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