[2607.09564] Bidirectional Elaborators à la Carte
Skip to main content
arXiv is now an independent nonprofit!<br>Learn more<br>×
Search arXiv
Press Enter to search · Advanced search
-->
Computer Science > Programming Languages
arXiv:2607.09564 (cs)
[Submitted on 10 Jul 2026 (v1), last revised 13 Jul 2026 (this version, v2)]
Title:Bidirectional Elaborators à la Carte
Authors:Andrew Slattery, Jonathan Sterling<br>View a PDF of the paper titled Bidirectional Elaborators \`a la Carte, by Andrew Slattery and Jonathan Sterling
View PDF<br>HTML (experimental)
Abstract:Surface syntax in proof assistants like Rocq, Lean, Agda, and Idris is highly implicit, lacking many details that are needed for user-written code to denote precisely defined mathematical objects. Elaboration is an algorithm that accounts for these details by translating surface syntax to an explicit enough core syntax. The reliability and predictability of elaboration relies on several critical properties of the core type system, including decidability of judgemental equality and the injectivity of type constructors; these dependencies are witnessed in a concrete system by explicit calls to conversion checking and weak-head reduction subroutines.
We introduce a dependently typed monadic domain specific language for the executable specification of correct-by-construction elaboration algorithms that is abstracted from any particular representation of normal forms or algorithm for conversion checking. In particular, we represent a bidirectionally typed surface language for Martin-Löf type theory by shallow embedding in this DSL so that the translation of surface terms into core terms amounts to elementary equational calculation. This translation is correct by construction in the sense that it cannot produce ill-typed terms, and is automatically stable under judgemental equality of core terms and even under substitution; from the latter property, we obtain a new denotational interpretation of the suspension of elaboration problems. Finally, a concrete elaboration algorithm is extracted by algebraic means from a presheaf model of the DSL built out of the bi-initial natural model of Martin-Löf type theory.
Subjects:
Programming Languages (cs.PL); Logic in Computer Science (cs.LO)
Cite as:<br>arXiv:2607.09564 [cs.PL]
(or<br>arXiv:2607.09564v2 [cs.PL] for this version)
https://doi.org/10.48550/arXiv.2607.09564
Focus to learn more
arXiv-issued DOI via DataCite
Submission history<br>From: Jonathan Sterling [view email]<br>[v1]<br>Fri, 10 Jul 2026 16:10:31 UTC (50 KB)
[v2]<br>Mon, 13 Jul 2026 09:19:53 UTC (50 KB)
Full-text links:<br>Access Paper:
View a PDF of the paper titled Bidirectional Elaborators \`a la Carte, by Andrew Slattery and Jonathan Sterling<br>View PDF<br>HTML (experimental)<br>TeX Source
view license
Current browse context:
cs.PL
next >
new<br>recent<br>| 2026-07
Change to browse by:
cs<br>cs.LO
References & Citations
NASA ADS<br>Google Scholar
Semantic Scholar
export BibTeX citation<br>Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .
Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)
Major funding support from