• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
        • Mmp-trees
        • Semaphore
        • Database
        • Cryptography
        • Rlp
          • Rlp-tree
          • Rlp-decoding-executable
            • Rlp-error
              • Rlp-error-fix
              • Rlp-error-p
              • Rlp-error-case
              • Rlp-error-equiv
                • Rlp-error-count
                • Rlp-error-fewer-bytes-than-short-length
                • Rlp-error-fewer-bytes-than-long-length
                • Rlp-error-fewer-bytes-than-length-of-length
                • Rlp-error-kind
                • Rlp-error-subtree
                • Rlp-error-non-optimal-short-length
                • Rlp-error-non-optimal-long-length
                • Rlp-error-leading-zeros-in-scalar
                • Rlp-error-leading-zeros-in-long-length
                • Rlp-error-extra-bytes
                • Rlp-error-branch-tree
                • Rlp-error-no-bytes
              • Rlp-parse-tree
              • Rlp-decodex-tree
              • Maybe-rlp-error
              • Rlp-decodex-bytes
              • Rlp-decodex-scalar
            • Rlp-decodability
            • Rlp-encoding
            • Rlp-decoding-declarative
            • Rlp-big-endian-representations
          • Transactions
          • Hex-prefix
          • Basics
          • Addresses
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Rlp-error

    Rlp-error-equiv

    Basic equivalence relation for rlp-error structures.

    Definitions and Theorems

    Function: rlp-error-equiv$inline

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

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

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

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

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

    Theorem: rlp-error-fix-under-rlp-error-equiv

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

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

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

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

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

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

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

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

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