Papers
Topics
Authors
Recent
Search
2000 character limit reached

Lifting E-Graphs: Variable-Aware Representation

Updated 4 July 2026
  • The paper introduces a novel e-graph design that integrates rigid α canonical variables and functional lifting to manage variable-sensitive equality.
  • It employs thinning bitvectors, fat identifiers, and lift-pulling smart constructors to normalize open terms and share common lift structures.
  • The approach addresses traditional e-graph limitations by embedding weakening as a first-class operation and using a thinning-aware union-find for equivalence.

to=arxiv_search.search 天天中彩票投注 大发快三是国家{"query":"(Zucker, 22 Jun 2026) Lifting E-Graphs: A Function Isn't a Constant", "max_results": 5} to=arxiv_search.search 红鼎්ඩjson{"query":"(Coward et al., 2022) Combining E-Graphs with Abstract Interpretation", "max_results": 5} to=arxiv_search.search 天天中彩票足彩json{"query":"e-graphs lifting variables slotted e-graphs co-de Bruijn", "max_results": 10} “Lifting e-graphs” denotes an e-graph design that supports rigid α\alpha canonical variables by giving the data structure a baked-in notion of functional lifting combinator. In this design, open terms are treated as functions from contexts rather than as context-free constants, and the implementation is described as fattening the usual integer identifiers with thinning bitvectors, lift-pulling smart constructors, and a special thinning-aware union find variation. The formulation is motivated by the claim that variables are quite subtle and easy to get wrong, and by the observation that standard e-graphs are fundamentally designed for ground terms (Zucker, 22 Jun 2026).

1. Variable-sensitive equality and the problem setting

The motivating difficulty is that ordinary e-graphs handle explicit syntax well, but variables, open terms, and binding structure create pathologies that are not well captured by treating variables as ordinary leaves. Several concrete failure modes are identified. Fresh-name blowup appears when rewrites introduce fresh variables, as in

Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.

If each application invents a different name, the e-graph can bloat with redundant variants. Scope hygiene also becomes unclear: a rewrite such as

x0=0x * 0 = 0

is harmless for an open term in context xx, but if one naively uses it inside a binder one can derive

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),

introducing a free xx where no such variable is bound. The paper also points to missed sharing in pairs such as

f(g(h(x)))andf(g(h(y))),f(g(h(x))) \quad\text{and}\quad f(g(h(y))),

which are not equal but are structurally identical up to renaming (Zucker, 22 Jun 2026).

The paper’s semantic diagnosis is sharper than a mere representation complaint. It states that notation such as sin(x)\sin(x) suppresses the ambient context. The expression may denote

xsin(x):R1Rx \mapsto \sin(x) : \mathbb{R}^1 \to \mathbb{R}

or

x,ysin(x):R2R,x,y \mapsto \sin(x) : \mathbb{R}^2 \to \mathbb{R},

and these are different functions with different types. In this sense, “a function isn’t a constant”: an open term cannot be safely treated like a context-free constant node, because its denotation depends on how many arguments it expects and which ones it uses (Zucker, 22 Jun 2026).

2. Functional lifting and rigid Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.0 canonical variables

The central combinator is a lifting operation indexed by a thinning bitvector Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.1: Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.2 The intended meaning is weakening or context extension: a function defined on a smaller context is embedded into a larger context by ignoring some arguments. Operationally, the paper presents: xx2 A bitvector such as Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.3 means “keep argument 0, keep argument 1, drop argument 2” (Zucker, 22 Jun 2026).

The representation is built from rigid Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.4 canonical variables. A preliminary nameless scheme uses symbols of the form Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.5, where Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.6 is the context dimension and Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.7 is the selected variable. Thus Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.8 becomes Px,Pore1Ni=0N1e.P \rightarrow \forall x, P \qquad\text{or}\qquad e \rightarrow \frac{1}{N}\sum_{i=0}^{N-1} e.9, and x0=0x * 0 = 00 becomes x0=0x * 0 = 01. The lifting e-graph then compresses this further by taking a primitive variable in a minimal one-variable context,

x0=0x * 0 = 02

and obtaining larger-context variables by lifting. Two examples are: x0=0x * 0 = 03

x0=0x * 0 = 04

This is why the approach is described as supporting rigid x0=0x * 0 = 05 canonical variables: names disappear, and context enlargement is represented canonically by thinning (Zucker, 22 Jun 2026).

The same viewpoint applies to ordinary open expressions. The paper gives the contrast

x0=0x * 0 = 06

and then rewrites the second as

x0=0x * 0 = 07

The larger-context expression is thus represented by reusing the smaller-context expression and adding a thinning that says “use only the first variable of the 2-context” (Zucker, 22 Jun 2026).

3. Representation by thinnings, fat identifiers, and lifted nodes

The principal representational move is to replace plain e-class identifiers by “fat ids.” Instead of

x0=0x * 0 = 08

the paper uses xx3 so that a reference is effectively a pair

x0=0x * 0 = 09

where xx0 is an underlying e-class id and xx1 is a thinning bitvector describing how that class is seen in the current context (Zucker, 22 Jun 2026).

A thinning is a bitvector over a finite ordered context. The paper defines: xx4 Hence xx2 is the ambient context size, while xx3 is the number of retained variables. Identity thinning is xx5 and thinning composition is: xx6 This gives thinnings an algebra with identity and composition (Zucker, 22 Jun 2026).

The e-node datatype is correspondingly context-aware: xx7 The key invariant is maximal lift pulling. The representation aims to maintain terms in a pulled form governed by the equations

xx4

and

xx5

The same pattern is used for unary symbols such as

xx6

The purpose is to avoid storing equivalent expressions in many different lifted arrangements; internal lifts are pulled outward so that common lift structure is shared canonically (Zucker, 22 Jun 2026).

4. Smart constructors and thinning-aware union-find

Canonicalization is performed by lift-pulling smart constructors. When constructing a node xx7 whose children are fat ids xx8, the constructor computes the common lifting shared by the child thinnings, peels that lifting off, interns the node with reduced child thinnings, and returns the resulting id with the common lifting reattached. This realizes the orientation

xx9

and yields an lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),0-aware hash-consing discipline even before union-find is considered (Zucker, 22 Jun 2026).

The second algorithmic component is a thinning-aware union-find. Parent links are annotated by thinnings: xx8 The find operation composes thinnings while traversing the parent chain: xx9 Thus a representative is not merely a root id; it is a root id together with the composed thinning from the queried context to the representative context (Zucker, 22 Jun 2026).

The union procedure relies on two operations. The weakest common thinning is pointwise conjunction: f(g(h(x)))andf(g(h(y))),f(g(h(x))) \quad\text{and}\quad f(g(h(y))),0 and div computes a residual thinning when one thinning factors through another: f(g(h(x)))andf(g(h(y))),f(g(h(x))) \quad\text{and}\quad f(g(h(y))),1 Union then becomes: f(g(h(x)))andf(g(h(y))),f(g(h(x))) \quad\text{and}\quad f(g(h(y))),2 If two sides already map to the same root with the same thinning, nothing is done. Otherwise a fresh common parent may be introduced, and each side is attached to it through residual thinnings (Zucker, 22 Jun 2026).

The paper distinguishes three characteristic union situations. First, if the liftings are identical, as in

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),1

one peels the common lifting and reduces to ordinary union. Second, if one side has redundant variables, as in

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),2

the pulled form

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),3

becomes internally

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),4

and the union must be oriented as

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),5

Third, if the liftings are incompatible, as in

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),6

with pulled form

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),7

the internal equality

lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),8

is resolved by introducing a fresh common parent: lam(y,0)=lam(y,x0),\mathrm{lam}(y,0)=\mathrm{lam}(y,x*0),9 This is the case in which the thinning-aware union-find is essential (Zucker, 22 Jun 2026).

5. Relation to other e-graph extensions

Lifting e-graphs stand in a recognizable line of variable-aware and semantics-aware e-graph work, but their intervention point is specific. The approach is explicitly inspired by slotted e-graphs and Co-de Bruijn syntax. Relative to slotted e-graphs, the paper describes a simplification or specialization: slotted e-graphs support more general variable renamings and permutations, whereas lifting e-graphs make totally ordered slots and redundancy or thinning primary. Relative to ordinary de Bruijn style nameless representations, the novelty is not merely the absence of names; it is the factoring of context extension as a built-in algebraic operation, so that terms are normalized to the smallest context they actually use (Zucker, 22 Jun 2026).

A useful contrast is provided by “Combining E-Graphs with Abstract Interpretation” (Coward et al., 2022). That work can be read as a principled lifting of ordinary e-graph reasoning from purely syntactic congruence management to syntax-plus-abstract-semantics reasoning: e-classes carry abstract semantic facts, and conditional rewrites are justified by abstract proofs. Lifting e-graphs alter a different layer. Rather than attaching abstract values to e-classes, they change the basic representation of references into the graph so that context and weakening are first-class. In one case the e-class becomes an equivalence carrier plus abstract semantic facts; in the other, the identifier itself becomes a context-sensitive object carrying a thinning (Coward et al., 2022).

The result is that lifting e-graphs are best understood not as an optional optimization pass, but as a redesign of the core e-graph interface around the claim that open terms denote functions on contexts. This is why the paper treats context as part of the identity of a term and embeds weakening directly into the data structure (Zucker, 22 Jun 2026).

6. Scope, limitations, and the meaning of “lifting” in this setting

The current scope is deliberate. The paper states that it has not yet fully developed binders. The focus is the pre-binder infrastructure: contexts, rigid xx0 canonical variables, lift-pulling, and thinning-aware equivalence management. Binders such as lam, forall, exists, integrate, and subst are described as semantically higher-order “projection functions” with different transfer rules than ordinary pointwise operators, so the present treatment is not the whole story for full higher-order syntax (Zucker, 22 Jun 2026).

There are also implementation caveats. The paper does not present a full standalone congruence-closure or rebuilding algorithm, though it explains how find, union, normalization, and smart constructors interact. It also notes that e-matching in the presence of redundancy edges such as

xx1

is subtle; the simplest implementation may just fail matches there unless one wants to solve thinning equations, potentially with multiple solutions (Zucker, 22 Jun 2026).

The phrase “lifting” here should also be distinguished from other technical uses of the same word. It is not graph-to-hypergraph lifting in Ramsey theory, graph-to-hypergraph structural lifting for over-squashing, path-complete graph lifting in control, or node-splitting lift operations on ordinary graphs (Budden et al., 2020, Banf et al., 15 Aug 2025, Ninite et al., 1 Jul 2026). In the present setting, lifting means a built-in functional lifting combinator that embeds a function on a smaller context into a larger context by ignoring some arguments, and an e-graph representation that makes this operation native rather than external (Zucker, 22 Jun 2026).

In that sense, lifting e-graphs extend e-graphs toward variable-aware reasoning without merely layering ad hoc renaming logic on top. The central claim is structural and semantic at once: open terms are functions, weakening is a first-class operation, and an e-graph that wants to reason canonically about variables must encode that fact directly.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Lifting E-Graph.