• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Deffixequiv
        • Defresult
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Defsubtype
          • Defset
          • Specific-types
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defbytelist
          • Defomap
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Byte
            • Byte-list
            • Byte-fix
            • Bytep-additional-theorems
          • Database
          • Pos-option
          • Nibble
          • Nat-option
          • String-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
          • Bag
          • Pos-set
          • Hex-digit-char-list
          • Dec-digit-char-list
          • Pseudo-event-form-list
          • Nat-option-list
          • Symbol-set
          • String-set
          • Nat-set
          • Oct-digit-char-list
          • Bin-digit-char-list
          • Bit-list
        • Defsubtype
        • Defset
        • Deftypes
        • Specific-types
        • Defflatsum
        • Deflist-of-len
        • Defbytelist
        • Fty::basetypes
        • Defomap
        • 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
  • Fty-extensions
  • Specific-types
  • Bytep

Byte

A fixtype of (unsigned 8-bit) bytes.

We use fty::defbyte to generate this fixtype, along with the recognizer, fixer, and equivalence. The recognizer is identical to bytep.

Definitions and Theorems

Function: byte-equiv$inline

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

Theorem: byte-equiv-is-an-equivalence

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

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

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

Theorem: byte-fix-under-byte-equiv

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

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

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

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

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

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

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

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

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

Subtopics

Byte-list
A fixtype of true lists of (unsigned 8-bit) bytes.
Byte-fix
Fixer for byte.
Bytep-additional-theorems
Additional theorems about byte.