Abstract a
(abs-letter cst) → achar
Function:
(defun abs-letter (cst) (declare (xargs :guard (abnf::treep cst))) (declare (xargs :guard (cst-matchp cst "letter"))) (let ((__function__ 'abs-letter)) (declare (ignorable __function__)) (case (cst-letter-conc? cst) (1 (abs-uppercase-letter (cst-letter-conc1-rep-elem cst))) (2 (abs-lowercase-letter (cst-letter-conc2-rep-elem cst))))))
Theorem:
(defthm characterp-of-abs-letter (b* ((achar (abs-letter cst))) (characterp achar)) :rule-classes :rewrite)
Theorem:
(defthm abs-letter-of-tree-fix-cst (equal (abs-letter (abnf::tree-fix cst)) (abs-letter cst)))
Theorem:
(defthm abs-letter-tree-equiv-congruence-on-cst (implies (abnf::tree-equiv cst cst-equiv) (equal (abs-letter cst) (abs-letter cst-equiv))) :rule-classes :congruence)