Function:
(defun modname-fix (x) (declare (xargs :guard (modname-p x))) (let ((__function__ 'modname-fix)) (declare (ignorable __function__)) (mbe :logic (if (modname-p x) x "default-modname") :exec x)))
Theorem:
(defthm modname-p-of-modname-fix (b* ((x-fix (modname-fix x))) (modname-p x-fix)) :rule-classes :rewrite)
Theorem:
(defthm modname-fix-when-modname-p (implies (modname-p x) (equal (modname-fix x) x)))