Equivalence Hypergraphs: E-Graphs for Monoidal Theories

📅 2024-06-22
🏛️ arXiv.org
📈 Citations: 1
Influential: 1
📄 PDF

career value

176K/year
🤖 AI Summary
This paper establishes a rigorous categorical semantics for e-graphs (equivalence graphs) within the framework of monadic categories, supporting double-pushout (DPO) rewriting. Method: The authors generalize e-graphs to monadic categories by introducing *equivalence hypergraphs* (e-hypergraphs)—a compositional structure whose vertices are algebras over a monad and whose hyperedges encode algebraic operations, thereby internalizing structural equations up to isomorphism. The approach integrates category theory, semilattice-enriched categories, and hypergraph-based combinatorial modeling to yield a sound and complete semantic framework. Contribution/Results: The resulting framework provides an algebraic and monadic foundation for equivalence reasoning in e-graph–based program optimization, and extends the formal applicability of e-graphs to SMT solving and algebraic optimization—enabling principled, categorical treatment of equational rewriting beyond traditional graph-based methods.

Technology Category

Application Category

📝 Abstract
The technique of equipping graphs with an equivalence relation, called equality saturation, has recently proved both powerful and practical in program optimisation, particularly for satisfiability modulo theory solvers. We give a categorical semantics to these structures, called e-graphs, in terms of Cartesian categories enriched over a semilattice. We show how this semantics can be generalised 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.
Problem

Research questions and friction points this paper is trying to address.

Providing categorical semantics for e-graphs in monoidal categories
Generalizing e-graph techniques for algebraic and monoidal theories
Enabling DPO rewriting via e-hypergraphs for structural equivalence
Innovation

Methods, ideas, or system contributions that make the work stand out.

Categorical semantics for e-graphs using Cartesian categories
Generalization to monoidal categories for new applications
E-hypergraphs enable DPO rewriting with structural equations