• 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
        • Mmp-trees
          • Mmp-encode-n/c
          • Mmp-encode-c-max
          • Mmp-encode
          • Mmp-write
          • Mmp-decode
          • Mmp-encode-u-map
          • Nibblelist-bytelist-map-sup-len-key
          • Mmp-encode-c-forall
          • Mmp-read
          • Mmp-encoding-p
          • Bytelist-to-nibblelist-keys
          • Mmp-encode-c-exists
          • Bytelist-bytelist-map
          • Nibblelist-bytelist-map
            • Nibblelist-bytelist-mfix
            • Nibblelist-bytelist-mapp
              • Nibblelist-bytelist-mequiv
          • Semaphore
          • Database
          • Cryptography
          • Rlp
          • Transactions
          • Hex-prefix
          • Basics
          • Addresses
        • 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
        • 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
    • Nibblelist-bytelist-map

    Nibblelist-bytelist-mapp

    Recognizer for nibblelist-bytelist-map.

    Signature
    (nibblelist-bytelist-mapp x) → *

    Definitions and Theorems

    Function: nibblelist-bytelist-mapp

    (defun nibblelist-bytelist-mapp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (nibble-listp (caar x))
             (byte-listp (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (nibblelist-bytelist-mapp (cdr x)))))))

    Theorem: booleanp-of-nibblelist-bytelist-mapp

    (defthm booleanp-of-nibblelist-bytelist-mapp
      (booleanp (nibblelist-bytelist-mapp x)))

    Theorem: mapp-when-nibblelist-bytelist-mapp

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

    Theorem: nibblelist-bytelist-mapp-of-tail

    (defthm nibblelist-bytelist-mapp-of-tail
      (implies (nibblelist-bytelist-mapp x)
               (nibblelist-bytelist-mapp (omap::tail x))))

    Theorem: nibble-listp-of-head-key-when-nibblelist-bytelist-mapp

    (defthm nibble-listp-of-head-key-when-nibblelist-bytelist-mapp
      (implies (and (nibblelist-bytelist-mapp x)
                    (not (omap::emptyp x)))
               (nibble-listp (mv-nth 0 (omap::head x)))))

    Theorem: byte-listp-of-head-val-when-nibblelist-bytelist-mapp

    (defthm byte-listp-of-head-val-when-nibblelist-bytelist-mapp
      (implies (and (nibblelist-bytelist-mapp x)
                    (not (omap::emptyp x)))
               (byte-listp (mv-nth 1 (omap::head x)))))

    Theorem: nibblelist-bytelist-mapp-of-update

    (defthm nibblelist-bytelist-mapp-of-update
      (implies (and (nibblelist-bytelist-mapp x)
                    (nibble-listp k)
                    (byte-listp v))
               (nibblelist-bytelist-mapp (omap::update k v x))))

    Theorem: nibblelist-bytelist-mapp-of-update*

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

    Theorem: nibblelist-bytelist-mapp-of-delete

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

    Theorem: nibblelist-bytelist-mapp-of-delete*

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

    Theorem: nibble-listp-when-assoc-nibblelist-bytelist-mapp-binds-free-x

    (defthm
          nibble-listp-when-assoc-nibblelist-bytelist-mapp-binds-free-x
      (implies (and (omap::assoc k x)
                    (nibblelist-bytelist-mapp x))
               (nibble-listp k)))

    Theorem: nibble-listp-of-car-of-assoc-nibblelist-bytelist-mapp

    (defthm nibble-listp-of-car-of-assoc-nibblelist-bytelist-mapp
      (implies (and (nibblelist-bytelist-mapp x)
                    (omap::assoc k x))
               (nibble-listp (car (omap::assoc k x)))))

    Theorem: byte-listp-of-cdr-of-assoc-nibblelist-bytelist-mapp

    (defthm byte-listp-of-cdr-of-assoc-nibblelist-bytelist-mapp
      (implies (and (nibblelist-bytelist-mapp x)
                    (omap::assoc k x))
               (byte-listp (cdr (omap::assoc k x)))))

    Theorem: byte-listp-of-lookup-when-nibblelist-bytelist-mapp

    (defthm byte-listp-of-lookup-when-nibblelist-bytelist-mapp
      (implies (and (nibblelist-bytelist-mapp x)
                    (omap::assoc k x))
               (byte-listp (omap::lookup k x))))