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