Formalizing the Solution to the Cap Set Problem
Pith reviewed 2026-05-25 10:19 UTC · model grok-4.3
The pith
The Ellenberg-Gijswijt upper bound on cap sets has been encoded and verified inside the Lean proof assistant.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
We have built a Lean formalization that faithfully follows the original pen-and-paper argument of Ellenberg and Gijswijt, thereby establishing the same upper bound on the size of subsets of F_q^n with no three-term arithmetic progression and supplying concrete values of the bound for q=3.
What carries the argument
A direct encoding in Lean of the original argument that constructs the bound by mirroring each step of the pen-and-paper reasoning.
If this is right
- The Ellenberg-Gijswijt bound holds for all n and q.
- Concrete upper bounds for the cap set problem are now machine-verified for small values of n when q=3.
- The polynomial-based construction used to obtain the bound can be inspected and reused inside the formal system.
- Similar elementary arguments from recent mathematics can be turned into verified formal proofs by the same direct translation approach.
Where Pith is reading between the lines
- The verified formalization could be extended to compute explicit bounds for additional small values of q or n that the original paper left as exercises.
- Once inside Lean, the bound becomes available as a reusable lemma for further formal work on related questions in additive combinatorics.
- The same translation method could be applied to other short, clever proofs that rely on polynomial identities over finite fields.
Load-bearing premise
The Lean code accurately captures every inference of the original argument without introducing translation gaps, omitted cases, or incorrect library lemmas.
What would settle it
An explicit counterexample in some small dimension n and q=3 where a set larger than the formally derived bound is exhibited, or an independent audit that finds a logical step in the Lean code missing from the published argument.
read the original abstract
In 2016, Ellenberg and Gijswijt established a new upper bound on the size of subsets of $\mathbb{F}^n_q$ with no three-term arithmetic progression. This problem has received much mathematical attention, particularly in the case $q = 3$, where it is commonly known as the \emph{cap set problem}. Ellenberg and Gijswijt's proof was published in the \emph{Annals of Mathematics} and is noteworthy for its clever use of elementary methods. This paper describes a formalization of this proof in the Lean proof assistant, including both the general result in $\mathbb{F}^n_q$ and concrete values for the case $q = 3$. We faithfully follow the pen and paper argument to construct the bound. Our work shows that (some) modern mathematics is within the range of proof assistants.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript presents a formalization in the Lean proof assistant of the 2016 Ellenberg-Gijswijt proof, which gives a new upper bound on the size of subsets of F_q^n without three-term arithmetic progressions; the work covers both the general case and the concrete cap-set bound for q=3, claiming to follow the original pen-and-paper argument faithfully and thereby demonstrating that certain modern combinatorial proofs lie within the scope of current proof assistants.
Significance. If the formalization is faithful, the result supplies machine-checked confirmation of a high-profile Annals of Mathematics theorem, supplies a reusable Lean library for related combinatorial arguments, and provides concrete evidence that proof assistants can now handle the length and conceptual depth of recent research-level mathematics.
minor comments (2)
- [Section 1] Section 1: the statement that the formalization 'faithfully follows' the original argument would be strengthened by an explicit list (perhaps in an appendix) of the main lemmas and their Lean counterparts.
- [Abstract and §1] The repository URL in the abstract and introduction should be accompanied by a permanent archive identifier (e.g., Zenodo DOI) to guarantee long-term reproducibility.
Simulated Author's Rebuttal
We thank the referee for their positive summary, significance assessment, and recommendation to accept the manuscript. There are no major comments requiring a point-by-point response.
Circularity Check
No significant circularity identified
full rationale
The paper is a formalization in Lean of the independent 2016 Ellenberg-Gijswijt proof (published in Annals of Mathematics by different authors). Its derivation chain consists of faithfully encoding that external argument; no load-bearing steps reduce by construction to self-citations, fitted parameters renamed as predictions, or self-definitional relations within this work. The cited result is externally verifiable and not dependent on the present authors' prior claims.
Axiom & Free-Parameter Ledger
axioms (1)
- standard math Standard axioms of mathematics as encoded in Lean’s mathlib (dependent type theory with classical logic and choice)
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.