Lune

LICS2025Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Equality Saturation for Quantum Circuit Optimization cites egg: Fast and extensible equality saturation
  • Relational e-matching cites egg: Fast and extensible equality saturation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Equality Saturation for Quantum Circuit OptimizationGanxiang Yang, Paige Raun, Runzhou Tao, Ronghui GuPLDI 2026

Builds on2

  1. egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt et al.POPL 2021 · 170 citations
  2. Relational e-matchingYihong Zhang, Yisu Remy Wang, Max Willsey, Zachary TatlockPOPL 2022 · 12 citations

Related papers

  1. Fast and Optimal Extraction for Sparse Equality GraphsAmir Kafshdar Goharshady, Chun Kit Lam, Lionel ParreauxOOPSLA 2024 · 11 citations
  2. Improving Equality Saturation for EDA via Semantic E-GraphsSijie Kong, Jingtao Xia, Daniel Ruelas-Petrisko, Zachary D. Sisco et al.PLDI 2026
  3. 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
  4. TensorRocq: Enabling Diagrammatic Reasoning in RocqBen Caldwell, William Spencer, Aleks Kissinger, Robert RandOOPSLA 2026
  5. Optimism in Equality SaturationRussel Arbore, Alvin Cheung, Max WillseyPLDI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines