• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
          • Primitive-functions
          • Translated-terms
          • Values
          • Evaluation
          • Program-equivalence
          • Functions
          • Packages
          • Programs
            • Program
              • Program-fix
              • Program-equiv
              • Make-program
              • Programp
              • Program->packages
                • Program->functions
                • Change-program
              • Lift-program
            • Interpreter
            • Evaluation-states
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Program

    Program->packages

    Get the packages field from a program.

    Signature
    (program->packages x) → packages
    Arguments
    x — Guard (programp x).
    Returns
    packages — Type (package-listp packages).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: program->packages$inline

    (defun program->packages$inline (x)
      (declare (xargs :guard (programp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'program->packages))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (package-list-fix (std::da-nth 0 x)))
             :exec (std::da-nth 0 x))))

    Theorem: package-listp-of-program->packages

    (defthm package-listp-of-program->packages
      (b* ((packages (program->packages$inline x)))
        (package-listp packages))
      :rule-classes :rewrite)

    Theorem: program->packages$inline-of-program-fix-x

    (defthm program->packages$inline-of-program-fix-x
      (equal (program->packages$inline (program-fix x))
             (program->packages$inline x)))

    Theorem: program->packages$inline-program-equiv-congruence-on-x

    (defthm program->packages$inline-program-equiv-congruence-on-x
      (implies (program-equiv x x-equiv)
               (equal (program->packages$inline x)
                      (program->packages$inline x-equiv)))
      :rule-classes :congruence)