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