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