• 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
            • Lift-package-list
            • Import-lookup
            • Package-option
            • Package-lookup
            • Package
              • Package-fix
              • Package-equiv
              • Make-package
              • Package->imports
              • Change-package
              • Package->name
              • Packagep
              • Lift-package
              • Package-list
            • Programs
            • 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
    • Package

    Packagep

    Recognizer for package structures.

    Signature
    (packagep x) → *

    Definitions and Theorems

    Function: packagep

    (defun packagep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'packagep))
        (declare (ignorable __function__))
        (and (true-listp x)
             (eql (len x) 2)
             (b* ((name (std::da-nth 0 x))
                  (imports (std::da-nth 1 x)))
               (and (stringp name)
                    (symbol-value-listp imports))))))

    Theorem: consp-when-packagep

    (defthm consp-when-packagep
      (implies (packagep x) (consp x))
      :rule-classes :compound-recognizer)