Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Erdős Problem 788 — exact finite model and final propositions

Definition
erdos788_problem

by ShouqiaoWang · Jul 30, 2026 · Mathlib c5ea003 (Lean v4.30.0)

combinatoricserdos-problemsextremal-combinatoricsnumber-theory

For n∈Nn\in\mathbb Nn∈N, define the integer intervals

In=(n,2n)∩N,Jn=(2n,4n)∩N.I_n=(n,2n)\cap\mathbb N,\qquad J_n=(2n,4n)\cap\mathbb N.In​=(n,2n)∩N,Jn​=(2n,4n)∩N.

Given a finite set B⊆JnB\subseteq J_nB⊆Jn​, call C⊆InC\subseteq I_nC⊆In​ admissible when no sum of two distinct elements of CCC lies in BBB. Define f(n)f(n)f(n) to be the greatest integer threshold ttt such that every finite B⊆JnB\subseteq J_nB⊆Jn​ admits an admissible finite C⊆InC\subseteq I_nC⊆In​ with

t≤∣B∣+∣C∣.t\le |B|+|C|.t≤∣B∣+∣C∣.

The bundle also defines the exponent correction

δ(n)=(log⁡log⁡nlog⁡n)1/3,\delta(n)=\left(\frac{\log\log n}{\log n}\right)^{1/3},δ(n)=(lognloglogn​)1/3,

and the explicit lower-bound constant c0=1/2000c_0=1/2000c0​=1/2000. All occurrences of f(n)f(n)f(n) below are its integer value viewed as a real number.

The quantitative proposition says that there are c,C>0c,C>0c,C>0 and n0≥1n_0\ge1n0​≥1 such that every n≥n0n\ge n_0n≥n0​ satisfies

cnlog⁡n≤f(n)≤n 1/2+Cδ(n).c\sqrt{n\log n}\le f(n)\le n^{\,1/2+C\delta(n)}.cnlogn​≤f(n)≤n1/2+Cδ(n).

The exponent-one-half proposition says that for every ε>0\varepsilon>0ε>0 there is n0≥1n_0\ge1n0​≥1 such that every n≥n0n\ge n_0n≥n0​ satisfies

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 original upper-question proposition separately asserts the upper half of this conclusion, with its own threshold for each ε>0\varepsilon>0ε>0. The strengthened paper proposition is the conjunction of:

  1. c0nlog⁡n≤f(n)c_0\sqrt{n\log n}\le f(n)c0​nlogn​≤f(n) for every natural n≥3n\ge3n≥3;
  2. the eventual two-sided quantitative estimate with lower constant exactly c0c_0c0​ and some C>0C>0C>0; and
  3. the exponent-one-half proposition.

The complete final proposition conjoins that strengthened paper proposition with the separately quantified original upper-question proposition.

Formalization Note The finite maximum is first formed over natural thresholds with an explicit finite score bound and then embedded into Z\mathbb ZZ. A separate mission milestone proves that this construction is exactly the greatest integer with the stated universal property. Lean's natural numbers include 000; at n=0n=0n=0 both intervals are empty and f(0)=0f(0)=0f(0)=0. Lean's real logarithm, division, and real power are total operations: in particular δ(0)=δ(1)=0\delta(0)=\delta(1)=0δ(0)=δ(1)=0. At n=2n=2n=2 the quotient inside the power is negative, and Real.rpow uses Mathlib's total negative-base convention rather than the signed real cube root. The proved asymptotic statements may choose thresholds above these small values.

Definition code
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Finset.Interval

/-!
# Erdős Problem 788: exact problem data and final statements

This file contains the public mathematical interface used by the Prove2Me
mission.  It preserves the exact finite maximum from the original problem and
the strengthened final statement proved by the accompanying Lean repository.
The proof implementation is submitted separately.
-/

namespace Erdos788

/-- The integer interval `I_n = (n, 2n) ∩ ℕ`. -/
def I (n : ℕ) : Finset ℕ :=
  Finset.Ioo n (2 * n)

/-- The integer interval `J_n = (2n, 4n) ∩ ℕ`. -/
def J (n : ℕ) : Finset ℕ :=
  Finset.Ioo (2 * n) (4 * n)

/-- `C` is `B`-admissible: it lies in `I n`, and no sum of two distinct
members of `C` belongs to `B`. -/
def Admissible (n : ℕ) (B C : Finset ℕ) : Prop :=
  C ⊆ I n ∧
    ∀ ⦃c⦄, c ∈ C → ∀ ⦃c'⦄, c' ∈ C → c ≠ c' → c + c' ∉ B

/-- The natural-number form of the universal guarantee at threshold `t`. -/
def Guarantees (n t : ℕ) : Prop :=
  ∀ B : Finset ℕ, B ⊆ J n →
    ∃ C : Finset ℕ, Admissible n B C ∧ t ≤ B.card + C.card

/-- A uniform finite upper bound for every score `|B| + |C|`. -/
def scoreBound (n : ℕ) : ℕ :=
  (J n).card + (I n).card

/-- The largest natural-number threshold with the universal property. -/
noncomputable def fNat (n : ℕ) : ℕ := by
  classical
  exact Nat.findGreatest (Guarantees n) (scoreBound n)

/-- The integer-valued function `f(n)` in the original problem. -/
noncomputable def f (n : ℕ) : ℤ :=
  (fNat n : ℤ)

/-- The paper's universal guarantee predicate for an arbitrary integer `t`. -/
def IntegerGuarantees (n : ℕ) (t : ℤ) : Prop :=
  ∀ B : Finset ℕ, B ⊆ J n →
    ∃ C : Finset ℕ, Admissible n B C ∧
      t ≤ ((B.card + C.card : ℕ) : ℤ)

/-- The exponent correction in the quantitatively strong paper. -/
noncomputable def exponentCorrection (n : ℕ) : ℝ :=
  (Real.log (Real.log (n : ℝ)) / Real.log (n : ℝ)) ^ (1 / 3 : ℝ)

/-- The explicit lower-bound constant in the strengthened formal statement. -/
noncomputable def finalLowerBoundConstant : ℝ :=
  1 / 2000

/-- The fully quantified two-sided conclusion of the main theorem. -/
def QuantitativeMainTheorem : Prop :=
  ∃ c C : ℝ, 0 < c ∧ 0 < C ∧
    ∃ n₀ : ℕ, 1 ≤ n₀ ∧ ∀ n : ℕ, n₀ ≤ n →
      c * Real.sqrt ((n : ℝ) * Real.log (n : ℝ)) ≤ (f n : ℝ) ∧
        (f n : ℝ) ≤
          (n : ℝ) ^ ((1 / 2 : ℝ) + C * exponentCorrection n)

/-- Explicit epsilon quantifiers for `f(n) = n^(1/2+o(1))`. -/
def HasExponentOneHalf : Prop :=
  ∀ ε : ℝ, 0 < ε → ∃ n₀ : ℕ, 1 ≤ n₀ ∧ ∀ n : ℕ, n₀ ≤ n →
    (n : ℝ) ^ ((1 / 2 : ℝ) - ε) ≤ (f n : ℝ) ∧
      (f n : ℝ) ≤ (n : ℝ) ^ ((1 / 2 : ℝ) + ε)

/-- The precise epsilon-quantified upper-bound question on the original
Erdős Problems page. -/
def AnswersOriginalUpperQuestion : Prop :=
  ∀ ε : ℝ, 0 < ε → ∃ n₀ : ℕ, 1 ≤ n₀ ∧ ∀ n : ℕ, n₀ ≤ n →
    (f n : ℝ) ≤ (n : ℝ) ^ ((1 / 2 : ℝ) + ε)

/-- The strengthened paper statement: the explicit lower bound holds for
every `n ≥ 3`, the quantitative upper bound holds for all sufficiently large
positive integers, and the resulting exponent is one half. -/
def PaperMainTheorem : Prop :=
  (∀ n : ℕ, 3 ≤ n →
    finalLowerBoundConstant * Real.sqrt ((n : ℝ) * Real.log (n : ℝ)) ≤
      (f n : ℝ)) ∧
  (∃ C : ℝ, 0 < C ∧
    ∃ n₀ : ℕ, 1 ≤ n₀ ∧ ∀ n : ℕ, n₀ ≤ n →
      finalLowerBoundConstant *
          Real.sqrt ((n : ℝ) * Real.log (n : ℝ)) ≤ (f n : ℝ) ∧
        (f n : ℝ) ≤
          (n : ℝ) ^ ((1 / 2 : ℝ) + C * exponentCorrection n)) ∧
  HasExponentOneHalf

/-- The complete final statement: the strengthened paper theorem together
with the original upper-bound question in its exact epsilon form. -/
def MainTheorem : Prop :=
  PaperMainTheorem ∧ AnswersOriginalUpperQuestion

end Erdos788
Source
Shouqiao Wang, Erdős Problem 788 formalization. Exact finite model: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/lean/Erdos788/Definitions.lean#L14-L69. Quantified final propositions: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/lean/Erdos788/Statement.lean#L13-L59. Reference manuscript: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788/paper.pdf, Theorem 1.1. Pinned repository snapshot: https://github.com/ShouqiaoW/erdos/tree/61325b10bbdc29f4fb5e0618b414b9f2189333ad/788.
Read-back

What the Lean code literally says, in plain math · gpt-5.6-sol

I

For each natural number nnn, I(n)I(n)I(n) is the finite set {m∈N:n<m<2n}\{m\in\mathbb N:n<m<2n\}{m∈N:n<m<2n}, with both endpoints excluded. Thus I(0)=I(1)=∅I(0)=I(1)=\varnothingI(0)=I(1)=∅, while for n≥1n\ge1n≥1 it consists of n+1,n+2,…,2n−1n+1,n+2,\ldots,2n-1n+1,n+2,…,2n−1 and has cardinality n−1n-1n−1.

J

For each natural number nnn, J(n)J(n)J(n) is the finite set {m∈N:2n<m<4n}\{m\in\mathbb N:2n<m<4n\}{m∈N:2n<m<4n}, with both endpoints excluded. Thus J(0)=∅J(0)=\varnothingJ(0)=∅, while for n≥1n\ge1n≥1 it consists of 2n+1,2n+2,…,4n−12n+1,2n+2,\ldots,4n-12n+1,2n+2,…,4n−1 and has cardinality 2n−12n-12n−1; in particular, J(1)={3}J(1)=\{3\}J(1)={3}.

Admissible

For every natural number nnn and arbitrary finite sets B,C⊆NB,C\subseteq\mathbb NB,C⊆N, Admissible n B C holds exactly when every c∈Cc\in Cc∈C satisfies n<c<2nn<c<2nn<c<2n, and for every two universally quantified natural numbers c,c′∈Cc,c'\in Cc,c′∈C, if c≠c′c\ne c'c=c′, then c+c′∉Bc+c'\notin Bc+c′∈/B. There is no requirement here that B⊆{b∈N:2n<b<4n}B\subseteq\{b\in\mathbb N:2n<b<4n\}B⊆{b∈N:2n<b<4n}. The sum of an element with itself is unrestricted because only distinct members are tested. The pair-avoidance condition is vacuous when CCC is empty or a singleton; the empty set is admissible for every nnn and every BBB, and when n=0n=0n=0 or n=1n=1n=1, admissibility forces C=∅C=\varnothingC=∅.

Guarantees

For every pair of natural numbers n,tn,tn,t, Guarantees n t asserts that for every finite set B⊆NB\subseteq\mathbb NB⊆N whose members all satisfy 2n<b<4n2n<b<4n2n<b<4n, there exists a finite set C⊆NC\subseteq\mathbb NC⊆N, allowed to depend on BBB, such that every c∈Cc\in Cc∈C satisfies n<c<2nn<c<2nn<c<2n, no sum c+c′c+c'c+c′ of two distinct members c,c′∈Cc,c'\in Cc,c′∈C belongs to BBB, and t≤∣B∣+∣C∣t\le|B|+|C|t≤∣B∣+∣C∣. The universal quantifier includes B=∅B=\varnothingB=∅, and the existential choice may be C=∅C=\varnothingC=∅. Consequently, the assertion always holds for t=0t=0t=0. For n=0n=0n=0 it holds exactly when t=0t=0t=0, since both intervals are empty; for n=1n=1n=1 it also holds exactly when t=0t=0t=0, since the universally included choice B=∅B=\varnothingB=∅ and the forced choice C=∅C=\varnothingC=∅ give score 000.

scoreBound

For every natural number nnn, scoreBound n is the natural number ∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣\left|\{b\in\mathbb N:2n<b<4n\}\right|+\left|\{c\in\mathbb N:n<c<2n\}\right|∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣. It is 000 when n=0n=0n=0, and for n≥1n\ge1n≥1 it equals (2n−1)+(n−1)=3n−2(2n-1)+(n-1)=3n-2(2n−1)+(n−1)=3n−2; in particular, its values at n=1n=1n=1 and n=2n=2n=2 are 111 and 444. This declaration defines that number but does not itself quantify over BBB or CCC or assert a proposition about them.

fNat

For every natural number nnn, fNat n is obtained by searching only among natural numbers t≤∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣t\le\left|\{b\in\mathbb N:2n<b<4n\}\right|+\left|\{c\in\mathbb N:n<c<2n\}\right|t≤∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣ and taking the greatest ttt such that, for every finite B⊆{b∈N:2n<b<4n}B\subseteq\{b\in\mathbb N:2n<b<4n\}B⊆{b∈N:2n<b<4n}, there exists a finite C⊆{c∈N:n<c<2n}C\subseteq\{c\in\mathbb N:n<c<2n\}C⊆{c∈N:n<c<2n} for which every two distinct c,c′∈Cc,c'\in Cc,c′∈C satisfy c+c′∉Bc+c'\notin Bc+c′∈/B and t≤∣B∣+∣C∣t\le|B|+|C|t≤∣B∣+∣C∣. The bounded greatest-search operation is total and would return 000 if no searched value satisfied the predicate; here t=0t=0t=0 always satisfies it, by choosing C=∅C=\varnothingC=∅, so the returned value is an actual satisfying maximum. The search bound is 000 at n=0n=0n=0 and 3n−23n-23n−2 for n≥1n\ge1n≥1. In particular, fNat 0 and fNat 1 are 000, while fNat 2 is 111: at n=2n=2n=2 the inner interval is {3}\{3\}{3}, so a singleton CCC always gives score at least 111, whereas B=∅B=\varnothingB=∅ prevents any score greater than 111.

f

For every natural number nnn, f n is the integer obtained by coercing the following natural number to Z\mathbb ZZ: the greatest natural t≤∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣t\le\left|\{b\in\mathbb N:2n<b<4n\}\right|+\left|\{c\in\mathbb N:n<c<2n\}\right|t≤∣{b∈N:2n<b<4n}∣+∣{c∈N:n<c<2n}∣ such that every finite B⊆{b∈N:2n<b<4n}B\subseteq\{b\in\mathbb N:2n<b<4n\}B⊆{b∈N:2n<b<4n} admits a finite C⊆{c∈N:n<c<2n}C\subseteq\{c\in\mathbb N:n<c<2n\}C⊆{c∈N:n<c<2n} with no sum of two distinct members of CCC in BBB and with t≤∣B∣+∣C∣t\le|B|+|C|t≤∣B∣+∣C∣. The bounded search is total with fallback value 000, and 000 is in fact always a valid candidate. Hence f n is always a nonnegative integer, with f(0)=0f(0)=0f(0)=0, f(1)=0f(1)=0f(1)=0, and f(2)=1f(2)=1f(2)=1.

IntegerGuarantees

For every natural number nnn and every integer ttt, IntegerGuarantees n t asserts that for every finite set B⊆{b∈N:2n<b<4n}B\subseteq\{b\in\mathbb N:2n<b<4n\}B⊆{b∈N:2n<b<4n}, there exists a finite set C⊆{c∈N:n<c<2n}C\subseteq\{c\in\mathbb N:n<c<2n\}C⊆{c∈N:n<c<2n} such that no sum of two distinct members of CCC belongs to BBB and t≤ιN→Z(∣B∣+∣C∣)t\le\iota_{\mathbb N\to\mathbb Z}(|B|+|C|)t≤ιN→Z​(∣B∣+∣C∣), where the entire natural-number sum of cardinalities is then cast to an integer. Every integer t≤0t\le0t≤0 satisfies this assertion for every nnn, by taking C=∅C=\varnothingC=∅, because the cast score is nonnegative. For n=0n=0n=0 and for n=1n=1n=1, the assertion holds exactly for t≤0t\le0t≤0, since the universally included choice B=∅B=\varnothingB=∅ and the forced choice C=∅C=\varnothingC=∅ produce score 000.

exponentCorrection

For every natural number nnn, exponentCorrection n is the real-power value (log⁡(log⁡n)log⁡n)1/3\left(\dfrac{\log(\log n)}{\log n}\right)^{1/3}(lognlog(logn)​)1/3, with nnn first cast to R\mathbb RR and the division and exponent interpreted in R\mathbb RR. The operations are totalized: log⁡0=0\log0=0log0=0, while for a negative nonzero real xxx, log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣; real division satisfies x/0=0x/0=0x/0=0; for x>0x>0x>0, Mathlib’s real power is xy=exp⁡(log⁡x⋅y)x^y=\exp(\log x\cdot y)xy=exp(logx⋅y); for x<0x<0x<0, it is xy=exp⁡(log⁡∣x∣⋅y)cos⁡(πy)x^y=\exp(\log|x|\cdot y)\cos(\pi y)xy=exp(log∣x∣⋅y)cos(πy); and 00=10^0=100=1 while 0y=00^y=00y=0 for every y≠0y\ne0y=0, including negative yyy. Consequently, at n=0n=0n=0 and n=1n=1n=1 the quotient is 0/0=00/0=00/0=0 and the correction is 01/3=00^{1/3}=001/3=0. At n=2n=2n=2, log⁡2∈(0,1)\log2\in(0,1)log2∈(0,1), so q2:=log⁡(log⁡2)/log⁡2<0q_2:=\log(\log2)/\log2<0q2​:=log(log2)/log2<0, and therefore q21/3=exp⁡ ⁣(13log⁡∣q2∣)cos⁡(π/3)=12exp⁡ ⁣(13log⁡∣q2∣)q_2^{1/3}=\exp\!\left(\frac13\log|q_2|\right)\cos(\pi/3)=\frac12\exp\!\left(\frac13\log|q_2|\right)q21/3​=exp(31​log∣q2​∣)cos(π/3)=21​exp(31​log∣q2​∣): it is one half of the ordinary positive cube root of ∣q2∣|q_2|∣q2​∣, not the signed real cube root and not the full positive cube root. For every natural n≥3n\ge3n≥3, the quotient is positive, so the expression is the ordinary positive cube root of that quotient.

finalLowerBoundConstant

finalLowerBoundConstant is the real number 12000\dfrac1{2000}20001​. Although real division is totalized at zero denominators, the denominator here is nonzero, so this is the ordinary positive rational number 1/20001/20001/2000.

QuantitativeMainTheorem

For this declaration, for each n∈Nn\in\mathbb Nn∈N let In={i∈N:n<i<2n}\mathcal I_n=\{i\in\mathbb N:n<i<2n\}In​={i∈N:n<i<2n} and Jn={j∈N:2n<j<4n}\mathcal J_n=\{j\in\mathbb N:2n<j<4n\}Jn​={j∈N:2n<j<4n}, and let MnM_nMn​ be the greatest natural number t≤∣Jn∣+∣In∣t\le|\mathcal J_n|+|\mathcal I_n|t≤∣Jn​∣+∣In​∣ such that every finite B⊆JnB\subseteq\mathcal J_nB⊆Jn​ admits a finite D⊆InD\subseteq\mathcal I_nD⊆In​ satisfying ∀d,d′∈D, d≠d′⇒d+d′∉B\forall d,d'\in D,\ d\ne d'\Rightarrow d+d'\notin B∀d,d′∈D, d=d′⇒d+d′∈/B and t≤∣B∣+∣D∣t\le|B|+|D|t≤∣B∣+∣D∣; t=0t=0t=0 is always a candidate, and MnM_nMn​ is used below after coercion first to Z\mathbb ZZ and then to R\mathbb RR. The proposition asserts that there exist real numbers c,Cc,Cc,C with c>0c>0c>0 and C>0C>0C>0, and then a natural number n0≥1n_0\ge1n0​≥1, such that every natural number n≥n0n\ge n_0n≥n0​ simultaneously satisfies cnlog⁡n≤Mnc\sqrt{n\log n}\le M_ncnlogn​≤Mn​ and Mn≤n 1/2+Cqn1/3M_n\le n^{\,1/2+Cq_n^{1/3}}Mn​≤n1/2+Cqn1/3​, where qn=log⁡(log⁡n)/log⁡nq_n=\log(\log n)/\log nqn​=log(logn)/logn and both superscripted operations use Mathlib’s real power. The constants c,Cc,Cc,C are uniform in nnn, while n0n_0n0​ is chosen after them. Here log⁡0=0\log0=0log0=0, division by zero is 000, and x\sqrt{x}x​ is the usual nonnegative square root for x≥0x\ge0x≥0 and is 000 for x<0x<0x<0. For real power, a positive base satisfies xy=exp⁡(log⁡x⋅y)x^y=\exp(\log x\cdot y)xy=exp(logx⋅y), a negative base satisfies xy=exp⁡(log⁡∣x∣⋅y)cos⁡(πy)x^y=\exp(\log|x|\cdot y)\cos(\pi y)xy=exp(log∣x∣⋅y)cos(πy), and 00=10^0=100=1 while 0y=00^y=00y=0 for y≠0y\ne0y=0. The condition n≥n0≥1n\ge n_0\ge1n≥n0​≥1 excludes n=0n=0n=0 and makes the outer power base positive and nlog⁡nn\log nnlogn nonnegative. If n=1n=1n=1 is included, then log⁡1=0\log1=0log1=0, the square-root term and q11/3q_1^{1/3}q11/3​ are 000, M1=0M_1=0M1​=0, and the outer power is 11/2=11^{1/2}=111/2=1. If n=2n=2n=2 is included, then q2<0q_2<0q2​<0 and q21/3q_2^{1/3}q21/3​ is one half of the ordinary positive cube root of ∣q2∣|q_2|∣q2​∣ because cos⁡(π/3)=1/2\cos(\pi/3)=1/2cos(π/3)=1/2.

HasExponentOneHalf

For this declaration, for each n∈Nn\in\mathbb Nn∈N let In={i∈N:n<i<2n}\mathcal I_n=\{i\in\mathbb N:n<i<2n\}In​={i∈N:n<i<2n} and Jn={j∈N:2n<j<4n}\mathcal J_n=\{j\in\mathbb N:2n<j<4n\}Jn​={j∈N:2n<j<4n}, and let MnM_nMn​ be the greatest natural number t≤∣Jn∣+∣In∣t\le|\mathcal J_n|+|\mathcal I_n|t≤∣Jn​∣+∣In​∣ such that every finite B⊆JnB\subseteq\mathcal J_nB⊆Jn​ admits a finite D⊆InD\subseteq\mathcal I_nD⊆In​ with no sum of two distinct members in BBB and with t≤∣B∣+∣D∣t\le|B|+|D|t≤∣B∣+∣D∣; this maximum exists because t=0t=0t=0 is a candidate, and it is used as a real number after coercion through Z\mathbb ZZ. The proposition asserts that for every real ε>0\varepsilon>0ε>0, there exists a natural number n0≥1n_0\ge1n0​≥1, allowed to depend on ε\varepsilonε, such that every natural n≥n0n\ge n_0n≥n0​ satisfies both n 1/2−ε≤Mnn^{\,1/2-\varepsilon}\le M_nn1/2−ε≤Mn​ and Mn≤n 1/2+εM_n\le n^{\,1/2+\varepsilon}Mn​≤n1/2+ε. These are Mathlib real powers: a positive base satisfies xy=exp⁡(log⁡x⋅y)x^y=\exp(\log x\cdot y)xy=exp(logx⋅y), a negative base satisfies xy=exp⁡(log⁡∣x∣⋅y)cos⁡(πy)x^y=\exp(\log|x|\cdot y)\cos(\pi y)xy=exp(log∣x∣⋅y)cos(πy), and 00=10^0=100=1 while 0y=00^y=00y=0 for every nonzero yyy, including negative yyy. Every quantified base is in fact positive because n≥n0≥1n\ge n_0\ge1n≥n0​≥1, so neither the negative-base nor zero-base branch occurs, although the lower exponent may be zero or negative. Since M1=0M_1=0M1​=0 but 1y=11^y=11y=1 for every real yyy, n0=1n_0=1n0​=1 cannot satisfy the displayed lower bound; any actual witness must therefore be at least 222. The excluded value n=0n=0n=0 would exhibit the zero-base totalization: its lower power would be 111 when ε=1/2\varepsilon=1/2ε=1/2 and 000 otherwise, including when 1/2−ε<01/2-\varepsilon<01/2−ε<0.

AnswersOriginalUpperQuestion

For this declaration, for each n∈Nn\in\mathbb Nn∈N let In={i∈N:n<i<2n}\mathcal I_n=\{i\in\mathbb N:n<i<2n\}In​={i∈N:n<i<2n} and Jn={j∈N:2n<j<4n}\mathcal J_n=\{j\in\mathbb N:2n<j<4n\}Jn​={j∈N:2n<j<4n}, and let MnM_nMn​ be the greatest natural number t≤∣Jn∣+∣In∣t\le|\mathcal J_n|+|\mathcal I_n|t≤∣Jn​∣+∣In​∣ such that every finite B⊆JnB\subseteq\mathcal J_nB⊆Jn​ admits a finite D⊆InD\subseteq\mathcal I_nD⊆In​ whose distinct-pair sums avoid BBB and for which t≤∣B∣+∣D∣t\le|B|+|D|t≤∣B∣+∣D∣; t=0t=0t=0 is always a candidate, and MnM_nMn​ is read as a real number after coercion through Z\mathbb ZZ. The proposition asserts that for every real ε>0\varepsilon>0ε>0, there exists a natural number n0≥1n_0\ge1n0​≥1, allowed to depend on ε\varepsilonε, such that every natural number n≥n0n\ge n_0n≥n0​ satisfies Mn≤n 1/2+εM_n\le n^{\,1/2+\varepsilon}Mn​≤n1/2+ε. The right side is Mathlib’s real power: it is exp⁡(log⁡x⋅y)\exp(\log x\cdot y)exp(logx⋅y) for a positive base, exp⁡(log⁡∣x∣⋅y)cos⁡(πy)\exp(\log|x|\cdot y)\cos(\pi y)exp(log∣x∣⋅y)cos(πy) for a negative base, 111 when x=y=0x=y=0x=y=0, and 000 when x=0x=0x=0 and y≠0y\ne0y=0. In the quantified range the base is positive and the exponent is strictly positive, so neither the zero-base nor negative-base branch is used. If n=1n=1n=1 is included, the inequality at that value is M1=0≤11/2+ε=1M_1=0\le1^{1/2+\varepsilon}=1M1​=0≤11/2+ε=1; n=0n=0n=0 is excluded by n0≥1n_0\ge1n0​≥1, and if evaluated there its positive-exponent power would be 000.

PaperMainTheorem

For this declaration, for each n∈Nn\in\mathbb Nn∈N let In={i∈N:n<i<2n}\mathcal I_n=\{i\in\mathbb N:n<i<2n\}In​={i∈N:n<i<2n} and Jn={j∈N:2n<j<4n}\mathcal J_n=\{j\in\mathbb N:2n<j<4n\}Jn​={j∈N:2n<j<4n}, and let MnM_nMn​ be the greatest natural number t≤∣Jn∣+∣In∣t\le|\mathcal J_n|+|\mathcal I_n|t≤∣Jn​∣+∣In​∣ such that every finite B⊆JnB\subseteq\mathcal J_nB⊆Jn​ admits a finite D⊆InD\subseteq\mathcal I_nD⊆In​ satisfying ∀d,d′∈D, d≠d′⇒d+d′∉B\forall d,d'\in D,\ d\ne d'\Rightarrow d+d'\notin B∀d,d′∈D, d=d′⇒d+d′∈/B and t≤∣B∣+∣D∣t\le|B|+|D|t≤∣B∣+∣D∣; 000 is always a candidate, and MnM_nMn​ is used in the inequalities after coercion through Z\mathbb ZZ to R\mathbb RR. The proposition is the conjunction of three requirements: first, every natural n≥3n\ge3n≥3 satisfies 12000nlog⁡n≤Mn\frac1{2000}\sqrt{n\log n}\le M_n20001​nlogn​≤Mn​; second, there exist a real C>0C>0C>0 and a natural n0≥1n_0\ge1n0​≥1 such that every natural n≥n0n\ge n_0n≥n0​ satisfies both 12000nlog⁡n≤Mn\frac1{2000}\sqrt{n\log n}\le M_n20001​nlogn​≤Mn​ and Mn≤n 1/2+Cqn1/3M_n\le n^{\,1/2+Cq_n^{1/3}}Mn​≤n1/2+Cqn1/3​, where qn=log⁡(log⁡n)/log⁡nq_n=\log(\log n)/\log nqn​=log(logn)/logn; third, for every real ε>0\varepsilon>0ε>0 there exists a natural number m0≥1m_0\ge1m0​≥1, allowed to depend on ε\varepsilonε, such that every natural n≥m0n\ge m_0n≥m0​ satisfies both n 1/2−ε≤Mnn^{\,1/2-\varepsilon}\le M_nn1/2−ε≤Mn​ and Mn≤n 1/2+εM_n\le n^{\,1/2+\varepsilon}Mn​≤n1/2+ε. The C,n0C,n_0C,n0​ in the second requirement are independent of the per-ε\varepsilonε thresholds in the third. The operations are totalized: log⁡0=0\log0=0log0=0 and log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣ for negative nonzero xxx; x/0=0x/0=0x/0=0; x=0\sqrt{x}=0x​=0 for x<0x<0x<0 and is the usual nonnegative square root for x≥0x\ge0x≥0; positive-base real power is exp⁡(log⁡x⋅y)\exp(\log x\cdot y)exp(logx⋅y); negative-base real power is exp⁡(log⁡∣x∣⋅y)cos⁡(πy)\exp(\log|x|\cdot y)\cos(\pi y)exp(log∣x∣⋅y)cos(πy); and 00=10^0=100=1 while 0y=00^y=00y=0 for y≠0y\ne0y=0. The first requirement encounters only n≥3n\ge3n≥3, where its logarithm and radicand are positive. In the second requirement, n=0n=0n=0 is excluded; at n=1n=1n=1, if included, the square-root term and correction are 000, M1=0M_1=0M1​=0, and the outer power is 111; at n=2n=2n=2, q2<0q_2<0q2​<0 and q21/3=12exp⁡ ⁣(13log⁡∣q2∣)q_2^{1/3}=\frac12\exp\!\left(\frac13\log|q_2|\right)q21/3​=21​exp(31​log∣q2​∣), one half of the ordinary positive cube root of ∣q2∣|q_2|∣q2​∣. In the third requirement, an actual m0m_0m0​ cannot equal 111, because its lower inequality at n=1n=1n=1 would be 1≤M1=01\le M_1=01≤M1​=0.

MainTheorem

For this declaration, for each n∈Nn\in\mathbb Nn∈N let In={i∈N:n<i<2n}\mathcal I_n=\{i\in\mathbb N:n<i<2n\}In​={i∈N:n<i<2n} and Jn={j∈N:2n<j<4n}\mathcal J_n=\{j\in\mathbb N:2n<j<4n\}Jn​={j∈N:2n<j<4n}, and let MnM_nMn​ be the greatest natural number t≤∣Jn∣+∣In∣t\le|\mathcal J_n|+|\mathcal I_n|t≤∣Jn​∣+∣In​∣ such that every finite B⊆JnB\subseteq\mathcal J_nB⊆Jn​ admits a finite D⊆InD\subseteq\mathcal I_nD⊆In​ with every distinct-pair sum outside BBB and with t≤∣B∣+∣D∣t\le|B|+|D|t≤∣B∣+∣D∣; 000 is always a candidate, and MnM_nMn​ is used as a real number after coercion first to Z\mathbb ZZ and then to R\mathbb RR. The proposition is the conjunction of four fully quantified requirements: (i) every natural n≥3n\ge3n≥3 satisfies 12000nlog⁡n≤Mn\frac1{2000}\sqrt{n\log n}\le M_n20001​nlogn​≤Mn​; (ii) there exist a real C>0C>0C>0 and a natural n0≥1n_0\ge1n0​≥1 such that every natural n≥n0n\ge n_0n≥n0​ satisfies both 12000nlog⁡n≤Mn\frac1{2000}\sqrt{n\log n}\le M_n20001​nlogn​≤Mn​ and Mn≤n 1/2+Cqn1/3M_n\le n^{\,1/2+Cq_n^{1/3}}Mn​≤n1/2+Cqn1/3​, where qn=log⁡(log⁡n)/log⁡nq_n=\log(\log n)/\log nqn​=log(logn)/logn; (iii) for every real ε>0\varepsilon>0ε>0 there exists a natural m0≥1m_0\ge1m0​≥1 such that every natural n≥m0n\ge m_0n≥m0​ satisfies both n 1/2−ε≤Mnn^{\,1/2-\varepsilon}\le M_nn1/2−ε≤Mn​ and Mn≤n 1/2+εM_n\le n^{\,1/2+\varepsilon}Mn​≤n1/2+ε; and (iv) separately, for every real ε>0\varepsilon>0ε>0 there exists a natural k0≥1k_0\ge1k0​≥1 such that every natural n≥k0n\ge k_0n≥k0​ satisfies Mn≤n 1/2+εM_n\le n^{\,1/2+\varepsilon}Mn​≤n1/2+ε. The thresholds m0m_0m0​ and k0k_0k0​ may depend on ε\varepsilonε and are separately existentially quantified, while C,n0C,n_0C,n0​ belong only to requirement (ii). Here log⁡0=0\log0=0log0=0, negative nonzero inputs to the real logarithm are handled through absolute value, division by zero is 000, and the real square root is 000 on negative inputs and the usual nonnegative root otherwise. Mathlib’s real power is exp⁡(log⁡x⋅y)\exp(\log x\cdot y)exp(logx⋅y) for x>0x>0x>0, exp⁡(log⁡∣x∣⋅y)cos⁡(πy)\exp(\log|x|\cdot y)\cos(\pi y)exp(log∣x∣⋅y)cos(πy) for x<0x<0x<0, 111 for 000^000, and 000 for 0y0^y0y when y≠0y\ne0y=0. Thus q0=q1=0q_0=q_1=0q0​=q1​=0 because 0/0=00/0=00/0=0; q2<0q_2<0q2​<0 and q21/3=12exp⁡ ⁣(13log⁡∣q2∣)q_2^{1/3}=\frac12\exp\!\left(\frac13\log|q_2|\right)q21/3​=21​exp(31​log∣q2​∣) because cos⁡(π/3)=1/2\cos(\pi/3)=1/2cos(π/3)=1/2; and qn>0q_n>0qn​>0 for natural n≥3n\ge3n≥3. Requirement (i) starts at 333; requirement (ii) excludes 000 but may include 111 or 222; requirement (iii) cannot have m0=1m_0=1m0​=1 because 11/2−ε=1>M1=01^{1/2-\varepsilon}=1>M_1=011/2−ε=1>M1​=0; and requirement (iv) has no such lower-bound obstruction at 111, where its inequality is 0≤10\le10≤1.

Human review
  • Endorsed by Shuze Chen · Jul 30, 2026

  • Endorsed by ShouqiaoWang · Jul 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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 works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me