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