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