• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Specific-types
            • Pos-list
            • Defbyte-standard-instances
            • Defbytelist-standard-instances
            • Byte-list
            • Byte
            • String-option
            • Pos-option
            • Nibble
            • Nat-option
            • Ubyte32-option
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Pseudo-event-form
            • Natoption/natoptionlist
            • Nati
            • Character-list
            • Nat/natlist
            • Maybe-string
            • Nibble-list
            • Natoption/natoptionlist-result
            • Nat/natlist-result
            • Nat-option-list-result
            • Set
            • String-result
            • String-list-result
            • Nat-result
            • Nat-option-result
            • Nat-list-result
            • Maybe-string-result
            • Integer-result
            • Character-result
            • Character-list-result
            • Boolean-result
            • Map
            • Bag
            • Pos-set
            • Hex-digit-char-list
            • Dec-digit-char-list
            • Pseudo-event-form-list
            • Nat-option-list
            • Character-any-map
              • Character-any-mfix
              • Character-any-mapp
                • Character-any-mequiv
              • Any-nat-map
              • Symbol-set
              • String-set
              • Nat-set
              • Character-set
              • Oct-digit-char-list
              • Bin-digit-char-list
              • Bit-list
            • Defsubtype
            • Defset
            • Defflatsum
            • Deflist-of-len
            • Pos-list
            • Defomap
            • Defbytelist
            • Defbyte-standard-instances
            • Deffixtype-alias
            • Defbytelist-standard-instances
            • Defunit
            • Byte-list
            • Database
            • Byte
            • String-option
            • Pos-option
            • Nibble
            • Nat-option
            • Ubyte32-option
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Pseudo-event-form
            • Natoption/natoptionlist
            • Nati
            • Character-list
            • Nat/natlist
            • Maybe-string
            • Nibble-list
            • Natoption/natoptionlist-result
            • Nat/natlist-result
            • Nat-option-list-result
            • Set
            • String-result
            • String-list-result
            • Nat-result
            • Nat-option-result
            • Nat-list-result
            • Maybe-string-result
            • Integer-result
            • Character-result
            • Character-list-result
            • Boolean-result
            • Map
            • Dependencies
            • Bag
            • Pos-set
            • Hex-digit-char-list
            • Dec-digit-char-list
            • Pseudo-event-form-list
            • Nat-option-list
            • Character-any-map
              • Character-any-mfix
              • Character-any-mapp
                • Character-any-mequiv
              • Any-nat-map
              • Symbol-set
              • String-set
              • Nat-set
              • Character-set
              • Oct-digit-char-list
              • Bin-digit-char-list
              • Bit-list
            • Isar
            • Kestrel-utilities
            • Set
            • C
            • Soft
            • Bv
            • Imp-language
            • Ethereum
            • Event-macros
            • Java
            • Riscv
            • Bitcoin
            • Zcash
            • Yul
            • ACL2-programming-language
            • Prime-fields
            • Json
            • Syntheto
            • File-io-light
            • Cryptography
            • Number-theory
            • Axe
            • Lists-light
            • Builtins
            • Solidity
            • Helpers
            • Htclient
            • Typed-lists-light
            • Arithmetic-light
          • X86isa
          • Axe
          • Execloader
        • Math
        • Testing-utilities
      • Character-any-map

      Character-any-mapp

      Recognizer for character-any-map.

      Signature
      (character-any-mapp x) → *

      Definitions and Theorems

      Function: character-any-mapp

      (defun character-any-mapp (x)
        (declare (xargs :guard t))
        (if (atom x)
            (null x)
          (and (consp (car x))
               (characterp (caar x))
               (any-p (cdar x))
               (or (null (cdr x))
                   (and (consp (cdr x))
                        (consp (cadr x))
                        (fast-<< (caar x) (caadr x))
                        (character-any-mapp (cdr x)))))))

      Theorem: booleanp-of-character-any-mapp

      (defthm booleanp-of-character-any-mapp
        (booleanp (character-any-mapp x)))

      Theorem: mapp-when-character-any-mapp

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

      Theorem: character-any-mapp-of-tail

      (defthm character-any-mapp-of-tail
        (implies (character-any-mapp x)
                 (character-any-mapp (omap::tail x))))

      Theorem: characterp-of-head-key-when-character-any-mapp

      (defthm characterp-of-head-key-when-character-any-mapp
        (implies (and (character-any-mapp x)
                      (not (omap::emptyp x)))
                 (characterp (mv-nth 0 (omap::head x)))))

      Theorem: any-p-of-head-val-when-character-any-mapp

      (defthm any-p-of-head-val-when-character-any-mapp
        (implies (and (character-any-mapp x)
                      (not (omap::emptyp x)))
                 (any-p (mv-nth 1 (omap::head x)))))

      Theorem: character-any-mapp-of-update

      (defthm character-any-mapp-of-update
        (implies (and (character-any-mapp x)
                      (characterp k)
                      (any-p v))
                 (character-any-mapp (omap::update k v x))))

      Theorem: character-any-mapp-of-update*

      (defthm character-any-mapp-of-update*
        (implies (and (character-any-mapp x)
                      (character-any-mapp y))
                 (character-any-mapp (omap::update* x y))))

      Theorem: character-any-mapp-of-delete

      (defthm character-any-mapp-of-delete
        (implies (character-any-mapp x)
                 (character-any-mapp (omap::delete k x))))

      Theorem: character-any-mapp-of-delete*

      (defthm character-any-mapp-of-delete*
        (implies (character-any-mapp x)
                 (character-any-mapp (omap::delete* k x))))

      Theorem: characterp-when-assoc-character-any-mapp-binds-free-x

      (defthm characterp-when-assoc-character-any-mapp-binds-free-x
        (implies (and (omap::assoc k x)
                      (character-any-mapp x))
                 (characterp k)))

      Theorem: characterp-of-car-of-assoc-character-any-mapp

      (defthm characterp-of-car-of-assoc-character-any-mapp
        (implies (and (character-any-mapp x)
                      (omap::assoc k x))
                 (characterp (car (omap::assoc k x)))))

      Theorem: any-p-of-cdr-of-assoc-character-any-mapp

      (defthm any-p-of-cdr-of-assoc-character-any-mapp
        (implies (and (character-any-mapp x)
                      (omap::assoc k x))
                 (any-p (cdr (omap::assoc k x)))))

      Theorem: any-p-of-lookup-when-character-any-mapp

      (defthm any-p-of-lookup-when-character-any-mapp
        (implies (and (character-any-mapp x)
                      (omap::assoc k x))
                 (any-p (omap::lookup k x))))