• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Defresult
        • Deffixequiv
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Specific-types
        • 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
            • Defsubtype
            • Deftypes
            • Defset
            • Defflatsum
            • Deflist-of-len
            • Defomap
            • Defbytelist
            • Fty::basetypes
            • Defvisitors
            • Deffixtype-alias
            • Deffixequiv-sk
            • Defunit
            • Multicase
            • Deffixequiv-mutual
            • Fty::baselists
            • Def-enumcase
            • Defmap
          • Apt
          • Std/util
          • Defdata
          • Defrstobj
          • Seq
          • Match-tree
          • Defrstobj
          • With-supporters
          • Def-partial-measure
          • Template-subst
          • Soft
          • Defthm-domain
          • Event-macros
          • Def-universal-equiv
          • Def-saved-obligs
          • With-supporters-after
          • Definec
          • Sig
          • Outer-local
          • Data-structures
        • ACL2
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • 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)