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