Sphere packing: the proof, the code, and the people
Gauss completes major formalization work built on a community project.
Maryna Viazovska · sphere-packing community · Math, Inc. / Gauss
Where this stands
A major formalization achievement whose human foundations, AI contribution, and ongoing maintenance all deserve credit.
Start with the question
The problem
How densely can identical non-overlapping balls fill space? Viazovska solved the eight-dimensional problem in 2016; with Cohn, Kumar, Miller, and Radchenko, she also settled dimension 24. Formalizing these proofs requires geometry, harmonic analysis, and modular forms.
Before the news
Understand the mathematics
The established mathematics behind the story, step by step. What is new, and who claims it, follows below with sources.
What density means
A packing is a set of non-overlapping balls of equal radius. Its density is the fraction of space they fill, measured in ever larger balls :
In the plane the hexagonal packing is best, with density (Thue; Fejes Tóth, 1940). In three dimensions the familiar stacking of oranges, with density , is optimal: that is the Kepler conjecture, proved by Hales (announced 1998, published 2005) and formally verified by the Flyspeck project in 2014. Before 2016, no other dimension was solved.
A bound from Fourier analysis
Cohn and Elkies (2003) turned packing into a question about a single function. Suppose is a well-behaved function with Fourier transform such that
Then every packing of has density at most , the volume of a ball of radius . For a lattice packing the proof is Poisson summation, : the left side is at most and the right side at least .
Viazovska’s magic function
In dimension the lattice has covolume and shortest vectors of length , so balls of radius fit, and its density is
The bound matches exactly if a function with exists, and then it must vanish at every length of a nonzero vector. Numerical evidence suggested it existed; Viazovska built it in 2016 from modular forms, whose symmetries under are what make and fit together. A week later, with Cohn, Kumar, Miller and Radchenko, she did the same for the Leech lattice in dimension , with .
Why formalizing it is a large project
The proof combines Fourier analysis on and Poisson summation, the theory of modular forms and their -expansions, and explicit inequalities showing that and where required. Each of these needs a library: definitions, basic lemmas and their interfaces have to exist in Lean before the final argument can even be stated.
01
Before the automated finish
The community project began in 2024. Its contributors built definitions, modular-form infrastructure, and a blueprint for the argument. Their own history describes contributions from many mathematicians and experiments with more than one AI tool. This groundwork is part of the achievement. [2]
02
What Gauss contributed
Math, Inc. reports that Gauss completed the remaining eight-dimensional work in five days and formalized the 24-dimensional case over two weeks. It released a roughly 200,000-line development. These are formalizations of known human theorems, rather than new discoveries of the optimal lattices. [1][3]
03
The project continues after compilation
The community describes reviewing the generated code and preparing it for integration. The project’s research paper treats the February milestone as one stage in a continuing collaboration. Maintainable definitions and reusable library results matter alongside the existence of a checked final theorem. [4][5]
Inspect the evidence
The Lean formalization
Released Lean artifact; community integration continues
Math, Inc.’s repository contains the 8- and 24-dimensional formalizations. The community project has its own maintenance and review process. A complete artifact in a company fork does not imply that all of its code has been merged into the community library.
Sources & further reading
Reviewed 9 Sept 2026. X permalinks were recovered from indexed posts and linked discussions; direct X pages were not consistently accessible. They document the conversation, not proof correctness.
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
Work through it together
Discussion
Loading discussions…