• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
        • Maybe-stringp
        • Maybe-natp
        • Two-nats-measure
        • Impossible
        • Bytep
          • Byte
            • Byte-list
            • Byte-fix
            • Bytep-additional-theorems
          • Bytes-as-digits-in-base-256
          • Bytep-additional-theorems
        • Nat-list-measure
        • Maybe-posp
        • Nibblep
        • Organize-symbols-by-pkg
        • Organize-symbols-by-name
        • Lnfix
        • Good-valuep
        • Streqv
        • Chareqv
        • Symbol-package-name-non-cl
        • Arith-equivs
        • Induction-schemes
        • Maybe-integerp
        • Char-fix
        • Pos-fix
        • Symbol-package-name-lst
        • Mbt$
        • Maybe-bitp
        • Good-pseudo-termp
        • Str-fix
        • Maybe-string-fix
        • Nonkeyword-listp
        • Lifix
        • Bfix
        • Std/basic/if*
        • Impliez
        • Tuplep
        • Std/basic/intern-in-package-of-symbol
        • Lbfix
        • Std/basic/symbol-name-lst
        • True
        • Std/basic/rfix
        • Std/basic/realfix
        • Std/basic/member-symbol-name
        • Std/basic/fix
        • False
        • Std/basic/nfix
        • Std/basic/ifix
      • Std/system
      • Std/typed-lists
      • Std/bitsets
      • Std/testing
      • Std/typed-alists
      • Std/stobjs
    • Proof-automation
    • Macro-libraries
    • 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.