• 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
          • Programs
          • Interpreter
          • Evaluation-states
            • Eval-state
            • Frame
            • Binding
              • Binding-fix
              • Bindingp
                • Binding-equiv
              • Stack
          • 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
    • Binding

    Bindingp

    Recognizer for binding.

    Signature
    (bindingp x) → *

    Definitions and Theorems

    Function: bindingp

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

    Theorem: booleanp-of-bindingp

    (defthm booleanp-of-bindingp
      (booleanp (bindingp x)))

    Theorem: mapp-when-bindingp

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

    Theorem: bindingp-of-tail

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

    Theorem: symbol-valuep-of-head-key-when-bindingp

    (defthm symbol-valuep-of-head-key-when-bindingp
      (implies (and (bindingp x)
                    (not (omap::emptyp x)))
               (symbol-valuep (mv-nth 0 (omap::head x)))))

    Theorem: valuep-of-head-val-when-bindingp

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

    Theorem: bindingp-of-update

    (defthm bindingp-of-update
      (implies (and (bindingp x)
                    (symbol-valuep k)
                    (valuep v))
               (bindingp (omap::update k v x))))

    Theorem: bindingp-of-update*

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

    Theorem: bindingp-of-delete

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

    Theorem: bindingp-of-delete*

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

    Theorem: symbol-valuep-when-assoc-bindingp-binds-free-x

    (defthm symbol-valuep-when-assoc-bindingp-binds-free-x
      (implies (and (omap::assoc k x) (bindingp x))
               (symbol-valuep k)))

    Theorem: symbol-valuep-of-car-of-assoc-bindingp

    (defthm symbol-valuep-of-car-of-assoc-bindingp
      (implies (and (bindingp x) (omap::assoc k x))
               (symbol-valuep (car (omap::assoc k x)))))

    Theorem: valuep-of-cdr-of-assoc-bindingp

    (defthm valuep-of-cdr-of-assoc-bindingp
      (implies (and (bindingp x) (omap::assoc k x))
               (valuep (cdr (omap::assoc k x)))))

    Theorem: valuep-of-lookup-when-bindingp

    (defthm valuep-of-lookup-when-bindingp
      (implies (and (bindingp x) (omap::assoc k x))
               (valuep (omap::lookup k x))))