• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
        • Z3-installation
        • Smt-hint
        • Tutorial
        • Status
        • Developer
          • Verified
            • Uninterpreted-fn-cp
            • Smt-hint-interface
              • Smtlink-hint
                • Smtlink-hint-p
                • Make-smtlink-hint
                • Func
                  • Func-fix
                  • Func-p
                    • Make-func
                    • Func-equiv
                    • Func->flattened-returns
                    • Func->flattened-formals
                    • Change-func
                    • Func->more-returns
                    • Func->expansion-depth
                    • Func->returns
                    • Func->formals
                    • Func->name
                    • Func->guard
                    • Func-list
                  • Smtlink-hint-fix
                  • Maybe-smtlink-hint
                  • Hint-pair
                  • Decl
                  • Binding
                  • Smtlink-hint-equiv
                  • Let-binding
                  • Change-smtlink-hint
                  • Smtlink-hint->expanded-clause-w/-hint
                  • Smtlink-hint->type-decl-list
                  • Smtlink-hint->fast-functions
                  • Smtlink-hint->expanded-g/type
                  • Smtlink-hint->smt-params
                  • Smtlink-hint->let-binding
                  • Smtlink-hint->hypotheses
                  • Smtlink-hint->fty-info
                  • Smtlink-hint->wrld-fn-len
                  • Smtlink-hint->symbols
                  • Smtlink-hint->smt-fname
                  • Smtlink-hint->smt-dir
                  • Smtlink-hint->smt-cnf
                  • Smtlink-hint->rm-file
                  • Smtlink-hint->main-hint
                  • Smtlink-hint->int-to-rat
                  • Smtlink-hint->functions
                  • Smtlink-hint->fty-types
                  • Smtlink-hint->custom-p
                  • Smtlink-hint->fty
                  • Smtlink-hint->abs
                • Smt-hint
                • Make-alist-fn-lst
                • True-list-fix
              • Function-expansion
              • Smt-config
              • Fty-support
              • Smt-computed-hints
              • Add-hypo-cp
              • Smt-hint-please
              • Type-extract-cp
              • Smt-extract
              • Smtlink-process-user-hint
              • Smt-basics
              • Smt-type-hyp
              • Smt-magic-fix
            • Trusted
        • 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
        • 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
    • Func

    Func-p

    Recognizer for func structures.

    Signature
    (func-p x) → *

    Definitions and Theorems

    Function: func-p

    (defun func-p (x)
     (declare (xargs :guard t))
     (let ((acl2::__function__ 'func-p))
      (declare (ignorable acl2::__function__))
      (and
       (mbe
        :logic (and (alistp x)
                    (equal (strip-cars x)
                           '(name formals guard
                                  returns more-returns expansion-depth
                                  flattened-formals flattened-returns)))
        :exec (fty::alist-with-carsp
                   x
                   '(name formals guard
                          returns more-returns expansion-depth
                          flattened-formals flattened-returns)))
       (b* ((name (cdr (std::da-nth 0 x)))
            (formals (cdr (std::da-nth 1 x)))
            (guard (cdr (std::da-nth 2 x)))
            (returns (cdr (std::da-nth 3 x)))
            (more-returns (cdr (std::da-nth 4 x)))
            (expansion-depth (cdr (std::da-nth 5 x)))
            (flattened-formals (cdr (std::da-nth 6 x)))
            (flattened-returns (cdr (std::da-nth 7 x))))
         (and (symbolp name)
              (decl-listp formals)
              (hint-pair-p guard)
              (decl-listp returns)
              (hint-pair-listp more-returns)
              (natp expansion-depth)
              (symbol-listp flattened-formals)
              (symbol-listp flattened-returns))))))

    Theorem: consp-when-func-p

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