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