Abstract a
(abs-definition tree) → def
Function:
(defun abs-definition (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-definition)) (declare (ignorable __function__)) (b* (((okf (abnf::tree-list-tuple8 sub)) (check-tree-nonleaf-8 tree "definition")) ((okf tree) (check-tree-list-1 sub.1st)) ((okf id) (abs-identifier tree)) ((okf tree) (check-tree-list-1 sub.2nd)) ((okf &) (check-tree-schars tree "(")) ((okf tree) (check-tree-list-1 sub.3rd)) ((okf params) (abs-?-identifier-*-comma-identifier tree)) ((okf tree) (check-tree-list-1 sub.4th)) ((okf &) (check-tree-schars tree ")")) ((okf tree) (check-tree-list-1 sub.5th)) ((okf &) (check-tree-schars tree ":=")) ((okf tree) (check-tree-list-1 sub.6th)) ((okf &) (check-tree-schars tree "{")) ((okf tree) (check-tree-list-1 sub.7th)) ((okf constraints) (abs-?-constraint-*-comma-constraint tree)) ((okf tree) (check-tree-list-1 sub.8th)) ((okf &) (check-tree-schars tree "}"))) (make-definition :name id :para params :body constraints))))
Theorem:
(defthm definition-resultp-of-abs-definition (b* ((def (abs-definition tree))) (definition-resultp def)) :rule-classes :rewrite)
Theorem:
(defthm abs-definition-of-tree-fix-tree (equal (abs-definition (abnf::tree-fix tree)) (abs-definition tree)))
Theorem:
(defthm abs-definition-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-definition tree) (abs-definition tree-equiv))) :rule-classes :congruence)