用AI自动将几何题转为可验证的正式证明,解决国际奥数题并自动生成反例。
MechGeo: Autoformalizing and Proving Euclidean Geometry in Lean 4

- 通过结构诊断与语义评估迭代修复几何命题,实现精准形式化。
- 在43道历史奥数题中成功证明29题,14题生成可验证反例。
- 首次对LEAP基准中12个几何题给出形式化证明,适合数学推理研究者。
我们提出MechGeo,一个基于Mathlib的原生智能框架,联合解决欧氏几何的忠实自动形式化与可信证明构建问题。其中,GeoFormalizer将非形式化问题从GeoIR转化为Lean 4代码,通过结构诊断与语义评估迭代修复候选命题;GeoProver构建几何证明计划,推导中间引理,并选择性地对合适子目标进行代数化,所用库已在Lean中验证。奇异值分解或SymPy生成代数证明证书,但所有证明与反例均由Lean内核检查。七种LLM模型实验显示,尤其在直接翻译能力较弱的模型上提升显著。在43道历史国际数学奥林匹克(IMO)几何题中,GeoFormalizer生成的形式化命题被GeoProver证明29题;其余14题构造出由Lean验证的反例,并在专家修正后全部完成证明。结合IMO 2026年第2题,这是目前已知规模最大的自动化、内核验证的IMO几何题形式化证明集合。在LEAP的Lean-IMO-Bench中14个几何命题上,MechGeo首次证明12题,形式化否定剩余两题,并证明其修复后版本。这些结果确立了反例引导诊断、几何推理与可信符号计算作为可信赖形式化几何的实用基础。
原文摘要 · Abstract (English)
We present MechGeo, a Mathlib native agentic framework that jointly addresses faithful autoformalization and certified proof construction for Euclidean geometry. In this framework, GeoFormalizer represents informal problems in GeoIR, deterministically translates them into Lean 4, and iteratively repairs candidate statements using structural diagnostics and semantic evaluation. GeoProver constructs geometric proof plans, derives intermediate lemmas, and selectively algebraizes suitable subgoals through a library verified in Lean. Singular or SymPy may generate algebraic certificates, but all resulting proofs and counterexamples are checked by Lean's kernel. Experiments across seven LLM backbones show substantial improvements in autoformalization, particularly for models with weaker direct translation performance. On 43 historical IMO geometry problems, GeoFormalizer generates formal statements that GeoProver proves in 29 cases; for the remaining 14, it constructs counterexamples verified in Lean and proves all repaired statements after expert correction. Together with IMO 2026 Problem 2, this yields, to the best of our knowledge, the largest reported collection of automated, kernel-checked Lean proofs for IMO geometry problems. On the 14 geometry statements in LEAP's Lean-IMO-Bench, MechGeo proves 12 for the first time, formally refutes the remaining two, and proves both repaired statements. These results establish counterexample guided diagnosis, geometric reasoning, and certified symbolic computation as a practical foundation for trustworthy formal geometry.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。