|
| 1 | +/- |
| 2 | +Copyright 2026 The Formal Conjectures Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +-/ |
| 16 | + |
| 17 | +import FormalConjectures.Util.ProblemImports |
| 18 | + |
| 19 | +/-! |
| 20 | +# Erdős Problem 23 |
| 21 | +
|
| 22 | +*References:* |
| 23 | +* [erdosproblems.com/23](https://www.erdosproblems.com/23) |
| 24 | +* [OEIS A389646](https://oeis.org/A389646) |
| 25 | +-/ |
| 26 | + |
| 27 | +open SimpleGraph BigOperators Classical |
| 28 | + |
| 29 | +namespace Erdos23 |
| 30 | + |
| 31 | +/-- |
| 32 | +Every triangle-free graph on $5$ vertices can be made bipartite by removing at most $1$ edge. |
| 33 | +This is the $n = 1$ case of Erdős Problem 23. |
| 34 | +-/ |
| 35 | +@[category test, AMS 5] |
| 36 | +theorem erdos_23_n1 : |
| 37 | + ∀ (G : SimpleGraph (Fin 5)), G.CliqueFree 3 → ∃ (H : SimpleGraph (Fin 5)), |
| 38 | + H ≤ G ∧ H.IsBipartite ∧ (G.edgeFinset \ H.edgeFinset).card ≤ 1 := by |
| 39 | + sorry |
| 40 | + |
| 41 | +/-- |
| 42 | +There exists a triangle-free graph on $5$ vertices such that at least $1$ edge must be removed |
| 43 | +to make it bipartite. This shows the bound in `erdos_23_n1` is tight. |
| 44 | +-/ |
| 45 | +@[category test, AMS 5] |
| 46 | +theorem erdos_23_n1_tight : |
| 47 | + ∃ (G : SimpleGraph (Fin 5)), G.CliqueFree 3 ∧ ∀ (H : SimpleGraph (Fin 5)), |
| 48 | + H ≤ G → H.IsBipartite → 1 ≤ (G.edgeFinset \ H.edgeFinset).card := by |
| 49 | + sorry |
| 50 | + |
| 51 | +/-- |
| 52 | +The blow-up of the 5-cycle $C_5$: replace each vertex of $C_5$ with an independent set of $n$ |
| 53 | +vertices, and connect two vertices iff their corresponding vertices in $C_5$ are adjacent. |
| 54 | +The vertex set is $\mathbb{Z}/5\mathbb{Z} \times \{0, \ldots, n-1\}$, where $(i, a)$ and $(j, b)$ |
| 55 | +are adjacent iff $j = i + 1$ or $i = j + 1$ in $\mathbb{Z}/5\mathbb{Z}$. |
| 56 | +-/ |
| 57 | +def blowupC5 (n : ℕ) : SimpleGraph (ZMod 5 × Fin n) := |
| 58 | + SimpleGraph.fromRel fun (i, _) (j, _) => i + 1 = j ∨ j + 1 = i |
| 59 | + |
| 60 | +/-- |
| 61 | +The blow-up of $C_5$ shows that the bound $n^2$ in Erdős Problem 23 is tight: |
| 62 | +any bipartite subgraph must omit at least $n^2$ edges. |
| 63 | +-/ |
| 64 | +@[category test, AMS 5] |
| 65 | +theorem blowupC5_tight (n : ℕ) (_hn : 0 < n) (H : SimpleGraph (ZMod 5 × Fin n)) |
| 66 | + (hH : H ≤ blowupC5 n) (hBip : H.IsBipartite) : |
| 67 | + n ^ 2 ≤ ((blowupC5 n).edgeFinset \ H.edgeFinset).card := by |
| 68 | + sorry |
| 69 | + |
| 70 | +/-- |
| 71 | +Can every triangle-free graph on $5n$ vertices be made bipartite by deleting at most $n^2$ edges? |
| 72 | +-/ |
| 73 | +@[category research open, AMS 5] |
| 74 | +theorem erdos_23 : answer(sorry) ↔ |
| 75 | + ∀ (n : ℕ) (V : Type) [Fintype V], Fintype.card V = 5 * n → |
| 76 | + ∀ (G : SimpleGraph V), G.CliqueFree 3 → |
| 77 | + ∃ (H : SimpleGraph V), |
| 78 | + H ≤ G ∧ H.IsBipartite ∧ (G.edgeFinset \ H.edgeFinset).card ≤ n^2 := by |
| 79 | + sorry |
| 80 | + |
| 81 | +-- TODO: add the remaining variants/statements/comments |
| 82 | + |
| 83 | +end Erdos23 |
0 commit comments