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