Hashing Modulo Context-Sensitive 𝛼-Equivalence
Lasse Blaauwbroek, Miroslav Olsák, Herman Geuvers
Abstract
The notion of 𝛼-equivalence between 𝜆-terms is commonly used to identify terms that are considered equal. However, due to the primitive treatment of free variables, this notion falls short when comparing subterms occurring within a larger context. Depending on the usage of the Barendregt convention (choosing different variable names for all involved binders), it will equate either too few or too many subterms. We introduce a formal notion of context-sensitive 𝛼-equivalence, where two open terms can be compared within a context that resolves their free variables. We show that this equivalence coincides exactly with the notion of bisimulation equivalence. Furthermore, we present an efficient 𝑂 (𝑛 log 𝑛) runtime hashing scheme that identifies 𝜆-terms modulo context-sensitive 𝛼-equivalence, generalizing over traditional bisimulation partitioning algorithms and improving upon a previously established 𝑂 (𝑛 log 2 𝑛) bound for a hashing modulo ordinary 𝛼-equivalence by Maziarz et al [20]. Hashing 𝜆-terms is useful in many applications that require common subterm elimination and structure sharing. We have employed the algorithm to obtain a large-scale, densely packed, interconnected graph of mathematical knowledge from the Coq proof assistant for machine learning purposes.
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.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers1
Builds on2
Related papers
- Barendregt Convenes with Knaster and Tarski: Strong Rule Induction for Syntax with BindingsJan van Brügge, James McKinna, Andrei Popescu, Dmitriy TraytelPOPL 2025 · 2 citations
- A Lazy, Concurrent Convertibility CheckerNathanaëlle Courant, Xavier LeroyPOPL 2026
- A fine-grained computational interpretation of Girard's intuitionistic proof-netsDelia KesnerPOPL 2022 · 6 citations
- 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
- Static Analysis of Memory Models for SMT EncodingsThomas Haas, René Pascasl Maseli, Roland Meyer, Hernán Ponce de LeónOOPSLA 2023
