Dice Question Streamline Icon: https://streamlinehq.com

Handling justifications in e-graph substitution for explanation generation

Develop a method to properly handle justifications (explanations) in the e-graph substitution algorithm used for dynamic rewrites, ensuring that the egg-based Lean tactic preserves and reconstructs all necessary rewrite steps for proof checking.

Information Square Streamline Icon: https://streamlinehq.com

Background

The authors implement substitution over e-classes by traversing and rebuilding subgraphs, with a cycle-breaking strategy to handle cyclic dependencies. This approach is suitable for applications that trust egg’s internal reasoning but also needs to produce explanation traces (justifications) that Lean can check.

They note a major caveat: they do not yet know how to correctly handle justifications within this substitution algorithm, which can cause loss of critical rewrite steps needed for Lean proof reconstruction.

References

A major caveat to our algorithm is that we do not yet know how to properly handle justifications (used for explanations).

Bridging Syntax and Semantics of Lean Expressions in E-Graphs (2405.10188 - Rossel et al., 16 May 2024) in Section “Substitution on E-Classes,” paragraph “Cycle Breaking”