Abstract an
(abs-equality-constraint tree) → c
Function:
(defun abs-equality-constraint (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-equality-constraint)) (declare (ignorable __function__)) (b* (((okf (abnf::tree-list-tuple3 sub)) (check-tree-nonleaf-3 tree "equality-constraint")) ((okf tree) (check-tree-list-1 sub.1st)) ((okf lhs) (abs-expression tree)) ((okf tree) (check-tree-list-1 sub.2nd)) ((okf &) (check-tree-schars tree "==")) ((okf tree) (check-tree-list-1 sub.3rd)) ((okf rhs) (abs-expression tree))) (make-constraint-equal :left lhs :right rhs))))
Theorem:
(defthm constraint-resultp-of-abs-equality-constraint (b* ((c (abs-equality-constraint tree))) (constraint-resultp c)) :rule-classes :rewrite)
Theorem:
(defthm abs-equality-constraint-of-tree-fix-tree (equal (abs-equality-constraint (abnf::tree-fix tree)) (abs-equality-constraint tree)))
Theorem:
(defthm abs-equality-constraint-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-equality-constraint tree) (abs-equality-constraint tree-equiv))) :rule-classes :congruence)