Combinatorics and discrete mathematics
Szemerédi's theorem
Any set of integers with positive density contains arbitrarily long arithmetic progressions.
IntuitionIntuition: arithmetic progressions hiding inside crowded sets
Pick any set of positive integers that is not too sparse — say it keeps a fixed fraction of all numbers up to every scale. Intuition suggests such a set cannot avoid all patterns forever: sooner or later it must contain three numbers spaced evenly apart, then four, then any number you like. Szemerédi's theorem makes this precise: it says that mere abundance — a positive fraction of the integers, with no algebraic structure assumed at all — already forces the set to contain arithmetic progressions of every finite length.
UndergraduateDensity and the precise statement
Definition: Upper density
For a set of positive integers , the upper density measures the largest fraction of that can occupy, in the limit as grows without bound: .
Here is the part of inside the first integers, and takes the largest value the ratio keeps returning to as grows — this way is well defined even if the fraction oscillates instead of converging.
This is the full statement: as soon as , the set contains an arithmetic progression for every length — no matter how large is. Setting already recovers the hardest classical special case, Roth's theorem; letting grow gives progressions as long as anyone could ask for, all from the single hypothesis of positive density.
| Theorem | Hypothesis on the set | Conclusion |
|---|---|---|
| Van der Waerden (1927) | Finite coloring of | Some color class contains a length- progression for every |
| Szemerédi (1975) | contains a length- progression for every | |
| Green–Tao (2004) | = the primes (density 0) | contains a length- progression for every |
AdvancedProof idea: the regularity method
For every integer and every , there is a threshold such that every with and contains an arithmetic progression of length .
Why is it true?
This finite version is logically equivalent to the infinite density statement by a simple compactness argument, and it is the form that is actually proved: instead of one infinite set, one only needs to control finitely many configurations inside a large but finite window.
Proof
Step 1 (reduction to the finite window). Suppose the infinite statement fails for some with no length- progression at all. Then for every , the restriction is a length--AP-free subset of whose size grows like for a fixed > 0. If the finitary statement were true, no such family could exist for arbitrarily large , a contradiction — so the two statements stand or fall together.
Step 2 (regularity partition). View potential -term progressions in as edges of a -uniform hypergraph. The hypergraph regularity lemma partitions the underlying vertex set into a bounded number of pieces so that, apart from a small exceptional fraction, every tuple of pieces is pseudorandom: the density of hyperedges between them is essentially constant, with no denser or sparser sub-clusters.
Step 3 (counting lemma). Once the partition is regular, a matching counting lemma shows that any tuple of pieces with positive relative density must contain the expected number of complete configurations — in particular, at least one genuine length- progression, because a regular pseudorandom structure with positive density cannot avoid the pattern it is being tested against.
Step 4 (removal argument). If had no length- progression at all, the counting lemma would force almost all of the configurations counted by the regular partition to be degenerate, which in turn would let one delete a vanishingly small number of elements from to kill every approximate progression — contradicting that keeps density on a set of size as large as we like. Hence a length- progression must exist. (Furstenberg's 1977 ergodic-theoretic proof and Gowers' higher-order Fourier-analytic proof reach the same conclusion by entirely different routes, each yielding explicit but astronomically large bounds on .)
If has and is large enough relative to , then contains a nontrivial 3-term arithmetic progression.
Why is it true?
This is the first nontrivial case of Szemerédi's theorem, proved by Roth in 1953 using Fourier analysis instead of the heavy regularity machinery needed for general . Its "density increment" strategy — either find the pattern, or show the set is unexpectedly structured and pass to a denser sub-progression — became the blueprint later reused, in vastly more sophisticated form, for the general theorem and for Green–Tao.
Proof
Step 1 (Fourier count of progressions). Suppose has density and no nontrivial 3-term progression. Writing for the Fourier transform of the indicator of , the number of triples can be written as an integral of over .
Step 2 (the pseudorandom case). If every nonzero Fourier coefficient of were small compared to , the integral would be dominated by the term alone, which already forces roughly triples — far more than the trivial ones — contradicting the assumption that has none.
Step 3 (density increment). So some nonzero coefficient must be large; this means correlates with the linear phase , i.e. is noticeably biased on some arithmetic progression (or Bohr set). Restricting to that sub-progression produces a shorter interval on which the density of has increased by a fixed multiplicative factor.
Step 4 (iteration and conclusion). Density cannot increase past 1, so after finitely many rounds of this density-increment step the process must terminate — meaning the pseudorandom case of Step 2 is eventually forced, which produces the missing 3-term progression and contradicts the no-progression assumption. Roth's original bookkeeping gives -type thresholds; this was improved over decades, and Kelley and Meka's 2023 argument pushes the bound down to nearly Behrend's classical construction, -type density, essentially closing the gap for this case.
UndergraduateReal-World Applications and Worked Examples
Szemerédi's own regularity lemma, invented as a tool inside this proof, went on to become one of the most-used tools in theoretical computer science: it underlies graph property testing algorithms (deciding whether a huge graph is close to satisfying a property by inspecting only a bounded-size random sample), gives lower bounds in communication complexity, and shows up in combinatorial design and coding theory. On the number-theory side, the theorem sits at one end of a spectrum whose other end is the Behrend construction of dense progression-free sets, and its finite form gives the combinatorial engine behind the Green–Tao theorem on primes.
Example: A 3-term progression inside a concrete set
Let — this is exactly the numbers from 1 to 12 that are not multiples of 3, so restricted to this window is . Find an explicit arithmetic progression of length 3 inside .
Solution
Step 1: since excludes exactly the multiples of 3, every element of has residue 1 or 2 modulo 3.
Step 2: pick common difference (a multiple of 3) so that all share the same residue class modulo 3, hence all avoid the missing residue 0.
Step 3: taking gives , and indeed — a genuine 3-term progression, matching what Szemerédi's theorem guarantees for any set of positive density once the window is large enough.
Example: Pigeonhole forces a dense — hence structured — color class
Color the integers red if odd and blue if even. Among the red class is , already of the window. Explain why this pigeonhole-style argument, combined with Szemerédi's theorem, guarantees a monochromatic 3-term progression whenever finitely many colors are used on a long enough interval — and exhibit the progression here.
Solution
Step 1: with 2 colors partitioning 9 integers, the color sizes sum to 9, so by pigeonhole the larger class has at least elements — here the red class has exactly 5.
Step 2: 5 elements inside a window of 9 means the red class already has density on this finite window, and in fact the odd numbers have density exactly over all of .
Step 3: since the odd numbers have positive density, Szemerédi's theorem (applied with ) guarantees they contain 3-term progressions — and indeed the red class itself, , is one, with common difference 2. This is exactly the mechanism (positive density forced by pigeonhole, then Szemerédi's theorem) that recovers van der Waerden's finite-coloring theorem as a corollary.
Using , what is the upper density of the set of all even positive integers?
What does Szemerédi's theorem conclude about a set with ?
Why does Szemerédi's theorem imply van der Waerden's theorem on finite colorings?
Why can't Szemerédi's theorem be applied directly to show the primes contain arbitrarily long arithmetic progressions?
References
- Endre Szemerédi (1975). On sets of integers containing no k elements in arithmetic progression
- Hillel Furstenberg (1977). Ergodic behavior of diagonal measures and a theorem of Szemerédi on arithmetic progressions · DOI:10.1007/BF02813304
- Zander Kelley, Raghu Meka (2023). Strong bounds for 3-progressions · arXiv:2302.05537