Recognizer for polarity4 bit structures.
(polarity4-p x) → *
Function:
(defun polarity4-p (x) (declare (xargs :guard t)) (let ((__function__ 'polarity4-p)) (declare (ignorable __function__)) (mbe :logic (unsigned-byte-p 4 x) :exec (and (natp x) (< x 16)))))
Theorem:
(defthm polarity4-p-when-unsigned-byte-p (implies (unsigned-byte-p 4 x) (polarity4-p x)))
Theorem:
(defthm unsigned-byte-p-when-polarity4-p (implies (polarity4-p x) (unsigned-byte-p 4 x)))
Theorem:
(defthm polarity4-p-compound-recognizer (implies (polarity4-p x) (natp x)) :rule-classes :compound-recognizer)