Fixer for slong-integer.
(slong-integer-fix x) → fixed-x
Function:
(defun slong-integer-fix (x) (declare (xargs :guard (slong-integerp x))) (mbe :logic (if (slong-integerp x) x 0) :exec x))
Theorem:
(defthm slong-integerp-of-slong-integer-fix (b* ((fixed-x (slong-integer-fix x))) (slong-integerp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm slong-integer-fix-when-slong-integerp (implies (slong-integerp x) (equal (slong-integer-fix x) x)))