• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                  • Type-option
                  • Name+type
                  • Type-option-set-result
                  • Type-option-result
                  • Type-map-result
                  • Type-list-result
                  • Name+type-result
                  • Type-result
                  • Type-identifiers
                  • Type-primitivep
                  • Type-arithmeticp
                  • Type-namedp
                  • Type-integerp
                  • Type-map
                    • Type-mapp
                      • Type-map-fix
                      • Type-map-equiv
                    • Type-option-set
                    • Type/typelist
                  • Struct-init
                  • Branch
                  • Statements
                  • Format-strings
                  • Input-syntax-abstraction
                  • Expressions
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Type-map

    Type-mapp

    Recognizer for type-map.

    Signature
    (type-mapp x) → *

    Definitions and Theorems

    Function: type-mapp

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

    Theorem: booleanp-of-type-mapp

    (defthm booleanp-of-type-mapp
      (booleanp (type-mapp x)))

    Theorem: mapp-when-type-mapp

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

    Theorem: type-mapp-of-tail

    (defthm type-mapp-of-tail
      (implies (type-mapp x)
               (type-mapp (omap::tail x))))

    Theorem: identifierp-of-head-key-when-type-mapp

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

    Theorem: typep-of-head-val-when-type-mapp

    (defthm typep-of-head-val-when-type-mapp
      (implies (and (type-mapp x)
                    (not (omap::emptyp x)))
               (typep (mv-nth 1 (omap::head x)))))

    Theorem: type-mapp-of-update

    (defthm type-mapp-of-update
      (implies (and (type-mapp x)
                    (identifierp k)
                    (typep v))
               (type-mapp (omap::update k v x))))

    Theorem: type-mapp-of-update*

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

    Theorem: type-mapp-of-delete

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

    Theorem: type-mapp-of-delete*

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

    Theorem: identifierp-when-assoc-type-mapp-binds-free-x

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

    Theorem: identifierp-of-car-of-assoc-type-mapp

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

    Theorem: typep-of-cdr-of-assoc-type-mapp

    (defthm typep-of-cdr-of-assoc-type-mapp
      (implies (and (type-mapp x) (omap::assoc k x))
               (typep (cdr (omap::assoc k x)))))

    Theorem: typep-of-lookup-when-type-mapp

    (defthm typep-of-lookup-when-type-mapp
      (implies (and (type-mapp x) (omap::assoc k x))
               (typep (omap::lookup k x))))