Fixer for dm::primep.
(prime-fix x) → fixed-x
Function:
(defun prime-fix (x) (declare (xargs :guard (dm::primep x))) (mbe :logic (if (dm::primep x) x 2) :exec x))
Theorem:
(defthm primep-of-prime-fix (b* ((fixed-x (prime-fix x))) (dm::primep fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm prime-fix-when-primep (implies (dm::primep x) (equal (prime-fix x) x)))
Theorem:
(defthm posp-of-prime-fix (posp (prime-fix x)))