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