Lifting E-Graphs: Variable-Aware Representation
- 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 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
If each application invents a different name, the e-graph can bloat with redundant variants. Scope hygiene also becomes unclear: a rewrite such as
is harmless for an open term in context , but if one naively uses it inside a binder one can derive
introducing a free where no such variable is bound. The paper also points to missed sharing in pairs such as
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 suppresses the ambient context. The expression may denote
or
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 0 canonical variables
The central combinator is a lifting operation indexed by a thinning bitvector 1: 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: 2 A bitvector such as 3 means “keep argument 0, keep argument 1, drop argument 2” (Zucker, 22 Jun 2026).
The representation is built from rigid 4 canonical variables. A preliminary nameless scheme uses symbols of the form 5, where 6 is the context dimension and 7 is the selected variable. Thus 8 becomes 9, and 0 becomes 1. The lifting e-graph then compresses this further by taking a primitive variable in a minimal one-variable context,
2
and obtaining larger-context variables by lifting. Two examples are: 3
4
This is why the approach is described as supporting rigid 5 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
6
and then rewrites the second as
7
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
8
the paper uses 3 so that a reference is effectively a pair
9
where 0 is an underlying e-class id and 1 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: 4 Hence 2 is the ambient context size, while 3 is the number of retained variables. Identity thinning is 5 and thinning composition is: 6 This gives thinnings an algebra with identity and composition (Zucker, 22 Jun 2026).
The e-node datatype is correspondingly context-aware: 7 The key invariant is maximal lift pulling. The representation aims to maintain terms in a pulled form governed by the equations
4
and
5
The same pattern is used for unary symbols such as
6
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 7 whose children are fat ids 8, 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
9
and yields an 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:
8
The find operation composes thinnings while traversing the parent chain:
9
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:
0
and div computes a residual thinning when one thinning factors through another:
1
Union then becomes:
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
1
one peels the common lifting and reduces to ordinary union. Second, if one side has redundant variables, as in
2
the pulled form
3
becomes internally
4
and the union must be oriented as
5
Third, if the liftings are incompatible, as in
6
with pulled form
7
the internal equality
8
is resolved by introducing a fresh common parent: 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 0 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
1
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.