{
  "id": "2730",
  "ident": "NS.02730",
  "slug": "erdos-651",
  "title": "Erdős Problem 651",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "For $k \\geq 2$ and every $n$ there is an integer $N$ such that any $N$ points in general\nposition in $\\mathbb{R}^k$ contain $n$ points in convex position. So $f_k(n)$ is well defined.\n\nThis is the higher-dimensional Erdős-Szekeres theorem. For $n \\leq k + 1$ one can take $N = n$.\nFor larger $n$ it follows from Ramsey's theorem, which gives $f_k(n) \\leq R_{k+2}(k+3, n)$, see\n[PoZa22, Section 1].",
  "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": "Erdos651.nonempty_cardSet",
  "statement_lean": "theorem nonempty_cardSet {k : ℕ} (hk : 2 ≤ k) (n : ℕ) : (cardSet k n).Nonempty",
  "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 651\n\n*References:*\n- [erdosproblems.com/651](https://www.erdosproblems.com/651)\n- [Er97e] Erdős, P., *Some of my favourite unsolved problems*. Math. Japon. (1997), 527-537.\n- [ErSz60] Erdős, P. and Szekeres, G., *On some extremum problems in elementary geometry*.\n  Ann. Univ. Sci. Budapest. Eötvös Sect. Math. 3-4 (1960/61), 53-62.\n- [PoZa22] Pohoata, C. and Zakharov, D., *Convex polytopes from fewer points*.\n  [arXiv:2208.04878](https://arxiv.org/abs/2208.04878) (2022).\n- [Va96] Valtr, P., *Several results related to the Erdős-Szekeres theorem*. Doctoral\n  dissertation, Charles University, Prague (1996).\n-/\n\n@[expose] public section\n\nopen Filter\nopen scoped EuclideanGeometry\n\nnamespace Erdos651\n\n/--\nA finite set `X` of points of $\\mathbb{R}^k$ is in general position if every subset of at most\n$k + 1$ points is affinely independent.\n\nFor $|X| \\geq k + 1$ this says that no $k + 1$ points of `X` lie on a common hyperplane, which is\nthe definition of [PoZa22, Section 1]. For smaller sets it also rules out degenerate\nconfigurations, such as three collinear points in $\\mathbb{R}^3$. This is not\n`EuclideanGeometry.InGeneralPosition`, which is for the plane and means that no three points are\ncollinear and no four are concyclic.\n-/\ndef IsInGeneralPosition {k : ℕ} (X : Finset (ℝ^k)) : Prop :=\n  ∀ Y ⊆ X, Y.card ≤ k + 1 → AffineIndependent ℝ ((↑) : ↥(Y : Set (ℝ^k)) → ℝ^k)\n\n/--\n`X` contains `n` points in convex position: there is a subset of `n` points such that none of\nthem lies in the convex hull of the others. These are the vertices of a convex polytope.\n-/\ndef HasConvexSubset {k : ℕ} (n : ℕ) (X : Finset (ℝ^k)) : Prop :=\n  ∃ Y ⊆ X, Y.card = n ∧ ConvexIndependent ℝ ((↑) : ↥(Y : Set (ℝ^k)) → ℝ^k)\n\n/--\nThe set of integers `N` such that every set of at least `N` points in general position in\n$\\mathbb{R}^k$ contains `n` points in convex position.\n\nA subset of a set in general position is in general position. So `N` belongs to this set\nexactly when every set of exactly `N` points in general position contains `n` points in convex\nposition, and the set is closed upwards (see `cardSet_mono`).\n-/\ndef cardSet (k n : ℕ) : Set ℕ :=\n  {N | ∀ X : Finset (ℝ^k), IsInGeneralPosition X → N ≤ X.card → HasConvexSubset n X}\n\n/--\n$f_k(n)$ is the smallest integer such that any $f_k(n)$ points in general position in\n$\\mathbb{R}^k$ contain $n$ points in convex position.\n\nFor $k \\geq 2$ the set `cardSet k n` is non-empty (see `nonempty_cardSet`), so `sInf` is a\nminimum. For $k \\leq 1$ the value is not meaningful: for $k = 1$ and $n \\geq 3$ the set is empty\nand `f 1 n = 0` is a junk value. We only use `f k n` for $k \\geq 2$.\n-/\nnoncomputable def f (k n : ℕ) : ℕ := sInf (cardSet k n)\n\n/-- If `N` belongs to `cardSet k n`, so does every larger integer. -/\n@[category API, AMS 5 52]\ntheorem cardSet_mono {k n N M : ℕ} (hN : N ∈ cardSet k n) (hNM : N ≤ M) :\n    M ∈ cardSet k n := by\n  intro X hX hM\n  exact hN X hX (hNM.trans hM)\n\n/-- If `N` belongs to `cardSet k n`, then `f k n ≤ N`. -/\n@[category API, AMS 5 52]\ntheorem f_le {k n N : ℕ} (h : N ∈ cardSet k n) : f k n ≤ N :=\n  Nat.sInf_le h\n\n/--\nFor $k \\geq 2$ and every $n$ there is an integer $N$ such that any $N$ points in general\nposition in $\\mathbb{R}^k$ contain $n$ points in convex position. So $f_k(n)$ is well defined.\n\nThis is the higher-dimensional Erdős-Szekeres theorem. For $n \\leq k + 1$ one can take $N = n$.\nFor larger $n$ it follows from Ramsey's theorem, which gives $f_k(n) \\leq R_{k+2}(k+3, n)$, see\n[PoZa22, Section 1].\n-/\n@[category research solved, AMS 5 52]\ntheorem nonempty_cardSet {k : ℕ} (hk : 2 ≤ k) (n : ℕ) : (cardSet k n).Nonempty := by\n  sorry\n\n/--\nLet $f_k(n)$ denote the smallest integer such that any $f_k(n)$ points in general position in\n$\\mathbb{R}^k$ contain $n$ which determine a convex polyhedron. Is it true that\n$$\n  f_k(n) > (1+c_k)^n\n$$\nfor some constant $c_k>0$?\n\nA problem of Erdős [Er97e]. We read \"determine a convex polyhedron\" as \"are in convex position\",\nand the inequality as holding, with some $c_k > 0$, for all sufficiently large $n$. We ask the\nquestion for every dimension $k \\geq 3$. The planar case $k = 2$ is the Erdős-Klein-Szekeres\nproblem (see `erdos_651.variants.planar`).\n\nThe answer is no. Pohoata and Zakharov [PoZa22, Theorem 1.1] proved that $f_3(n) \\leq 2^{o(n)}$,\nand this implies $f_k(n) \\leq 2^{o(n)}$ for every $k \\geq 3$, see\n`erdos_651.variants.pohoata_zakharov`.\n-/\n@[category research solved, question, AMS 5 52]\ntheorem erdos_651 :\n    ¬ ∀ k : ℕ, 3 ≤ k → ∃ c > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (1 + c) ^ n < (f k n : ℝ) := by\n  sorry\n\n/--\nPohoata and Zakharov [PoZa22, Theorem 1.1] proved that $ES_3(n) = 2^{o(n)}$, where $ES_k(n)$ is\nthe function $f_k(n)$ above: for every $\\varepsilon > 0$ and all large $n$, any set of at least\n$2^{\\varepsilon n}$ points in general position in $\\mathbb{R}^3$ contains $n$ points in convex\nposition. By the projection argument of Valtr [Va96] (see `erdos_651.variants.antitone`) the same\nholds in every dimension $k \\geq 3$ [PoZa22, abstract and Section 1].\n\nThe theorem gives $f_k(n) \\leq \\lceil 2^{\\varepsilon n} \\rceil$. The form below follows by\napplying it with $\\varepsilon / 2$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_651.variants.pohoata_zakharov {k : ℕ} (hk : 3 ≤ k) :\n    ∀ ε > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (f k n : ℝ) ≤ (2 : ℝ) ^ (ε * (n : ℝ)) := by\n  sorry\n\n/--\nFor every dimension $k \\geq 3$ and every $c > 0$ one has $f_k(n) \\leq (1+c)^n$ for all large\n$n$. This is `erdos_651.variants.pohoata_zakharov` with $\\varepsilon = \\log_2(1 + c)$. In\nparticular, for every $c > 0$ the lower bound $f_k(n) > (1+c)^n$ fails not only for infinitely\nmany $n$ but for all large $n$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_651.variants.subexponential {k : ℕ} (hk : 3 ≤ k) :\n    ∀ c > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (f k n : ℝ) ≤ (1 + c) ^ n := by\n  sorry\n\n/--\nFor $k = 2$ the lower bound of the question holds: $f_2(n) > (1+c)^n$ for some $c > 0$ and all\nlarge $n$. Erdős and Szekeres [ErSz60] proved that\n$2^{n-2} + 1 \\leq f_2(n)$, see [PoZa22, abstract and Section 1], and $(3/2)^n < 2^{n-2} + 1$ for\nall $n \\geq 5$. The Erdős-Klein-Szekeres conjecture (Erdős Problem 107) states that\n$f_2(n) = 2^{n-2} + 1$ for $n \\geq 3$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_651.variants.planar :\n    ∃ c > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (1 + c) ^ n < (f 2 n : ℝ) := by\n  sorry\n\n/--\nThe function $f_k(n)$ does not increase with the dimension: $f_{k+1}(n) \\leq f_k(n)$ for\n$k \\geq 2$. Given a set in general position in $\\mathbb{R}^{k+1}$ with at least $f_k(n)$ points,\nproject it to a generic hyperplane, find $n$ points in convex position in the projection, and\nlift them back. This projection argument is due to Valtr [Va96]; see [PoZa22, Section 1, (1)].\n\nThe site states that $f_2(n) > f_3(n) > \\cdots$. [PoZa22] gives only the non-strict inequality, so\nwe state that. The strict inequalities fail for small $n$: for example $f_2(3) = f_3(3) = 3$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_651.variants.antitone {k : ℕ} (hk : 2 ≤ k) (n : ℕ) : f (k + 1) n ≤ f k n := by\n  sorry\n\nend Erdos651\n",
  "statement_hash": "c289e4b0aed4e5d9a3e1d1cafef6167dd4170f63864e5ec0e1e740f4a3243ba6",
  "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."
}