Skip to main content
QUICK REVIEW

[Paper Review] M2F: Automated Formalization of Mathematical Literature at Scale

Zichen Wang, Wanli Ma|arXiv (Cornell University)|Feb 19, 2026
Mathematics, Computing, and Information ProcessingComputer Science0 citations
TL;DR

M2F automates end-to-end formalization of long-form mathematical texts into Lean using a two-stage VeriRefine pipeline, achieving high project-scale buildability and strong proof repair performance.

ABSTRACT

Automated formalization of mathematics enables mechanical verification but remains limited to isolated theorems and short snippets. Scaling to textbooks and research papers is largely unaddressed, as it requires managing cross-file dependencies, resolving imports, and ensuring that entire projects compile end-to-end. We present M2F (Math-to-Formal), the first agentic framework for end-to-end, project-scale autoformalization in Lean. The framework operates in two stages. The statement compilation stage splits the document into atomic blocks, orders them via inferred dependencies, and repairs declaration skeletons until the project compiles, allowing placeholders in proofs. The proof repair stage closes these holes under fixed signatures using goal-conditioned local edits. Throughout both stages, M2F keeps the verifier in the loop, committing edits only when toolchain feedback confirms improvement. In approximately three weeks, M2F converts long-form mathematical sources into a project-scale Lean library of 153,853 lines from 479 pages textbooks on real analysis and convex analysis, fully formalized as Lean declarations with accompanying proofs. This represents textbook-scale formalization at a pace that would typically require months or years of expert effort. On FATE-H, we achieve $96\%$ proof success (vs.\ $80\%$ for a strong baseline). Together, these results demonstrate that practical, large-scale automated formalization of mathematical literature is within reach. The full generated Lean code from our runs is available at https://github.com/optsuite/ReasBook.git.

Motivation & Objective

  • Turn textbook- or paper-scale mathematical content into a buildable Lean project under a fixed environment.
  • Enable end-to-end formalization with provenance linking from declarations to source spans.
  • Develop a verifier-certified refinement loop (VeriRefine) to ensure progress only on toolchain improvements.
  • Demonstrate scalability to hundreds of pages and large Lean libraries while maintaining proof integrity.
  • Provide quantitative evaluation against baselines and external provers on real and benchmark datasets.

Proposed method

  • Two-stage pipeline: Stage 1 (statement compilation) converts content into Lean skeletons with possible placeholders, repairing them until the project elaborates.
  • Stage 2 (proof repair) fixes remaining holes with goal-conditioned local edits while holding statement signatures fixed.
  • VeriRefine: an accept/revert primitive that commits edits only when Lean toolchain feedback shows objective improvement.
  • Pinned Lean environment guarantees reproducible builds and diagnostics-driven acceptance.
  • Proposals for patches can come from LLMs or other agents, but confirmation is strictly toolchain-driven.
Figure 1 : The M2F pipeline for project-scale automated formalization.
Figure 1 : The M2F pipeline for project-scale automated formalization.

Experimental results

Research questions

  • RQ1Can long-form mathematical sources be transformed into a coherent, end-to-end Lean project under a fixed environment?
  • RQ2How effectively can a verifier-driven refinement loop close all proof holes at project scale without regressions?
  • RQ3What is the impact of matched-statement evaluation on proving success compared to baseline provers?
  • RQ4How does Stage 2 performance compare to state-of-the-art proof systems on standardized benchmarks like FATE-H?

Key findings

  • M2F outputs a buildable Lean library from 479 pages of textbooks, totaling 241 files, 4,116 declarations, and 153,853 lines of Lean code.
  • Stage 1 achieves 100% statement-compile coverage (SCC) across Real Analysis, Convex Analysis, and Paper with low average repair rounds (ARR ~0.08–0.42).
  • Stage 2 achieves 100% proof-success on matched statements for long-form corpora (PSR = 100% across all three corpora).
  • On the external FATE-H benchmark, Stage 2 reaches 96% PSR under matched statements, outperforming Seed-Prover 1.5 (80%).
  • With a light-supervision condition (+31 decl lemma map), Stage 2 achieves 97% PSR on FATE-H.
Figure 3 : FATE-H per-problem code length (non-empty lines) and outcome category. Colors indicate outcome: green = solved automatically, yellow = solved with lemma-map supervision, red = unsolved; the single wrong-statement instance is shown with a distinct style (see § 6.4 ).
Figure 3 : FATE-H per-problem code length (non-empty lines) and outcome category. Colors indicate outcome: green = solved automatically, yellow = solved with lemma-map supervision, red = unsolved; the single wrong-statement instance is shown with a distinct style (see § 6.4 ).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.