• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
          • Correctness
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
                • Max-faulty-for-total
                • Bonded-committee-at-round
                • Committee-members-stake
                • Active-committee-at-round
                • Update-committee-with-transaction
                • Committee-quorum-stake
                • Lookback
                • Committee-option
                • Update-committee-with-transaction-list
                • Committee-after-blocks
                • Same-bonded-committees-p
                • Same-active-committees-p
                • Committee
                • Committee-member-stake
                • Committee-total-stake
                • Committee-max-faulty-stake
                • Committee-nonemptyp
                • Committee-members
                • Address-pos-map
                  • Address-pos-map-fix
                  • Address-pos-mapp
                    • Address-pos-map-equiv
                  • Genesis-committee
                • System-states
                • Certificates
                • Messages
                • Transactions
                • Proposals
                • Validator-states
                • Blocks
                • Addresses
              • Events
              • Reachability
            • Library-extensions
          • Aleovm
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Address-pos-map

    Address-pos-mapp

    Recognizer for address-pos-map.

    Signature
    (address-pos-mapp x) → *

    Definitions and Theorems

    Function: address-pos-mapp

    (defun address-pos-mapp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (addressp (caar x))
             (posp (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (address-pos-mapp (cdr x)))))))

    Theorem: booleanp-of-address-pos-mapp

    (defthm booleanp-of-address-pos-mapp
      (booleanp (address-pos-mapp x)))

    Theorem: mapp-when-address-pos-mapp

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

    Theorem: address-pos-mapp-of-tail

    (defthm address-pos-mapp-of-tail
      (implies (address-pos-mapp x)
               (address-pos-mapp (omap::tail x))))

    Theorem: addressp-of-head-key-when-address-pos-mapp

    (defthm addressp-of-head-key-when-address-pos-mapp
      (implies (and (address-pos-mapp x)
                    (not (omap::emptyp x)))
               (addressp (mv-nth 0 (omap::head x)))))

    Theorem: posp-of-head-val-when-address-pos-mapp

    (defthm posp-of-head-val-when-address-pos-mapp
      (implies (and (address-pos-mapp x)
                    (not (omap::emptyp x)))
               (posp (mv-nth 1 (omap::head x)))))

    Theorem: address-pos-mapp-of-update

    (defthm address-pos-mapp-of-update
      (implies (and (address-pos-mapp x)
                    (addressp k)
                    (posp v))
               (address-pos-mapp (omap::update k v x))))

    Theorem: address-pos-mapp-of-update*

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

    Theorem: address-pos-mapp-of-delete

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

    Theorem: address-pos-mapp-of-delete*

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

    Theorem: addressp-when-assoc-address-pos-mapp-binds-free-x

    (defthm addressp-when-assoc-address-pos-mapp-binds-free-x
      (implies (and (omap::assoc k x)
                    (address-pos-mapp x))
               (addressp k)))

    Theorem: addressp-of-car-of-assoc-address-pos-mapp

    (defthm addressp-of-car-of-assoc-address-pos-mapp
      (implies (and (address-pos-mapp x)
                    (omap::assoc k x))
               (addressp (car (omap::assoc k x)))))

    Theorem: posp-of-cdr-of-assoc-address-pos-mapp

    (defthm posp-of-cdr-of-assoc-address-pos-mapp
      (implies (and (address-pos-mapp x)
                    (omap::assoc k x))
               (posp (cdr (omap::assoc k x)))))

    Theorem: posp-of-lookup-when-address-pos-mapp

    (defthm posp-of-lookup-when-address-pos-mapp
      (implies (and (address-pos-mapp x)
                    (omap::assoc k x))
               (posp (omap::lookup k x))))