• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
          • Defbyte
          • Defresult
          • Defsubtype
          • Pos-list
          • Defflatsum
          • Deflist-of-len
          • Defbytelist
          • Defset
          • Specific-types
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defomap
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Byte
            • Byte-list
            • Byte-fix
            • Bytep-additional-theorems
          • Nibble
          • Pos-option
          • Nat-option
          • Byte-list20
          • String-option
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Character-list
          • Natoption/natoptionlist
          • Nati
          • Maybe-string
          • Nat/natlist
          • Nibble-list
          • Natoption/natoptionlist-result
          • Set
          • Nat/natlist-result
          • Nat-option-list-result
          • 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
          • Pseudo-event-form-list
          • Nat-option-list
          • Nat-set
          • Bit-list
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
        • Syntheto
        • Number-theory
        • Cryptography
        • Lists-light
        • File-io-light
        • Json
        • Built-ins
        • Solidity
        • Axe
        • Std-extensions
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Execloader
      • Axe
    • Testing-utilities
    • Math
  • 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.