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