epfl-lara / lisa

Proof assistant based on first-order logic and set theory
Apache License 2.0
33 stars 18 forks source link

Egraph #220

Closed SimonGuilloud closed 5 months ago

SimonGuilloud commented 5 months ago

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 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.