Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Erdős Problem 788 — strengthened final theorem

Proved
Erdos788.erdos788

by ShouqiaoWang · Jul 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricserdos-problemsextremal-combinatoricsnumber-theory

Let f(n)f(n)f(n) be the exact integer-valued extremal function in Erdős Problem 788. The complete strengthened theorem asserts all of the following:

12000nlog⁡n≤f(n)(n≥3);\frac1{2000}\sqrt{n\log n}\le f(n) \qquad(n\ge3);20001​nlogn​≤f(n)(n≥3);

there exist C>0C>0C>0 and n0≥1n_0\ge1n0​≥1 such that for every n≥n0n\ge n_0n≥n0​,

12000nlog⁡n≤f(n)≤n 12+C(log⁡log⁡nlog⁡n)1/3;\frac1{2000}\sqrt{n\log n}\le f(n)\le n^{\,\frac12+ C\left(\frac{\log\log n}{\log n}\right)^{1/3}};20001​nlogn​≤f(n)≤n21​+C(lognloglogn​)1/3;

and for every ε>0\varepsilon>0ε>0, all sufficiently large nnn satisfy

n1/2−ε≤f(n)≤n1/2+ε.n^{1/2-\varepsilon}\le f(n)\le n^{1/2+\varepsilon}.n1/2−ε≤f(n)≤n1/2+ε.

The statement additionally includes, as its own fully quantified conjunct, the affirmative answer to the original Erdős Problems upper-bound question:

∀ε>0,f(n)≤n1/2+εfor all sufficiently large n.\forall\varepsilon>0,\quad f(n)\le n^{1/2+\varepsilon} \quad\text{for all sufficiently large }n.∀ε>0,f(n)≤n1/2+εfor all sufficiently large n.

This is the repository’s strengthened formal version of the public manuscript’s Theorem 1.1: it makes the lower constant explicit and proves that lower bound for every n≥3n\ge3n≥3.

Preamble
import Definitions.Def_erdos788_problem
Formal statement
namespace Erdos788

/-- Erdős Problem 788, preserving both the strengthened paper statement and
the exact quantifier form of the original upper-bound question. -/
theorem erdos788 : MainTheorem := by sorry

end Erdos788
Source
Shouqiao Wang, Erdős Problem 788 formalization. Final theorem: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/lean/Erdos788/FinalTheorem.lean#L35-L60. Exact target proposition: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/lean/Erdos788/Statement.lean#L44-L59. Reference manuscript: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/paper.pdf, Theorem 1.1; this formal target is the repository's explicitly documented strengthening and also includes the original upper question.

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me