A formal proof of the Kepler conjecture

Thomas C. Hales, Mark Adams, Gertrud Bauer, Dat Tat Dang, John Harrison, Truong Le Hoang, Cezary Kaliszyk, Victor Magron, Sean McLaughlin, Thang Tat Nguyen, Truong Quang Nguyen, Tobias Nipkow, Steven Obua, Joseph Pleso, Jason M. Rute, Alexey Solovyev, An Hoai Thi Ta, Trung Nam Tran, Diep Thi Trieu, Josef Urban, Ky Khac Vu, Roland Zumkeller

Abstract

In 1611, Johannes Kepler conjectured that the face-centered cubic packing of spheres is the densest possible arrangement in three-dimensional space. While a computer-aided proof was announced in 1998, its complexity and reliance on unverified code left the mathematical community in a state of uncertainty. This paper details the results of the Flyspeck project, which has successfully completed a full formal verification of the Kepler conjecture. By utilizing the HOL Light and Isabelle proof assistants, the project transformed the original proof into a machine-checked certainty, correcting numerous errors and establishing a new benchmark for rigor in computer-aided mathematics.

Introduction

The Kepler conjecture states that no arrangement of congruent spheres in Euclidean 3-space has a density greater than that of the face-centered cubic packing, which is approximately 74.04%. Despite its intuitive nature—resembling the way oranges are stacked in a grocery store—a rigorous mathematical proof remained elusive for nearly four centuries.

In 1998, Thomas Hales and Samuel Ferguson submitted a proof consisting of 250 pages of text and extensive computer code used to verify thousands of nonlinear inequalities and combinatorial structures. The referees for the Annals of Mathematics spent four years reviewing the work but ultimately concluded they could only be "99% certain" of its correctness, as they could not fully certify the custom code. This "crisis of rigor" motivated the Flyspeck project: an ambitious effort to produce a formal proof where every logical step is verified by a computer kernel.

Methodology

The Flyspeck project adopted a "divide and conquer" strategy, decomposing the massive proof into four primary computational and logical tasks:

1. Text Formalization

The traditional mathematical arguments were translated into the formal logic of the HOL Light proof assistant. This required the development of extensive digital libraries for geometry, topology, and measure theory to support the underlying definitions of the proof.

2. Verification of Nonlinear Inequalities

The proof relies on approximately 1,000 complex nonlinear inequalities. To verify these, the team employed interval arithmetic combined with second-order Taylor approximations to establish rigorous bounds. This phase was the most computationally intensive, requiring 5,000 processor-hours of cloud computing to ensure that no numerical errors occurred during the calculation.

3. Tame Graph Classification

The proof reduces all potential counterexamples to a finite set of combinatorial structures known as "tame graphs." The enumeration and verification of these 18,762 graphs were performed within the Isabelle proof assistant, ensuring that the list of potential counterexamples was exhaustive.

4. Linear Programming

The nonlinear problems were relaxed into 43,078 linear programs. The team developed a verified procedure to demonstrate that all these programs are infeasible, thereby proving that no combinatorial configuration can exceed the density of the face-centered cubic packing.

Key Insights and Formalization Challenges

Correcting the Mathematical Record

The formalization process served as an exhaustive audit of the original 1998 proof. The authors identified and corrected hundreds of minor errors. Most notably, they discovered a significant error in the "main estimate" of the original proof that had escaped the notice of human referees for years. The formal proof now stands as the definitive, corrected version of the argument.

Symmetry and Generality

Human mathematicians often simplify proofs using the phrase "without loss of generality" (WLOG) to account for symmetries like rotation or translation. Formalizing these intuitive leaps is notoriously difficult. The Flyspeck team had to develop specialized automated tools to handle geometric symmetries within the proof assistant's rigid logical framework.

The Blueprint Approach

The team found that the original 1998 paper was not structured in a way that was easily digestible by a machine. Consequently, they authored a "blueprint" version of the proof. This version prioritized combinatorial hypermaps over traditional topology, creating a roadmap specifically designed for formalization.

Results

The Flyspeck project has successfully concluded with the full certification of the Kepler conjecture. Key outcomes include:

  • Absolute Certainty: By reducing the "trusted computing base" to a few hundred lines of core kernel code, the proof is now a mathematical certainty.
  • Efficiency of Re-verification: While the initial formalization took years, the resulting proof scripts allow the entire theorem to be re-verified in approximately five hours on a standard 2 GHz CPU.
  • Scale of Achievement: The project is one of the largest formalization efforts in history, comparable in scope to the verification of the Feit-Thompson odd order theorem.

Limitations and Future Directions

Despite its success, the project highlights several challenges in the field of formal verification. Currently, the proof is split between HOL Light and Isabelle; a future goal is to unify the proof within a single system to eliminate the need for cross-system logical imports. Additionally, while the machine verifies the logic, humans must still audit the formal definitions to ensure they accurately represent the physical reality of sphere packing. Finally, the performance gap between verified interval arithmetic and unverified C++ code remains a hurdle for future large-scale formalizations.

Summary updated

BibTeX
@inproceedings{hales2017formal,
  author = {Thomas C. Hales and Mark Adams and Gertrud Bauer and Dat Tat Dang and John Harrison and Truong Le Hoang and Cezary Kaliszyk and Victor Magron and Sean McLaughlin and Thang Tat Nguyen and Truong Quang Nguyen and Tobias Nipkow and Steven Obua and Joseph Pleso and Jason M. Rute and Alexey Solovyev and An Hoai Thi Ta and Trung Nam Tran and Diep Thi Trieu and Josef Urban and Ky Khac Vu and Roland Zumkeller},
  title = {{A formal proof of the Kepler conjecture}},
  booktitle = {Forum},
  year = {2017},
  doi = {10.1017/fmp.2017.1},
}
Figure