Recognizer for sbyte4.
(sbyte4p x) → yes/no
Function:
(defun sbyte4p (x) (declare (xargs :guard t)) (mbe :logic (signed-byte-p 4 x) :exec (and (integerp x) (<= -8 x) (< x 8))))
Theorem:
(defthm booleanp-of-sbyte4p (b* ((yes/no (sbyte4p x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm sbyte4p-forward-signed-byte-p (implies (sbyte4p x) (signed-byte-p 4 x)) :rule-classes :forward-chaining)
Theorem:
(defthm signed-byte-p-rewrite-sbyte4p (equal (signed-byte-p 4 x) (sbyte4p x)))
Theorem:
(defthm integerp-when-sbyte4p (implies (sbyte4p x) (integerp x)) :rule-classes :compound-recognizer)