# 计算机辅助证明

计算机辅助证明是一种数学证明，其中计算机执行大量计算或穷举式的情形检验，而这些工作若由人工验证则不切实际。此类证明通常分两步进行：先通过分析将定理归约为有限个可检验的条件，再对这些条件进行严格的计算机验证。<sup>[1](https://ar5iv.labs.arxiv.org/html/1810.00745)</sup> 里程碑式的成果包括四色定理——1976年借助覆盖约十亿种情形的程序得证，<sup>[2](https://www.cl.cam.ac.uk/~lp15/Pages/4colproof.pdf)</sup> 开普勒猜想——其1998年的证明后来由飞检计划完全形式化，<sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup> 以及布尔毕达哥拉斯三元组问题——2016年由一个SAT求解器（判定逻辑公式是否可满足的程序）解决，产生的证明达200太字节。<sup>[4](https://doi.org/10.48550/arxiv.1605.00723)</sup>

| 事实 | 详情 |
|---|---|
| 标准结构 | 分析归约为有限条件，然后进行严格的计算机验证<sup>[1](https://ar5iv.labs.arxiv.org/html/1810.00745)</sup> |
| 四色定理 | 1976年得证；可约性检验在IBM 360上运行约1,200小时<sup>[2](https://www.cl.cam.ac.uk/~lp15/Pages/4colproof.pdf)</sup><sup> • </sup><sup>[5](https://link.springer.com/chapter/10.1007/978-981-96-4745-3_3)</sup> |
| 开普勒猜想 | 堆积密度至多为 \( \pi/\sqrt{18} \)；飞检形式化于2014年8月10日完成<sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup><sup> • </sup><sup>[6](https://drops.dagstuhl.de/storage/16dagstuhl-seminar-proceedings/dsp-vol05021/DagSemProc.05021.16/DagSemProc.05021.16.pdf)</sup> |
| 布尔毕达哥拉斯三元组 | 在超级计算机上耗费4个CPU年；证明达200太字节<sup>[4](https://doi.org/10.48550/arxiv.1605.00723)</sup><sup> • </sup><sup>[7](https://cs.uwaterloo.ca/%7Eshallit/Talks/ciaa21.pdf)</sup> |
| 严格算术 | 若 \( x \in [x] \) 且 \( y \in [y] \)，则 \( x \star y \in [x] \star [y] \)<sup>[1](https://ar5iv.labs.arxiv.org/html/1810.00745)</sup> |
| 证明助手 | Coq、Isabelle和Lean验证逻辑论证；代码只有在证明有效时才能编译通过<sup>[8](https://www.ams.org/journals/notices/202501/noti3041/noti3041.html)</sup> |

## 工作原理

穷举证明。黑尔斯的开普勒证明利用计算构建了一个包含数千个“驯服”图的穷举数据库，然后为与之相关的非线性与线性优化问题求界。<sup>[9](https://www.contrib.andrew.cmu.edu/~avigad/Papers/computers.pdf)</sup>

严格算术防止舍入误差使结论失效。区间算术用保证包含真值的区间代替数；其关键性质是：若 \( x \in [x] \) 且 \( y \in [y] \)，则对任意算子 \( \star \)，有 \( x \star y \in [x] \star [y] \)。<sup>[1](https://ar5iv.labs.arxiv.org/html/1810.00745)</sup> 自验证方法用浮点算术进行计算，速度快；它们可能因给不出答案而失败，但绝不会给出错误答案，且只适用于适定问题。区间牛顿法证明非线性系统的零点存在或不存在：若 \( N([x]) \subseteq [x] \)，则 \( [x] \) 中恰有一个零点。<sup>[10](https://www.tuhh.de/ti3/paper/rump/Ru05a.pdf)</sup> 朴素的区间包络可能随迭代呈指数增长，即包裹效应，并会因依赖问题而爆炸；追踪坐标变换的包络，如泰勒模型，可以控制这种增长。<sup>[11](https://ar5iv.labs.arxiv.org/html/2603.15073)</sup>

搜索引擎处理组合方面。布尔毕达哥拉斯三元组的证明使用了立方-征服式SAT求解。<sup>[4](https://doi.org/10.48550/arxiv.1605.00723)</sup> MathCheck组合将计算机代数嵌入冲突驱动子句学习SAT求解器的内层循环，由代数系统提供学习子句，这些子句编码了特定理论的引理并削减搜索空间。<sup>[12](https://www.ijcai.org/Proceedings/16/Papers/636.pdf)</sup> 在开普勒证明中，线性规划松弛排除了大多数驯服图；当单个规划问题无法给出所需界时，就用分支定界将其分解为一系列界。<sup>[13](https://annals.math.princeton.edu/wp-content/uploads/annals-v162-n3-p01.pdf)</sup>

## 实施步骤

典型的证明遵循固定顺序。首先，通过分析将定理归约为有限个条件，例如有界区域上的不等式。<sup>[1](https://ar5iv.labs.arxiv.org/html/1810.00745)</sup> 其次，程序使用严格算术验证这些条件，从而在构造上计入舍入误差。第三，结果需向学界提供认证。认证可以采取可重放的证明证书形式，SAT和SMT求解器能够输出这种证书；<sup>[8](https://www.ams.org/journals/notices/202501/noti3041/noti3041.html)</sup> 也可以在证明助手中进行完全形式化，如飞检计划，其脚本约五十万行代码，估计耗费20人年；<sup>[14](https://arxiv.org/abs/2402.08032)</sup> 或者采用传统同行评审。同行评审在这种规模下捉襟见肘：1998年的开普勒证明评审了五年，首席评审人写道他有99%的把握认为其正确，最终该证明在未获评审人完全认证的情况下发表。<sup>[6](https://drops.dagstuhl.de/storage/16dagstuhl-seminar-proceedings/dsp-vol05021/DagSemProc.05021.16/DagSemProc.05021.16.pdf)</sup><sup> • </sup><sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup>

## 起源

四色定理问的是是否每张平面地图至多需要四种颜色；它于1852年被提出，1878年经凯莱首次见于印刷品，并抵挡住了1879年一个有缺陷的证明，直到计算机时代才被攻克。关于可约构形的猜想是在基尔大学的一次学术报告会上提出的，<sup>[15](https://projecteuclid.org/download/pdf_1/euclid.ijm/1256049011)</sup> 到1965年，已存在一种计算机算法来机械地检验构形的可约性。<sup>[5](https://link.springer.com/chapter/10.1007/978-981-96-4745-3_3)</sup> 该证明在多伦多举行的美国数学学会夏季会议上宣布，1977年发表于《伊利诺伊数学杂志》。<sup>[5](https://link.springer.com/chapter/10.1007/978-981-96-4745-3_3)</sup><sup> • </sup><sup>[15](https://projecteuclid.org/download/pdf_1/euclid.ijm/1256049011)</sup>

对于开普勒猜想，人们发展出一套连贯的证明策略，最终暗示可以使用计算机；<sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup> 黑尔斯于1998年将证明发布在arXiv上，<sup>[16](https://doi.org/10.48550/arxiv.math/9811078)</sup> 马夏尔在2009年发表于《数学时代报》的论文中引入了蓝图证明所使用的空间几何划分。<sup>[17](https://doi.org/10.1007/s00209-009-0644-2)</sup>

## 变体

计算机辅助与完全形式化。在计算机辅助证明中，程序的输出按计算结果被信任；在完全形式化证明中，每一步逻辑都由机器检验，从而将信任降至证明助手的内核。四色定理说明了这一转变：贡蒂埃2005年的Coq形式化复用了罗伯逊、桑德斯、西摩和托马斯编制的633个可约构形与32条放电规则的目录，该证明作者标注的日期为1996年，而贡蒂埃报告中记为1995年。<sup>[2](https://www.cl.cam.ac.uk/~lp15/Pages/4colproof.pdf)</sup><sup> • </sup><sup>[18](https://math.gatech.edu/~thomas/FC/fourcolor.html)</sup>

严格数值与认证数值。仿射算术通过追踪程序变量之间的线性依赖关系改进了区间算术；Isabelle/HOL中一个经过验证的ODE求解器将其与精确到三阶的两级龙格–库塔法结合使用，并能认证塔克的洛伦兹计算。<sup>[19](https://link.springer.com/article/10.1007/s10817-017-9448-y)</sup> 飞检计划结合了HOL Light和Isabelle，并在HOL Zero中对主要陈述进行了第二次验证；所有形式化数值计算都使用专门形式化的有限精度浮点数，而非机器的原生浮点运算。<sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup>

## 应用

在分析学中，兰福德于1982年在《美国数学学会公报》上发表了费根鲍姆猜想的计算机辅助证明，<sup>[20](https://doi.org/10.1090/s0273-0979-1982-15008-x)</sup> 首次展示计算机能够证明泛函分析中的定理，他用严格区间算术界定泰勒系数并应用压缩映射定理。<sup>[11](https://ar5iv.labs.arxiv.org/html/2603.15073)</sup> 塔克于1999年用正规形理论和区间算术证明了洛伦兹吸引子的存在性，解决了斯梅尔的第14个问题。<sup>[11](https://ar5iv.labs.arxiv.org/html/2603.15073)</sup>

在离散数学中，证明10阶有限射影平面不存在在Cray上耗费了2,000小时；威廉·麦丘恩1996年用自动定理证明器证明了罗宾斯猜想，解决了一个自20世纪30年代以来悬而未决的问题；赫尔证明了舒尔数S(5)等于160。<sup>[21](https://www.ams.org/journals/notices/201806/rnoti-p681.pdf)</sup>

近期的工作转向大规模使用证明助手。2023年，陶哲轩带领约20名合作者在三周内形式化了33页的Gowers–Green–Manners–Tao证明。<sup>[8](https://www.ams.org/journals/notices/202501/noti3041/noti3041.html)</sup> 液态张量实验由科梅兰于2022年在《德国数学家联合会通讯》上记录。<sup>[22](https://doi.org/10.1515/dmvm-2022-0058)</sup> 2026年，一个AI驱动的项目在11天内产出了费马大定理的计算机检验证明：29,511个定理和约1,300万行Lean代码，仅依赖Lean的三条标准公理；Lean FRO比较器通过Lean内核重放了整个证明，而内核的独立Rust重实现nanoda接受了每一条声明。<sup>[23](https://www.anthropic.com/research/formalizing-fermats-last-theorem)</sup><sup> • </sup><sup>[24](https://www-cdn.anthropic.com/9e431dff043da6538d99d6c2d231b670aa3da263.pdf)</sup> 四色定理的一个新计算机证明于2026年3月在线发布，使用一个包含8,202个构形的不可免集，这些构形可以并行归约，给出一个对 \( n \) 个顶点的图需要 \( n \log n \) 步的四着色算法，而早先的证明需要 \( n^{2} \) 步。<sup>[25](https://www.quantamagazine.org/the-four-color-theorem-gets-a-rare-new-proof-20260910/)</sup>

## 局限与替代方案

失败模式已有记录。开普勒证明中的数百个小错误在形式化过程中得到纠正。<sup>[3](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)</sup> 塔克发现并修复了他C++程序中的错误，这些程序未经形式验证。<sup>[19](https://link.springer.com/article/10.1007/s10817-017-9448-y)</sup> 阿佩尔–哈肯的不可免性计算——数百页缩微胶片由哈肯的女儿多萝西娅·布洛斯坦人工验证——包含多处可修复的错误。<sup>[8](https://www.ams.org/journals/notices/202501/noti3041/noti3041.html)</sup>

哲学辩论始于1979年的蒂莫奇科，他主张无法通览的阿佩尔–哈肯证明构成了后验的、实验性的辩护，并得出结论说它“使四色定理成为第一个后验已知的数学命题”。<sup>[26](https://philpapers.org/archive/SECPVE.pdf)</sup> 伯奇反驳说，对计算机的依赖不必阻碍先验的保证，他指出几乎所有数学家都承认该定理已被证明，尽管完整证明只能由其他计算机检验。<sup>[27](https://philosophy.ucla.edu/wp-content/uploads/2018/08/Burge-1998-Computer-Proof-Apriori-Knowledge-and-Other-Minds.pdf)</sup> 麦克沃伊主张，将此类证明视为后验的标准论据——基于不可通览性、对计算机可靠性的经验依赖、可能的错误以及实验性元素——全都站不住脚。<sup>[28](https://philpapers.org/rec/MCETES)</sup>

实际限制依然存在。数千行代码使验证程序是否做了该做的事变得极其困难，这就是为什么独立重实现的佐证是形式证明之外的另一种信心策略。<sup>[29](https://www.clps.ugent.be/sites/default/files/publications/PSEP_DEMOL.pdf)</sup> 人们普遍认为单靠计算无法提供数学家希望从证明中获得的洞见。<sup>[9](https://www.contrib.andrew.cmu.edu/~avigad/Papers/computers.pdf)</sup> 即便是形式证明也存在硬件或操作系统及编译器完整性、篡改以及随机硬件故障（如宇宙射线效应）的残余风险，不过可信的证明检验器可以用ML或Haskell之类的语言在一两页内实现，且具有线性时间平均复杂度。<sup>[30](http://kryten.mm.rpi.edu/ka_sb_proofs_offprint.pdf)</sup>

## References

1. [Computer-assisted proofs in PDE: a survey (arXiv 1810.00745)](https://ar5iv.labs.arxiv.org/html/1810.00745)
2. [A computer-checked proof of the Four Colour Theorem (Gonthier, formalization report)](https://www.cl.cam.ac.uk/~lp15/Pages/4colproof.pdf)
3. [A formal proof of the Kepler conjecture (Hales et al., Forum of Mathematics, Pi, official published Flyspeck account; includes content of the cl.cam.ac.uk preprint copy of the same paper)](https://www.cambridge.org/core/journals/forum-of-mathematics-pi/article/formal-proof-of-the-kepler-conjecture/78FBD5E1A3D1BCCB8E0D5B0C463C9FBC)
4. [Heule, Marijn J. H., Kullmann, Oliver, Marek, Victor W. (2016). Solving and Verifying the boolean Pythagorean Triples problem via Cube-and-Conquer. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1605.00723)
5. [Computer-Based Proofs of Four Color Conjecture (Springer chapter)](https://link.springer.com/chapter/10.1007/978-981-96-4745-3_3)
6. [Introduction to the Flyspeck Project (Hales, 2006)](https://drops.dagstuhl.de/storage/16dagstuhl-seminar-proceedings/dsp-vol05021/DagSemProc.05021.16/DagSemProc.05021.16.pdf)
7. [Say No to Case Analysis: Automating the Drudgery of Case-Based Proofs (Shallit, CIAA 2021)](https://cs.uwaterloo.ca/%7Eshallit/Talks/ciaa21.pdf)
8. [Machine-Assisted Proof (Terence Tao, Notices of the AMS, January 2025; merged with the rnoti-p6.pdf copy of the same article)](https://www.ams.org/journals/notices/202501/noti3041/noti3041.html)
9. [Computers in mathematical inquiry (Jeremy Avigad)](https://www.contrib.andrew.cmu.edu/~avigad/Papers/computers.pdf)
10. [Computer-assisted Proofs and Self-validating Methods (Rump)](https://www.tuhh.de/ti3/paper/rump/Ru05a.pdf)
11. [The Evolution of Computer-Assisted Proof in Analysis (arXiv 2603.15073)](https://ar5iv.labs.arxiv.org/html/2603.15073)
12. [MathCheck: A Math Assistant via a Combination of Computer Algebra Systems and SAT Solvers (IJCAI 2016)](https://www.ijcai.org/Proceedings/16/Papers/636.pdf)
13. [A proof of the Kepler conjecture (Hales, Annals of Mathematics 2005)](https://annals.math.princeton.edu/wp-content/uploads/annals-v162-n3-p01.pdf)
14. [The Formal Proof of the Kepler Conjecture: a critical retrospective (Hales, 2024)](https://arxiv.org/abs/2402.08032)
15. [Every planar map is four colorable. Part I: Discharging (Appel & Haken, Illinois Journal of Mathematics, 1977)](https://projecteuclid.org/download/pdf_1/euclid.ijm/1256049011)
16. [Hales, Thomas C. (1998). The Kepler conjecture. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.math/9811078)
17. [Christian Marchal (2009). Study of the Kepler’s conjecture: the problem of the closest packing. Mathematische Zeitschrift.](https://doi.org/10.1007/s00209-009-0644-2)
18. [The Four Color Theorem (Robertson, Sanders, Seymour, Thomas summary page)](https://math.gatech.edu/~thomas/FC/fourcolor.html)
19. [A Verified ODE Solver and the Lorenz Attractor (Journal of Automated Reasoning; publisher/DOI page, includes content of the PMC full-text copy)](https://link.springer.com/article/10.1007/s10817-017-9448-y)
20. [Oscar E. Lanford III (1982). A computer-assisted proof of the Feigenbaum conjectures. Bulletin of the American Mathematical Society.](https://doi.org/10.1090/s0273-0979-1982-15008-x)
21. [The Mechanization of Mathematics (Jeremy Avigad, Notices of the AMS, 2018)](https://www.ams.org/journals/notices/201806/rnoti-p681.pdf)
22. [Johan Commelin (2022). Liquid Tensor Experiment. Mitteilungen der Deutschen Mathematiker-Vereinigung.](https://doi.org/10.1515/dmvm-2022-0058)
23. [Formalizing Fermat's Last Theorem (Anthropic project announcement)](https://www.anthropic.com/research/formalizing-fermats-last-theorem)
24. [Formalizing Fermat's Last Theorem in Lean (technical report)](https://www-cdn.anthropic.com/9e431dff043da6538d99d6c2d231b670aa3da263.pdf)
25. [The Four-Color Theorem Gets a Rare New Proof (Quanta Magazine, 10 September 2026)](https://www.quantamagazine.org/the-four-color-theorem-gets-a-rare-new-proof-20260910/)
26. [Proofs Versus Experiments: Wittgensteinian Themes Surrounding the Four-Color Theorem](https://philpapers.org/archive/SECPVE.pdf)
27. [Computer Proof, Apriori Knowledge, and Other Minds (Tyler Burge, 1998)](https://philosophy.ucla.edu/wp-content/uploads/2018/08/Burge-1998-Computer-Proof-Apriori-Knowledge-and-Other-Minds.pdf)
28. [The epistemological status of computer-assisted proofs (Mark McEvoy, Philosophia Mathematica 2008)](https://philpapers.org/rec/MCETES)
29. [The proof is in the process. A preamble for a philosophy of computer-assisted mathematics (C. De Mol)](https://www.clps.ugent.be/sites/default/files/publications/PSEP_DEMOL.pdf)
30. [Computers, Justification, and Mathematical Knowledge (Arkoudas & Bringsjord offprint)](http://kryten.mm.rpi.edu/ka_sb_proofs_offprint.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Logical calculi and logical syntax › Proof theory

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/computer-assisted-proof

English original: https://www.edgepedia.org/computer-assisted-proof
