• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
        • Evaluation
        • Program-equivalence
        • Functions
        • Packages
          • Lift-package-list
          • Import-lookup
          • Package-option
          • Package-lookup
          • Package
          • Lift-package
            • Package-list
          • Programs
          • Interpreter
          • Evaluation-states
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Packages

    Lift-package

    Lift a package from the current ACL2 environment to the meta level.

    Signature
    (lift-package name) → package
    Arguments
    name — Guard (stringp name).
    Returns
    package — Type (packagep package).

    This must be used only on package names that are currently known. Otherwise, pkg-imports will cause an error.

    We retrieve the imports of the package (a list of symbols), we lift them to the meta level, and we construct a package with the given name and lifted imports.

    Definitions and Theorems

    Function: lift-package

    (defun lift-package (name)
      (declare (xargs :guard (stringp name)))
      (let ((__function__ 'lift-package))
        (declare (ignorable __function__))
        (b* ((imports (pkg-imports name)))
          (make-package :name name
                        :imports (lift-symbol-list imports)))))

    Theorem: packagep-of-lift-package

    (defthm packagep-of-lift-package
      (b* ((package (lift-package name)))
        (packagep package))
      :rule-classes :rewrite)