FormalConjectures/ErdosProblems/1005.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
5 declarations, 2 contain sorry, 0 declared as axioms
Erdős Problem 1005
References:
- erdosproblems.com/1005
- [Ma42] Mayer, A. E., A mean value theorem concerning Farey series. Quart. J. Math. Oxford Ser. (1942), 48-57.
- [Er43] Erdős, P., A note on Farey series. Quart. J. Math. Oxford Ser. (1943), 82-85.
- [vD25b] van Doorn, W., Improved bounds for the Mayer-Erdős phenomenon on similarly ordered Farey fractions. arXiv:2509.00121 (2025).
Imports (1)
- def
Erdos1005.IsFareyA rationalqis a Farey fraction of ordernif it lies in[0, 1]and has denominator at mostnline 43 sourceSource documentation
A rational
qis a Farey fraction of ordernif it lies in[0, 1]and has denominator at mostn. (Everyq : ℚis stored in lowest terms, soq.denandq.numare the reduced denominator and numerator.)standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,RatProof uses:
And,LE.le,OfNat.ofNat,Rat.den3 instances, coercions and auxiliary constants left out.
def IsFarey (n : ℕ) (q : ℚ) : Prop := …
- def
Erdos1005.betweenCountThe number of Farey fractions of ordernstrictly betweenxandyline 47 sourceSource documentation
The number of Farey fractions of order
nstrictly betweenxandy.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,RatProof uses:
Set.ncard,Set.ofPred,And, Erdos1005.IsFarey,LT.lt1 instances, coercions and auxiliary constants left out.
noncomputable def betweenCount (n : ℕ) (x y : ℚ) : ℕ := …
- def
Erdos1005.fDocumented declaration: f line 54 sourceSource documentation
f nis the largest integer such that any two Farey fractions of ordernwhose indices differ by at mostf nare similarly ordered: it is the minimum, over all pairsx < yof Farey fractions of ordernwith(x.num - y.num) * (x.den - y.den) < 0, of the number of Farey fractions strictly betweenxandy.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
InfSet.sInf,Set.ofPred,Exists,Rat,And, Erdos1005.IsFarey,LT.lt,Int,HMul.hMul,HSub.hSub,Rat.num,Rat.den,OfNat.ofNat,Eq, Erdos1005.betweenCount10 instances, coercions and auxiliary constants left out.
noncomputable def f (n : ℕ) : ℕ := …
- theorem
Erdos1005.erdos_1005Let $\frac{a_1}{b_1}, \frac{a_2}{b_2}, \ldots$ be the Farey fractions of order $n \geq 4$ sorry line 70 sourceSource documentation
Let $\frac{a_1}{b_1}, \frac{a_2}{b_2}, \ldots$ be the Farey fractions of order $n \geq 4$. Let $f(n)$ be the largest integer such that if $1 \leq k < l \leq k + f(n)$ then $\frac{a_k}{b_k}$ and $\frac{a_l}{b_l}$ are similarly ordered, in other words $(a_k - a_l)(b_k - b_l) \geq 0$. Estimate $f(n)$: in particular, is there a constant $c > 0$ such that $f(n) = (c + o(1)) n$ for all large $n$?
Mayer [Ma42] proved that $f(n) \to \infty$ and Erdős [Er43] that $f(n) \gg n$. Van Doorn [vD25b] proved $(1/12 - o(1)) n \le f(n) \le n / 4 + O(1)$ and conjectured that $f(n) = (1/4 + o(1)) n$, which was proved by Cipollini and GPT-5.5; see
erdos_1005.variants.constant.depends on sorry what this means
Statement uses:
Iff,True,Exists,Real,And,LT.lt,OfNat.ofNat,Filter.Tendsto,Nat,HDiv.hDiv, Erdos1005.f,Filter.atTop,nhdsProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous25 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_1005 : answer(True) ↔ ∃ c : ℝ, 0 < c ∧ Tendsto (fun n : ℕ => (f n : ℝ) / n) atTop (𝓝 c) := by …Mentions: c, Erdos1005.f
- theorem
Erdos1005.erdos_1005.variants.constantsorry line 78 sourcedepends on sorry what this means
Statement uses:
Filter.Tendsto,Nat,Real,HDiv.hDiv, Erdos1005.f,Filter.atTop,nhds,OfNat.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous30 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.