Abstract an
(abs-identifier tree) → id
Function:
(defun abs-identifier (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-identifier)) (declare (ignorable __function__)) (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)))
Theorem:
(defthm string-resultp-of-abs-identifier (b* ((id (abs-identifier tree))) (string-resultp id)) :rule-classes :rewrite)
Theorem:
(defthm abs-identifier-of-tree-fix-tree (equal (abs-identifier (abnf::tree-fix tree)) (abs-identifier tree)))
Theorem:
(defthm abs-identifier-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-identifier tree) (abs-identifier tree-equiv))) :rule-classes :congruence)