A
The characters are converted to lowercase, according to the normalized representation required by rulename-wfp.
Function:
(defun abstract-rulename (tree) (declare (xargs :guard (treep tree))) (b* (((fun (fail)) (prog2$ (abstract-fail) (rulename ""))) ((unless (tree-case tree :nonleaf)) (fail)) (treess (tree-nonleaf->branches tree)) ((unless (and (consp treess) (consp (cdr treess)))) (fail)) (trees-alpha (car treess)) (trees-alpha/digit/dash (cadr treess)) ((unless (consp trees-alpha)) (fail)) (tree-alpha (car trees-alpha)) (char (abstract-alpha tree-alpha)) (chars (abstract-*-alpha/digit/dash trees-alpha/digit/dash)) (charstring (implode (downcase-charlist (cons char chars))))) (rulename charstring)))
Theorem:
(defthm rulenamep-of-abstract-rulename (b* ((rulename (abstract-rulename tree))) (rulenamep rulename)) :rule-classes :rewrite)