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