Abstract a
(abs-letter tree) → char
Function:
(defun abs-letter (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-letter)) (declare (ignorable __function__)) (b* (((okf tree) (check-tree-nonleaf-1-1 tree "letter")) (char (abs-uppercase-letter tree)) ((when (not (reserrp char))) char) (char (abs-lowercase-letter tree)) ((when (not (reserrp char))) char)) (reserrf (list :found-subtree (tree-info-for-error tree))))))
Theorem:
(defthm character-resultp-of-abs-letter (b* ((char (abs-letter tree))) (character-resultp char)) :rule-classes :rewrite)
Theorem:
(defthm letter-char-p-of-abs-letter (b* ((common-lisp::?char (abs-letter tree))) (implies (not (reserrp char)) (str::letter-char-p char))))
Theorem:
(defthm abs-letter-of-tree-fix-tree (equal (abs-letter (abnf::tree-fix tree)) (abs-letter tree)))
Theorem:
(defthm abs-letter-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-letter tree) (abs-letter tree-equiv))) :rule-classes :congruence)