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