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