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