Fixer for identifierp.
(identifier-fix x) → fixed-x
Function:
(defun identifier-fix (x) (declare (xargs :guard (identifierp x))) (mbe :logic (if (identifierp x) x (list (char-code #\$))) :exec x))
Theorem:
(defthm identifierp-of-identifier-fix (b* ((fixed-x (identifier-fix x))) (identifierp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm identifier-fix-when-identifierp (implies (identifierp x) (equal (identifier-fix x) x)))