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