/- Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Erdős Problem 107

References:

open Filteropen EuclideanGeometrynamespace Erdos107

The set of $N$ such that any $N$ points in the plane, no three on a line, contain a convex $n$-gon.

def cardSet (n : ) := { N | (pts : Finset ℝ²), pts.card = N NonTrilinear (pts : Set ℝ²) HasConvexNGon n pts }

The function $f(n)$ specified in erdos_107.

noncomputable def f (n : ) : := sInf (cardSet n)

Let $f(n)$ be minimal such that any $f(n)$ points in $ℝ^2$, no three on a line, contain $n$ points which form the vertices of a convex $n$-gon. Prove that $f(n) = 2^{n-2} + 1$.

@[category research open, AMS 52] theorem erdos_107 : answer(sorry) n 3, f n = 2^(n - 2) + 1 := True n 3, f n = 2 ^ (n - 2) + 1 All goals completed! 🐙

For every $n ≥ 3$, there exists $N$ such that any $N$ points, no three on a line, contain a convex $n$-gon.

@[category research solved, AMS 52] theorem nonempty_cardSet : n 3, (cardSet n).Nonempty := n 3, (cardSet n).Nonempty All goals completed! 🐙

Depending on details of definitions, the statement is false or trivial for $n < 3$.

this: (P : Set ℝ²), HasConvexNGon 0 Pf 0 = 0 All goals completed! 🐙

Three distinct non-collinear points form a convex-independent set.

a:ℝ²b:ℝ²hab:a bx:ℝ²hac:a xhbc:b xhcoll:¬Collinear {a, b, x}hmem:x (convexHull ) ({a, b, x} \ {x})hx_aff:x affineSpan ({a, b, x} \ {x})Collinear {a, b} All goals completed! 🐙hmem3:3 cardSet 3N:hN:N cardSet 3hlt:N < 3f: ℝ² := fun i EuclideanSpace.single 0 ipts:Finset ℝ² := Finset.image f (Finset.range N)hinj:Function.Injective fhpts_card:pts.card = Nhnontri:NonTrilinear ptsS:Finset ℝ²hScard:S.card = 3hSsub:S ptsright✝:ConvexIndep Sthis:S.card pts.cardFalse All goals completed! 🐙namespace variants

Erdős and Szekeres proved the bounds $$ 2^{n-2} + 1 ≤ f(n) ≤ \binom{2n-4}{n-2} + 1 $$ ([ErSz60] and [ErSz35] respectively).

[ErSz60] Erdős, P. and Szekeres, G., On some extremum problems in elementary geometry. Ann. Univ. Sci. Budapest. Eötvös Sect. Math. (1960/61), 53-62.

[ErSz35] Erdős, P. and Szekeres, G., A combinatorial problem in geometry. Compos. Math. (1935), 463-470.

@[category research solved, AMS 52] theorem ersz_bounds : n 3, 2^(n - 2) + 1 f n f n Nat.choose (2 * n - 4) (n - 2) + 1 := n 3, 2 ^ (n - 2) + 1 f n f n (2 * n - 4).choose (n - 2) + 1 All goals completed! 🐙

Suk [Su17] proved $$ f(n) ≤ 2^{(1+o(1))n}. $$

[Su17] Suk, Andrew, On the Erdős-Szekeres convex polygon problem. J. Amer. Math. Soc. (2017), 1047-1053.

@[category research solved, AMS 52] theorem su_bound : r : , r =o[atTop] (fun n => (n : )) n 3, (f n : ) 2^(n + r n) := r, (r =o[atTop] fun n n) n 3, (f n) 2 ^ (n + r n) All goals completed! 🐙

The current best bound is due to Holmsen, Mojarrad, Pach, and Tardos [HMPT20], who prove $$ f(n) ≤ 2^{n+O(\sqrt{n\log n})}. $$

[HMPT20] Holmsen, Andreas F. and Mojarrad, Hossein Nassajian and Pach, János and Tardos, Gábor, Two extensions of the Erdős-Szekeres problem. J. Eur. Math. Soc. (JEMS) (2020), 3981-3995.

@[category research solved, AMS 52] theorem hmpt_bound : r : , r =O[atTop] (fun n => Real.sqrt (n * Real.log n)) n 3, (f n : ) 2^(n + r n) := r, (r =O[atTop] fun n (n * Real.log n)) n 3, (f n) 2 ^ (n + r n) All goals completed! 🐙end Erdos107.variants