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