TRANSMISSION // 2612.02458v1
Building a Map Between Mathematical Prose and Proof Code
Source published
A system links written mathematical claims to Lean declarations, aiming to make large formalization projects easier to audit. Its results are promising but depend on limited, imperfectly labeled examples.

A computer can check that a proof follows from its formal assumptions. But that does not establish that the formal statement matches the claim in a paper. This study tests a practical way to connect the two: treat written mathematics and Lean code as nodes in a graph, then predict the links between them.
Why matching prose and code matters
Proof assistants such as Lean can verify formal proofs against precisely stated assumptions. Yet a checked proof may still fail to express the intended claim in a mathematical paper. Researchers therefore face two related questions: does the proof work in the formal system, and does the formal statement correspond to the source text?
The authors of this preprint focus on the second question. They represent a mathematical project as a bipartite knowledge graph: one side contains statements in natural language, including LaTeX lemmas and theorems; the other contains Lean declarations. A cross-link means that a declaration formalizes a statement. The graph can also record dependencies within each side.
These links are not always one-to-one. A paper’s theorem might be represented by several Lean declarations, or one declaration might support multiple statements. Some statements may have no formal counterpart at all. Any useful matching system must allow for those possibilities rather than forcing every item into a neat pair.
How the system works
The team assembled six community projects whose authors had already recorded links between LaTeX and Lean. Together, these projects contained 1,932 natural-language statements and 16,710 Lean declarations. The researchers extracted text, declarations, project structure and dependencies, then compared candidate statement–declaration pairs using semantic similarity and other features, such as shared words, labels and mathematical symbols.
A gradient-boosted model scored candidate links. The system then used a global assignment procedure to choose a consistent set, with the option to leave statements unmatched. It could also assign a second declaration to a statement when another model predicted that the claim had been split across declarations. In a hybrid version, uncertain candidate links were sent to a large language model (LLM) for review; confident candidates were handled without an LLM call.
For the main test, the authors trained on five projects and evaluated on the sixth, repeating this process so each project served as the held-out test set. They compared their approach with an LLM-only judge and a simpler semantic-similarity baseline. They also tested transfer to a Lean formalization of Terence Tao’s Analysis I, and explored whether graph-based retrieval could help formalize a research paper.
What the tests found
On the six-project evaluation, the hybrid pipeline using Claude Opus 5.5 achieved higher precision and F1 score than the LLM-only baseline, while using less than half the reported API cost. Precision measures how many predicted links match the reference links; recall measures how many reference links the system finds. The trade-off matters: the hybrid method’s recall was lower than the LLM-only judge’s, so it made more selective predictions rather than finding as many links.
The deterministic pipeline, which did not call an LLM, also improved on the simple similarity baseline, though it did not match the hybrid system’s overall performance. Results varied across the six projects, and the authors report substantial differences between projects, suggesting that performance depends on the source and its blueprinting style.
The textbook test was harder. The hybrid method had the strongest reported precision on the evaluated non-exercise statements, while an LLM judge achieved better recall and F1. The authors excluded exercises, which made up about 40% of the textbook’s recorded correspondences. They note that exercise prompts often point to results elsewhere, a kind of reference their current approach does not resolve well.
In a separate demonstration, an AI coding agent used graph-retrieved links to help formalize a research paper on the graph Allen–Cahn scheme. The authors report compiled Lean proofs for 23 of the paper’s 27 numbered results, compared with 20 using another set of Mathlib search tools. This was a single case study, not a broad comparative trial. The paper also says that both approaches relied on some assumptions and did not formalize certain results requiring tools absent from Mathlib. During the demonstration, the authors report finding errors in two statements in the source paper; this illustrates the potential value of close source-to-formal comparison, but does not establish that the method will generally detect errors.
What remains uncertain
The main evaluation measures agreement with links recorded by project authors—not whether those links are mathematically correct, complete or uniquely appropriate. The study also tests only six blueprint projects, and its textbook results reveal a shift between paper-style and textbook-style writing. The system approximates many-to-many matching with a constrained assignment, so it cannot represent every possible correspondence pattern.
The results are from an arXiv preprint, which may not have undergone peer review. This account is based on the supplied preprint text; the search excerpts available alongside it do not independently verify its claims. The study supports a narrower conclusion than “AI can verify mathematical meaning”: graph-based matching may help organize and retrieve candidate correspondences, while human scrutiny and further testing remain important.
- formal mathematics
- Lean
- autoformalization
- knowledge graphs
- link prediction
- artificial intelligence
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
When AI Learns from Math’s Lean Translations
Supporting evidence: Both papers distinguish machine-checking from faithful correspondence to a natural-language source: the origin paper says Lean verifies a theorem relative to its assumptions, not that it expresses the motivating claim; Khaitan et al. report that compiling statements can still fail agreement with the project’s formalization. Their evidence differs: the origin paper studies matching existing statements and declarations, while Khaitan et al. evaluate generated code in held-out research projects.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2612.02458v1 — Original paper
Excerpt reference:
static/papers/2612.02458v1.md:116-193
Basis: Paper text
Source file SHA-256:c00bc416891dd6f555eac61a75727ab5280eb725e37cb568a07bafe25fd8a2f52611.28819v1 — Original paper
Excerpt reference:
static/papers/2611.28819v1.md:172-225
Basis: Paper text
Source file SHA-256:b08c32ddcf12641b91c12eceafab29b39e791a7cda268ed71347f404eaa8fd2b2611.28819v1 — Original paper
Excerpt reference:
static/papers/2611.28819v1.md:285-329
Basis: Paper text
Source file SHA-256:b08c32ddcf12641b91c12eceafab29b39e791a7cda268ed71347f404eaa8fd2b
Can AI Turn a Quantum Physics Textbook Into Verified Code?
Supporting evidence: Both papers identify source faithfulness as a separate problem from a proof assistant checking formal code: the origin paper frames correspondence as distinct from formal correctness, and Yin et al. describe formalizations that can compile yet fail to capture the source’s meaning. The quantum study adds separate grounding and AI-review checks in a textbook-scale project; those checks and its physics-specific setting are not directly comparable to the origin paper’s edge-recovery evaluation.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2612.02458v1 — Original paper
Excerpt reference:
static/papers/2612.02458v1.md:116-193
Basis: Paper text
Source file SHA-256:c00bc416891dd6f555eac61a75727ab5280eb725e37cb568a07bafe25fd8a2f52612.02353v1 — Original paper
Excerpt reference:
static/papers/2612.02353v1.md:53-114
Basis: Paper text
Source file SHA-256:1cb682c3acaa80ffcd4720f5c4457a84452d9d0be5c5286549535eaaddabfc932612.02353v1 — Original paper
Excerpt reference:
static/papers/2612.02353v1.md:298-368
Basis: Paper text
Source file SHA-256:1cb682c3acaa80ffcd4720f5c4457a84452d9d0be5c5286549535eaaddabfc93
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When AI Learns from Math’s Lean Translations
Source published
Shared keywords: formal mathematics
Can AI agents safely optimize mathematical proof libraries?
Source published
Shared keywords: formal mathematics
How AI’s Logic Grounding Shapes What It Can Reason About
Source published
Shared keywords: artificial intelligence, knowledge graphs, link prediction
How should AI forecast links for newly emerging entities?
Source published
Shared keywords: artificial intelligence, link prediction
Sage tries to make AI-written mathematics mean what it says
Source published
Shared keywords: formal mathematics