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