This is an ordinary defenum.
Function:
(defun repeatmod-p (x) (declare (xargs :guard t)) (or (eq x ':?) (eq x ':+) (eq x 'nil)))
Theorem: type-when-repeatmod-p
(defthm type-when-repeatmod-p (implies (repeatmod-p x) (if (if (symbolp x) (if (not (equal x 't)) (not (equal x 'nil)) 'nil) 'nil) 't (equal x 'nil))) :rule-classes :compound-recognizer)