[论文解读] M2F: Automated Formalization of Mathematical Literature at Scale
M2F 自动化将长篇形式的数学文本端到端形式化为 Lean,采用两阶段 VeriRefine 流水线,在项目规模的可构建性和强证明修复性能方面表现出色。
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.
研究动机与目标
- 在固定环境下,将教科书级或论文级的数学内容转化为可构建的 Lean 项目。
- 实现从声明到源代码跨度的溯源链接的一体化形式化。
- 开发经验证人认证的 refinement 循环(VeriRefine),确保仅在工具链改进时才有进展。
- Demonstrate scalability to hundreds of pages and large Lean libraries while maintaining proof integrity.
- 对实际和基准数据集进行相对于基线和外部证明者的定量评估。
提出的方法
- 两阶段流水线:阶段 1(陈述编译)将内容转换为带有可能占位符的 Lean 骨架,并在项目展开前进行修复。
- 阶段 2(证明修复)在保持陈述签名固定的情况下,通过目标条件的局部编辑来修复剩余漏洞。
- VeriRefine:一个接受/回退原语,只有在 Lean 工具链反馈表明目标有所改进时才提交编辑。
- 固定的 Lean 环境保证再现性构建和诊断驱动的接受。
- 补丁提案可以来自 LLM 或其他代理,但确认严格由工具链驱动。

实验结果
研究问题
- RQ1在固定环境下,长篇形式的数学来源能否转化为一个连贯的端到端 Lean 项目?
- RQ2在项目规模下,验证驱动的 refinement 循环能否在不产生回退的情况下关闭所有证明漏洞?
- RQ3匹配陈述评估对与基线证明者相比的证明成功有何影响?
- RQ4阶段 2 相较于像 FATE-H 这样的标准基准,表现如何?
主要发现
- M2F 能从 479 页教科书中输出一个可构建的 Lean 库,总计 241 个文件、4,116 条声明、153,853 行 Lean 代码。
- 阶段 1 在 Real Analysis、Convex Analysis 和 Paper 三个领域实现了 100% 的 statement-compile 覆盖(SCC),平均修复轮数很低(ARR ~0.08–0.42)。
- 阶段 2 在长篇语料库的匹配陈述上实现了 100% 的证明成功率(PSR = 100%),覆盖全部三个语料库。
- 在外部基准 FATE-H 上,阶段 2 在匹配陈述下达到 96% 的 PSR,超过 Seed-Prover 1.5(80%)。
- 在轻度监督条件下(+31 decl lemma map),阶段 2 在 FATE-H 上达到 97% 的 PSR。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。