An 8-bit unsigned bitstruct type.
This is a bitstruct type introduced by defbitstruct, represented as a unsigned 8-bit integer.
This is an atomic/empty structure; it has no fields.
Function:
(defun 8bits-p (x) (declare (xargs :guard t)) (let ((__function__ '8bits-p)) (declare (ignorable __function__)) (mbe :logic (unsigned-byte-p 8 x) :exec (and (natp x) (< x 256)))))
Theorem:
(defthm 8bits-p-when-unsigned-byte-p (implies (unsigned-byte-p 8 x) (8bits-p x)))
Theorem:
(defthm unsigned-byte-p-when-8bits-p (implies (8bits-p x) (unsigned-byte-p 8 x)))
Theorem:
(defthm 8bits-p-compound-recognizer (implies (8bits-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun 8bits-fix (x) (declare (xargs :guard (8bits-p x))) (let ((__function__ '8bits-fix)) (declare (ignorable __function__)) (mbe :logic (loghead 8 x) :exec x)))
Theorem:
(defthm 8bits-p-of-8bits-fix (b* ((fty::fixed (8bits-fix x))) (8bits-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm 8bits-fix-when-8bits-p (implies (8bits-p x) (equal (8bits-fix x) x)))
Function:
(defun 8bits-equiv$inline (x y) (declare (xargs :guard (and (8bits-p x) (8bits-p y)))) (equal (8bits-fix x) (8bits-fix y)))
Theorem:
(defthm 8bits-equiv-is-an-equivalence (and (booleanp (8bits-equiv x y)) (8bits-equiv x x) (implies (8bits-equiv x y) (8bits-equiv y x)) (implies (and (8bits-equiv x y) (8bits-equiv y z)) (8bits-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm 8bits-equiv-implies-equal-8bits-fix-1 (implies (8bits-equiv x x-equiv) (equal (8bits-fix x) (8bits-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm 8bits-fix-under-8bits-equiv (8bits-equiv (8bits-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))