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