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