• 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
          • Defbyte
          • Defresult
          • Fold
          • Specific-types
          • Defsubtype
          • Defset
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defomap
          • Defbytelist
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
            • Byte-listp
            • Byte-list-fix
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Byte-list-equiv
            • Database
            • Byte
              • Byte-list
                • Byte-listp
                • Byte-list-fix
                • Byte-list20
                • Byte-list32
                • Byte-list64
                • Byte-list-equiv
                • Byte-fix
                • Bytep-additional-theorems
              • String-option
              • Pos-option
              • Nibble
              • Nat-option
              • Ubyte32-option
              • Byte-list20
              • Byte-list32
              • Byte-list64
              • Pseudo-event-form
              • Natoption/natoptionlist
              • Nati
              • Character-list
              • Nat/natlist
              • Maybe-string
              • Nibble-list
              • Natoption/natoptionlist-result
              • Nat/natlist-result
              • Nat-option-list-result
              • Set
              • String-result
              • String-list-result
              • Nat-result
              • Nat-option-result
              • Nat-list-result
              • Maybe-string-result
              • Integer-result
              • Character-result
              • Character-list-result
              • Boolean-result
              • Map
              • Dependencies
              • Bag
              • Pos-set
              • Hex-digit-char-list
              • Dec-digit-char-list
              • Pseudo-event-form-list
              • Nat-option-list
              • Character-any-map
              • Any-nat-map
              • Symbol-set
              • String-set
              • Nat-set
              • Character-set
              • Oct-digit-char-list
              • Bin-digit-char-list
              • Bit-list
            • Isar
            • Kestrel-utilities
            • Set
            • C
            • Soft
            • Bv
            • Imp-language
            • Ethereum
            • Event-macros
            • Java
            • Riscv
            • Bitcoin
            • Zcash
            • Yul
            • ACL2-programming-language
            • Prime-fields
            • Json
            • Syntheto
            • File-io-light
            • Cryptography
            • Number-theory
            • Axe
            • Lists-light
            • Builtins
            • Solidity
            • Helpers
            • Htclient
            • Typed-lists-light
            • Arithmetic-light
          • X86isa
          • Axe
          • Execloader
        • Math
        • Testing-utilities
      • Byte-list

      Byte-list-equiv

      Basic equivalence relation for byte-list structures.

      Definitions and Theorems

      Function: byte-list-equiv$inline

      (defun byte-list-equiv$inline (x y)
        (declare (xargs :guard (and (byte-listp x) (byte-listp y))))
        (equal (byte-list-fix x)
               (byte-list-fix y)))

      Theorem: byte-list-equiv-is-an-equivalence

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

      Theorem: byte-list-equiv-implies-equal-byte-list-fix-1

      (defthm byte-list-equiv-implies-equal-byte-list-fix-1
        (implies (byte-list-equiv x x-equiv)
                 (equal (byte-list-fix x)
                        (byte-list-fix x-equiv)))
        :rule-classes (:congruence))

      Theorem: byte-list-fix-under-byte-list-equiv

      (defthm byte-list-fix-under-byte-list-equiv
        (byte-list-equiv (byte-list-fix x) x)
        :rule-classes (:rewrite :rewrite-quoted-constant))

      Theorem: equal-of-byte-list-fix-1-forward-to-byte-list-equiv

      (defthm equal-of-byte-list-fix-1-forward-to-byte-list-equiv
        (implies (equal (byte-list-fix x) y)
                 (byte-list-equiv x y))
        :rule-classes :forward-chaining)

      Theorem: equal-of-byte-list-fix-2-forward-to-byte-list-equiv

      (defthm equal-of-byte-list-fix-2-forward-to-byte-list-equiv
        (implies (equal x (byte-list-fix y))
                 (byte-list-equiv x y))
        :rule-classes :forward-chaining)

      Theorem: byte-list-equiv-of-byte-list-fix-1-forward

      (defthm byte-list-equiv-of-byte-list-fix-1-forward
        (implies (byte-list-equiv (byte-list-fix x) y)
                 (byte-list-equiv x y))
        :rule-classes :forward-chaining)

      Theorem: byte-list-equiv-of-byte-list-fix-2-forward

      (defthm byte-list-equiv-of-byte-list-fix-2-forward
        (implies (byte-list-equiv x (byte-list-fix y))
                 (byte-list-equiv x y))
        :rule-classes :forward-chaining)