← All papers
First page of Progress in Formalizing Sphere Packing in Dimension 8

Progress in Formalizing Sphere Packing in Dimension 8

Sidharth Hariharan, Christopher Birkbeck, Seewoo Lee, Ho Kiu Gareth Ma, Bhavik Mehta, Auguste Poiroux, Maryna Viazovska

math.MG Apr 25, 2026 · v1
Reports formal verification of 8-dimensional sphere packing in the Lean theorem prover.
In 2016, Viazovska famously solved the sphere packing problem in dimension $8$, using modular forms to construct a 'magic' function satisfying optimality conditions determined by Cohn and Elkies in 2003. In March 2024, Hariharan and Viazovska launched a project to formalize this solution and related mathematical facts in the Lean Theorem Prover. A significant milestone was achieved in February 2026: the result was formally verified, with the final stages of the verification done by Math, Inc.'s autoformalization model 'Gauss'. We discuss the techniques used to achieve this milestone, reflect on the unique collaboration between humans and Gauss, and discuss project objectives that remain.

Viazovska's 2016 proof of optimal sphere packing in dimension 8 uses modular forms to construct a magic function satisfying Cohn-Elkies optimality conditions. Formalizing this proof in a theorem prover had not been completed prior to 2026.

The Sphere Packing project, launched in March 2024 by Hariharan and Viazovska, formalizes Viazovska's solution in the Lean theorem prover. Human formalizers built the initial blueprint and Lean development (~20,000 lines). In the final stages, Math, Inc.'s autoformalization model 'Gauss' completed a sorry-free formalization of the main theorem in five days, expanding the development to ~80,000 lines. A subsequent compression and refactoring pass reduced it to 60,000 lines. The paper discusses techniques used and the human-AI collaboration.

The result was formally verified in February 2026 with a sorry-free development of approximately 60,000 lines of Lean 4. The autoformalization model completed the bulk of the remaining formalization in five days, taking the project from 20,000 to 80,000 lines before compression.