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