A Lean formalisation of Maryna Viazovska's Fields Medal-winning solution to the sphere packing problem in dimension 8 and 24.
Lean
72
1,027 commits
updated Apr 7, 2026
Completing the formal proof of higher-dimensional sphere packing.
This repository formalizes sphere-packing optimality in dimensions 8 and 24, together with uniqueness among periodic packings in dimension 24. It focuses on the sphere-packing breakthroughs recognized by Maryna Viazovska's 2022 Fields Medal (IMU citation).
The dimension 8 optimality formalization was kickstarted at EPFL by Maryna Viazovska and Sidharth Hariharan in March 2024 (link). That foundational work established the repository, blueprint, and proof direction this project builds on.
Building directly on that original repository and blueprint, Math, Inc.'s autoformalization agent Gauss completed dimension 8 in 5 days, expanding the codebase from 20,000 to 60,000 lines. In the same repository, dimension 24 optimality and periodic uniqueness were completed in about 2 weeks using the associated paper plus autonomous literature search to bridge gaps, especially for uniqueness ingredients proved across other papers. The final codebase is about 180,000 lines of Lean.
Thanks to recent progress on Gauss, this development required no additional human-written scaffolding or proof hints beyond the original repository and papers. This is a significant milestone for autoformalization, demonstrating that results at the research frontier can be fully formalized with minimal human intervention, building on Lean's existing ecosystem of formalized mathematics.
Note: All line-count figures are post-cleanup (refactoring, golfing, and removal of unused results and theory developments). At peak, the full formalization reached roughly 500,000 lines of code; after cleanup, the final codebase is about 180,000 lines of Lean.
Formalizations like this will soon be commonplace and making multi-million-LOC autoformalizations modular and reusable will be an important challenge in the coming months. At the same time, plentiful autoformalization will accelerate mathematical understanding and discovery, and we are honored to have collaborated with Sid, Maryna, and the rest of the sphere packing team on pushing these frontiers.
This project formalizes the following key results in the theory of sphere packing:
g.Compile the Lean files (requires Lean):
lake exe cache get && lake build
Build the blueprint PDF (requires uv):
uvx leanblueprint pdf
Build and serve the blueprint website:
uvx leanblueprint web && uvx leanblueprint serve
Lean
98.0%
TeX
1.9%
A Lean formalisation of Maryna Viazovska's Fields Medal-winning solution to the sphere packing problem in dimension 8 and 24.
Lean
72
1,027 commits
updated Apr 7, 2026
Completing the formal proof of higher-dimensional sphere packing.
This repository formalizes sphere-packing optimality in dimensions 8 and 24, together with uniqueness among periodic packings in dimension 24. It focuses on the sphere-packing breakthroughs recognized by Maryna Viazovska's 2022 Fields Medal (IMU citation).
The dimension 8 optimality formalization was kickstarted at EPFL by Maryna Viazovska and Sidharth Hariharan in March 2024 (link). That foundational work established the repository, blueprint, and proof direction this project builds on.
Building directly on that original repository and blueprint, Math, Inc.'s autoformalization agent Gauss completed dimension 8 in 5 days, expanding the codebase from 20,000 to 60,000 lines. In the same repository, dimension 24 optimality and periodic uniqueness were completed in about 2 weeks using the associated paper plus autonomous literature search to bridge gaps, especially for uniqueness ingredients proved across other papers. The final codebase is about 180,000 lines of Lean.
Thanks to recent progress on Gauss, this development required no additional human-written scaffolding or proof hints beyond the original repository and papers. This is a significant milestone for autoformalization, demonstrating that results at the research frontier can be fully formalized with minimal human intervention, building on Lean's existing ecosystem of formalized mathematics.
Note: All line-count figures are post-cleanup (refactoring, golfing, and removal of unused results and theory developments). At peak, the full formalization reached roughly 500,000 lines of code; after cleanup, the final codebase is about 180,000 lines of Lean.
Formalizations like this will soon be commonplace and making multi-million-LOC autoformalizations modular and reusable will be an important challenge in the coming months. At the same time, plentiful autoformalization will accelerate mathematical understanding and discovery, and we are honored to have collaborated with Sid, Maryna, and the rest of the sphere packing team on pushing these frontiers.
This project formalizes the following key results in the theory of sphere packing:
g.Compile the Lean files (requires Lean):
lake exe cache get && lake build
Build the blueprint PDF (requires uv):
uvx leanblueprint pdf
Build and serve the blueprint website:
uvx leanblueprint web && uvx leanblueprint serve
Lean
98.0%
TeX
1.9%