Erdős Problem 390 — exact finite model and asymptotic target
Definitionerdos390_problemFor natural numbers and , let
Call an admissible endpoint for if there is a finite set whose product is . Because is a set, its factors are automatically distinct. For , define to be the least admissible endpoint; set for only to make a total function.
Define
The main asymptotic proposition is along the natural numbers tending to infinity. For the complementary formulation, also define
as a rational number, and say that has a complement product if some finite subset of has product .
These definitions provide the exact finite model and asymptotic target used by the mission.
Formalization Note Real logarithm and division are total operations. Thus the displayed functions also have formal values at small , but every asymptotic assertion is taken at . The quotient is rational rather than truncated natural-number division.
import Mathlib.Analysis.Asymptotics.Defs
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Data.Finset.Interval
import Mathlib.Data.Nat.Factorial.Basic
open Filter
open scoped BigOperators
namespace Erdos390
noncomputable section
/-- The integer interval `(n, M]`. -/
def factorInterval (n M : ℕ) : Finset ℕ :=
Finset.Ioc n M
/-- There is a factorization of `n!` into distinct integers in `(n, M]`. -/
def IsAdmissibleEndpoint (n M : ℕ) : Prop :=
∃ factors : Finset ℕ,
factors ⊆ factorInterval n M ∧ factors.prod id = n.factorial
/-- For `n ≥ 3`, the singleton factorization `{n!}` supplies an endpoint. -/
theorem exists_admissibleEndpoint {n : ℕ} (hn : 3 ≤ n) :
∃ M, IsAdmissibleEndpoint n M := by
refine ⟨n.factorial, {n.factorial}, ?_, by simp⟩
intro a ha
have ha' : a = n.factorial := by simpa using ha
subst a
simp [factorInterval, Nat.lt_factorial_self hn]
/-- The least possible largest factor. Outside the paper's domain `n ≥ 3`,
the value is set to zero solely to make the function total. -/
def f (n : ℕ) : ℕ :=
by
classical
exact if hn : 3 ≤ n then Nat.find (exists_admissibleEndpoint hn) else 0
/-- The exact second-order constant in the proposed solution. -/
def C0 : ℝ :=
(4029639598 : ℝ) / 25970038185
/-- The second-order scale `n / log n`. -/
def secondOrderScale (n : ℕ) : ℝ :=
(n : ℝ) / Real.log (n : ℝ)
/-- The error after subtracting the asserted two leading terms. -/
def mainError (n : ℕ) : ℝ :=
(f n : ℝ) -
(2 * (n : ℝ) + C0 * secondOrderScale n)
/-- The literal small-`o` formulation of the paper's main asymptotic. -/
def MainAsymptotic : Prop :=
mainError =o[atTop] secondOrderScale
/-- The exact rational complement quotient `M! / (n!)²`. -/
def complementQuotient (n M : ℕ) : ℚ :=
(M.factorial : ℚ) / (n.factorial : ℚ) ^ 2
/-- A subset of `(n,M]` whose product is the complement quotient. -/
def HasComplementProduct (n M : ℕ) : Prop :=
∃ selected : Finset ℕ,
selected ⊆ factorInterval n M ∧
((selected.prod id : ℕ) : ℚ) = complementQuotient n M
end
end Erdos390Read-back
What the Lean code literally says, in plain math · gpt-5.6-sol
For all natural numbers , is the finite set ; it is empty when . The predicate means that there exists a finite set , whose elements are necessarily distinct, such that every satisfies and, in the natural numbers, . The empty set is allowed, with product . Consequently, when , this predicate holds exactly when , namely when or . The file also asserts that for every natural number satisfying , there exists at least one natural number for which holds. The function has value at ; for , is the least natural number satisfying the existence condition above. The constant is the real number , whose denominator is nonzero. Define , with first embedded into the real numbers. Here the real logarithm and real division are totalized: in particular, and , so , while for this is the usual positive real quotient. Define , with all terms interpreted in the real numbers. The boundary definitions give , , and . The proposition means that along the natural numbers tending to infinity; expanded, this says that for every real number , there exists such that every satisfies . Finally, is the rational number . Although rational division is totalized, , including , so the denominator here is always nonzero. The predicate means that there exists a finite set such that the natural-number product , after embedding into the rationals, is exactly . Again, the empty set is allowed and has product . This definition itself does not require , so when it reduces to the equation .
Confirmed by the mission captain (proposal self-audit).