Recognize elements and rule names.
(element/rulename-p x) → yes/no
Note that elements and rule names are disjoint.
Function:
(defun element/rulename-p (x) (declare (xargs :guard t)) (or (elementp x) (rulenamep x)))
Theorem:
(defthm booleanp-of-element/rulename-p (b* ((yes/no (element/rulename-p x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm disjoint-element/rulename (not (and (elementp x) (rulenamep x))))