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