• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • 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
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Packages

    Lift-package-list

    Lift a list of packages (specified by name) from the current ACL2 environment to the meta level, in the same order.

    Signature
    (lift-package-list x) → packages
    Returns
    packages — Type (package-listp packages).

    This is an ordinary std::defprojection.

    Definitions and Theorems

    Function: lift-package-list-exec

    (defun
     lift-package-list-exec (x acc)
     (declare (xargs :guard (string-listp x)))
     (let ((__function__ 'lift-package-list-exec))
          (declare (ignorable __function__))
          (if (consp x)
              (lift-package-list-exec (cdr x)
                                      (cons (lift-package (car x)) acc))
              acc)))

    Function: lift-package-list-nrev

    (defun
      lift-package-list-nrev (x acl2::nrev)
      (declare (xargs :stobjs (acl2::nrev)))
      (declare (xargs :guard (string-listp x)))
      (let ((__function__ 'lift-package-list-nrev))
           (declare (ignorable __function__))
           (if (atom x)
               (acl2::nrev-fix acl2::nrev)
               (let ((acl2::nrev (acl2::nrev-push (lift-package (car x))
                                                  acl2::nrev)))
                    (lift-package-list-nrev (cdr x)
                                            acl2::nrev)))))

    Function: lift-package-list

    (defun
     lift-package-list (x)
     (declare (xargs :guard (string-listp x)))
     (let ((__function__ 'lift-package-list))
          (declare (ignorable __function__))
          (mbe :logic (if (consp x)
                          (cons (lift-package (car x))
                                (lift-package-list (cdr x)))
                          nil)
               :exec (if (atom x)
                         nil
                         (acl2::with-local-nrev
                              (lift-package-list-nrev x acl2::nrev))))))

    Theorem: package-listp-of-lift-package-list

    (defthm package-listp-of-lift-package-list
            (b* ((packages (lift-package-list x)))
                (package-listp packages))
            :rule-classes :rewrite)

    Theorem: lift-package-list-nrev-removal

    (defthm lift-package-list-nrev-removal
            (equal (lift-package-list-nrev acl2::x acl2::nrev)
                   (append acl2::nrev (lift-package-list acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-exec-removal

    (defthm lift-package-list-exec-removal
            (equal (lift-package-list-exec acl2::x acl2::acc)
                   (revappend (lift-package-list acl2::x)
                              acl2::acc))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-of-rev

    (defthm lift-package-list-of-rev
            (equal (lift-package-list (rev acl2::x))
                   (rev (lift-package-list acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-of-list-fix

    (defthm lift-package-list-of-list-fix
            (equal (lift-package-list (list-fix acl2::x))
                   (lift-package-list acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-of-append

    (defthm lift-package-list-of-append
            (equal (lift-package-list (append acl2::a acl2::b))
                   (append (lift-package-list acl2::a)
                           (lift-package-list acl2::b)))
            :rule-classes ((:rewrite)))

    Theorem: cdr-of-lift-package-list

    (defthm cdr-of-lift-package-list
            (equal (cdr (lift-package-list acl2::x))
                   (lift-package-list (cdr acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: car-of-lift-package-list

    (defthm car-of-lift-package-list
            (equal (car (lift-package-list acl2::x))
                   (and (consp acl2::x)
                        (lift-package (car acl2::x))))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-under-iff

    (defthm lift-package-list-under-iff
            (iff (lift-package-list acl2::x)
                 (consp acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: consp-of-lift-package-list

    (defthm consp-of-lift-package-list
            (equal (consp (lift-package-list acl2::x))
                   (consp acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: len-of-lift-package-list

    (defthm len-of-lift-package-list
            (equal (len (lift-package-list acl2::x))
                   (len acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: true-listp-of-lift-package-list

    (defthm true-listp-of-lift-package-list
            (true-listp (lift-package-list acl2::x))
            :rule-classes :type-prescription)

    Theorem: lift-package-list-when-not-consp

    (defthm lift-package-list-when-not-consp
            (implies (not (consp acl2::x))
                     (equal (lift-package-list acl2::x) nil))
            :rule-classes ((:rewrite)))

    Theorem: lift-package-list-of-cons

    (defthm lift-package-list-of-cons
            (equal (lift-package-list (cons acl2::a acl2::b))
                   (cons (lift-package acl2::a)
                         (lift-package-list acl2::b)))
            :rule-classes ((:rewrite)))