• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Bitcoin
        • Ethereum
          • Mmp-trees
          • Semaphore
          • Database
          • Cryptography
          • Rlp
            • Rlp-tree
              • Rlp-tree-case
              • Rlp-tree-equiv
                • Rlp-treep
                • Rlp-tree-leaf
                • Rlp-tree-branch
                • Rlp-tree-kind
                • Rlp-tree-list
                • Rlp-tree-fix
                • Rlp-tree-count
              • Rlp-decoding-executable
              • Rlp-decodability
              • Rlp-encoding
              • Rlp-decoding-declarative
              • Rlp-big-endian-representations
            • 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
    • Rlp-tree

    Rlp-tree-equiv

    Basic equivalence relation for rlp-tree structures.

    Definitions and Theorems

    Function: rlp-tree-equiv$inline

    (defun rlp-tree-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (rlp-treep acl2::x)
                                  (rlp-treep acl2::y))))
      (equal (rlp-tree-fix acl2::x)
             (rlp-tree-fix acl2::y)))

    Theorem: rlp-tree-equiv-is-an-equivalence

    (defthm rlp-tree-equiv-is-an-equivalence
      (and (booleanp (rlp-tree-equiv x y))
           (rlp-tree-equiv x x)
           (implies (rlp-tree-equiv x y)
                    (rlp-tree-equiv y x))
           (implies (and (rlp-tree-equiv x y)
                         (rlp-tree-equiv y z))
                    (rlp-tree-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: rlp-tree-equiv-implies-equal-rlp-tree-fix-1

    (defthm rlp-tree-equiv-implies-equal-rlp-tree-fix-1
      (implies (rlp-tree-equiv acl2::x x-equiv)
               (equal (rlp-tree-fix acl2::x)
                      (rlp-tree-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: rlp-tree-fix-under-rlp-tree-equiv

    (defthm rlp-tree-fix-under-rlp-tree-equiv
      (rlp-tree-equiv (rlp-tree-fix acl2::x)
                      acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-rlp-tree-fix-1-forward-to-rlp-tree-equiv

    (defthm equal-of-rlp-tree-fix-1-forward-to-rlp-tree-equiv
      (implies (equal (rlp-tree-fix acl2::x) acl2::y)
               (rlp-tree-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-rlp-tree-fix-2-forward-to-rlp-tree-equiv

    (defthm equal-of-rlp-tree-fix-2-forward-to-rlp-tree-equiv
      (implies (equal acl2::x (rlp-tree-fix acl2::y))
               (rlp-tree-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: rlp-tree-equiv-of-rlp-tree-fix-1-forward

    (defthm rlp-tree-equiv-of-rlp-tree-fix-1-forward
      (implies (rlp-tree-equiv (rlp-tree-fix acl2::x)
                               acl2::y)
               (rlp-tree-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: rlp-tree-equiv-of-rlp-tree-fix-2-forward

    (defthm rlp-tree-equiv-of-rlp-tree-fix-2-forward
      (implies (rlp-tree-equiv acl2::x (rlp-tree-fix acl2::y))
               (rlp-tree-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)