• 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
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                • Input-syntax-abstraction
                • Expressions
                • Output-files
                • Addresses
                • Literals
                • Characters
                • Expression-list
                • Statement-list
                • Output-syntax-abstraction
                • Struct-init-list
                • Branch-list
                • Annotations
                • Abstract-syntax-trees
                • Symbols
                • Keywords
                • Programs
                  • Program
                    • Program-fix
                    • Program-equiv
                    • Make-program
                    • Program->package
                      • Change-program
                      • Programp
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Program

    Program->package

    Get the package field from a program.

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

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

    Definitions and Theorems

    Function: program->package$inline

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

    Theorem: packagep-of-program->package

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

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

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

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

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