Recognizer for uint-integer.
(uint-integerp x) → yes/no
Function:
(defun uint-integerp (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p (int-bits) x) :exec (and (integerp x) (<= 0 x) (< x (expt 2 (int-bits))))))
Theorem:
(defthm booleanp-of-uint-integerp (b* ((yes/no (uint-integerp x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm uint-integerp-forward-unsigned-byte-p (implies (uint-integerp x) (unsigned-byte-p (int-bits) x)) :rule-classes :forward-chaining)
Theorem:
(defthm unsigned-byte-p-rewrite-uint-integerp (equal (unsigned-byte-p (int-bits) x) (uint-integerp x)))
Theorem:
(defthm natp-when-uint-integerp (implies (uint-integerp x) (natp x)) :rule-classes :compound-recognizer)