Equivalence Hypergraphs: DPO Rewriting for Monoidal E-Graphs
Aleksei Tiurin, Chris Barrett, Dan R. Ghica, Nick Hu
Abstract
The technique of equality saturation, which equips graphs with an equivalence relation, has proven effective for program optimisation. We give a categorical semantics to these structures, called e-graphs, in terms of Cartesian categories enriched over the category of semilattices. This approach generalises to monoidal categories, which opens the door to new applications of e-graph techniques, from algebraic to monoidal theories. Finally, we present a sound and complete combinatorial representation of morphisms in such a category, based on a generalisation of hypergraphs which we call e-hypergraphs. They have the usual advantage that many of their structural equations are absorbed into a general notion of isomorphism. This new principled approach to e-graphs enables double-pushout (DPO) rewriting for these structures, which constitutes the main contribution of this paper.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a016cfa5-b53d-4d2e-9f45-4c1878cacb99Cited by top-tier papers1
Ask how each one uses itBuilds on2
Related papers
- Fast and Optimal Extraction for Sparse Equality GraphsAmir Kafshdar Goharshady, Chun Kit Lam, Lionel ParreauxOOPSLA 2024 · 11 citations
- Improving Equality Saturation for EDA via Semantic E-GraphsSijie Kong, Jingtao Xia, Daniel Ruelas-Petrisko, Zachary D. Sisco et al.PLDI 2026
- Slotted E-Graphs: First-Class Support for (Bound) Variables in E-GraphsRudi Schneider, Marcus Rossel, Amir Shaikhha, Andrés Goens et al.PLDI 2025 · 1 citation
- TensorRocq: Enabling Diagrammatic Reasoning in RocqBen Caldwell, William Spencer, Aleks Kissinger, Robert RandOOPSLA 2026
- Optimism in Equality SaturationRussel Arbore, Alvin Cheung, Max WillseyPLDI 2026
