• 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
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • 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
          • Yul
          • Zcash
          • ACL2-programming-language
          • 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
    • Nibblelist-bytelist-map

    Nibblelist-bytelist-mequiv

    Basic equivalence relation for nibblelist-bytelist-map structures.

    Definitions and Theorems

    Function: nibblelist-bytelist-mequiv$inline

    (defun nibblelist-bytelist-mequiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (nibblelist-bytelist-mapp acl2::x)
                                  (nibblelist-bytelist-mapp acl2::y))))
      (equal (nibblelist-bytelist-mfix acl2::x)
             (nibblelist-bytelist-mfix acl2::y)))

    Theorem: nibblelist-bytelist-mequiv-is-an-equivalence

    (defthm nibblelist-bytelist-mequiv-is-an-equivalence
      (and (booleanp (nibblelist-bytelist-mequiv x y))
           (nibblelist-bytelist-mequiv x x)
           (implies (nibblelist-bytelist-mequiv x y)
                    (nibblelist-bytelist-mequiv y x))
           (implies (and (nibblelist-bytelist-mequiv x y)
                         (nibblelist-bytelist-mequiv y z))
                    (nibblelist-bytelist-mequiv x z)))
      :rule-classes (:equivalence))

    Theorem: nibblelist-bytelist-mequiv-implies-equal-nibblelist-bytelist-mfix-1

    (defthm
     nibblelist-bytelist-mequiv-implies-equal-nibblelist-bytelist-mfix-1
     (implies (nibblelist-bytelist-mequiv acl2::x x-equiv)
              (equal (nibblelist-bytelist-mfix acl2::x)
                     (nibblelist-bytelist-mfix x-equiv)))
     :rule-classes (:congruence))

    Theorem: nibblelist-bytelist-mfix-under-nibblelist-bytelist-mequiv

    (defthm nibblelist-bytelist-mfix-under-nibblelist-bytelist-mequiv
      (nibblelist-bytelist-mequiv (nibblelist-bytelist-mfix acl2::x)
                                  acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-nibblelist-bytelist-mfix-1-forward-to-nibblelist-bytelist-mequiv

    (defthm
     equal-of-nibblelist-bytelist-mfix-1-forward-to-nibblelist-bytelist-mequiv
     (implies (equal (nibblelist-bytelist-mfix acl2::x)
                     acl2::y)
              (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: equal-of-nibblelist-bytelist-mfix-2-forward-to-nibblelist-bytelist-mequiv

    (defthm
     equal-of-nibblelist-bytelist-mfix-2-forward-to-nibblelist-bytelist-mequiv
     (implies (equal acl2::x
                     (nibblelist-bytelist-mfix acl2::y))
              (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-1-forward

    (defthm
       nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-1-forward
     (implies
          (nibblelist-bytelist-mequiv (nibblelist-bytelist-mfix acl2::x)
                                      acl2::y)
          (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-2-forward

    (defthm
       nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-2-forward
     (implies
         (nibblelist-bytelist-mequiv acl2::x
                                     (nibblelist-bytelist-mfix acl2::y))
         (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)