Automatic Textbook Formalization
Fabian Gloeckle, Ahmad Rammal, Charles Arnal, Rémi Munos, Vivien Cabannes, Gabriel Synnaeve, Amaury Hayat
NeurIPS 2026
TL;DR. case study of formalizing an entire graduate math textbook in Lean 4 within one week using 30K coding agents
Abstract. We present a case study where an automatic AI system formalizes a textbook with more than 500 pages of graduate-level algebraic combinatorics to Lean. The resulting formalization represents a new milestone in textbook formalization scale and proficiency, moving from early results in undergraduate topology and restructuring of existing library content to a full standalone formalization of a graduate textbook. The formalization comprises 130K lines of code and 5900 Lean declarations and was conducted within one week by a total of 30K Claude 4.5 Opus agents collaborating in parallel on a shared code base via version control, simultaneously setting a record in multi-agent software engineering with usable results. The inference cost matches or undercuts what we estimate as the salaries required for a team of human experts, and we expect there is still the potential for large efficiencies to be made without the need for better models. We make our code and the resulting Lean code base available open-source.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:47 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The paper presents a large-scale case study in which ~30K Claude 4.5 Opus agents, coordinated through standard repository engineering practices (git branches, PR review, merge queue, file-based issue tracking), formalize a 500+ page graduate algebraic combinatorics textbook in Lean 4 within one week. The artifact comprises 130K lines, ~5,900 declarations, and 340 proved target statements, with detailed token/outcome statistics, candid failure analysis, and an open-source release, at an estimated $100K inference cost claimed to match or undercut a human expert team.
Key issues to prioritize in the rebuttal:
Lean compilation verifies proofs relative to repository definitions, not that those definitions faithfully encode the textbook; Appendix F itself documents placeholder definitions, duplicated representations, an incorrect Bender–Knuth involution, and agents proving consequences of broken definitions. Reviewer zCGR explicitly states that an independent expert audit of all 340 targets (or a stratified random sample) with a reported statement-fidelity error rate would materially improve their assessment. This should be the centerpiece of the rebuttal; same-model generation and review makes correlated errors plausible, so the audit should be independent.
Either substantiate or remove: the "frontier models would behave comparably" claim, the 3–10x cost-reduction projection, and the "matches or undercuts a human expert team" comparison — the latter needs a concrete labor model with person-hours and, critically, comparison under the same quality standard (a human formalization would include expert-validated statements and interfaces).
Provide a fixed architecture/pseudocode for the final system, and quantify human interventions (spot checks, prompt changes, restarts, new roles) rather than framing the run as fully autonomous.
Even small-scale ablations on selected chapters (sketcher+prover only, no maintainer, no issue tracker, no dual review, lower parallelism) are needed to attribute success to the orchestration design rather than raw parallelism, budget, or model capability. Relatedly, clarify whether this is positioned as a systems case study, resource paper, or orchestration research contribution.
Final justification
After the rebuttal phase, 2/3 provided positive comments and emphasized that the authors’ rebuttal addressed their concerns. The authors addressed reviewer zCGR's concern. After the discussion, reviewer zCGR did not provide any other suggestions. Therefore, I voted for acceptance.
Read meta-review
Meta-review
The paper presents a large-scale case study in which ~30K Claude 4.5 Opus agents, coordinated through standard repository engineering practices (git branches, PR review, merge queue, file-based issue tracking), formalize a 500+ page graduate algebraic combinatorics textbook in Lean 4 within one week. The artifact comprises 130K lines, ~5,900 declarations, and 340 proved target statements, with detailed token/outcome statistics, candid failure analysis, and an open-source release, at an estimated $100K inference cost claimed to match or undercut a human expert team.
Key issues to prioritize in the rebuttal:
Lean compilation verifies proofs relative to repository definitions, not that those definitions faithfully encode the textbook; Appendix F itself documents placeholder definitions, duplicated representations, an incorrect Bender–Knuth involution, and agents proving consequences of broken definitions. Reviewer zCGR explicitly states that an independent expert audit of all 340 targets (or a stratified random sample) with a reported statement-fidelity error rate would materially improve their assessment. This should be the centerpiece of the rebuttal; same-model generation and review makes correlated errors plausible, so the audit should be independent.
Either substantiate or remove: the "frontier models would behave comparably" claim, the 3–10x cost-reduction projection, and the "matches or undercuts a human expert team" comparison — the latter needs a concrete labor model with person-hours and, critically, comparison under the same quality standard (a human formalization would include expert-validated statements and interfaces).
Provide a fixed architecture/pseudocode for the final system, and quantify human interventions (spot checks, prompt changes, restarts, new roles) rather than framing the run as fully autonomous.
Even small-scale ablations on selected chapters (sketcher+prover only, no maintainer, no issue tracker, no dual review, lower parallelism) are needed to attribute success to the orchestration design rather than raw parallelism, budget, or model capability. Relatedly, clarify whether this is positioned as a systems case study, resource paper, or orchestration research contribution.
Final justification
After the rebuttal phase, 2/3 provided positive comments and emphasized that the authors’ rebuttal addressed their concerns. The authors addressed reviewer zCGR's concern. After the discussion, reviewer zCGR did not provide any other suggestions. Therefore, I voted for acceptance.
2 comments
Ablation experiment
We ran an ablation experiment as suggested by reviewer vEQN.
We selected Hongjian Li’s preprint, Extension of the Fundamental Theorem of Algebra to Polynomial Matrix Equations over Q-Circulant Matrices (https://arxiv.org/abs/2601.13775) and selected 13 target theorems and definitions for formalization, including one permitted citation sorry. Having lost our compute grant, we initially looked for more recent models with a formalization performance similar to Claude Opus 4.5. Among GPT 5.6 Luna, GPT 5.6 Terra, Leanstral 1.5, Kimi 2.5 and GLM 5.2, we found GPT 5.6 Terra to be a model with reasonable pricing and formalization performance (checked using partial single agent formalization on the same preprint).
We then compared two systems with a budget of USD 50 each.
- Full system – as described in the paper and accompanying code base. We set the frequency of scan, progress, triage agents to once every 20 minutes and lowered prover and maintainer concurrency.
- Minimal system – sketcher and provers without reviewers and other agent types. Provers are asked to provide a proof for the assigned statement not to rework the code base elsewhere to emulate a strict top-down system.
Results:
Neither system produced a full and correct formalization of the preprint. However the full system reached a significantly higher formalization quality as evidenced by this automated audit of the statement translation fidelity.
| Classification | Full system | Hierarchical |
|---|---|---|
| Good | 5 | 4 |
| Minor issue | 6 | 4 |
| Major error | 2 | 5 |
Notably, the minimal system generated 9 theorems with statement True (i.e. omitted statements that are trivially correct). In terms of cost, the minimal system already terminated after spending USD 1.05 while the full system spent around USD 13 for the actual work on the targets before starting to attempt to remove permitted literature citation sorries, spending the full budget.
Over the course of the full run, both reviewers and scanners repeatedly pointed out statement formalization errors and better API options, demonstrating how weak models can benefit from a carefully designed multi-agent harness.
We will include this ablation experiment in the final version of the paper.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper presents a large-scale case study in automatic textbook formalization. The authors build a multi-agent system that formalizes a 500+ page graduate textbook in algebraic combinatorics into Lean. The resulting artifact contains around 130K lines of Lean code, approximately 5,900 declarations, and 340 target definitions/theorems, all reportedly formalized and proved. The system uses a repository-level workflow inspired by collaborative software engineering: sketcher agents produce theorem and definition skeletons, prover agents fill proofs, reviewer agents check mathematical faithfulness and engineering quality, and maintainer/triage/scan/progress agents handle global issues. Coordination is mediated through git, short-lived branches, pull requests, a merge queue, and a file-based issue tracker.
Strengths and weaknesses
This paper presents a large-scale case study of automatic textbook formalization using multi-agent system orchestration. The scale of the result is striking. A full graduate-level textbook, 130K lines of Lean code, and thousands of agent runs represent a substantial engineering effort and a valuable artifact for the formal mathematics and autoformalization communities. The paper’s main strength is its framing of autoformalization as collaborative proof engineering rather than theorem proving. The system argues that textbook formalization requires not only proving local statements, but also maintaining coherent definitions, useful APIs, review procedures, dependency structure, and global progress. The use of multiple specialized agent roles is sensible, and the discussion of failures in Appendix F is particularly valuable. The examples of duplicated N-partition definitions and inconsistent Bender-Knuth involution formalizations illustrate real challenges that are often hidden in theorem-level evaluations. The paper is transparent about cost, token usage, agent outcomes, and orchestration failures.
However, as a research contribution, the paper is weaker. Many of the orchestration mechanisms are standard software engineering practices—git branches, pull requests, review, merge queues, issue tracking—applied at scale to Lean formalization. This is practically important, but the paper does not sufficiently isolate which design decisions are necessary or novel. There is no clear ablation of the agent roles, issue tracker, reviewer structure, merge policy, or scheduling strategy. As a result, it is difficult to know whether the success comes from the proposed orchestration design specifically, from massive parallelism and budget, from LLM's capabilities, or from the particular structure of the chosen textbook.
The paper is generally supported as a case study, but some broader claims feel under-evidenced. For example, the paper suggests that the bottleneck is now orchestration rather than model capability, and that 3–10x cost reductions are achievable without better models. These are plausible, but they are mostly argued from observations rather than controlled experiments.
Questions
-
Is this paper best viewed as a systems case study, a dataset/resource paper, or a research paper on multi-agent orchestration?
-
Please provide more evidence for the necessity of the orchestration components. For example, can you compare against simpler variants such as only sketcher+prover agents, no maintainer agents, no issue tracker, no dual review, or lower parallelism? Even small-scale ablations on selected chapters would make the orchestration claims much stronger.
-
The paper says reviewer agents imposed a high bar and that key statements were manually spot-checked, but the reliability of the final artifact depends critically on whether Lean statements accurately reflect the textbook. A more systematic sampling protocol, error rate estimate, or independent human audit would improve confidence.
Limitations
Not fully. The paper does discuss several important limitations, including high cost, single-run design, coordination failures, duplicate definitions, rabbit holes, and merge bottlenecks. However, I would encourage the authors to include a dedicated limitations section in the main paper rather than leaving many of the most important caveats in Appendix F. The paper should more explicitly discuss the limited generality of a single textbook case study, the dependence on one frontier model, the lack of systematic ablations, and the uncertainty around the semantic faithfulness of formalized statements. The implications for future autoformalization are compelling, but the paper should distinguish more clearly between demonstrated results and plausible extrapolations.
Final justification
The authors have addressed my concerns satisfactorily and further strengthened the paper by providing additional experimental results and manual judgment.
Formatting concerns
Some important methodological and limitation details are pushed into the appendix, particularly the failure analysis in Appendix F.
3 comments
Rebuttal
We sincerely thank you very much for your thoughtful and detailed feedback.
Answer to questions:
-
Thanks for highlighting this lack of precision: in our opinion, the paper is best viewed as a case study. Performed in March 2026, this is, to our knowledge, the first full autoformalization of a graduate textbook without human involvement beyond verification.
-
We agree. Large-scale autoformalization raises distinct challenges: unlike a self-contained proof within known mathlib content, stating a theorem with 20+ transitive definition dependencies requires navigating an untrusted development environment. We were unaware of a benchmark with sufficient depth and size. Our experiment can therefore also serve as a benchmark: alternative systems may formalize the same targets with less LLM compute. We agree that a carefully chosen chapter could test the same difficulties at a smaller scale, and we hope to be able to provide such an ablation during the discussion period.
-
Yes, reliability depends critically on whether the Lean statements accurately reflect the textbook. Following your suggestion, we audited all 340 target statements, see below.
Statement translation fidelity
Repository-level fidelity checks are harder than checks of standalone Mathlib theorems because statements may depend on substantial project-specific context. For example, the formalized Jacobi–Trudi theorem has 22 transitive dependencies, spanning both mathematical concepts and internal Lean infrastructure.
With this in mind, we conducted a complete audit of all 340 target statements with the following evaluation protocol:
-
We extracted proof-free standalone Lean files containing all target statements and their definition dependencies using an adapted version of EmitStandalone (https://github.com/mattrobball/lean-informal/blob/main/Informal/EmitStandalone.lean). Grouping the 340 targets into 46 chapter-level files reduced redundant review of shared dependencies.
-
We check against adversarial proof techniques (hidden axioms, syntax elaboration tricks etc) using Lean comparator.
-
A frontier model from another family (GPT 5.6 Sol) reviewed all targets for semantic faithfulness. It located each informal statement and corresponding formal declarations, followed repository definitions and dependencies as needed, and assessed semantic equivalence within the repository context. Unlike a fixed declaration-by-declaration pipeline, this agentic approach can follow definitions across files, trace proof and dependency chains, and identify alternative representations and bridging theorems when relevant code is distributed throughout the repository. This is important because there is not always an exact 1:1 mapping between informal and formal declarations.
-
A separate project-level consistency review checked whether duplicated definitions were either connected by proved equivalences or kept separate throughout downstream proof chains (GPT 5.6 Sol). This is to avoid a situation where the source proves P(X) \and Q(X) but the formal version proves P(X) \and Q(X’) for two different versions X and X’ without including an equivalence X \equiv X’.
-
Following reviewer kWUV’s suggestion, we also performed a repository-aware backtranslation audit. Since statements cannot be paired up one by one in isolation, formal concepts were translated into informal language using their required context (as in their standalone files and the informal counterparts) and then compared with the source statements for semantic equivalence in a separate model context using DeepSeek-V4-Pro. The model was instructed to flag ambiguous cases rather than guessing.
This entire procedure has been considered a reasonable fidelity check in the absence of human domain experts by mathlib maintainers. In addition to this automated evaluation protocol, we are performing a human spot checking of a random subset of the 46 “chapter” standalone files by a mathlib maintainer, two PhD students in mathematics and a professor in mathematics.
The results of the audit are as follows:
- Statement-level review: found one substantive issue and three groups of minor inconsistencies. The Jacobi-Trudi formalization identifies the number of variables N with the determinant size M, whereas the informal theorem allows them to vary independently. Ten targets omit trivial zero-extension cases; fourteen use narrower coefficient domains, five of which follow from integral versions by base change; and one uses a different convention for skew Schur polynomials of non-contained partitions, assigning an arbitrary dummy value that is never used in the relevant theorem statements.
- Coherence review: identified 12 duplication clusters involving objects such as partitions, tableaux, Schur polynomials, and Laurent series, but found no incoherent representation switch. Eight clusters are fully bridged, two are partially bridged, and two have no general bridge but are never mixed within an audited proof chain. The incomplete Laurent-series bridge remains the least certain case, although it does not affect the audited theorems because their proof chains do not switch between the unconnected representations.
- Backtranslation audit: initially flagged 178 targets. Full-repository review reduced these to 28 actual findings, 20 already detected by earlier checks and eight additional minor issues. For two targets about formal power series, statements are incomplete, (they include the mathematical work to make mathlib’s finite-support summation results applicable but lack the final invocation thereof). In one case, the statement and proof lack a standard reduction that would allow a finite exceptional set. In one case, a trivial k=0 boundary case is missing, in another an extraneous “no zero divisors” hypothesis is included. In one case, a statement is formulated for simple graphs that could be extended to multigraphs with a standard argument. Two other situations with the different convention for skew Schur polynomials for non-contained partitions were flagged.
- Comparator audit: only flagged the use of native_decide, which is permitted in many Lean projects for faster computation-heavy proofs.
- Human audit is still in process and will be communicated before the end of the week. So far no additional translation mistake was reported. Also, a website with the formalization side-by-side with the informal statement was made public on the Lean Zulip in a dedicated thread before this submission and, while several mathlib contributors had a look at it and engaged in discussion, no formalization mistake was reported.
Overall, except for the M=N issue, we classify the deviations as either minor or defensible alternative conventions. The table below reports repairs implemented by GPT 5.6 Sol for a representative subset; all attempted repairs other than the M=N case required fewer than 200 added lines of Lean. We omit alternative conventions, such as partition containment and zero extension, and typeclass choices from this comparison because their diffs would primarily reflect broad but shallow refactoring rather than the conceptual difficulty of the repair.
| Issue | Targets repaired | Diff |
|---|---|---|
| Jacobi–Trudi: independent (M,N) | 1 | +890/−87 |
| Jacobi–Trudi: non-containment case | 1 | +80/−0 |
| Product-limit converse | 1 | +102/−1 |
| FPS coefficient and Fubini bridges | 2 | +155/−3 |
| Euler identity over arbitrary commutative rings | 1 | +10/−5 |
| Binomial unimodality at (k=0) | 1 | +16/−10 |
| LGV for directed multigraphs | 1 | +129/−0 |
Answers to comments
Research Contribution
We agree that the two goals of this project – to establish that autoformalization at the textbook scale and outside of mathlib coverage is practically feasible, and to propose a rigorously vetted “minimal architecture” that is capable of doing so – are fundamentally at odds given the computational budgets under which we operated. We therefore opted for a pragmatic middle ground where we started off with a simple top-down system with sketchers, provers and reviewers and gradually incorporated additional coordination mechanisms when the need arose. In other words, all components of the final system were informed by some observed deficiency of the previous version, but we cannot guarantee that subsequent features did not fully replace previous features (and we are transparent about this fact, see Section 5.6 for example). However, we agree that additional evidence is required to establish our design as necessary for large-scale autoformalization. At present, we can hint at the following evidence: anecdotal evidence from our development (see above), a heuristic argument for why pure top-down designs are not robust to scaling and comparison with other published projects. For the heuristic argument, consider a dependency tree of depth and a success rate of for statement or definition formalizations. Pure top-down (sketch and prove) approaches never revise statements and thus require all d statements in a chain to be correct, so the success rate goes to zero for large depths . Comparing with related large-scale autoformalization projects, the most relevant existing works use a strict top-down planning procedure (sketcher agent, once the sketch compiles it is frozen, then provers for each proof to fill in), but so far hasn’t been shown to work in domains clearly outside of what mathlib provides. This was very partially discussed in the related work and we will detail it more.
Broader claims
We agree with you that these broader claims may dilute the message of a paper that is primarily a case-study and we removed most of them. In detail, we cut the unsupported “10x efficiency gains” claim and the “other models would behave similarly” speculation, and refer to the answer to reviewer kWUV for background and details related to these claims.
Thank you for the detailed rebuttal. The additional repository-aware checks, coherence analysis, and backtranslation audit considerably improve my confidence in the reported results.
Assuming ongoing human spot-checking does not reveal any additional substantive issues, I believe the paper would constitute the complete empirical studies to date on the capabilities and limitations of LLMs for large-scale autoformalization.
Additional experiments
Thank you very much for your encouraging assessment. We wanted to let you know that the human spot-checking is now complete. The reviewers examined 16 randomly selected chapter files, covering 140 of the 340 targets and their transitive dependencies, and found no major issues. We have posted the full results as an official comment under the meta review for completeness.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This work presents a large-scale case study on the autoformalization of a graduate-level textbook, focusing on the viability of automatically translating informal mathematics into formal statements in Lean 4.
Strengths and weaknesses
Strengths
- Scale. The paper conducts a large-scale study spanning a diverse and challenging set of theorems.
- Insights. The work presents valuable insights into organizing autonomous agent systems for large autoformalization projects. The conclusions drawn are highly relevant and important to the field of formal mathematics.
- Analysis. The authors provide a thorough breakdown of the agent operations, alongside valuable observations on how LLMs handle collaboration when working with overlapping theorems, lemmas, and declarations.
With that being said, there are a few weaknesses that I would like to see addressed.
Weaknesses
- Autoformalization quality. The translation quality was my primary concern while reading this work. The authors extensively discuss repository orchestration but omit a critical evaluation of translation faithfulness. Prior works suggest that translation accuracy remains below desired levels and highlight an observable difference between human- and machine-generated statements [1, 2, 3]. Employing separate critique models is a positive step, but the authors do not explore other quality assurance methods, such as backtranslation [1]. Moreover, they make unsupported claims, such as:
We generally observed a high statement formalization quality bar imposed by the review agents and manually spot-checked key statements and definitions. This gives us a high degree of confidence in the overall correctness of the formalization, but it remains a possibility that individual theorems and definitions have not been translated semantically faithfully.
If a proper manual inspection was performed, could the authors share these results? As it stands, this large-scale autoformalization case study lacks proper large-scale quality assurance. I understand that manually checking everything is not viable; however, an evaluation on a small subset should be included in this paper. For instance, prior to submission, the authors could have tried pushing certain theorems to Mathlib, where repository contributors perform human inspection of new theorems. The over-reliance on automated translation verification is the biggest weakness of this work.
- Unsupported statements. Authors claim:
This experiment used Claude 4.5 Opus, an agentic coding model capable in Lean, but we expect current frontier models to behave roughly comparably on this task.
If the authors do not provide additional experiments or statistics to support such claims, they should not be in the paper. The scale of this work is already substantial; there is no need to include speculative claims. Since this assertion is included, how do the authors support it? What underlying insight justifies it, and which frontier models actually qualify for textbook formalization? Anecdotally, the variance between frontier models regarding their capabilities in Lean differs drastically. Statements lacking a clear reference or empirical support should be avoided. Further examples include:
With the bug fixes integrated over the course of the experiment, prompts that more effectively prevent unnecessary work on exercises and cited theorems from the outset, a more conservative tuning of the degree of parallelism and the relaunch frequency for failed and blocked agents and further general improvements in the orchestration layer, we believe that a 3-10x decrease in inference cost can be achievable without the need for better models.
This discussion could have been moved to a dedicated limitations section in the Appendix. In the main text, it reads awkwardly and dilutes the paper's core message. What is the basis for the "3-10x decrease in cost" estimate? Why not a 20x improvement?
At $100K and one week of wall-clock time, the cost already matches or undercuts a human expert team
There is no cost analysis provided to justify this statement. The work does not appear to contain annotation metrics or any direct cost comparison between manual and automated approaches.
My intention is not to simply criticize the work, but rather to urge the authors to either provide concrete evidence for these claims or remove them entirely. Unsupported statements are unnecessary in a case study paper of this nature, and I strongly advise omitting them.
- Presentation and minor issues. The writing lacks clarity at times. Many paragraphs refer to figures and tables that appear two pages earlier. Additionally, table captions should be placed at the top of the tables. The work lacks a strong, illustrative Figure 1 to help the reader conceptualize the interactions between the various agents. Finally, the related works section should be expanded in the main text; currently, it omits a sizable portion of the necessary discussion regarding both autoformalization and Automated Theorem Proving (ATP). While these issues are not dealbreakers, they made reading the work more difficult than necessary.
References
[1] Gao et al. 2025. Herald: A Natural Language Annotated Lean 4 Dataset. ICLR
[2] Liu et al. 2025. ATLAS: Autoformalizing Theorems through Lifting, Augmentation, and Synthesis of Data. NeurIPS
[3] Ospanov et al. 2025. miniF2F-Lean Revisited: Reviewing Limitations and Charting a Path Forward. NeurIPS
Questions
- What are additional translation equivalence checks beyond prompting agents?
- How human review fit into this? What is the quality assurance protocol for this case study?
- How authors maintain Lean versioning, i.e. compatibility with older/newer releases?
Limitations
yes
Final justification
Since authors will remove unsupported statements and provided explanations for human annotations are sufficient, I am willing to maintain my initial positive assessment.
Formatting concerns
No major paper formatting concerns.
3 comments
Rebuttal
We sincerely thank you very much for your thoughtful and detailed feedback. The points you mention are very relevant, here are our answers:
Answers to questions:
-
Concerning the translation equivalence check, this was indeed the main weakness and we now implement both an automated checking with different components including backtranslation, following your advice. This is detailed in the response to reviewer vEQN (Statement translation fidelity) that we cannot reproduce here due to the rebuttal length limit.
-
Concerning the human review, we agree that this was not detailed enough in the paper. We indeed performed a manual inspection on a subset of the translations by experts, for which we’ll share the results in the paper (see answer to reviewer zCGR). To do so, we extracted standalone Lean files that include the definition dependencies and statement for each target while omitting proofs, unrelated code and multi-file dependencies using EmitStandalone (https://github.com/mattrobball/lean-informal/blob/main/Informal/EmitStandalone.lean) from lean-informal (https://github.com/mattrobball/lean-informal). This allowed us to reduce the review surface to the exact definitions and statements involved in the 340 targets. We adapted the extractor for multi-target standalone files to avoid having to check shared dependencies redundantly, applying it to 46 “chapters” of the formalization, each such standalone file thus covering several targets. We are performing a human spot check of a subset of the 46 “chapter” standalone files as a control test. We will include the results in the paper and we hope to be able to share them by the end of the discussion period. These were selected randomly among the 46 instances. This spot check is conducted by a mathlib maintainer, two PhD students in mathematics and a professor in mathematics, all very familiar with Lean. We did not try to push results to Mathlib following Mathlib’s guidelines at this time. However, we did make the formalization public before this submission on a website where the formalization appears side-by-side with the natural statements and shared it on the Lean Zulip on a dedicated thread. While several mathlib contributors had a look at it and engaged in discussion, no formalization mistake was reported so far.
-
We agree that automatic version updates are a major research topic once large-scale textbook autoformalization runs stably, but we decided to keep this question out of scope for this pilot. We use a fixed Lean version (v4.28.0) for the entire experiment, and provide mathlib search tools directly for this pinned version.
Answers to comments:
Unsupported statements, we agree that they should not be in the paper without more justification.
“This experiment used Claude 4.5 Opus, an agentic coding model capable in Lean, but we expect current frontier models to behave roughly comparably on this task.” Our idea behind was that several frontier models are now better in Lean than Claude Opus 4.5 (for instance performances of Claude Opus 4.5 on ProofBench are below the performances of Claude Opus 5, Fable 5, Gpt-5.6-Sol, Kimi K3 and of the order of the ones of GLM 5.2, Muse Spark 1.1). Since we did not run the pipeline with other models and don’t have quantitative statistics, we’ll nevertheless remove this claim from the paper, following your suggestion.
“a 3-10x decrease in inference cost can be achievable without the need for better models” the situation is easier: at least ⅔ of the tokens were “wasted” while establishing the final design of the pipeline, which means that running the (open-source) pipeline today with Claude Opus 4.5 would cost at least 3 times less (in tokens). We will move this discussion in the Appendix and remove the unsupported “10x” following your very relevant suggestion, as we agree that it dilutes the main message.
“the cost already matches or undercuts a human expert team”: estimating the human cost of formalization projects is difficult as contributions are primarily by volunteers and on a part-time basis. The single data point we are aware of is the Empty Hexagon project (https://arxiv.org/abs/2403.17370) which reports 300 person-hours for a formalization project of 4.7K lines of code. Assuming a yearly employer cost of $100K-150K for Lean experts, this would amount to $360-540K for the algebraic combinatorics textbook (assuming: similar difficulty, similar level of verbosity). Other noteworthy projects include the Liquid Tensor Experiment (82K LOC, 18 months runtime, 18 contributors; https://arxiv.org/abs/2309.14870) and the Carleson project (44K LOC, 13 months runtime, 14 paper authors + 14 other contributors; https://florisvandoorn.com/carleson/paper.pdf). This would tend to suggest a much larger cost for a team of human experts than the current experiment. We agree that the comparison would need to be with mathlib-quality grade formalization. Even with a good trust in the quality of the statements and definitions translation thanks to the evaluation protocol described above, the proofs, while correct, may not be mathlib-quality grade.
Minor issues
Thank you also for the comments: we moved the table captions on top of the tables, added a Figure 1 that summarizes the interactions between the different agents, and expanded the related work on the part related with autoformalization and include related works on ATP in formal language.
I thank the authors for their rebuttal. I will maintain my initial positive assessment.
Additional audit and ablations
Thank you very much for your positive assessment. For completeness, we wanted to let you know that we have now posted the final results of the human review, covering 140 of the 340 targets and their transitive dependencies, with no major issues found. We have also posted an additional ablation comparing the full system with a minimal sketcher-and-prover system.
- Rating
- 3/6
- Confidence
- 4/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper presents a large-scale case study in which roughly 30,000 Claude 4.5 Opus agent runs collaborate on formalizing a 500-page algebraic combinatorics textbook in Lean. The workflow adapts standard repository engineering git branches, pull-request review, a merge queue, and a file-based issue tracker to multi-agent formalization. The resulting repository contains about 130K lines, 5,900 declarations, and proofs for 340 selected target definitions and theorems. The paper also reports detailed token and outcome statistics and discusses several coordination and formalization failures encountered during the run.
Strengths and weaknesses
The scale of the experiment is notable, and the released code and Lean artifact could be useful to researchers studying repository-level agents. The paper is also candid about wasted computation, merge bottlenecks, duplicated definitions, incorrect intermediate formalizations, and prompt or orchestration changes made during the run. These observations are valuable as a systems case study. My main concern is that the evaluation does not establish the mathematical quality or completeness of the resulting formalization. The software-engineering formulation at lines 99–102 is incomplete: Lean compilation verifies proofs relative to the formal definitions and statements in the repository; it does not verify that those definitions and statements faithfully encode the source textbook. The paper reports only manual spot checks of selected statements (lines 212–217) and explicitly acknowledges possible semantic mismatches. Appendix F further documents placeholder definitions, duplicated representations, incorrect versions of the Bender–Knuth involution, and cases where prover agents successfully proved consequences of broken definitions. These examples directly expose the failure mode that the current evaluation does not measure. Relatedly, the claim that the system formalizes a “complete” textbook is not sufficiently supported. Counts of lines and declarations are not substitutes for source coverage, semantic fidelity, or library quality. Appendix E lists substantial topics, but the paper does not characterize target difficulty, distance from existing mathlib content, or dependency depth. The framing at lines 60–68 around removing human review is therefore premature. The paper does not demonstrate that agent reviewers are a reliable replacement for expert review; it mainly omits an exhaustive human correctness gate. Since generation and mathematical review appear to use the same underlying model family, correlated semantic errors are plausible. Human involvement also includes spot checks, prompt changes, restarts, new agent roles, and manually initiated status analyses. This is reasonable for an exploratory study, but it should be quantified and reflected in the claims. The methodological contribution is less clear than the scale result. An architecture diagram or explanation with fixed algorithm would substantially improve the paper. Efficiency is another major concern. The reported $100K cost is a back-of-the-envelope estimate because cache statistics were not logged. The proposed 3–10× improvement is also not experimentally demonstrated. The statement that this cost matches or undercuts a human expert team (lines 308–310) lacks a labor model and, more importantly, does not compare deliverables under the same quality standard. A human-produced formalization would normally include expert validation of statements, definitions, interfaces, and maintainability, none of which is measured here. The comparison with M2F (arXiv:2602.17016) should be revised. M2F is close in scale and method. The cited preprint also links public artifact repositories, so describing it as closed-source appears inaccurate. The present paper may offer a distinct contribution in highly parallel repository coordination, but that distinction needs a direct and technically accurate comparison. Treating M2F’s human statement audit primarily as a limitation is also unconvincing when this paper provides no alternative semantic-quality evaluation. Finally, blocking internet access (lines 189–190) is defensible as a contamination control, but it creates a tension between benchmarking and realistic formalization practice. Appendix B lists local file, grep, and declaration search, but does not clarify whether agents had access to mathlib retrieval such as Loogle, LeanSearch, or an offline equivalent. The paper should separate contamination prevention from access to normal library-navigation tools.
Questions
-
Semantic fidelity and coverage. Can the authors provide an independent expert audit of all 340 targets, or a stratified random sample, with a clear error rate? Please separately report statement fidelity. A strong audit with a low mismatch rate would materially improve my assessment.
-
Method and human involvement. Can the authors provide a fixed architecture or pseudocode for the final system, together with an human intervention log and expert time?
-
Cost comparison. What exact assumptions yield the human-team comparison? Please specify person-hours, and acceptance criteria, and compare them against a semantically audited machine artifact.
-
Related work, retrieval tools. Please expand the comparison with M2F(arXiv:2602.17016) , clarify whether mathlib search was available.
Limitations
The paper discusses cost and coordination failures openly, but the central limitations are not adequately addressed: semantic faithfulness is not systematically evaluated; same-model review may have correlated errors; and maintainability or community reuse is not assessed. Claims about replacing human review, resolving the coordination bottleneck, and matching human experts should be narrowed until these issues are evaluated.
Formatting concerns
No major concerns.
2 comments
Rebuttal
We sincerely thank you very much for your thoughtful and detailed feedback. We indeed position the paper as a case study, and we are grateful that you recognized and evaluated it as such. To address the individual points:
Statement translation fidelity
We conducted a thorough audit with several steps (end-to-end agentic review of each statement, backtranslation, definition duplication consistency alongside human spot checking currently under way). The audit flagged one issue and several minor discrepancies among a total of 340 target statements. See our answer to reviewer vEQN (Statement translation fidelity) for the full audit protocol and results (that we cannot reproduce here due to the rebuttal length limit).
Source coverage / completeness
As rightly pointed out, it is difficult to establish what “complete” coverage means for a textbook formalization (include exercises, examples, introductory prose?). We therefore decided to designate 340 definitions and theorems as targets for the formalization. These are selected to represent deep results and include most leaves / final theorems of the respective chapters. The full list of selected targets can be found here: https://anonymous.4open.science/r/algebraic-combinatorics-8C35/manifest.json. We did not characterize target difficulty, distance from existing mathlib content, or dependency depth in the paper because we did not know of an objective way for establishing these ex ante, without trying to formalize them in the first place. Our reason for selecting the textbook, however, was that it appears to be within the halo of mathlib, reachable but mostly disjoint. The formalization appears to back this initial assessment.
Human involvement
As indicated in Fig. 4 (dotted vertical lines), there were 12 restarts involving code changes or interventions in the issue tracker. Code changes are not subject-specific but of course driven by issues encountered over the course of the run (see anonymized repository linked in the paper). Restarts following interventions in the issue tracker worked as follows: when the run appeared to have stalled (based on merge statistics), we stopped it and prompted a Claude 4.5 Opus agent to assess the status, find blockers, and update the issue tracker by closing, merging and creating new issues with the goal of simplifying the orchestration without losing track of what’s left to do. This process could (and probably should) be automated in future such projects. We did not use any Lean expertise ourselves in these interventions and deliberately chose a textbook on a topic we have no acquaintance with. We estimate our involvement with code base efficiency and bug fixes to be of several hours over the course of the one week experiment, while our mathematical involvement was minimal or absent. In the final version of the code base, no human intervention is necessary other than for the final evaluation of the resulting repository.
Mathlib search
As mentioned in App. B, specialized tools were included for mathlib search (file search, mathlib grep, declaration search with specialized regular expressions). We opted for this solution instead of heavier semantic search tools, as we observed Claude models to explore a local mathlib installation with standard bash tools (find, grep) with great success. The tools we provided are convenience wrappers with read access to the mathlib installation outside of the bash sandbox. With these search tools, we did not see the necessity for internet access so we blocked it for security and contamination prevention purposes.
Cost reporting and efficiency
We provide detailed token usage statistics which is an objective way of reporting LLM compute usage without relying on inference provider implementation specifics. We believe the calculation in App. A to be a sensible upper bound. For a definitive upper bound, assume no caching ( USD 430K). Indeed, we noticed a mistake in the formula where we accounted for both cache write and input while in reality only one of them is charged. With the fixed formula, the estimate for 1h cache writes is USD 84K and with 5min cache writes, it is USD 73K. Regarding the margin for 3x efficiency gains, see the response to reviewer kWUV.
Human cost model
Estimating the human cost of formalization projects is difficult as contributions are primarily by volunteers and on a part-time basis. The single data point we are aware of is the Empty Hexagon project (https://arxiv.org/abs/2403.17370) which reports 300 person-hours for a formalization project of 4.7K lines of code. Assuming a yearly salary of 100K-200K USD for Lean experts, this would amount to 360-720K USD for the algebraic combinatorics textbook (assuming: similar difficulty, similar level of verbosity). Other noteworthy projects include the Liquid Tensor Experiment (82K LOC, 18 months runtime, 18 contributors; https://arxiv.org/abs/2309.14870) and the Carleson project (44K LOC, 13 months runtime, 14 paper authors + 14 other contributors; https://florisvandoorn.com/carleson/paper.pdf).
Comparison with M2F
M2F is a highly relevant piece of related work and comparable in scale. It uses a two-stage pipeline with a sketching phase (definitions and statements) and a proving phase (filling in proofs). A human audit evaluates statement translation faithfulness between both phases. Our experiment can be viewed as an attempt to answer the question: What happens if you remove the human statement audit and go fully autonomous? Note that this does not replace human evaluation of the final artifact (see above) but our approach of designating hard target theorems whose dependency tree is supposed to cover a large part of their respective chapters reduces the review surface to the targets only while maintaining high coverage of the textbook. Crucially, in domains like algebraic combinatorics it is easy to get important definitions subtly wrong in a way that would even be hard for humans to spot (e.g. Bender-Knuth involutions discussed in the paper), but only the correct definition allows to prove downstream theorems such as symmetry or Stembridge’s lemma. We empirically observed statement fixes driven by issues in downstream usage, and this reinforces our claim that hard targets can drive intermediate statement correctness, provided that the autoformalization system is not a strict top-down design.
Additional paper edits
We thank you for the suggestion to add an instructive Figure 1 and explanation of the orchestration system in pseudo-code. Likewise, we will expand the Related Work section including a more accurate comparison with M2F and a discussion of the human labor cost estimate in an appendix. We will remove unsubstantiated claims such as “other frontier models would behave similarly” or the expected “10x cost reductions”.
Additional audit and ablation
Thank you again for your detailed and constructive feedback. Since you indicated that a strong independent audit with a low mismatch rate would materially improve your assessment, we wanted to highlight that the human review is now complete. Independent experts examined 16 randomly selected chapter files, covering 140 of the 340 targets and their transitive dependencies, and found no major issues; all 43 minor issues and comments are reported transparently in our official comment under the meta review.
We have also posted an additional ablation comparing the full system with a minimal sketcher-and-prover system, providing direct evidence for the value of the orchestration components. We hope these new results address the principal concerns underlying your initial assessment and would be grateful if you could take them into account in your final evaluation.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Human statement review
We conducted a human review of all targets and their transitive dependencies for 16 out of the 47 standalone chapter files described in our answer to reviewer vEQN (Statement translation fidelity). The chapter files were randomly selected and assigned to two math PhD students, one math PhD, one math professor – all of which with extensive knowledge of Lean – and one mathlib maintainer. This covers 140 out of 340 targets and 340 Lean declarations overall.
The audit found no major issues with the statement and definition formalizations, and flagged 43 minor issues and comments:
Overall, there are two mathematical issues worth highlighting:
Note that the automated audits had already surfaced most of these minor issues, e.g. the omission of trivial cases in definitions with extension by zero.
One reviewer additionally left the following comments, highlighting both the overall quality of the formalization and the difficulty of conducting repository-level formalization audits:
Overall, we believe this supports our assessment that the repository overall represents the mathematical content of the textbook in a faithful way, with deviations and different conventions / decisions no larger than in a human formalization project.