Erdős Problem 788 — exact finite model and final propositions
Definitionerdos788_problemFor , define the integer intervals
Given a finite set , call admissible when no sum of two distinct elements of lies in . Define to be the greatest integer threshold such that every finite admits an admissible finite with
The bundle also defines the exponent correction
and the explicit lower-bound constant . All occurrences of below are its integer value viewed as a real number.
The quantitative proposition says that there are and such that every satisfies
The exponent-one-half proposition says that for every there is such that every satisfies
The original upper-question proposition separately asserts the upper half of this conclusion, with its own threshold for each . The strengthened paper proposition is the conjunction of:
- for every natural ;
- the eventual two-sided quantitative estimate with lower constant exactly and some ; and
- 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
. A separate mission milestone proves that this construction is
exactly the greatest integer with the stated universal property. Lean's
natural numbers include ; at both intervals are empty and .
Lean's real logarithm, division, and real power are total operations: in
particular . At 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.
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 Erdos788Read-back
What the Lean code literally says, in plain math · gpt-5.6-sol
I
For each natural number , is the finite set , with both endpoints excluded. Thus , while for it consists of and has cardinality .
J
For each natural number , is the finite set , with both endpoints excluded. Thus , while for it consists of and has cardinality ; in particular, .
Admissible
For every natural number and arbitrary finite sets , Admissible n B C holds exactly when every satisfies , and for every two universally quantified natural numbers , if , then . There is no requirement here that . The sum of an element with itself is unrestricted because only distinct members are tested. The pair-avoidance condition is vacuous when is empty or a singleton; the empty set is admissible for every and every , and when or , admissibility forces .
Guarantees
For every pair of natural numbers , Guarantees n t asserts that for every finite set whose members all satisfy , there exists a finite set , allowed to depend on , such that every satisfies , no sum of two distinct members belongs to , and . The universal quantifier includes , and the existential choice may be . Consequently, the assertion always holds for . For it holds exactly when , since both intervals are empty; for it also holds exactly when , since the universally included choice and the forced choice give score .
scoreBound
For every natural number , scoreBound n is the natural number . It is when , and for it equals ; in particular, its values at and are and . This declaration defines that number but does not itself quantify over or or assert a proposition about them.
fNat
For every natural number , fNat n is obtained by searching only among natural numbers and taking the greatest such that, for every finite , there exists a finite for which every two distinct satisfy and . The bounded greatest-search operation is total and would return if no searched value satisfied the predicate; here always satisfies it, by choosing , so the returned value is an actual satisfying maximum. The search bound is at and for . In particular, fNat 0 and fNat 1 are , while fNat 2 is : at the inner interval is , so a singleton always gives score at least , whereas prevents any score greater than .
f
For every natural number , f n is the integer obtained by coercing the following natural number to : the greatest natural such that every finite admits a finite with no sum of two distinct members of in and with . The bounded search is total with fallback value , and is in fact always a valid candidate. Hence f n is always a nonnegative integer, with , , and .
IntegerGuarantees
For every natural number and every integer , IntegerGuarantees n t asserts that for every finite set , there exists a finite set such that no sum of two distinct members of belongs to and , where the entire natural-number sum of cardinalities is then cast to an integer. Every integer satisfies this assertion for every , by taking , because the cast score is nonnegative. For and for , the assertion holds exactly for , since the universally included choice and the forced choice produce score .
exponentCorrection
For every natural number , exponentCorrection n is the real-power value , with first cast to and the division and exponent interpreted in . The operations are totalized: , while for a negative nonzero real , ; real division satisfies ; for , Mathlib’s real power is ; for , it is ; and while for every , including negative . Consequently, at and the quotient is and the correction is . At , , so , and therefore : it is one half of the ordinary positive cube root of , not the signed real cube root and not the full positive cube root. For every natural , the quotient is positive, so the expression is the ordinary positive cube root of that quotient.
finalLowerBoundConstant
finalLowerBoundConstant is the real number . Although real division is totalized at zero denominators, the denominator here is nonzero, so this is the ordinary positive rational number .
QuantitativeMainTheorem
For this declaration, for each let and , and let be the greatest natural number such that every finite admits a finite satisfying and ; is always a candidate, and is used below after coercion first to and then to . The proposition asserts that there exist real numbers with and , and then a natural number , such that every natural number simultaneously satisfies and , where and both superscripted operations use Mathlib’s real power. The constants are uniform in , while is chosen after them. Here , division by zero is , and is the usual nonnegative square root for and is for . For real power, a positive base satisfies , a negative base satisfies , and while for . The condition excludes and makes the outer power base positive and nonnegative. If is included, then , the square-root term and are , , and the outer power is . If is included, then and is one half of the ordinary positive cube root of because .
HasExponentOneHalf
For this declaration, for each let and , and let be the greatest natural number such that every finite admits a finite with no sum of two distinct members in and with ; this maximum exists because is a candidate, and it is used as a real number after coercion through . The proposition asserts that for every real , there exists a natural number , allowed to depend on , such that every natural satisfies both and . These are Mathlib real powers: a positive base satisfies , a negative base satisfies , and while for every nonzero , including negative . Every quantified base is in fact positive because , so neither the negative-base nor zero-base branch occurs, although the lower exponent may be zero or negative. Since but for every real , cannot satisfy the displayed lower bound; any actual witness must therefore be at least . The excluded value would exhibit the zero-base totalization: its lower power would be when and otherwise, including when .
AnswersOriginalUpperQuestion
For this declaration, for each let and , and let be the greatest natural number such that every finite admits a finite whose distinct-pair sums avoid and for which ; is always a candidate, and is read as a real number after coercion through . The proposition asserts that for every real , there exists a natural number , allowed to depend on , such that every natural number satisfies . The right side is Mathlib’s real power: it is for a positive base, for a negative base, when , and when and . 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 is included, the inequality at that value is ; is excluded by , and if evaluated there its positive-exponent power would be .
PaperMainTheorem
For this declaration, for each let and , and let be the greatest natural number such that every finite admits a finite satisfying and ; is always a candidate, and is used in the inequalities after coercion through to . The proposition is the conjunction of three requirements: first, every natural satisfies ; second, there exist a real and a natural such that every natural satisfies both and , where ; third, for every real there exists a natural number , allowed to depend on , such that every natural satisfies both and . The in the second requirement are independent of the per- thresholds in the third. The operations are totalized: and for negative nonzero ; ; for and is the usual nonnegative square root for ; positive-base real power is ; negative-base real power is ; and while for . The first requirement encounters only , where its logarithm and radicand are positive. In the second requirement, is excluded; at , if included, the square-root term and correction are , , and the outer power is ; at , and , one half of the ordinary positive cube root of . In the third requirement, an actual cannot equal , because its lower inequality at would be .
MainTheorem
For this declaration, for each let and , and let be the greatest natural number such that every finite admits a finite with every distinct-pair sum outside and with ; is always a candidate, and is used as a real number after coercion first to and then to . The proposition is the conjunction of four fully quantified requirements: (i) every natural satisfies ; (ii) there exist a real and a natural such that every natural satisfies both and , where ; (iii) for every real there exists a natural such that every natural satisfies both and ; and (iv) separately, for every real there exists a natural such that every natural satisfies . The thresholds and may depend on and are separately existentially quantified, while belong only to requirement (ii). Here , negative nonzero inputs to the real logarithm are handled through absolute value, division by zero is , and the real square root is on negative inputs and the usual nonnegative root otherwise. Mathlib’s real power is for , for , for , and for when . Thus because ; and because ; and for natural . Requirement (i) starts at ; requirement (ii) excludes but may include or ; requirement (iii) cannot have because ; and requirement (iv) has no such lower-bound obstruction at , where its inequality is .
Confirmed by the mission captain (proposal self-audit).