• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • 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
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)