Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Green–Tao (2017): r4(N)≪N(log⁡N)−cr_4(N) \ll N(\log N)^{-c}r4​(N)≪N(logN)−c

Open
Erdos142.green_tao_four

by Zexuan Liu · Sep 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

additive-combinatoricsarithmetic-progressionscombinatoricsnumber-theory

There is a constant c>0c > 0c>0 such that, for all sufficiently large NNN,

r4(N)  ≤  N(log⁡N)c.r_4(N) \;\le\; \frac{N}{(\log N)^{c}} .r4​(N)≤(logN)cN​.

This is the polylogarithmic bound of Green and Tao for four-term progressions. It improved on Gowers's r4(N)≪N(log⁡log⁡N)−cr_4(N) \ll N(\log\log N)^{-c}r4​(N)≪N(loglogN)−c and on their own earlier bound Nexp⁡(−clog⁡log⁡N)N\exp(-c\sqrt{\log\log N})Nexp(−cloglogN​), and remains the best known upper bound for k=4k = 4k=4; the authors describe it as the limit of their method.

The four-term case is the first in which the Fourier-analytic machinery of Roth's theorem is insufficient and quadratic Fourier analysis is required: the relevant obstruction to uniformity is correlation with a quadratic phase rather than a linear one, so the argument runs through the inverse theorem for the Gowers U3U^3U3-norm and an arithmetic regularity lemma. Note that this bound is still weaker than the mission's goal at k=4k = 4k=4, which asks for o(N/log⁡N)o(N/\log N)o(N/logN): the exponent ccc produced here is small and not known to exceed 111.

Formalization Note. The implied constant of ≪\ll≪ is absorbed by shrinking ccc, so the displayed form with ∃c>0\exists c > 0∃c>0 and an eventual inequality is equivalent to the paper's statement and fixes no arbitrary constant.

Preamble
import Mathlib
import Definitions.Def_Erdos142Basic
Formal statement
namespace Erdos142

theorem green_tao_four :
    ∃ c : ℝ, 0 < c ∧ ∀ᶠ N : ℕ in Filter.atTop,
      (r 4 N : ℝ) ≤ (N : ℝ) / (Real.log N) ^ c := by sorry

end Erdos142
Source
B. Green and T. Tao, New bounds for Szemeredi's theorem, III: A polylogarithmic bound for r_4(N), Mathematika 63 (2017), 944-1040, arXiv:1705.01703, https://arxiv.org/abs/1705.01703. Cited as the best known upper bound for k=4 on Erdős Problem #142, https://www.erdosproblems.com/142 (cited there as [Er80, p.92], [Er81, p.4], [Er97c], [Va99, 1.27])
Read-back

What the Lean code literally says, in plain math · claude-opus-5

Read-back: Erdos142.green_tao_four

The literal assertion

The declaration asserts the existence of a single real number ccc such that two things hold simultaneously: first, c>0c > 0c>0; and second, the inequality

r(4,N)  ≤  N(log⁡N)cr(4, N) \;\le\; \frac{N}{(\log N)^{c}}r(4,N)≤(logN)cN​

holds eventually as NNN ranges over the natural numbers with respect to the atTop filter — that is, there exists a threshold N0∈NN_0 \in \mathbb{N}N0​∈N such that the displayed inequality holds for every natural number N≥N0N \ge N_0N≥N0​. Note the order of quantification: the constant ccc is chosen first, once and for all, and only afterwards is the threshold N0N_0N0​ allowed to be chosen (so N0N_0N0​ may depend on ccc, but ccc may not depend on NNN). No upper bound whatsoever is imposed on ccc; the only constraint on it is positivity. The inequality is non-strict (≤\le≤, not <<<), it is stated as an inequality between real numbers — the natural number r(4,N)r(4,N)r(4,N) and the natural number NNN are both cast into R\mathbb{R}R — and it is a one-sided upper bound on r(4,N)r(4,N)r(4,N): nothing is claimed in the other direction.

What (log⁡N)c(\log N)^{c}(logN)c means here

log⁡\loglog is the real natural logarithm applied to the real cast of NNN, and because the exponent ccc is a real number, the power (log⁡N)c(\log N)^{c}(logN)c is real exponentiation (Real.rpow), not iterated multiplication. For a base x>0x > 0x>0 this is exp⁡(clog⁡x)\exp(c \log x)exp(clogx) as usual. Two total-function conventions are silently in force. (i) log⁡0=0\log 0 = 0log0=0 and log⁡1=0\log 1 = 0log1=0, so for N∈{0,1}N \in \{0, 1\}N∈{0,1} the base is 000; since c>0c > 0c>0, real exponentiation gives 0c=00^{c} = 00c=0, and division by zero in this setting returns 000, so for N∈{0,1}N \in \{0,1\}N∈{0,1} the right-hand side would be 000 and the inequality would read r(4,N)≤0r(4,N) \le 0r(4,N)≤0. (ii) The base log⁡N\log NlogN is never negative for any natural NNN (it is 000 at N=0,1N = 0, 1N=0,1 and positive for N≥2N \ge 2N≥2), so the branch of real exponentiation used for negative bases never arises. Because the claim is only made eventually, the small values N=0,1,2N = 0, 1, 2N=0,1,2 (and any other finite initial segment) may simply be excluded by the choice of N0N_0N0​; the statement makes no assertion about them. For N≥3N \ge 3N≥3 one has log⁡N>1\log N > 1logN>1, so (log⁡N)c>1(\log N)^{c} > 1(logN)c>1 and the right-hand side is genuinely smaller than NNN.

What r(4,N)r(4,N)r(4,N) means (expanded from the bundle)

The symbol r(k,N)r(k,N)r(k,N) is a custom definition in the accompanying bundle, not a standard library notion. It is defined as the supremum, taken inside N\mathbb{N}N, of the set of natural numbers

{ ∣S∣  :  S⊆{1,2,…,N} a finite set, and S is "AP-of-length-k free" },\bigl\{\, |S| \;:\; S \subseteq \{1, 2, \dots, N\} \text{ a finite set, and } S \text{ is "AP-of-length-}k\text{ free"} \,\bigr\},{∣S∣:S⊆{1,2,…,N} a finite set, and S is "AP-of-length-k free"},

where {1,…,N}\{1,\dots,N\}{1,…,N} is the integer interval from 111 to NNN inclusive (so 000 is not in the ground set, and the interval is empty when N=0N = 0N=0) and ∣S∣|S|∣S∣ is the cardinality of SSS. Two accompanying lemmas in the bundle establish that this set of cardinalities is non-empty (the empty set qualifies) and bounded above by NNN, so the supremum is an honest maximum rather than the junk value 000 that a supremum over N\mathbb{N}N returns for an unbounded or empty set. In particular the bundle proves r(k,N)≤Nr(k,N) \le Nr(k,N)≤N for all k,Nk, Nk,N, and proves that every progression-free S⊆{1,…,N}S \subseteq \{1,\dots,N\}S⊆{1,…,N} satisfies ∣S∣≤r(k,N)|S| \le r(k,N)∣S∣≤r(k,N). In the theorem, kkk is fixed to 444.

What "AP-of-length-kkk free" means (expanded from the bundle)

For a set sss and a length l∈N∪{∞}l \in \mathbb{N} \cup \{\infty\}l∈N∪{∞}, the bundle declares sss free of arithmetic progressions of length lll to mean:

∀ t⊆s,(t is an arithmetic progression of length l)  ⟹  l≤1.\forall\, t \subseteq s,\quad \bigl(t \text{ is an arithmetic progression of length } l\bigr) \;\Longrightarrow\; l \le 1 .∀t⊆s,(t is an arithmetic progression of length l)⟹l≤1.

Here "ttt is an arithmetic progression of length lll" means: there exist a first term aaa and a common difference ddd (both in the ambient additive commutative monoid, here N\mathbb{N}N) such that the extended-natural cardinality of ttt equals lll and ttt is exactly the set { a+nd  :  n∈N, n<l }\{\, a + n d \;:\; n \in \mathbb{N},\ n < l \,\}{a+nd:n∈N, n<l}. Both conditions are required: the set-equality and the cardinality equality.

Instantiating at l=k=4l = k = 4l=k=4 (the natural number 444 cast into N∪{∞}\mathbb{N} \cup \{\infty\}N∪{∞}), the consequent 4≤14 \le 14≤1 is false, so the definition unfolds to: no subset ttt of SSS is an arithmetic progression of length exactly 444, i.e. there are no a,da, da,d with t={a,a+d,a+2d,a+3d}t = \{a, a+d, a+2d, a+3d\}t={a,a+d,a+2d,a+3d} and ∣t∣=4|t| = 4∣t∣=4. The cardinality clause is what rules out degenerate progressions: taking d=0d = 0d=0 gives the singleton {a}\{a\}{a}, whose cardinality is 1≠41 \ne 41=4, so constant "progressions" do not count; conversely any d≥1d \ge 1d≥1 in N\mathbb{N}N yields four distinct terms. Since ttt ranges over all subsets of SSS (including SSS itself), this is equivalent to saying that SSS contains four elements in arithmetic progression with positive common difference. Note also that this notion is defined with the consequent "l≤1l \le 1l≤1" precisely so that it becomes vacuous for lengths 000 and 111; at l=4l = 4l=4 that escape clause is inert.

Definitions present in the bundle but not used by the statement

The bundle also defines an elementary predicate HasAP (∃ a,d\exists\, a, d∃a,d with d>0d > 0d>0 and a+id∈Aa + i d \in Aa+id∈A for all i<ki < ki<k) and its negation APFree. Neither of these appears anywhere in the statement of the theorem: rrr is defined through the set-theoretic notion described above, not through APFree. The bundle further contains a lemma that the empty set is progression-free for every length.

Summary of quantifier structure

∃ c∈R,c>0  ∧  ∃ N0∈N, ∀ N≥N0,r(4,N)≤N(log⁡N)c.\exists\, c \in \mathbb{R},\quad c > 0 \;\wedge\; \exists\, N_0 \in \mathbb{N},\ \forall\, N \ge N_0,\quad r(4,N) \le \frac{N}{(\log N)^{c}} .∃c∈R,c>0∧∃N0​∈N, ∀N≥N0​,r(4,N)≤(logN)cN​.

There are no other hypotheses, no typeclass side conditions on the theorem itself, and no free variables: the statement is closed.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me