{
  "id": "2329",
  "ident": "NS.02329",
  "slug": "erdos-504",
  "title": "Erdős Problem 504",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "**Erdős–Szekeres (1960).** For $n \\ge 3$,\n$\\alpha_{2^n} = \\pi\\left(1 - \\frac{1}{n}\\right)$.",
  "subjects": [
    "math.MG",
    "msc:52"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/504",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos504.erdos_504",
  "statement_lean": "theorem erdos_504 {n : ℕ} (hn : 3 ≤ n) :\n    minimaxAngle (2 ^ n) = (1 - 1 / (n : ℝ)) * π",
  "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 504\n\n*Reference:* [erdosproblems.com/504](https://www.erdosproblems.com/504)\n\nBlumenthal's minimax angle problem: let $\\alpha_N$ be the supremum of all\n$0 \\le \\alpha \\le \\pi$ such that every set of $N$ points in the plane contains\nthree distinct points determining an angle at least $\\alpha$. Determine\n$\\alpha_N$.\n\nSzekeres [Sz41] proved $\\alpha_{2^n} \\le \\pi(1 - 1/n)$ together with a lower\nbound for $2^n + 1$ points. Erdős and Szekeres [ErSz60] proved\n$\\alpha_{2^n} = \\alpha_{2^n - 1} = \\pi(1 - 1/n)$, and Sendov [Se95] determined\n$\\alpha_N$ for every $N$.\n\n[Sz41] Szekeres, G., _On an extremum problem in the plane_. Amer. J. Math. 63\n(1941), 208-210.\n\n[ErSz60] Erdős, P. and Szekeres, G., _On some extremum problems in elementary\ngeometry_. Ann. Univ. Sci. Budapest. Eötvös Sect. Math. 3-4 (1960-61), 53-62.\n\n[Se95] Sendov, Bl., _Minimax of the angles in a plane configuration of points_.\nActa Math. Hungar. 69 (1995), 27-46. (Reviewed in Zbl 0853.52009, which states the\nmain theorem as $\\alpha_N = \\pi\\left(1 - \\frac{2}{2n+1}\\right)$ for\n$2^n < N \\le 2^n + 2^{n-2}$ and $\\alpha_N = \\pi\\left(1 - \\frac{1}{n+1}\\right)$ for\n$2^n + 2^{n-2} < N \\le 2^{n+1}$, $n \\ge 2$.)\n-/\n\n@[expose] public section\n\nopen Real EuclideanGeometry\n\nnamespace Erdos504\n\n/--\nThe minimax angle $\\alpha_N$: the supremum of all $\\alpha \\in [0, \\pi]$ such\nthat every set of $N$ points of the plane contains three pairwise distinct\npoints $x, z, y$ with $\\angle x z y \\ge \\alpha$ (angle taken at the middle\npoint $z$).\n-/\nnoncomputable def minimaxAngle (N : ℕ) : ℝ :=\n  sSup {α : ℝ | α ∈ Set.Icc 0 π ∧\n    ∀ S : Finset ℂ, S.card = N →\n      ∃ x ∈ S, ∃ z ∈ S, ∃ y ∈ S, x ≠ z ∧ y ≠ z ∧ x ≠ y ∧\n        α ≤ EuclideanGeometry.angle x z y}\n\n/--\n**Erdős–Szekeres (1960).** For $n \\ge 3$,\n$\\alpha_{2^n} = \\pi\\left(1 - \\frac{1}{n}\\right)$.\n-/\n@[category research solved, AMS 52]\ntheorem erdos_504 {n : ℕ} (hn : 3 ≤ n) :\n    minimaxAngle (2 ^ n) = (1 - 1 / (n : ℝ)) * π := by\n  sorry\n\n/--\n**Erdős–Szekeres (1960).** For $n \\ge 3$, also\n$\\alpha_{2^n - 1} = \\pi\\left(1 - \\frac{1}{n}\\right)$.\n-/\n@[category research solved, AMS 52]\ntheorem erdos_504.variants.endpoint {n : ℕ} (hn : 3 ≤ n) :\n    minimaxAngle (2 ^ n - 1) = (1 - 1 / (n : ℝ)) * π := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe lower-bound half of `erdos_504` in existential form (Theorem 1 of\n[ErSz60]): any $2^n$ points of the plane contain three points determining an\nangle strictly greater than $\\pi(1 - 1/n)$.\n-/\n@[category research solved, AMS 52,\n  formal_proof using lean4 at \"https://github.com/ToshiDad/erdos-504/blob/fd344a9/Erdos504.lean#L6501\"]\ntheorem erdos_504.variants.erdos_szekeres_1960 {n : ℕ} (hn : 3 ≤ n)\n    (S : Finset ℂ) (hcard : S.card = 2 ^ n) :\n    ∃ p ∈ S, ∃ q ∈ S, ∃ r ∈ S, p ≠ q ∧ r ≠ q ∧\n      (1 - 1 / (n : ℝ)) * π < EuclideanGeometry.angle p q r := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Szekeres (1941), lower bound.** More than $2^n$ points of the plane contain\nthree points determining an angle strictly greater than $\\pi(1 - 1/n)$.\n-/\n@[category research solved, AMS 52,\n  formal_proof using lean4 at \"https://github.com/ToshiDad/erdos-504/blob/fd344a9/Erdos504.lean#L341\"]\ntheorem erdos_504.variants.szekeres_lower {n : ℕ} (hn : 0 < n) (S : Finset ℂ)\n    (hcard : 2 ^ n < S.card) :\n    ∃ p ∈ S, ∃ q ∈ S, ∃ r ∈ S, p ≠ q ∧ r ≠ q ∧\n      (1 - 1 / (n : ℝ)) * π < EuclideanGeometry.angle p q r := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Szekeres (1941), upper-bound construction.** For every $\\varepsilon > 0$\nthere is a set of exactly $2^t$ points of the plane all of whose angles are\nless than $\\pi(1 - 1/t) + \\varepsilon$. Together with\n`erdos_504.variants.erdos_szekeres_1960` this pins down\n$\\alpha_{2^t} = \\pi(1 - 1/t)$ for $t \\ge 3$, where the supremum is approached\nbut not attained by any finite configuration. (For $t = 2$ it is attained:\na square has all angles at most $\\pi/2 = \\alpha_4$.)\n-/\n@[category research solved, AMS 52,\n  formal_proof using lean4 at \"https://github.com/ToshiDad/erdos-504/blob/fd344a9/Erdos504.lean#L801\"]\ntheorem erdos_504.variants.szekeres_upper {t : ℕ} (ht : 0 < t) {ε : ℝ}\n    (hε : 0 < ε) :\n    ∃ S : Finset ℂ, S.card = 2 ^ t ∧\n      ∀ p ∈ S, ∀ q ∈ S, ∀ r ∈ S, p ≠ q → r ≠ q →\n        EuclideanGeometry.angle p q r < (1 - 1 / (t : ℝ)) * π + ε := by\n  sorry\n\n/--\n**Sendov (1995).** The complete determination: for $n \\ge 3$,\n$\\alpha_N = \\pi(1 - 1/n)$ whenever $2^{n-1} + 2^{n-3} < N \\le 2^n$, and\n$\\alpha_N = \\pi\\left(1 - \\frac{2}{2n - 1}\\right)$ whenever\n$2^{n-1} < N \\le 2^{n-1} + 2^{n-3}$.\n\nThis is the statement of [Se95] (as given in Zbl 0853.52009) with $n$ shifted by one.\nFor $n = 3$ the second branch gives $\\alpha_5 = 3\\pi/5$, the value computed in [ErSz60],\nand $\\alpha_N$ is nondecreasing in $N$ across the two branches.\nThe problem page [erdosproblems.com/504](https://www.erdosproblems.com/504) prints the\nsecond branch as $\\pi(1 - \\frac{1}{2n-1})$, which would give $\\alpha_5 = 4\\pi/5 > \\alpha_6$;\nthat appears to be a typo.\n-/\n@[category research solved, AMS 52]\ntheorem erdos_504.variants.sendov {n N : ℕ} (hn : 3 ≤ n)\n    (h1 : 2 ^ (n - 1) < N) (h2 : N ≤ 2 ^ n) :\n    minimaxAngle N =\n      if 2 ^ (n - 1) + 2 ^ (n - 3) < N then (1 - 1 / (n : ℝ)) * π\n      else (1 - 2 / (2 * (n : ℝ) - 1)) * π := by\n  sorry\n\nend Erdos504\n",
  "statement_hash": "dd5b62ed2d7f68e28305fdb1f326a28dec013973dac46a1ece5b592edbdd9983",
  "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."
}