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