WorksComputer Science
Definition Grounding in Theory-Level Auto-formalization
Abstract
LLM-based auto-formalization systems can now generate formally verified Lean code at unprecedented rates. However, a formalization advances mathematical research only when further mathematical results can be built on it, especially when its definitions and helper lemmas are general enough to be imported and used idiomatically. We propose definition grounding, where definition formalizations are continuously judged and revised, as a method to ensure formalization quality. We find that agents formalizing definitions from textbook text often produce definitions that later statements cannot use, and only 25%-50% of their definition sets are compatible with all later statements. However, clarifying the informal definitions can improve this rate up to 77.5% averaged over all models. Furthermore, stating a small set of basic properties without proving them can improve model judges' capability to detect definitions with compatibility issues, at only about 11% of the definition formalization cost. These results are verified with ReuseBench, a benchmark we curated for formalizing new mathematical fields and theories.
Introduction
AI systems now produce new mathematical results faster than human experts can carefully check their proofs [49]. As a result, formal verification in proof assistants such as Lean 4 is increasingly important to establishing the correctness of these results. Fortunately, modern AI auto-formalization systems are capable of autonomously formalizing frontier mathematical results, hundreds of pages of mathematical textbooks [28], and large-scale proofs spanning several areas of mathematics [48 b]. However, these large-scale formalizations are often overly convoluted, unrefactored, and poorly understood, and they are very hard to use in downstream formalization projects. A formalization’s value for advancing mathematical research critically depends on how well it allows further mathematical results to be built on it.
This is clearest when a whole theory is being auto-formalized. Formalizing a new mathematical or theoretical field as a library for others to import starts from its core definitions, then adds basic properties, core results, and eventually progresses to research-level results. Each of these layers is built on earlier ones. We call this setting theory-level auto-formalization following Min et al. [47], which we elaborate on in § 2.2.
In this setting, the most crucial aspect of a correct, reusable formalization is the quality of the formalized definitions. A good formalized definition should be faithful to the intended meaning of the informal source that defines it. It should also be suitable for formalizing downstream statements and their proofs, with the help of its helper lemmas. By downstream statements we mean those statements that use the definition (either in their statement or proof). A definition that fails the second condition can go unnoticed through several layers of a theory-level auto-formalization task, and fixing it then means refactoring everything already built on it.
Writing quality definitions in the manner described above is one of the key failure points of state-of-the-art auto-formalization systems. Ilin and Nugent [36] report in a case study that only 1 of their 62 definitions was formalized in a correct and reusable way, and Rammal et al. [54] report that their sometimes replaced a complex object, such as a manifold or a scheme, with an oversimplified definition, resulting in incorrectly formalized downstream statements.
Thus, in order for large-scale autoformalization projects to create high-quality code, it is necessary to be able to continuously evaluate formalized definitions for reusability. Ideally, an auto-formalization system should be able to evaluate the quality of definitions as they are created, such as through an independent model judge. However, if, throughout the formalization, evidence arises that the original statements have faithfulness or reusability issues, the model should go back and improve them. In this paper we investigate the foundational questions underlying such a framework, namely, when current LLM agents generate good vs. bad definition formalizations, and how such definition issues can be identified.
Our main contributions are the following. First, we corroborate the findings above and show that LLM definition formalizations given source text often have issues when being used downstream. Further, we show that these issues often occur deep down in the dependency tree. To address this issue, we propose formalizing a small set of basic properties on top of a candidate definition formalization, and revising or regenerating the definitions if a judge predicts the definitions to be incompatible with the given evidence. We demonstrate that LLM judges can identify and predict incompatibility problems of definitions, and we show that providing the initial downstream formalizations can increase the accuracy of the LLM judge. To measure the above results, we curate ReuseBench that evaluates whether models write high-quality, reusable Lean code, especially reusable definition formalizations.
Related Work
There has been a large body of work that assesses LLMs’ ability to prove theorems [72] (Hu et al. 2025; Azerbayev et al. 2023), but much less has been said about their ability to write quality, reusable definitions in the context of entire theories. Zhang et al. (2025) formalize real-world definitions from Wikipedia and arXiv into Isabelle/HOL, and MathAtlas [51] scores definitions alongside theorem statements from 103 graduate textbooks. These works evaluate whether each definition is formalized correctly, while ReuseBench instead tests whether later statements can be built on the formalized definitions. Further, the position paper Min et al. [47] argues that the theory-level formalization approach is the correct one, which the present work focuses on.
A number of works study the ability of LLMs to evaluate the quality of Lean code changes. APE-Bench [69] evaluates edits to Lean repositories by compilation and LLM judges, and MathlibPR [68] finds that models cannot tell merge-ready Mathlib pull requests from ones that build but were revised or never merged. Our work focuses on evaluating the ability of LLM judges on definition quality.
Software engineering deals with a similar problem to formalization: passing correctness checks or test cases does not mean being usable. SlopCodeBench [50] measures the accumulative concentration of complexity in functions while agents extend their own code across 196 checkpoints of 36 problems. The code produced by agents is about twice as complexity-concentrated as that of open-source repositories. SWE-CI [16], EvoCodeBench [61], and MaintainBench [67] measure how well code survives later changes. Patel et al. [52] let agents build on agent-written or human-written code, and find resolve rates up to 13.1% lower on agent-written code, a gap hard to explain by traditional maintainability metrics.
Problem Formulation
Terminology and Notations
We will follow the following notation and conventions in the rest of the paper:
“Informal” refers to mathematical statements and definitions stated in natural language such as in papers and textbooks. “Formal” refers to verified code of mathematical statements, such as definitions and proofs in a proof assistant language. The language is Lean 4 unless specified otherwise. “Formalization” refers to the process of generating formal counterparts of given informal statements, definitions, and proofs. “Auto-formalization” refers to the formalization process done by an AI system.
We use and to denote a set of informal definitions and statements (i.e., theorems, lemmas and additional definitions) respectively. We add a dot on top to denote formal, so and denote a set of formal definitions and statements respectively.
denotes the boolean values .
Theory-level Autoformalization
Consider the setting of formalizing a new mathematical or theoretical field (i.e., a theory). The goal is to formalize the core concepts and objects of the theory, followed by basic properties, core lemmas, and finally major theorems. The library is continuously updated with new statements, and external formalization efforts import and use its results. We model this as an iterative process of formalizing , where each iteration corresponds to a formalization session adding new statements to the library or using existing ones. We refer to each of as a layer. We use the convention that .
In autoformalization, the iterative formalization process is mostly done by AI systems such as coding agents, which we represent as . Suppose that represents all the code within a commit of the formalized library, and represents the set of all such possible library states. Starting from an empty (besides imported ones like Mathlib) library , each agent run takes in the current library state and is asked to formalize on top of it. This generates an updated repo state that contains formalizations of . Given the non-determinism of AI agents, we model the process as , where is a probability distribution over the next library state, and is the set of possible layers.
Refactoring. One prominent problem in theory-level autoformalization is the need for refactoring. This happens when, at some stage later in the formalization process, it is realized that earlier definitions and results are incompatible with the new formalization goals. This means that new statements cannot be stated faithfully using the formal definition as-is, or cannot be proven using the formalized lemmas they are supposed to depend on. This typically happens because of subtly unfaithful or overly narrow formalizations of earlier definitions or statements.
Traditionally, an agent would need to create significant wrappers or coercions of existing formalization results, or completely rewrite the definition or theorems that are the root cause of the issue. This would also require modifying all the proofs and/or statements that are affected by the corrections in the dependency chain, like modifying the proof of a theorem that relies on the changed definition. Refactoring significantly affects the cost of the formalization process, and often lowers the quality of the final formalized library due to the introduced wrappers and coercions. Notably, this impact on cost and quality is more severe when the incompatibility is discovered further into the formalization process, since the dependency chain that needs to be modified becomes larger. Our proposed definition grounding instead aids us to ensure the quality of the definitions at every iteration to avoid such large-scale refactoring or code degradation.
Definition Grounding
To ensure a faithful and clean library of a formalized theory, the formalization quality of the core definitions is of utmost importance. Most results within the theory state properties about them, and a narrowly or unfaithfully formalized definition can be incompatible with statements much further down in the formalization process (i.e., a definition formalization is incompatible with for large ). As discussed in the previous section, such refactoring cost would be large and significantly affect codebase quality.
Therefore, if we can predict the formalized definitions that will be incompatible with future downstream statements, we can change them early on and avoid these costly refactorings. This prediction can be done by an LLM judge at each iteration . Given the context , the judge is asked whether will be compatible with future statements. Operationally, this process can be represented as follows. At each iteration :
The agent generates .
We ask the LLM judge whether will remain compatible with future statements, denoted .
If , refactor or re-generate until .
Proceed to the next iteration with as the current library state.
We refer to the process of producing and maintaining definition formalizations that later layers can be built on definition grounding2. The necessity and effectiveness of the above processes hinge on the following questions:
Q1: How often does current AI generate definition formalizations that are incompatible with downstream statements?
Q2: Can model judges correctly predict which definition formalizations are likely to cause future refactoring?
Q3: Do additional downstream formalizations help model judges better predict the quality of definitions?
Our experiments in § 4 focus on answering each of the above questions.
Dataset for Theory-level Auto-formalization
To investigate the performance and methods of current AI agents and systems on theory-level autoformalization, one would need a dataset and benchmark that describes the process of formalizing a theory, including formalizing its core objects and definitions. However, most existing formal proving benchmarks focus on measuring the capability of proving theorems with pre-defined formal statements and definitions (if any). Autoformalization benchmarks focus on writing formal versions of informal statements [53, 27, 43], but such tasks still contain little or no evaluation on formalizing the definitions underlying them.
We therefore propose ReuseBench as a task of autoformalizing new mathematical fields or theories. Each theory contains a sequence of incremental tasks of informal definitions and statements to formalize, starting from the core objects and concepts and followed by at most 5 sets of increasingly advanced statements about the theory. Theories are extracted from introductory textbooks on mathematical or theoretical topics, from which we extract foundational definitions and the ensuing propositions, claims, lemmas, theorems, or exercises about these definitions. ReuseBench currently contains 8 theories and can be easily extended to include other fields of interest. Most definitions and statements of each theory came from the textbooks as cited in Table 1. We show the full citation list for all layers and theories, including ones from papers, in the supplementary material.
Following the notation in § 2.2, we label these layers as , , , , . The difficulty of the downstream layers is selected roughly according to the following tiers, which are designed to resemble the order of results formalized in real-world formalization projects:
: Foundational definitions in the textbooks.
: Basic properties of the definitions.
: Textbook exercises and slightly more advanced properties from the textbook.
: Intermediate lemmas towards core results of the theory.
: Core results of the theory.
: Research-level results, usually from papers rather than textbooks.
Each of these layers is stored as lines in a JSONL file including their informal statement, the source document (i.e., textbook or paper) they came from, which statement in the document they correspond to, and the definitions or statements they depend on for stating and proving from the current or prior layers.
Selection Criteria and Cleaning
The target theories contain non-trivial definitions that are adjacent to Mathlib. ReuseBench aims to evaluate the capability of agents formalizing new theories from only an empty project based on Mathlib. Therefore, we don’t want the theory to be already fully formalized in Mathlib, which would allow the agents to directly import the Mathlib definitions and theorems. On the other hand, many advanced theories are stated based on objects of more basic ones that are also not formalized in Mathlib. Including these would confound the evaluation of formalization of the basic theory versus the more advanced target theory.
To ensure that the theories satisfy these properties, we check definitions against a pinned Mathlib release and ensure that at most a small share may already have an equivalent there. None of the chapter’s central objects or results may have enough Mathlib support that the downstream statements could be stated and proved without the submitted definitions. At the same time, the definitions’ content must be within reach of what Mathlib already provides, so that an agent does not first have to build a large missing theory beneath them.
Every definition and statement is self-contained. Textbooks often state definitions and theorems in ways not suitable for direct formalization. Textbook definitions can often omit implicit edge cases, and both textbook and paper statements can rely on unstated assumptions and conventions. Interpreting the precise meanings of informal definitions and theorems is an important part of the challenges of autoformalization. A textbook definition can bundle auxiliary claims about the definition that should have been separate theorems. It can also contain references to previous statements by textbook-specific indicators, or directly use notations with attached assumptions introduced earlier in the book. We therefore include restated versions of textbook definitions and theorems alongside their original textbook text. In the cleaned versions, each definition introduces only a mathematical object and makes no claim about it. When a statement in the book relies on hypotheses or conventions set earlier in the chapter, we make them explicit. We also calibrate the definitions and statements using later layers to include missing edge cases and hypotheses that the original text omits. In Table 2, we show that this cleaned version substantially improves the formalization quality of the definitions.
| Model | Full pass rate (%) | |||||
| Source | ||||||
| GPT 6 Astra | 6.3 | 18.1 | 10.8 | 11.7 | 15.2 | 43.8 |
| GPT 5.6 Sol | 5.2 | 18.0 | 14.1 | 16.9 | 19.2 | 31.2 |
| Claude Fable 5.1 | 4.8 | 10.3 | 5.6 | 6.2 | 3.8 | 50.0 |
| Claude Opus 5 | 5.5 | 6.5 | 6.2 | 9.0 | 6.9 | 50.0 |
| Claude Sonnet 5 | 10.1 | 22.3 | 19.6 | 16.1 | 18.8 | 25.0 |
| All models | 6.4 | 15.0 | 11.3 | 12.0 | 12.8 | 40.0 |
| Cleaned | ||||||
| GPT 6 Astra | 0.0 | 1.0 | 0.9 | 0.0 | 2.5 | 81.2 |
| GPT 5.6 Sol | 2.0 | 3.4 | 3.6 | 5.8 | 10.0 | 75.0 |
| Claude Fable 5.1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 |
| Claude Opus 5 | 0.4 | 2.5 | 0.0 | 0.0 | 0.0 | 87.5 |
| Claude Sonnet 5 | 8.8 | 13.8 | 11.9 | 12.8 | 25.2 | 43.8 |
| All models | 2.2 | 4.1 | 3.3 | 3.7 | 7.5 | 77.5 |
Table 2. Witness rate in and full pass rate of the definition formalizations written by each model, given access to the source text (Source) and the cleaned statements (Cleaned), averaged over all 8 theories. Full pass rate means the percentage of definition formalizations with , i.e., that are fully compatible.
| Theory | Source | ||||||
| Markov chain mixing times | Levin and Peres [41] | 20 | 24 | 14 | 9 | 14 | 13 |
| Random walks on graphs | Levin and Peres [41] | 13 | 15 | 12 | 9 | 8 | 5 |
| Curie–Weiss model | Friedli and Velenik [26] | 11 | 12 | 13 | 8 | 7 | 5 |
| Nets, covering numbers & singular values | Vershynin [66] | 9 | 16 | 14 | 6 | 7 | 4 |
| Linear and Reed–Solomon codes | Guruswami et al. [33] | 14 | 15 | 13 | 7 | 7 | 6 |
| Symmetric and Schur polynomials | Grinberg [32] | 14 | 16 | 11 | 9 | 8 | 9 |
| Entropy and Ruzsa distance | Anderson et al. [2] | 9 | 17 | 12 | 8 | 6 | 6 |
| Price of anarchy | Karlin and Peres [37] | 12 | 11 | 12 | 9 | 8 | 5 |
| Total | 102 | 126 | 101 | 65 | 65 | 53 |
Table 1. Number of definitions in and of statements in each layer of every theory in ReuseBench.
Content and Data Format
For each theory, every layer , , , , is a JSONL file, where each line contains the following fields:
The definition or theorem text, cleaned and restated to be self-contained.
A unique id (e.g.,
def-transition-matrix), so agents can pinpoint which Lean statements are intended to formalize which informal statement.The ids of the dependencies that each definition or statement depends on. For example, most theorems in depend on at least one definition from .
The verbatim text from the source before cleaning for the definitions in .
Source info, including which textbook/paper source document it corresponds to, which page, lines, or label in the book it refers to.
Definition Grounding Experiments
In this work, we focus on the core questions in definition grounding as outlined in § 2.3, which serve as the foundation for high-quality theory-level formalization. In Section 4.2, we evaluate current frontier LLMs on generating definitions that remain usable for stating downstream statements of different levels without significant workarounds or refactoring. In Section 4.3, we investigate whether an LLM judge can accurately predict whether a set of formalized definitions can be used idiomatically in unseen downstream statements they will need to support the formalizations of. Then, we investigate whether using a set of definitions to formalize a set of basic downstream statements would help the model judges in making more accurate predictions.
Experiment Setup
Definition and Downstream Formalizations. For each theory, a definition generator agent writes Lean files formalizing the informal definitions of the theory as well as helper lemmas accompanying the definitions. We generate multiple definition candidates using the models described in the Runs paragraph. We then use a canonical agent , using GPT 5.6 Sol, to formalize each of the downstream layers sequentially. The process follows the description in § 2.2, where the canonical agent run formalizing starts from library state containing formalizations of all previous layers , and produces additionally containing . We ask the canonical agent to only state downstream statements rather than prove them. Note that the quality of definition formalizations mainly affects whether downstream statements can be stated faithfully and idiomatically, and formal proofs are more affected by the formalization quality of the lemmas they rely on.
Compatibility. We judge the compatibility of the definition formalization with each downstream statement. Specifically, when formalizing , an incompatible definition forces the canonical agent to write revised versions of definitions, make wrappers around them, or formalize the statement unfaithfully. We ask the canonical agent to declare any such workarounds it made and mechanically measure how the statements are affected. In these cases, is called a witness against , denoted . In formalization projects, this represents where the agent would likely need to refactor the incompatible definition. To ensure the accuracy of the witness verdicts, we hand-audited a selected set of 20 witnesses and confirmed that they correspond to genuine formalization defects or suboptimal formalization decisions from the definition formalization layer.
Measures. From the witnesses , we can derive three quantities given a definition formalization :
The compatibility label , which is True when no statement in is a witness against . Since our dataset contains 5 layers, the compatibility of over the full downstream is abbreviated as .
The witness rate of layer , which is the fraction of statements in that are witnesses against ,
The full pass rate of a set of definition formalizations, which is the fraction of them with , i.e., with no witness in any layer.
Runs. To generate the definition formalization candidates for each theory, we use 5 different frontier models3, GPT 6 Astra, GPT 5.6 Sol, Claude Fable 5.1, Claude Opus 5, and Claude Sonnet 5, to generate diverse definition formalization candidates for each theory. We run 2 repeats of the definition generator agent using each of the above models for each theory, thus 10 definition formalizations for each theory.
Can Models Generate Compatible Definition Formalizations?
In this section we investigate the performance of frontier models with a standard coding agent harness in generating compatible definition formalizations. Since textbook definitions can have minor flaws for clear informal prose (§ 3.1), whether agents access sufficient context and clarified rewrites can significantly affect their definition quality. We therefore evaluate agents under different access levels to the informal information about the definitions that they are asked to formalize:
Access to Verbatim Source Statements (source). Each definition in a textbook can be traced back to its defining text within the source. This can be a standalone definition block similar to those rendered by \begin{definition} in LaTeX, or one or more inline sentences describing the characteristics of the definitions in a paragraph. In this evaluation setting, we provide the generator agent with the transcription of the defining text of each definition it is asked to formalize. We also extract and provide the standing conventions introduced earlier in the textbook. However, the definition generator agent would need to infer unconstrained edge cases, unstated assumptions, or minor inconsistencies that are natural parts of real-world textbooks. This represents the more usual real-world textbook formalization setting.
Access to Cleaned Statements (Cleaned). As mentioned in § 3.1, ReuseBench also contains cleaned versions of definitions and statements. In this setting, agents are given task structures similar to the “source” setting but the informal definition statements are replaced with the cleaned versions.
Metric. We report the witness rate of each layer and the full pass rate (§ 4.1) for every frontier model we use as the definition generator. All values are averaged across all 8 theories and 2 repeated definition generator runs.
Results
Table 2 shows the experiment results in the metrics described in Section 4.2. We observe the following:
Formalizations of source definitions are often incompatible downstream. In the “Source” setting where the agent is provided with verbatim transcribed book statements, the formalized definitions encounter substantial compatibility issues on the downstream sets. In particular, even the best-performing model we evaluate, Fable 5.1, generates definition formalizations with no compatibility issues only 50% of the time when given raw textbook statements. This shows the importance of carefully reviewing and filtering definition candidates generated by AI models when formalizing raw source documents.
Definition incompatibility can surface late. Recall that later-discovered incompatibilities are more costly because one would need to refactor all of the theory formalizations that are already built on top of the formalized definitions. Our results show that the witness rate remains high at later stages , , , which indicates that the generated definition candidates can introduce substantial refactoring cost at these later downstream stages.
Cleaned data substantially improves downstream compatibility. In the “Cleaned” setting, the witness rate of incompatible downstream statements decreases substantially compared to the “Source” setting, and the generated candidates also pass all 5 downstream sets more often. Therefore, many textbook texts describing the definitions are often not directly suitable for formalization, and it is highly beneficial to carefully clean the textbook statements based on intended downstream use to avoid future refactoring.
Can Model Judges Predict Downstream Compatibility?
Since one-shot generation of definition formalizations that are long-term compatible is challenging, a viable strategy is to occasionally review definition quality with an LLM judge based on current partial progress, and revise/refactor the definition formalizations if there are issues (§ 2.3). However, this is only effective if Q2: LLMs can make accurate predictions on which definition formalizations are more compatible with downstream statements. Furthermore, a periodic revision after every layer (as opposed to judging and revising once immediately after formalizing the definitions) is preferable only if Q3: additional formalization of downstream statements helps judge models make better predictions.
To investigate both questions, we construct one-shot model judges (using GPT 5.6 Sol) that predict downstream compatibility of formalized definitions . The judge takes in the Lean file content containing , as well as the informal definition statements, and is asked to predict “Can future downstream formalizations be built on top of idiomatically and faithfully?”. We denote this judge . To investigate the second question of whether additional formalizations help make better judgments, we modify the model judge to take in additional context, including the currently formalized downstream statements and their corresponding informal statements . The model judge is asked instead whether is compatible with the provided evidence as a proxy for future usability. We denote this judge .
For the definition candidates, we use the “source” candidates from Section 4.2 for each theory when possible. However, three hard theories do not have any “source” candidate without downstream witness, so we use the “cleaned” versions for these. This totals 80 candidates with 50 passing.
Metrics. We use the same compatibility label from § 4.1 to evaluate the judges . To investigate Q2, we can compare with directly. To investigate Q3, we are instead interested in whether with makes better predictions than .
Given the non-determinism of LLM judges, we perform repeated calls of for each . We report three metrics, Accuracy (Acc.), Area Under Precision-Recall Curve (AUC), and Precision. Accuracy straightforwardly measures the probability that the judge aligns with the reference .
Recall that our goal is to find out and filter/refactor downstream-incompatible definitions as early as possible. Precision measures, if we filter based on whether a majority of the repeated judge calls accepts , the probability that a kept is compatible with the downstream sets (i.e., ). For any given judge with non-determinism, one can apply the judge’s verdicts at different levels of strictness by requiring at least positive verdicts among repeated runs. In these cases, we are interested in how well the number of passes among the repeated judge runs differentiates compatible definition formalizations from incompatible ones. Concretely, we calculate the precision-recall curve using the different numbers of passes among repeated judge calls as thresholds, compared with the compatibility label . We then measure the area under this curve (AUC) as a measure of how differentiating the judge is at any given threshold.
Results
Model judges can help eliminate downstream incompatible candidates. We show that all model judges improve upon the baseline (all True) in terms of AUC and precision (Table 3, Figure 1). Keeping only the definition formalizations that a majority of the definition-only judge’s calls accepts raises the downstream compatible rate from 62.5% to 78%. For example, filtering with using a majority of 5 votes removes 21 of the 30 incompatible formalizations while discarding 18 of the 50 compatible ones.
| Baseline | ||||||
| Accuracy | 0.62 | 0.65 | 0.85 | 0.82 | 0.82 | 0.81 |
| AUC | 0.62 | 0.79 | 0.85 | 0.85 | 0.84 | 0.87 |
| Precision | 0.62 | 0.78 | 0.86 | 0.82 | 0.86 | 0.86 |
| Formalization cost (USD) | – | $4.32 | $0.27 | $0.30 | $0.24 | $0.26 | ||
| Judge cost (5 repeats) | – | $0.17 | $0.21 | $0.27 | $0.32 | $0.35 |
Table 3. Accuracy, AUC and Precision of the baseline (all True) and of the judges against the compatibility label , over all 8 theories.
Figure 1. Precision-recall curves of the judges against the compatibility label , over all 8 theories, thresholding the number of accepting calls out of 5.
Early downstream formalizations help judges make better predictions. The accuracy, precision, and AUC of the judge improve substantially when we add the downstream formalization evidence. Notably, adding formalized alone raises prediction accuracy from 0.65 to 0.85 and AUC from 0.79 to 0.85. Adding further downstream evidence to does not substantially improve this figure further. Since only contains basic properties, the average cost for , including formalizing and the 5 judge calls, is only 11% of the cost required to formalize the definitions and helpers. Therefore, our experiments suggest that formalizing a small downstream set including basic properties of the definitions and running a model judge to evaluate the quality substantially helps filter out definitions with compatibility issues at a low cost.
Together, the above result supports the definition grounding process of § 2.3. Incompatible definition formalizations are common with source-based definition formalization, and a judge given the formalized flags 73% incompatible definition formalizations in our evaluation before later layers are built on them, at about 11% of the cost of formalizing the definitions.
Sources and Licenses
| Theory | Source | Layers | Copy used | License |
| Markov chain mixing times | Levin and Peres [41] | , – | Authors’ PDF (2nd ed.) | In copyright; free PDF from the authors |
| Diaconis and Shahshahani [22] | – | © Springer-Verlag | ||
| Bayer and Diaconis [9] | – | © IMS | ||
| Cryan et al. [20] | arXiv:1903.06081v4 | arXiv non-exclusive license | ||
| Ding et al. [24] | arXiv:0801.2625v4 | arXiv non-exclusive license | ||
| Basu et al. [8] | arXiv:1409.3250v4 | arXiv non-exclusive license | ||
| Teyssier [64] | arXiv:1905.08514v1 | arXiv non-exclusive license | ||
| Chen et al. [18] | arXiv:2011.02075v4 | arXiv non-exclusive license | ||
| Random walks on graphs | Levin and Peres [41] | , – | Authors’ PDF (2nd ed.) | In copyright; free PDF from the authors |
| Lyons and Peres [45] | , | Authors’ PDF, 19 Aug 2026 | © the authors; free PDF from the authors | |
| Spielman and Srivastava [62] | arXiv:0803.0929v4 | CC BY 3.0 | ||
| Ding et al. [23] | arXiv:1004.4371v5 | arXiv non-exclusive license | ||
| Dembo et al. [21] | arXiv:math/0107191v2 | None stated on arXiv | ||
| Zhai [70] | arXiv:1407.7617v1 | arXiv non-exclusive license | ||
| Curie–Weiss model | Friedli and Velenik [26] | , – | Authors’ PDF, 22 Aug 2017 | © the authors; free PDF from the authors |
| Chatterjee [14] | arXiv:math/0604352v2 | None stated on arXiv | ||
| Chatterjee and Shao [15] | arXiv:0907.4450v3 | arXiv non-exclusive license | ||
| Eichelsbacher and Löwe [25] | , | arXiv:0908.1909v1 | arXiv non-exclusive license | |
| Chen et al. [17] | arXiv:0911.5373v4 | arXiv non-exclusive license | ||
| Can and Pham [12] | arXiv:1709.04267v2 | arXiv non-exclusive license | ||
| Nets, covering numbers & singular values | Vershynin [66] | , – | Author’s PDF, 22 Jul 2026 | © the author |
| Vershynin [65] | arXiv:1011.3027v7 | arXiv non-exclusive license | ||
| Bandeira and van Handel [6] | arXiv:1408.6185v4 | arXiv non-exclusive license | ||
| Rudelson and Vershynin [58] | arXiv:math/0703503v2 | None stated on arXiv | ||
| Rudelson and Vershynin [59] | arXiv:0802.3956v4 | arXiv non-exclusive license | ||
| Livshyts et al. [44] | arXiv:1909.04219v4 | arXiv non-exclusive license | ||
| Artstein et al. [3] | arXiv:math/0407236v1 | None stated on arXiv | ||
| Linear and Reed–Solomon codes | Guruswami et al. [33] | , – | Draft, 26 Aug 2025 | CC BY-NC-ND 3.0 |
| Ball and Lavrauw [5] | , | arXiv:1908.10772v2 | arXiv non-exclusive license | |
| Bao [7] | arXiv:1401.3582v2 | arXiv non-exclusive license | ||
| Zhu and Liao [73] | , | arXiv:2107.01717v4 | CC BY-SA 4.0 | |
| Chakraborty and Tanver [13] | arXiv:2608.15864v2 | arXiv non-exclusive license |
Table 4. Detailed source and license of each theory we collected
| Theory | Source | Layers | Copy used | License |
| Shangguan and Tamo [60] | arXiv:1911.01502v1 | arXiv non-exclusive license | ||
| Brakensiek et al. [11] | arXiv:2206.05256v4 | arXiv non-exclusive license | ||
| Alrabiah et al. [1] | arXiv:2304.09445v6 | CC BY 4.0 | ||
| Ben-Sasson et al. [10] | , | IACR ePrint 2020/654, 3 Jul 2021 | CC BY | |
| Symmetric and Schur polynomials | Grinberg [32] | , – | arXiv:2506.00738v1 | CC0 1.0 |
| Symmetric and Schur polynomials | Knutson and Tao [38] | arXiv:math/9807160v4 | None stated on arXiv | |
| Symmetric and Schur polynomials | Knutson et al. [39] | arXiv:math/0107011v2 | None stated on arXiv | |
| Symmetric and Schur polynomials | Huh et al. [35] | arXiv:1906.09633v3 | arXiv non-exclusive license | |
| Symmetric and Schur polynomials | Lam et al. [40] | arXiv:math/0502446v3 | None stated on arXiv | |
| Entropy and Ruzsa distance | Anderson et al. [2] | , – | teorth/pfr, commit 3d78981 | Apache-2.0 |
| Entropy and Ruzsa distance | Tao [63] | arXiv:0906.4387v5 | arXiv non-exclusive license | |
| Entropy and Ruzsa distance | Madiman and Tetali [46] | arXiv:0901.0044v2 | arXiv non-exclusive license | |
| Entropy and Ruzsa distance | Gowers et al. [29] | arXiv:2311.05762v2 | CC BY 4.0 | |
| Entropy and Ruzsa distance | Green et al. [31] | arXiv:2306.13403v3 | CC BY 4.0 | |
| Entropy and Ruzsa distance | Gowers et al. [30] | arXiv:2404.02244v2 | CC BY 4.0 | |
| Price of anarchy | Karlin and Peres [37] | , – | Authors’ PDF, 13 Dec 2016 | Licensed to AMS |
| Price of anarchy | Roughgarden and Tardos [57] | Author’s version, 5 Dec 2001 | © ACM | |
| Price of anarchy | Roughgarden [55] | – | Author’s version, 23 Dec 2002 | © Elsevier |
| Price of anarchy | Roughgarden [56] | , – | Author’s version, 14 Jul 2015 | © ACM |
| Price of anarchy | Lin et al. [42] | – | Published version, author’s website | © SIAM |
| Price of anarchy | Colini-Baldeschi et al. [19] | , | arXiv:1703.00927v2 | arXiv non-exclusive license |
Table 1 (PDF p. 14). Definition Grounding in Theory-Level Auto-formalization
References
- [1]Alrabiah, O., Guo, Z., Guruswami, V., Li, R., and Zhang, Z. (2025). Random Reed–Solomon codes achieve list-decoding capacity with linear-sized alphabets. Advances in Combinatorics. Paper no. 8.DOI
- [2]Anderson, A., Bakšy, M., Bayer, J., Collares, M., Degenne, R., Dillies, Y., Eltschig, B., Goüezel, S., Kytölä, K., Lewis, R., Lezeau, P., Luccioli, L., Macbeth, H., Massot, P., Mellendijk, A., Miller, K., Monticone, P., Morrison, K., Nash, O., Song, U., Tao, T., van Doorn, F., Wilshaw, S., and Wu, L. (2023). Formalization of the polynomial Freiman–Ruzsa conjecture of Marton. Version 0.1.0. https://github.com/toerth/pfr. Blueprint at commit 3d78981.
- [3]Artstein, S., Milman, V., and Szarek, S. J. (2004). Duality of metric entropy. Annals of Mathematics, 159(3):1313–1328.
- [5]Ball, S. and Lavrauw, M. (2019). Arcs in finite projective spaces. EMS Surveys in Mathematical Sciences, 6(1/2):133–172.arxiv.org/abs/1908.10772
- [6]Bandeira, A. S. and van Handel, R. (2016). Sharp nonasymptotic bounds on the norm of random matrices with independent entries. The Annals of Probability, 44(4):2479–2506.
- [7]Bao, X. (2015). The equivalent identities of the MacWilliams identities for linear codes. Jurnal Teknologi, 76(1).
- [8]Basu, R., Hermon, J., and Peres, Y. (2017). Characterization of cutoff for reversible Markov chains. The Annals of Probability, 45(3):1448–1487.
- [9]Bayer, D. and Diaconis, P. (1992). Trailing the dovetail shuffle to its lair. The Annals of Applied Probability, 2(2):294–313.DOI
- [10]Ben-Sasson, E., Carmon, D., Ishai, Y., Koparty, S., and Saraf, S. (2020). Proximity gaps for Reed–Solomon codes. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 900–909.
- [11]Brakensiek, J., Gopi, S., and Makam, V. (2023). Generic Reed–Solomon codes achieve list-decoding capacity. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC), pages 1488–1501.
- [12]Can, V. H. and Pham, V.-H. (2017). A Cramér type moderate deviation theorem for the critical Curie– Weiss model. Electronic Communications in Probability, 22. Paper no. 62.
- [13]Chakraborty, H. S. and Tanver, M. H. (2026). Harmonic higher weight distributions, Simon’s approach of MacWilliams identity and moments. arXiv preprint arXiv:2608.15864.arxiv.org/abs/2608.15864
- [14]Chatterjee, S. (2007). Stein’s method for concentration inequalities. Probability Theory and Related Fields, 138(1–2):305–321.DOI
- [15]Chatterjee, S. and Shao, Q.-M. (2011). Nonnormal approximation by Stein’s method of exchangeable pairs with application to the Curie–Weiss model. The Annals of Applied Probability, 21(2):464–483.
- [16]Chen, J., Xu, X., Wei, H., Chen, C., and Zhao, B. (2026). SWE-CI: Evaluating agent capabilities in maintaining codebases via continuous integration. arXiv preprint arXiv:2603.03823.
- [17]Chen, L. H. Y., Fang, X., and Shao, Q.-M. (2013). From Stein identities to moderate deviations. The Annals of Probability, 41(1):262–293.
- [18]Chen, Z., Liu, K., and Vigoda, E. (2021). Optimal mixing of Glauber dynamics: Entropy factorization via high-dimensional expansion. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 1537–1550.arxiv.org/abs/2011.02075
- [19]Colini-Baldeschi, R., Cominetti, R., Mertikopoulos, P., and Sessi, M. (2020). When is selfish routing bad? The price of anarchy in light and heavy traffic. Operations Research, 68(2):411–434.
- [20]Cryan, M., Guo, H., and Mousa, G. (2021). Modified log-Sobolev inequalities for strongly log-concave distributions. The Annals of Probability, 49(1):506–525.
- [21]Dembo, A., Peres, Y., Rosen, J., and Zeitouni, O. (2004). Cover times for Brownian motion and random walks in two dimensions. Annals of Mathematics, 160(2):433–464.
- [22]Diaconis, P. and Shahshahani, M. (1981). Generating a random permutation with random transpositions. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 57(2):159–179.DOI
- [23]Ding, J., Lee, J. R., and Peres, Y. (2012). Cover times, blanket times, and majorizing measures. Annals of Mathematics, 175(3):1409–1471.
- [24]Ding, J., Lubetzky, E., and Peres, Y. (2010). Total variation cutoff in birth-and-death chains. Probability Theory and Related Fields, 146(1–2):61–85.
- [25]Eichelsbacher, P. and Löwe, M. (2010). Stein’s method for dependent random variables occurring in statistical mechanics. Electronic Journal of Probability, 15:962–988.
- [26]Friedli, S. and Velenik, Y. (2017). Statistical Mechanics of Lattice Systems: A Concrete Mathematical Introduction. Cambridge University Press.
- [27]Gao, G., Wang, Y., Jiang, J., Gao, Q., Qin, Z., Xu, T., and Dong, B. (2025). Herald: A natural language annotated Lean 4 dataset. In International Conference on Learning Representations.
- [28]Gloeckle, F., Rammal, A., Arnal, C., Munos, R., Cabannes, V., Synnaeve, G., and Hayat, A. (2026). Automatic textbook formalization. arXiv preprint arXiv:2604.03071.arxiv.org/abs/2604.03071
- [29]Gowers, W. T., Green, B., Manners, F., and Tao, T. (2025). On a conjecture of Marton. Annals of Mathematics, 201(2):515–549.arxiv.org/abs/2311.05762
- [30]Gowers, W. T., Green, B., Manners, F., and Tao, T. (2026). Marton’s conjecture in abelian groups with bounded torsion. Annales de la Faculté des sciences de Toulouse: Mathématiques, 35(1):1–33.arxiv.org/abs/2404.02244
- [31]Green, B., Manners, F., and Tao, T. (2025). Sumsets and entropy revisited. Random Structures & Algorithms, 66(1). Article e21252.DOI
- [32]Grinberg, D. (2025). An introduction to algebraic combinatorics. arXiv preprint arXiv:2506.00738.arxiv.org/abs/2506.00738
- [33]Guruswami, V., Rudra, A., and Sudan, M. (2025). Essential Coding Theory. Book draft, version of August 26, 2025.
- [35]Huh, J., Matherne, J. P., Mészáros, K., and St. Dizier, A. (2022). Logarithmic concavity of Schur and related polynomials. Transactions of the American Mathematical Society, 375(6):4411–4427.
- [36]Ilin, V. and Nugent, B. (2026). Sorries are not the hard part: An expert-review case study of a semi-autonomous formalization. arXiv preprint arXiv:2606.13925.arxiv.org/abs/2606.13925
- [37]Karlin, A. R. and Peres, Y. (2017). Game Theory, Alive. American Mathematical Society.
- [38]Knutson, A. and Tao, T. (1999). The honeycomb model of GL_n(C) tensor products I: Proof of the saturation conjecture. Journal of the American Mathematical Society, 12(4):1055–1090.
- [39]Knutson, A., Tao, T., and Woodward, C. (2004). The honeycomb model of GL_n(C) tensor products II: Puzzles determine facets of the Littlewood–Richardson cone. Journal of the American Mathematical Society, 17(1):19–48.
- [40]Lam, T., Postnikov, A., and Pylyavskyy, P. (2007). Schur positivity and Schur log-concavity. American Journal of Mathematics, 129(6):1611–1622.arxiv.org/abs/math/0502446
- [41]Levin, D. A. and Peres, Y. (2017). Markov Chains and Mixing Times. American Mathematical Society, second edition. With contributions by Elizabeth L. Wilmer.
- [42]Lin, H., Roughgarden, T., Tardos, É., and Walkover, A. (2011). Stronger bounds on Braess’s paradox and the maximum latency of selfish routing. SIAM Journal on Discrete Mathematics, 25(4):1667–1686.DOI
- [43]Liu, Q., Zheng, X., Lu, X., Cao, Q., and Yan, J. (2025). Rethinking and improving autoformalization: Towards a faithful metric and a dependency retrieval-based approach. In International Conference on Learning Representations.
- [44]Livshyts, G. V., Tikhomirov, K., and Vershynin, R. (2021). The smallest singular value of inhomogeneous square random matrices. The Annals of Probability, 49(3):1286–1309.arxiv.org/abs/1909.04219
- [45]Lyons, R. and Peres, Y. (2016). Probability on Trees and Networks, volume 42 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press.DOI
- [46]Madiman, M. and Tetali, P. (2010). Information inequalities for joint distributions, with interpretations and applications. IEEE Transactions on Information Theory, 56(6):2699–2713.DOI
- [47]Min, M. J., He, M., Li, Z., Yi, Z., Malik, S., Gupta, A., Si, X., and Bastani, O. (2026). Position: Theory-level autoformalization, from isolated statements to unified formal knowledge bases. In International Conference on Machine Learning (Position Paper Track).
- [48]OpenAI (2026a). Finite time blowup for Navier–Stokes. Manuscript, September 8, 2026. Lean formalization: https://github.com/openai/NavierStokesAndEuler.hub.valency.io/works/W_u44zqgpa
- [49]OpenAI (2026b). OpenAI Research Catalog: 372 result families in 722 manuscripts. October 6, 2026. https://github.com/openai/math.
- [50]Orlanski, G., Roy, D., Yun, A., Shin, C., Gu, A., Ge, A., Adila, D., Roberts, N., Sala, F., and Albarghouthi, A. (2026). SlopCodeBench: Benchmarking how coding agents degrade over long-horizon iterative tasks. arXiv preprint arXiv:2603.24755.arxiv.org/abs/2603.24755
- [51]Patel, N., Arias, N., Babayan, D., Cochran, V., Libman, T., Mahmood, H., McCarty, L., Munoz, S., Willey, L., and Flanigan, J. (2026a). MathAtlas: A benchmark for autoformalization in the wild. arXiv preprint arXiv:2605.14061.arxiv.org/abs/2605.14061
- [52]Patel, S., Hou, B. L., Purohit, A., Xu, K., Pan, J., He, H., and Chen, V. (2026b). Is agent code less maintainable than human code? arXiv preprint arXiv:2606.21804.arxiv.org/abs/2606.21804
- [53]Poiroux, A., Weiss, G., Kunc̆ák, V., and Bosselut, A. (2025). Reliable evaluation and benchmarks for statement autoformalization. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 17947–17969.arxiv.org/abs/2406.07222
- [54]Rammal, A., Patel, N., Gloeckle, F., Hayat, A., Kempe, J., Munos, R., Arnal, C., and Cabannes, V. (2026). Formalizing mathematics at scale. arXiv preprint arXiv:2605.29955.arxiv.org/abs/2605.29955
- [55]Roughgarden, T. (2003). The price of anarchy is independent of the network topology. Journal of Computer and System Sciences, 67(2):341–364.
- [56]Roughgarden, T. (2015). Intrinsic robustness of the price of anarchy. Journal of the ACM, 62(5). Article 32.
- [57]Roughgarden, T. and Tardos, É. (2002). How bad is selfish routing? Journal of the ACM, 49(2):236–259.
- [58]Rudelson, M. and Vershynin, R. (2008). The Littlewood–Offord problem and invertibility of random matrices. Advances in Mathematics, 218(2):600–633.arxiv.org/abs/math/0703503
- [59]Rudelson, M. and Vershynin, R. (2009). Smallest singular value of a random rectangular matrix. Communications on Pure and Applied Mathematics, 62(12):1707–1739.DOI
- [60]Shangguan, C. and Tamo, I. (2020). Combinatorial list-decoding of Reed–Solomon codes beyond the Johnson radius. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 538–551.arxiv.org/abs/1911.01502
- [61]Shen, H., Chen, X., Xu, W., Ma, Y., Chen, L., and Li, K. (2026). EvoCode-Bench: Evaluating coding agents in multi-turn iterative interactions. arXiv preprint arXiv:2605.24110.arxiv.org/abs/2605.24110
- [62]Spielman, D. A. and Srivastava, N. (2011). Graph sparsification by effective resistances. SIAM Journal on Computing, 40(6):1913–1926.
- [63]Tao, T. (2010). Sumset and inverse sumset theory for Shannon entropy. Combinatorics, Probability and Computing, 19(4):603–639.DOI
- [64]Teyssier, L. (2020). Limit profile for random transpositions. The Annals of Probability, 48(5):2323–2343.arxiv.org/abs/1905.08514
- [65]Vershynin, R. (2012). Introduction to the non-asymptotic analysis of random matrices. In Eldar, Y. C. and Kutyniok, G., editors, Compressed Sensing: Theory and Applications, pages 210–268. Cambridge University Press.arxiv.org/abs/1011.3027
- [66]Vershynin, R. (2026). High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge University Press, second edition.
- [67]Wang, Z., Ling, R., Wang, C., Yu, Y., Wang, S., Li, Z., Xiong, F., and Zhang, W. (2025). MaintainCode: Maintainable code generation under dynamic requirements. In Advances in Neural Information Processing Systems.arxiv.org/abs/2503.24260
- [68]Xie, Z., Liu, X., and Zhang, S. (2026). Math-libPR: Pull request merge-readiness benchmark for formal mathematical libraries. arXiv preprint arXiv:2605.07147.arxiv.org/abs/2605.07147
- [69]Xin, H., Yuan, Z., Fleuriot, J., and Li, W. (2026). APE-Bench: Evaluating automated proof engineering for formal math libraries. In Proceedings of the 43rd International Conference on Machine Learning.arxiv.org/abs/2504.19110
- [70]Zhai, A. (2018). Exponential concentration of cover times. Electronic Journal of Probability, 23. Paper no. 32.arxiv.org/abs/1407.7617
- [71]Zhang, L., Valentino, M., and Freitas, A. (2025). Autoformalization in the wild: Assessing LLMs on real-world mathematical definitions. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 1720–1738.arxiv.org/abs/2502.12065
- [72]Zheng, K., Han, J. M., and Polu, S. (2022). miniF2F: a cross-system benchmark for formal Olympiad-level mathematics. In International Conference on Learning Representations.arxiv.org/abs/2109.00110
- [73]Zhu, C. and Liao, Q. (2024). The b-weight distribution for MDS codes. Advances in Mathematics of Communications, 18(6):1893–1910.arxiv.org/abs/2107.01717
