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