Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Erdős #142 (`variants.lower`): rk(N)=ok(N/log⁡N)r_k(N) = o_k(N/\log N)rk​(N)=ok​(N/logN)

Open
Erdos142.erdos_142_variants_lower

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

additive-combinatoricsarithmetic-progressionscombinatoricsnumber-theory

Let rk(N)r_k(N)rk​(N) be the largest possible size of a subset of {1,…,N}\{1,\dots,N\}{1,…,N} that does not contain any non-trivial kkk-term arithmetic progression. The claim is that for every k>1k > 1k>1,

rk(N)  =  ok ⁣(Nlog⁡N),r_k(N) \;=\; o_k\!\left(\frac{N}{\log N}\right),rk​(N)=ok​(logNN​),

that is, rk(N)log⁡N/N→0r_k(N)\log N / N \to 0rk​(N)logN/N→0 as N→∞N \to \inftyN→∞, with the rate allowed to depend on kkk.

This statement is erdos_142.variants.lower of the formal-conjectures entry for Erdős Problem #142, reproduced binder for binder over that file's own definition of rkr_krk​.

It is the one formalizable target in that file. The headline declaration there, erdos_142, asserts rk(N)=Θ(f)r_k(N) = \Theta(f)rk​(N)=Θ(f) with the comparison function left as a placeholder, and so do variants.upper and variants.three: the literal request of the problem — an asymptotic formula for rk(N)r_k(N)rk​(N) — has no known right-hand side for any k≥3k \ge 3k≥3. The displayed estimate is also the strongest precisely-stated form the problem page attaches to #142; Erdős offered 5000 dollars for (essentially) exactly it, which is the content of Erdős Problem #3. It is known for k=3k = 3k=3, where it follows from the bound of Bloom and Sisask and a fortiori from that of Kelley and Meka; it is trivial for k=2k = 2k=2, where r2(N)=1r_2(N) = 1r2​(N)=1; and it is open for every k≥4k \ge 4k≥4. Proving it for all kkk gives, by a standard summation argument, Erdős's conjecture that any set of natural numbers whose reciprocals sum to infinity contains arbitrarily long arithmetic progressions.

Formalization Note. The asymptotic relation is Asymptotics.IsLittleO along Filter.atTop on N\mathbb{N}N, applied to the real-valued casts. Real division is Lean's, so the comparison function is 000 at N=1N = 1N=1; this is invisible to the atTop filter. The hypothesis is 1<k1 < k1<k, exactly as in the source file.

Preamble
import Mathlib
import Definitions.Def_Erdos142Basic
open Filter
Formal statement
namespace Erdos142

theorem erdos_142_variants_lower (k : ℕ) (hk : 1 < k) :
    (fun N => (r k N : ℝ)) =o[atTop] (fun N : ℕ => N / (N : ℝ).log) := by sorry

end Erdos142
Source
Google DeepMind, formal-conjectures, FormalConjectures/ErdosProblems/142.lean, theorem `erdos_142.variants.lower`, https://github.com/google-deepmind/formal-conjectures/blob/main/FormalConjectures/ErdosProblems/142.lean ; Erdős Problem #142, https://www.erdosproblems.com/142 (cited there as [Er80, p.92], [Er81, p.4], [Er97c], [Va99, 1.27]); specifically the remark 'he elsewhere offered 5000justfor(essentially)showingthat5000 just for (essentially) showing that 5000justfor(essentially)showingthatr_k(N)=o_k(N/\log N)$ (see [3])'. See also Erdős Problem #3, https://www.erdosproblems.com/3.
Read-back

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

Read-back: Erdos142.erdos_142_variants_lower

The statement

The declaration takes one explicit natural-number argument kkk and one hypothesis 1<k1 < k1<k, and asserts a little-o relation between two functions N→R\mathbb{N} \to \mathbb{R}N→R, taken along the filter atTop\text{atTop}atTop on N\mathbb{N}N (i.e. "as the natural number NNN tends to infinity"):

N⟼rk(N)is o ⁣(N⟼Nlog⁡N)(N→∞),N \longmapsto r_k(N) \quad \text{is } o\!\left( N \longmapsto \frac{N}{\log N} \right) \qquad (N \to \infty),N⟼rk​(N)is o(N⟼logNN​)(N→∞),

where rk(N)r_k(N)rk​(N) is the natural number defined below, injected into R\mathbb{R}R, and Nlog⁡N\frac{N}{\log N}logNN​ means the real number (N:R)log⁡(N:R)\frac{(N : \mathbb{R})}{\log (N : \mathbb{R})}log(N:R)(N:R)​ with log⁡\loglog the natural logarithm on R\mathbb{R}R.

Unfolded, the little-o relation is exactly the following quantifier structure:

∀ c∈R, c>0 ⟹ ∃ N0∈N, ∀ N≥N0:∥rk(N)∥ ≤ c⋅∥Nlog⁡N∥.\forall\, c \in \mathbb{R},\ c > 0 \ \Longrightarrow\ \exists\, N_0 \in \mathbb{N},\ \forall\, N \ge N_0 : \quad \bigl\| r_k(N) \bigr\| \ \le\ c \cdot \left\| \frac{N}{\log N} \right\|.∀c∈R, c>0 ⟹ ∃N0​∈N, ∀N≥N0​:​rk​(N)​ ≤ c⋅​logNN​​.

Note the order of quantifiers: the threshold N0N_0N0​ is chosen after ccc, and the bound is non-strict (≤\le≤), with ccc ranging over all strictly positive reals. Both sides are absolute values (norms) of reals; the left side equals rk(N)r_k(N)rk​(N) since it is a natural number, and the right side equals ∣Nlog⁡N∣\left|\frac{N}{\log N}\right|​logNN​​.

The hypothesis 1<k1 < k1<k is the only constraint on kkk; kkk is otherwise arbitrary, and the claim is asserted for each such fixed kkk separately (there is no uniformity in kkk).

What rk(N)r_k(N)rk​(N) means (expanded from the bundle)

For natural numbers kkk and NNN,

rk(N) := sup⁡ { ∣S∣ : S a finite subset of N, S⊆{1,2,…,N}, S is "AP-of-length-k-free" },r_k(N) \ :=\ \sup\ \bigl\{\, |S| \ :\ S \text{ a finite subset of } \mathbb{N},\ S \subseteq \{1, 2, \dots, N\},\ \text{$S$ is "AP-of-length-$k$-free"} \,\bigr\},rk​(N) := sup {∣S∣ : S a finite subset of N, S⊆{1,2,…,N}, S is "AP-of-length-k-free"},

where the supremum is the supremum of a set of natural numbers, and {1,…,N}\{1,\dots,N\}{1,…,N} is the integer interval [1,N][1, N][1,N] (empty when N=0N = 0N=0).

Junk-value convention for this supremum: the supremum is taken in N\mathbb{N}N, where by convention the supremum of an empty set, or of a set unbounded above, is 000. Here neither degenerate case arises: the empty set S=∅S = \emptysetS=∅ always qualifies (it is AP-free, and ∅⊆{1,…,N}\emptyset \subseteq \{1,\dots,N\}∅⊆{1,…,N}), so the set of admissible cardinalities contains 000 and is nonempty; and every admissible ∣S∣|S|∣S∣ is at most NNN. So rk(N)r_k(N)rk​(N) is an attained maximum, and rk(0)=0r_k(0) = 0rk​(0)=0.

"AP-of-length-lll-free" (IsAPOfLengthFree)

For a set sss in an additive commutative monoid α\alphaα and l∈N∪{∞}l \in \mathbb{N} \cup \{\infty\}l∈N∪{∞} (the type N∞\mathbb{N}^\inftyN∞), the predicate reads literally:

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

The conclusion l≤1l \le 1l≤1 does not mention ttt; it is a statement about the fixed parameter lll only. So the predicate is logically equivalent to

(∃ t⊆s that is an arithmetic progression of length l) ⟹ l≤1.\bigl(\exists\, t \subseteq s \text{ that is an arithmetic progression of length } l\bigr) \ \Longrightarrow\ l \le 1 .(∃t⊆s that is an arithmetic progression of length l) ⟹ l≤1.

In the theorem, lll is the natural number kkk coerced into N∞\mathbb{N}^\inftyN∞, and the hypothesis 1<k1 < k1<k makes the conclusion k≤1k \le 1k≤1 false; hence for the values of kkk covered by the theorem the predicate says: no subset t⊆st \subseteq st⊆s is an arithmetic progression of length kkk. (For k≤1k \le 1k≤1 the predicate would hold vacuously-by-conclusion for every sss, but those kkk are excluded by the hypothesis.)

"Arithmetic progression of length lll" (IsAPOfLength / IsAPOfLengthWith)

A set t⊆αt \subseteq \alphat⊆α is an arithmetic progression of length l∈N∞l \in \mathbb{N}^\inftyl∈N∞ if there exist a,d∈αa, d \in \alphaa,d∈α such that both:

  1. the cardinality of ttt, computed in N∞\mathbb{N}^\inftyN∞ (a genuine natural number if ttt is finite, and ∞\infty∞ if ttt is infinite), equals lll:
# t = lin N∪{∞};\#\,t \ =\ l \quad \text{in } \mathbb{N} \cup \{\infty\};#t = lin N∪{∞};
  1. ttt is exactly the image set
t = { a+n⋅d : n∈N, n<l },t \ =\ \{\, a + n\cdot d \ :\ n \in \mathbb{N},\ n < l \,\},t = {a+n⋅d : n∈N, n<l},

where n<ln < ln<l compares the natural number nnn with lll inside N∞\mathbb{N}^\inftyN∞, and n⋅dn \cdot dn⋅d is the nnn-fold monoid multiple of ddd.

Both conditions are required simultaneously. In particular condition 1 is what rules out degenerate progressions: with l=kl = kl=k and k>1k > 1k>1, the choice d=0d = 0d=0 would make the set in condition 2 equal to the singleton {a}\{a\}{a}, whose cardinality is 1≠k1 \ne k1=k; so d=0d = 0d=0 is automatically excluded, and more generally the kkk listed terms a,a+d,…,a+(k−1)da, a+d, \dots, a+(k-1)da,a+d,…,a+(k−1)d must be pairwise distinct. There is no separate hypothesis "d>0d > 0d>0" in the definition — non-degeneracy is carried entirely by the cardinality equation in N∞\mathbb{N}^\inftyN∞.

In the application inside rk(N)r_k(N)rk​(N), the ambient monoid is α=N\alpha = \mathbb{N}α=N, so aaa and ddd are natural numbers and n⋅d=ndn \cdot d = ndn⋅d=nd; the set sss is the finite set SSS viewed as a set of naturals, and ttt ranges over arbitrary subsets of N\mathbb{N}N contained in SSS.

Putting it together, for k>1k > 1k>1: rk(N)r_k(N)rk​(N) is the largest cardinality of a subset S⊆{1,…,N}S \subseteq \{1,\dots,N\}S⊆{1,…,N} such that there are no a,d∈Na, d \in \mathbb{N}a,d∈N for which {a,a+d,…,a+(k−1)d}\{a, a+d, \dots, a+(k-1)d\}{a,a+d,…,a+(k−1)d} has exactly kkk elements and is contained in SSS.

Junk values in the comparison function

The comparison function is N↦(N:R)log⁡(N:R)N \mapsto \dfrac{(N:\mathbb{R})}{\log (N:\mathbb{R})}N↦log(N:R)(N:R)​, using real division, which is total: division by 000 yields 000.

  • At N=0N = 0N=0: log⁡0=0\log 0 = 0log0=0 by the real-logarithm convention, so the value is 0/0=00/0 = 00/0=0.
  • At N=1N = 1N=1: log⁡1=0\log 1 = 0log1=0, so the value is 1/0=01/0 = 01/0=0.
  • For N≥2N \ge 2N≥2: log⁡N>0\log N > 0logN>0 and the value is the usual positive quantity N/log⁡NN/\log NN/logN.

Because the little-o relation is taken along atTop\text{atTop}atTop, the bound is only required for all sufficiently large NNN, so the two degenerate points N=0,1N = 0, 1N=0,1 (where the right-hand side is 000 while rk(1)=1r_k(1) = 1rk​(1)=1) place no constraint on the statement.

Items defined in the bundle but not used by this statement

The bundle also defines the elementary predicates

HasAP(k,A) :⟺ ∃ a,d∈N, d>0 ∧ ∀ i<k, a+id∈A,APFree(k,A) :⟺ ¬ HasAP(k,A),\mathrm{HasAP}(k, A) \ :\Longleftrightarrow\ \exists\, a, d \in \mathbb{N},\ d > 0 \ \wedge\ \forall\, i < k,\ a + i d \in A, \qquad \mathrm{APFree}(k, A) \ :\Longleftrightarrow\ \neg\,\mathrm{HasAP}(k, A),HasAP(k,A) :⟺ ∃a,d∈N, d>0 ∧ ∀i<k, a+id∈A,APFree(k,A) :⟺ ¬HasAP(k,A),

for a finite set A⊆NA \subseteq \mathbb{N}A⊆N, and proves three auxiliary facts: that the empty set is AP-of-length-kkk-free for every kkk; that every AP-free S⊆{1,…,N}S \subseteq \{1,\dots,N\}S⊆{1,…,N} satisfies ∣S∣≤rk(N)|S| \le r_k(N)∣S∣≤rk​(N); and that rk(N)≤Nr_k(N) \le Nrk​(N)≤N. Neither HasAP\mathrm{HasAP}HasAP nor APFree\mathrm{APFree}APFree appears in the definition of rk(N)r_k(N)rk​(N) or in the theorem statement; the theorem's notion of progression-freeness is the N∞\mathbb{N}^\inftyN∞-cardinality one described above.

Summary of the literal claim

For every natural number kkk with k≥2k \ge 2k≥2: for every real c>0c > 0c>0 there exists a threshold N0N_0N0​ such that for every natural number N≥N0N \ge N_0N≥N0​, the maximum size of a subset of {1,…,N}\{1,\dots,N\}{1,…,N} containing no kkk-element arithmetic progression is at most c⋅Nlog⁡Nc \cdot \dfrac{N}{\log N}c⋅logNN​. Equivalently, rk(N)/(N/log⁡N)→0r_k(N)\big/\bigl(N/\log N\bigr) \to 0rk​(N)/(N/logN)→0 as N→∞N \to \inftyN→∞.

Human review
  • Flagged by Shuze Chen · Sep 10, 2026

    This theorem should be set as the Goal of Erods142 mission

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