FormalizedGeometry & formalization3 min read

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.

Δ8=π4384≈0.2537(E8)Δ24=π1212!≈0.00193(Leech lattice)\begin{gathered} \Delta_8 = \frac{\pi^4}{384} \approx 0.2537 \quad (E_8) \\ \Delta_{24} = \frac{\pi^{12}}{12!} \approx 0.00193 \quad (\text{Leech lattice}) \end{gathered}

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 BRB_R:

Δ(P)=lim sup⁡R→∞vol⁡(P∩BR)vol⁡(BR).\Delta(P) = \limsup_{R \to \infty} \frac{\operatorname{vol}(P \cap B_R)}{\operatorname{vol}(B_R)}.

In the plane the hexagonal packing is best, with density π/12≈0.9069\pi / \sqrt{12} \approx 0.9069 (Thue; Fejes Tóth, 1940). In three dimensions the familiar stacking of oranges, with density π/18≈0.7405\pi / \sqrt{18} \approx 0.7405, 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 f:Rn→Rf: \mathbb{R}^n \to \mathbb{R} is a well-behaved function with Fourier transform f^\hat f such that

f(0)=f^(0)>0,f(x)≤0 for ∣x∣≥r,f^(ξ)≥0 for all ξ.\begin{gathered} f(0) = \hat f(0) > 0, \\ f(x) \le 0 \text{ for } |x| \ge r, \\ \hat f(\xi) \ge 0 \text{ for all } \xi. \end{gathered}

Then every packing of Rn\mathbb{R}^n has density at most vol⁡(Br/2n)\operatorname{vol}\big(B^n_{r/2}\big), the volume of a ball of radius r/2r/2. For a lattice packing the proof is Poisson summation, ∑v∈Λf(v)=1vol⁡(Rn/Λ)∑w∈Λ∗f^(w)\sum_{v \in \Lambda} f(v) = \frac{1}{\operatorname{vol}(\mathbb{R}^n / \Lambda)} \sum_{w \in \Lambda^*} \hat f(w): the left side is at most f(0)f(0) and the right side at least f^(0)/vol⁡(Rn/Λ)\hat f(0) / \operatorname{vol}(\mathbb{R}^n / \Lambda).

Viazovska’s magic function

In dimension 88 the lattice E8E_8 has covolume 11 and shortest vectors of length 2\sqrt{2}, so balls of radius 2/2\sqrt{2}/2 fit, and its density is

vol⁡(B2/28)=π44!(22)8=π4384.\operatorname{vol}\big(B^8_{\sqrt{2}/2}\big) = \frac{\pi^4}{4!} \left(\frac{\sqrt{2}}{2}\right)^{8} = \frac{\pi^4}{384}.

The bound matches exactly if a function with r=2r = \sqrt{2} exists, and then it must vanish at every length 2k\sqrt{2k} of a nonzero E8E_8 vector. Numerical evidence suggested it existed; Viazovska built it in 2016 from modular forms, whose symmetries under τ↦−1/τ\tau \mapsto -1/\tau are what make ff and f^\hat f fit together. A week later, with Cohn, Kumar, Miller and Radchenko, she did the same for the Leech lattice in dimension 2424, with r=2r = 2.

Why formalizing it is a large project

The proof combines Fourier analysis on Rn\mathbb{R}^n and Poisson summation, the theory of modular forms and their qq-expansions, and explicit inequalities showing that f≤0f \le 0 and f^≥0\hat f \ge 0 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. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.

Work through it together

Discussion

Loading discussions…