• 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
            • Function
              • Function-fix
              • Function-equiv
              • Make-function
              • Function->params
              • Change-function
              • Function->name
              • Function->body
              • Functionp
              • Function-lookup
              • Function-option
              • Lift-function
              • Lift-function-list
              • Function-set
            • Packages
            • 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
    • Function

    Functionp

    Recognizer for function structures.

    Signature
    (functionp x) → *

    Definitions and Theorems

    Function: functionp

    (defun functionp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'functionp))
        (declare (ignorable __function__))
        (and (true-listp x)
             (eql (len x) 3)
             (b* ((name (std::da-nth 0 x))
                  (params (std::da-nth 1 x))
                  (body (std::da-nth 2 x)))
               (and (symbol-valuep name)
                    (symbol-value-listp params)
                    (ttermp body))))))

    Theorem: consp-when-functionp

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