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