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