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