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