arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.17016cs.AI
收藏

M2F:大规模数学文献的自动化形式化

M2F: Automated Formalization of Mathematical Literature at Scale

School of Mathematical Sciences, Peking University(北京大学数学科学学院);Beijing International Center for Mathematical Research, Peking University(北京大学北京国际数学研究中心);Huawei Technologies(华为技术有限公司);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心)

Zichen Wang, Wanli Ma, Zhenyu Ming, Gong Zhang, Kun Yuan, Zaiwen Wen

AI总结:

M2F通过端到端自动化形式化框架,在三周内将教科书转化为Lean库,实现96%的证明成功率。

摘要:

自动化形式化数学能够实现机械验证,但目前仍局限于孤立的定理和短片段。扩展到教科书和研究论文尚属空白,因为它需要管理跨文件依赖关系、解决导入问题,并确保整个项目能够端到端地编译。我们提出了M2F(Math-to-Formal),这是首个面向端到端、项目级自动形式化的框架,在Lean中实现。该框架分为两个阶段。声明编译阶段将文档分成原子块,通过推断依赖关系对它们进行排序,并修复声明骨架,直到项目能够编译,允许在证明中使用占位符。证明修复阶段则在固定签名下,通过目标条件化的局部编辑来关闭这些空缺。在整个过程中,M2F始终让验证器参与其中,只有在工具链反馈确认改进时才提交编辑。在大约三周内,M2F将长篇数学文献转换为一个包含153,853行代码的项目级Lean库,该库来自479页的实分析和凸分析教科书,完全形式化为Lean声明并附有证明。这代表了教科书级的形式化速度,通常需要数月或数年的专家努力。在FATE-H上,我们实现了96%的证明成功率(相比强基线的80%)。这些结果共同表明,实用的、大规模的数学文献自动化形式化已处于可及范围。我们运行生成的完整Lean代码可在https://github.com/optsuite/ReasBook.git上获得。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑