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