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