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