• 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
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
              • Static-safety-checking
                • Check-safe-statements/blocks/cases/fundefs
                • Check-safe-expressions
                • Check-safe-fundef-list
                • Check-safe-variable-multi
                • Check-safe-variable-single
                • Check-safe-assign-multi
                • Check-safe-assign-single
                • Check-safe-path
                • Check-safe-extends-varset
                • Vars+modes
                • Add-vars
                • Add-var
                • Add-funtypes
                • Check-safe-literal
                • Funtype
                • Get-funtype
                • Check-var
                • Check-safe-top-block
                • Check-safe-path-list
                • Vars+modes-result
                • Funtype-result
                • Funtable-result
                • Funtable-for-fundefs
                • Funtype-for-fundef
                • Funtable
                  • Funtablep
                    • Funtable-fix
                    • Funtable-equiv
                • Static-shadowing-checking
                • Mode-set-result
                • Literal-evaluation
                • Static-identifier-checking
                • Static-safety-checking-evm
                • Mode-set
                • Modes
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • 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
    • Funtable

    Funtablep

    Recognizer for funtable.

    Signature
    (funtablep x) → *

    Definitions and Theorems

    Function: funtablep

    (defun funtablep (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (identifierp (caar x))
             (funtypep (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (funtablep (cdr x)))))))

    Theorem: booleanp-of-funtablep

    (defthm booleanp-of-funtablep
      (booleanp (funtablep x)))

    Theorem: mapp-when-funtablep

    (defthm mapp-when-funtablep
      (implies (funtablep x) (omap::mapp x))
      :rule-classes (:rewrite :forward-chaining))

    Theorem: funtablep-of-tail

    (defthm funtablep-of-tail
      (implies (funtablep x)
               (funtablep (omap::tail x))))

    Theorem: identifierp-of-head-key-when-funtablep

    (defthm identifierp-of-head-key-when-funtablep
      (implies (and (funtablep x)
                    (not (omap::emptyp x)))
               (identifierp (mv-nth 0 (omap::head x)))))

    Theorem: funtypep-of-head-val-when-funtablep

    (defthm funtypep-of-head-val-when-funtablep
      (implies (and (funtablep x)
                    (not (omap::emptyp x)))
               (funtypep (mv-nth 1 (omap::head x)))))

    Theorem: funtablep-of-update

    (defthm funtablep-of-update
      (implies (and (funtablep x)
                    (identifierp k)
                    (funtypep v))
               (funtablep (omap::update k v x))))

    Theorem: funtablep-of-update*

    (defthm funtablep-of-update*
      (implies (and (funtablep x) (funtablep y))
               (funtablep (omap::update* x y))))

    Theorem: funtablep-of-delete

    (defthm funtablep-of-delete
      (implies (funtablep x)
               (funtablep (omap::delete k x))))

    Theorem: funtablep-of-delete*

    (defthm funtablep-of-delete*
      (implies (funtablep x)
               (funtablep (omap::delete* k x))))

    Theorem: identifierp-when-assoc-funtablep-binds-free-x

    (defthm identifierp-when-assoc-funtablep-binds-free-x
      (implies (and (omap::assoc k x) (funtablep x))
               (identifierp k)))

    Theorem: identifierp-of-car-of-assoc-funtablep

    (defthm identifierp-of-car-of-assoc-funtablep
      (implies (and (funtablep x) (omap::assoc k x))
               (identifierp (car (omap::assoc k x)))))

    Theorem: funtypep-of-cdr-of-assoc-funtablep

    (defthm funtypep-of-cdr-of-assoc-funtablep
      (implies (and (funtablep x) (omap::assoc k x))
               (funtypep (cdr (omap::assoc k x)))))

    Theorem: funtypep-of-lookup-when-funtablep

    (defthm funtypep-of-lookup-when-funtablep
      (implies (and (funtablep x) (omap::assoc k x))
               (funtypep (omap::lookup k x))))