(abs-identifier-alt tree) → id
Function:
(defun abs-identifier-alt (tree) (declare (xargs :guard (abnf::treep tree))) (declare (xargs :guard (cst-matchp tree "identifier"))) (let ((__function__ 'abs-identifier-alt)) (declare (ignorable __function__)) (let ((string-or-err (b* (((okf (abnf::tree-list-tuple2 sub)) (check-tree-nonleaf-2 tree "identifier")) ((okf letter-tree) (check-tree-list-1 sub.1st)) ((okf char) (abs-letter letter-tree)) ((okf chars) (abs-*-letter/decimaldigit/underscore sub.2nd)) (string (acl2::implode (cons char chars)))) string))) (b* (((when (stringp string-or-err)) string-or-err) (- (er hard? 'top-level "problem in abs-identifier-alt: ~x0" tree))) ""))))
Theorem:
(defthm stringp-of-abs-identifier-alt (b* ((id (abs-identifier-alt tree))) (stringp id)) :rule-classes :rewrite)
Theorem:
(defthm abs-identifier-alt-of-tree-fix-tree (equal (abs-identifier-alt (abnf::tree-fix tree)) (abs-identifier-alt tree)))
Theorem:
(defthm abs-identifier-alt-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-identifier-alt tree) (abs-identifier-alt tree-equiv))) :rule-classes :congruence)