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