A rule name must start with a lowercase letter (and thus not be empty) and contain only lowercase letters, numbers, and dashes.
Aside from all letters being lowercase,
these constraints are required by the rule
Function:
(defun rulename-wfp (rulename) (declare (xargs :guard (rulenamep rulename))) (b* ((charstring (rulename->get rulename)) (chars (explode charstring))) (and (consp chars) (str::letter-char-p (car chars)) (str::letter/digit/dash-charlist-p (cdr chars)) (equal (downcase-charlist chars) chars))))
Theorem:
(defthm booleanp-of-rulename-wfp (b* ((yes/no (rulename-wfp rulename))) (booleanp yes/no)) :rule-classes :rewrite)