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