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