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