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.
CCS Concepts: โข Software and its engineering โ Compilers; โข Theory of computation โ Lambda calculus; Design and analysis of algorithms.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 10fcbe3e-dbba-4274-af3b-03c8de57a3daCited by top-tier papers1
Ask how each one uses itBuilds on2
Related papers
- A Lazy, Concurrent Convertibility CheckerNathanaรซlle Courant, Xavier LeroyPOPL 2026
- 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
- The Benefit of Being Non-Lazy in Probabilistic ฮป-calculus: Applicative Bisimulation is Fully Abstract for Non-Lazy Probabilistic Call-by-NameGianluca Curzi, Michele PaganiLICS 2020 ยท 1 citation
- QuickSub: Efficient Iso-Recursive SubtypingLitao Zhou, Bruno C. d. S. OliveiraPOPL 2025 ยท 4 citations
- A fine-grained computational interpretation of Girard's intuitionistic proof-netsDelia KesnerPOPL 2022 ยท 6 citations
