Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a tactic called "Congruence".
This tactic tries to prove a sequent by congruence.
Consider the congruence closure of all terms and formulas in the sequent, with respect to all === and <=> left of the sequent.
The sequent is provable by congruence if one of the following conditions is met:
- The right side contains an equality s === t or equivalence a <=> b provable in the congruence closure.
- The left side contains an negated equality !(s === t) or equivalence !(a <=> b) provable in the congruence closure.
- There is a formula a on the left and b on the right such that a and b are congruent.
- There are two formulas a and !b on the left such that a and b are congruent.
- There are two formulas a and !b on the right such that a and b are congruent.
- The sequent is Ol-valid without equality reasoning
Note that complete congruence closure modulo OL is an open problem.
The tactic uses an egraph datastructure to compute the congruence closure.
The egraph itselfs relies on two underlying union-find datastructure, one for terms and one for formulas.
The union-finds are equiped with an
explain
method that produces a path between any two elements in the same equivalence class.Each edge of the path can come from an external equality, or be the consequence of congruence.
The tactic uses uses this path to produce needed proofs.