{
  "id": "1341",
  "ident": "NS.01341",
  "slug": "erdos-211",
  "title": "Erdős Problem 211",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Erdős speculates that there are at least $(1+o(1))kn/6$ determined lines [Er84].\nThe asymptotic bound is uniform over $1 \\leq k < n$.",
  "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": "Erdos211.erdos_211.variants.one_sixth",
  "statement_lean": "theorem erdos_211.variants.one_sixth :\n  ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, ∀ (n k : ℕ), N ≤ n → 1 ≤ k → k < n →\n    ∀ s : Finset ℝ², s.card = n →\n      (∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ n - k) →\n      (1 - ε) / 6 * (k : ℝ) * (n : ℝ) ≤ ((determinedLines s).card : ℝ)",
  "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\n\n/-!\n# Erdős Problem 211\n\n*References:*\n- [erdosproblems.com/211](https://www.erdosproblems.com/211)\n- [Be83] Beck, József, *On the lattice property of the plane and some problems of Dirac,\n  Motzkin and Erdős in combinatorial geometry*. Combinatorica (1983), 281-297.\n- [SzTr83] Szemerédi, Endre and Trotter, Jr., William T., *Extremal problems in discrete\n  geometry*. Combinatorica (1983), 381-392.\n- [Er84] Erdős, P., *Research problems*. Period. Math. Hungar. (1984), 101-103.\n- [BGS74] Burr, Stefan A. and Grünbaum, Branko and Sloane, N. J. A., *The orchard problem*.\n  Geometriae Dedicata (1974), 397-424.\n- [FuPa84] Füredi, Z. and Palásti, I., *Arrangements of lines with a large number of triangles*.\n  Proc. Amer. Math. Soc. (1984), 561-566.\n-/\n\n@[expose] public section\n\nnamespace Erdos211\n\nopen EuclideanGeometry Filter\n\nopen scoped Classical in\n/-- Distinct lines containing two distinct points of the configuration. -/\nnoncomputable def determinedLines (s : Finset ℝ²) : Finset (AffineSubspace ℝ ℝ²) :=\n  s.offDiag.image fun p => line[ℝ, p.1, p.2]\n\nopen scoped Classical in\n/-- The uniform Erdős–Beck lower bound. -/\ndef MainBound : Prop :=\n  ∃ c : ℝ, 0 < c ∧ ∀ (n k : ℕ), 1 ≤ k → k < n →\n    ∀ s : Finset ℝ², s.card = n →\n      (∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ n - k) →\n      c * (k : ℝ) * (n : ℝ) ≤ ((determinedLines s).card : ℝ)\n\nopen scoped Classical in\n/-- The quadratic lower bound for configurations with at most half the points on a line. -/\ndef QuadraticBound : Prop :=\n  ∃ c : ℝ, 0 < c ∧ ∀ n : ℕ, 1 ≤ n →\n    ∀ s : Finset ℝ², s.card = 2 * n →\n      (∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ n) →\n      c * (n : ℝ) ^ 2 ≤ ((determinedLines s).card : ℝ)\n\nopen scoped Classical in\n/-- Erdős speculates that there are at least $(1+o(1))kn/6$ determined lines [Er84].\nThe asymptotic bound is uniform over $1 \\leq k < n$. -/\n@[category research open, AMS 5 52]\ntheorem erdos_211.variants.one_sixth :\n  ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, ∀ (n k : ℕ), N ≤ n → 1 ≤ k → k < n →\n    ∀ s : Finset ℝ², s.card = n →\n      (∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ n - k) →\n      (1 - ε) / 6 * (k : ℝ) * (n : ℝ) ≤ ((determinedLines s).card : ℝ) := by\n  sorry\n\nopen scoped Classical in\n/-- There are arbitrarily large configurations with no four collinear points and\n$\\sim n^2/6$ three-point lines, constructed by Burr, Grünbaum, and Sloane [BGS74]\nand Füredi and Palásti [FuPa84]. The index need not equal the number of points. -/\n@[category research solved, AMS 5 52]\ntheorem erdos_211.variants.sharpness :\n  ∃ s : ℕ → Finset ℝ²,\n    Tendsto (fun i => (s i).card) atTop atTop ∧\n    (∀ (i : ℕ) (L : AffineSubspace ℝ ℝ²), IsLine L →\n      ((s i).filter fun p => p ∈ L).card ≤ 3) ∧\n    Tendsto (fun i =>\n      (((determinedLines (s i)).filter fun L => ((s i).filter fun p => p ∈ L).card = 3).card : ℝ) /\n        ((s i).card : ℝ) ^ 2) atTop (nhds (1 / 6 : ℝ)) := by\n  sorry\n\n/-- Membership means that two distinct points of the configuration generate the line. -/\n@[category API, AMS 5 52]\ntheorem mem_determinedLines {s : Finset ℝ²} {L : AffineSubspace ℝ ℝ²} :\n    L ∈ determinedLines s ↔ ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ line[ℝ, a, b] = L := by\n  classical\n  simp only [determinedLines, Finset.mem_image, Finset.mem_offDiag]\n  aesop\n\n/-- A span of two distinct points is a geometric line. -/\n@[category API, AMS 5 52]\ntheorem isLine_pair {a b : ℝ²} (hab : a ≠ b) : IsLine (line[ℝ, a, b]) := by\n  unfold IsLine\n  rw [direction_affineSpan, vectorSpan_pair]\n  exact finrank_span_singleton (vsub_ne_zero.mpr hab)\n\n/-- Two distinct points on a geometric line span the whole line. -/\n@[category API, AMS 5 52]\ntheorem line_pair_eq {a b : ℝ²} {L : AffineSubspace ℝ ℝ²}\n    (hL : IsLine L) (ha : a ∈ L) (hb : b ∈ L) (hab : a ≠ b) :\n    line[ℝ, a, b] = L := by\n  apply (AffineSubspace.eq_iff_direction_eq_of_mem (left_mem_affineSpan_pair ℝ a b) ha).mpr\n  apply Submodule.eq_of_le_of_finrank_eq\n  · exact AffineSubspace.direction_le (affineSpan_pair_le_of_mem_of_mem ha hb)\n  · exact (isLine_pair hab).trans hL.symm\n\n/-- Every determined line is one-dimensional. -/\n@[category API, AMS 5 52]\ntheorem isLine_of_mem_determinedLines {s : Finset ℝ²} {L : AffineSubspace ℝ ℝ²}\n    (hL : L ∈ determinedLines s) : IsLine L := by\n  obtain ⟨a, _, b, _, hab, rfl⟩ := mem_determinedLines.mp hL\n  exact isLine_pair hab\n\n/-- The finite image counts precisely all geometric lines containing at least two points. -/\n@[category API, AMS 5 52]\ntheorem determinedLines_eq {s : Finset ℝ²} {L : AffineSubspace ℝ ℝ²} :\n    L ∈ determinedLines s ↔ IsLine L ∧ 2 ≤ ((s : Set ℝ²) ∩ (L : Set ℝ²)).ncard := by\n  classical\n  have hcard : ((s : Set ℝ²) ∩ (L : Set ℝ²)).ncard =\n      (s.filter fun p => p ∈ L).card := by\n    rw [← Set.ncard_coe_finset]\n    congr 1\n    ext p\n    simp\n  rw [hcard]\n  constructor\n  · intro h\n    obtain ⟨a, ha, b, hb, hab, heq⟩ := mem_determinedLines.mp h\n    refine ⟨isLine_of_mem_determinedLines h, ?_⟩\n    apply Nat.succ_le_iff.mpr\n    apply Finset.one_lt_card.mpr\n    exact ⟨a, Finset.mem_filter.mpr ⟨ha, heq ▸ left_mem_affineSpan_pair ℝ a b⟩,\n      b, Finset.mem_filter.mpr ⟨hb, heq ▸ right_mem_affineSpan_pair ℝ a b⟩, hab⟩\n  · rintro ⟨hL, hcard⟩\n    obtain ⟨a, ha, b, hb, hab⟩ := Finset.one_lt_card.mp (Nat.lt_of_succ_le hcard)\n    exact mem_determinedLines.mpr ⟨a, (Finset.mem_filter.mp ha).1,\n      b, (Finset.mem_filter.mp hb).1,\n      hab, line_pair_eq hL (Finset.mem_filter.mp ha).2 (Finset.mem_filter.mp hb).2 hab⟩\n\nopen scoped Classical in\n/-- The fiber over a geometric line consists of the ordered pairs of distinct incident points. -/\n@[category API, AMS 5 52]\ntheorem pair_fiber_eq {s : Finset ℝ²} {L : AffineSubspace ℝ ℝ²} (hL : IsLine L) :\n    (s.offDiag.filter fun p => line[ℝ, p.1, p.2] = L) =\n      (s.filter fun p => p ∈ L).offDiag := by\n  classical\n  ext p\n  simp only [Finset.mem_filter, Finset.mem_offDiag]\n  constructor\n  · rintro ⟨⟨ha, hb, hab⟩, heq⟩\n    exact ⟨⟨ha, heq ▸ left_mem_affineSpan_pair ℝ p.1 p.2⟩,\n      ⟨hb, heq ▸ right_mem_affineSpan_pair ℝ p.1 p.2⟩, hab⟩\n  · rintro ⟨⟨ha, haL⟩, ⟨hb, hbL⟩, hab⟩\n    exact ⟨⟨ha, hb, hab⟩, line_pair_eq hL haL hbL hab⟩\n\nopen scoped Classical in\n/-- Exact double counting: each ordered pair belongs to its unique determined line. -/\n@[category API, AMS 5 52]\ntheorem ordered_pair_count (s : Finset ℝ²) :\n    s.card * (s.card - 1) = ∑ L ∈ determinedLines s,\n      (s.filter fun p => p ∈ L).card * ((s.filter fun p => p ∈ L).card - 1) := by\n  classical\n  have h := Finset.card_eq_sum_card_image (fun p : ℝ² × ℝ² => line[ℝ, p.1, p.2]) s.offDiag\n  have hoff : s.offDiag.card = s.card * (s.card - 1) := by\n    rw [Finset.offDiag_card, Nat.mul_sub_left_distrib, Nat.mul_one]\n  rw [hoff] at h\n  calc\n    s.card * (s.card - 1) = _ := h\n    _ = _ := by\n      apply Finset.sum_congr rfl\n      intro L hL\n      rw [pair_fiber_eq (isLine_of_mem_determinedLines hL), Finset.offDiag_card, Nat.mul_sub_left_distrib, Nat.mul_one]\n\nopen scoped Classical in\n/-- Elementary bound when no line contains more than $r$ points.\nThis is weaker than the Erdős–Beck bound and is not a proof of `erdos_211`. -/\n@[category API, AMS 5 52]\ntheorem pair_count_bound {s : Finset ℝ²} {r : ℕ}\n    (hr : ∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ r) :\n    s.card * (s.card - 1) ≤ (determinedLines s).card * (r * (r - 1)) := by\n  classical\n  rw [ordered_pair_count]\n  calc\n    _ ≤ ∑ _L ∈ determinedLines s, r * (r - 1) := by\n      apply Finset.sum_le_sum\n      intro L hL\n      have h := hr L (isLine_of_mem_determinedLines hL)\n      exact Nat.mul_le_mul h (Nat.sub_le_sub_right h 1)\n    _ = _ := by simp\n\nopen scoped Classical in\n/-- In a configuration with no three collinear points, every unordered pair gives a line. -/\n@[category API, AMS 5 52]\ntheorem line_count_no_three {s : Finset ℝ²}\n    (hs : ∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ 2) :\n    s.card * (s.card - 1) = 2 * (determinedLines s).card := by\n  classical\n  rw [ordered_pair_count]\n  calc\n    _ = ∑ _L ∈ determinedLines s, 2 := by\n      apply Finset.sum_congr rfl\n      intro L hL\n      have hlo := (determinedLines_eq.mp hL).2\n      have hc : ((s : Set ℝ²) ∩ (L : Set ℝ²)).ncard =\n          (s.filter fun p => p ∈ L).card := by\n        rw [← Set.ncard_coe_finset]\n        congr 1\n        ext p\n        simp\n      rw [hc] at hlo\n      have heq := Nat.le_antisymm (hs L (isLine_of_mem_determinedLines hL)) hlo\n      simp [heq]\n    _ = _ := by simp [Nat.mul_comm]\n\nopen scoped Classical in\n/-- With at most three points on each line, double counting gives the sharp\nleading coefficient $1/6$ in a quadratic lower bound. -/\n@[category API, AMS 5 52]\ntheorem six_mul_lines_no_four {s : Finset ℝ²}\n    (hs : ∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ 3) :\n    s.card * (s.card - 1) ≤ 6 * (determinedLines s).card := by\n  simpa [Nat.mul_comm] using pair_count_bound hs\n\nopen scoped Classical in\n/-- The real-valued form of the preceding bound, including empty configurations. -/\n@[category API, AMS 5 52]\ntheorem real_lower_bound_no_four {s : Finset ℝ²}\n    (hs : ∀ L : AffineSubspace ℝ ℝ², IsLine L → (s.filter fun p => p ∈ L).card ≤ 3) :\n    (s.card : ℝ) * ((s.card : ℝ) - 1) / 6 ≤ ((determinedLines s).card : ℝ) := by\n  have h := six_mul_lines_no_four hs\n  by_cases hzero : s.card = 0\n  · simp [hzero]\n  · have hone : 1 ≤ s.card := by omega\n    have hreal : (s.card : ℝ) * ((s.card : ℝ) - 1) ≤\n        6 * ((determinedLines s).card : ℝ) := by\n      exact_mod_cast h\n    linarith\n\n/-- The quadratic special case follows with twice the constant in the main bound. -/\n@[category API, AMS 5 52]\ntheorem quadratic_of_erdos_211 (h : MainBound) : QuadraticBound := by\n  obtain ⟨c, hc, h⟩ := h\n  refine ⟨2 * c, by positivity, ?_⟩\n  intro n hn s hs hcap\n  have hkn : n < 2 * n := by omega\n  have hb := h (2 * n) n hn hkn s hs (by\n    intro L hL\n    have := hcap L hL\n    omega)\n  push_cast at hb\n  nlinarith\n\nset_option linter.style.formal_proof_palomar false in\n/-- Let $1\\leq k<n$. Given $n$ points in $\\mathbb{R}^2$, at most $n-k$ on any line,\nthere are $\\gg kn$ many lines which contain at least two points.\nSolved by Beck [Be83] and Szemerédi and Trotter [SzTr83]. -/\n@[category research solved, AMS 5 52,\n  formal_proof using lean4 at \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos211.lean#L900\"]\ntheorem erdos_211 : MainBound := by\n  sorry\n\n/-- Given any $2n$ points with at most $n$ on a line there are $\\gg n^2$ many lines\nformed by the points. Solved by Beck [Be83] and Szemerédi and Trotter [SzTr83]. -/\n@[category research solved, AMS 5 52]\ntheorem erdos_211.variants.quadratic : QuadraticBound :=\n  quadratic_of_erdos_211 erdos_211\n\nend Erdos211\n",
  "statement_hash": "8fe562258a78657acf37ec331fcc790adea8d35f450c77a37aab3638c4426704",
  "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."
}