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