{
  "id": "558",
  "ident": "NS.00558",
  "slug": "erdos-1069",
  "title": "Erdős Problem 1069",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Given any $n$ points in $\\mathbb{R}^2$, the number of $k$-rich lines (lines which contain\n$\\geq k$ of the points) is, provided $k\\leq n^{1/2}$,\n$$\\ll \\frac{n^2}{k^3}.$$\n\nErdős [Er87b] describes this as a conjecture of himself, Croft, and Purdy. It was proved by\nSzemerédi and Trotter [SzTr83]. We take $k \\geq 2$, since for $k \\leq 1$ there are infinitely\nmany $k$-rich lines.",
  "subjects": [
    "math.CO",
    "math.MG",
    "msc:05",
    "msc:52"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1069.erdos_1069",
  "statement_lean": "theorem erdos_1069 :\n    ∃ C : ℝ, 0 < C ∧ ∀ (n k : ℕ) (s : Finset ℝ²), s.card = n → 2 ≤ k →\n      (k : ℝ) ≤ Real.sqrt n →\n        ((richLines s k).ncard : ℝ) ≤ C * (n : ℝ) ^ 2 / (k : ℝ) ^ 3",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\npublic import FormalConjectures.ErdosProblems.«211»\n\n/-!\n# Erdős Problem 1069\n\n*References:*\n- [erdosproblems.com/1069](https://www.erdosproblems.com/1069)\n- [Er87b] Erdős, P., *Some combinatorial and metric problems in geometry*. Intuitive geometry\n  (Siófok, 1985) (1987), 167-177.\n- [Sa87] Sah, C.-H., *The rich line problem of P. Erdős*. (1987), 123-125.\n- [SzTr83] Szemerédi, E. and Trotter, Jr., W. T., *Extremal problems in discrete geometry*.\n  Combinatorica (1983), 381-392.\n-/\n\n@[expose] public section\n\nopen EuclideanGeometry\n\nnamespace Erdos1069\n\n/-- The $k$-rich lines of a finite set `s` of points in the plane: the lines of `ℝ²` which\ncontain at least $k$ points of `s`. -/\ndef richLines (s : Finset ℝ²) (k : ℕ) : Set (AffineSubspace ℝ ℝ²) :=\n  {L | IsLine L ∧ k ≤ ((s : Set ℝ²) ∩ (L : Set ℝ²)).ncard}\n\n/-- For $k \\geq 2$ there are only finitely many $k$-rich lines, since each is spanned by two of\nthe points, so `Set.ncard` counts them. -/\n@[category API, AMS 5 52]\ntheorem richLines_finite (s : Finset ℝ²) {k : ℕ} (hk : 2 ≤ k) : (richLines s k).Finite := by\n  refine (Erdos211.determinedLines s).finite_toSet.subset ?_\n  rintro L ⟨hL, hcard⟩\n  exact Finset.mem_coe.2 (Erdos211.determinedLines_eq.2 ⟨hL, hk.trans hcard⟩)\n\n/--\nGiven any $n$ points in $\\mathbb{R}^2$, the number of $k$-rich lines (lines which contain\n$\\geq k$ of the points) is, provided $k\\leq n^{1/2}$,\n$$\\ll \\frac{n^2}{k^3}.$$\n\nErdős [Er87b] describes this as a conjecture of himself, Croft, and Purdy. It was proved by\nSzemerédi and Trotter [SzTr83]. We take $k \\geq 2$, since for $k \\leq 1$ there are infinitely\nmany $k$-rich lines.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_1069 :\n    ∃ C : ℝ, 0 < C ∧ ∀ (n k : ℕ) (s : Finset ℝ²), s.card = n → 2 ≤ k →\n      (k : ℝ) ≤ Real.sqrt n →\n        ((richLines s k).ncard : ℝ) ≤ C * (n : ℝ) ^ 2 / (k : ℝ) ^ 3 := by\n  sorry\n\n/--\nWhen $k=n^{1/2}$ the lattice points show that there can be $\\geq(2+o(1))n^{1/2}$ many\n$n^{1/2}$-rich lines: for $n=m^2$ the $m\\times m$ grid has $2m$ lines with $m$ points each.\nErdős thought that perhaps this is best possible, but Sah [Sa87] gave a construction achieving\n$\\geq (3+o(1))n^{1/2}$ many $n^{1/2}$-rich lines.\n-/\n@[category textbook, AMS 5 52]\ntheorem erdos_1069.variants.lattice (m : ℕ) (hm : 2 ≤ m) :\n    ∃ s : Finset ℝ², s.card = m ^ 2 ∧ 2 * m ≤ (richLines s m).ncard := by\n  sorry\n\nend Erdos1069\n",
  "statement_hash": "8ed69dffa536d3e2b9f87c63024065fb8d9b9d5ccdef3671c81b5a45754ae748",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}