Coerce to a string.
(str-fix x) is the identity on stringps, or
returns the empty string,
This is similar to other fixing functions like fix and nfix. See also streqv.
Function:
(defun str-fix$inline (x) (declare (xargs :guard t)) (if (stringp x) x ""))
Theorem:
(defthm stringp-of-str-fix (stringp (str-fix x)) :rule-classes :type-prescription)
Theorem:
(defthm str-fix-default (implies (not (stringp x)) (equal (str-fix x) "")))
Theorem:
(defthm str-fix-when-stringp (implies (stringp x) (equal (str-fix x) x)))