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