{
  "id": "3050",
  "ident": "NS.03050",
  "slug": "erdos-74",
  "title": "Erdős Problem 74",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $f(n)\\to \\infty$ possibly very slowly.\nIs there a graph of infinite chromatic number such that every finite subgraph on $n$\nvertices can be made bipartite by deleting at most $f(n)$ edges?\n\nThe answer is no. A machine-checked disproof constructs a function $f(n) \\to \\infty$ for which\nevery graph satisfying this local deletion bound has finite chromatic number.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/74",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos74.erdos_74",
  "statement_lean": "theorem erdos_74 : ¬ ∀ f : ℕ → ℕ, Tendsto f atTop atTop →\n    (∃ (V : Type u) (G : SimpleGraph V), G.chromaticNumber = ⊤ ∧\n    ∀ n, G.maxSubgraphEdgeDistToBipartite n ≤ f n)",
  "challenge_source": "/-\nCopyright 2025 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 74\n\n*Reference:* [erdosproblems.com/74](https://www.erdosproblems.com/74)\n-/\n\n@[expose] public section\n\nopen Filter SimpleGraph\n\nopen scoped Topology Real\n\nnamespace Erdos74\n\nopen Erdos74\n\nuniverse u\nvariable {V : Type u}\n\n/--\nFor a given subgraph `A`, this is the set of all numbers `k` such that `A` can be made\nbipartite by deleting `k` edges.\n-/\ndef SimpleGraph.edgeDistancesToBipartite {G : SimpleGraph V} (A : G.Subgraph) : Set ℕ :=\n  { (E.ncard) | (E : Set (Sym2 V)) (_ : E ⊆ A.edgeSet) (_ : IsBipartite (A.deleteEdges E).coe)}\n\nset_option backward.isDefEq.respectTransparency false in\n/--\nThe set of edge distances to a bipartite graph is always non-empty because deleting all edges\nfrom a graph makes it bipartite.\n-/\n@[category test, AMS 5]\ntheorem SimpleGraph.edgeDistancesToBipartite_nonempty {G : SimpleGraph V} (A : G.Subgraph) :\n    SimpleGraph.edgeDistancesToBipartite A |>.Nonempty := by\n  dsimp only [edgeDistancesToBipartite,Set.nonempty_def]\n  refine ⟨_, A.edgeSet, fun _ a ↦ a, ?_, rfl⟩\n  use fun _ => 0\n  simp\n\n/--\nThe minimum number of edges that must be deleted from a subgraph `A` to make it bipartite.\n-/\nnoncomputable def SimpleGraph.minEdgeDistToBipartite {G : SimpleGraph V} (A : G.Subgraph) : ℕ :=\n  sInf <| SimpleGraph.edgeDistancesToBipartite A\n\n/--\nFor a graph `G` and a number `n`, this is the set of `minEdgeDistToBipartite A` for all\ninduced subgraphs `A` of `G` on `n` vertices.\n-/\ndef SimpleGraph.subgraphEdgeDistsToBipartite (G : SimpleGraph V) (n : ℕ) : Set ℕ :=\n  { (SimpleGraph.minEdgeDistToBipartite A) |\n    (A : Subgraph G) (_ : A.verts.ncard = n) (_ : A.verts.Finite) }\n\nset_option backward.isDefEq.respectTransparency false in\n/--\nThe set of minimum edge distances to bipartite for subgraphs of size `n` is bounded above.\nA graph on `n` vertices has at most `n choose 2` edges, and deleting all of them\nmakes the graph bipartite, providing a straightforward upper bound.\n-/\n@[category test, AMS 5]\ntheorem SimpleGraph.subgraphEdgeDistsToBipartite_bddAbove (G : SimpleGraph V) (n : ℕ) :\n    BddAbove (SimpleGraph.subgraphEdgeDistsToBipartite G n) := by\n  use n.choose 2\n  simp only [upperBounds, Set.mem_ofPred_eq, SimpleGraph.subgraphEdgeDistsToBipartite,\n    SimpleGraph.minEdgeDistToBipartite, SimpleGraph.edgeDistancesToBipartite]\n  intro m h\n  replace ⟨A, ⟨hn, h_fin, h⟩⟩ := h\n  rw [← h]\n  have : A.edgeSet.ncard ≤ n.choose 2 := by\n    rw [← hn]\n    have := h_fin.fintype\n    have := Fintype.ofFinite ↑A.coe.edgeSet\n    convert (A.coe).card_edgeFinset_le_card_choose_two\n    · rw [← Set.ncard_coe_finset A.coe.edgeFinset, coe_edgeFinset A.coe, ← Subgraph.image_coe_edgeSet_coe A]\n      exact (Set.ncard_image_iff (Set.toFinite A.coe.edgeSet)).mpr <|\n        Function.Injective.injOn <| Sym2.map.injective Subtype.coe_injective\n    · rw [Set.ncard_eq_toFinset_card _ h_fin, Set.Finite.card_toFinset]\n  refine le_trans ?_ this\n  apply Nat.sInf_le\n  simp only [Subgraph.deleteEdges_verts, exists_prop, Set.mem_ofPred_eq]\n  use A.edgeSet\n  refine ⟨by rfl, ?_, rfl⟩\n  use fun _ => 0\n  simp\n\n/--\nFor a given graph $G$ and size $n$, this defines the smallest number $k$\nsuch that any subgraph of $G$ on $n$ vertices can be made bipartite by deleting\nat most $k$ edges.\n\nThis value is optimal because it is the maximum of `minEdgeDistToBipartite` taken\nover all $n$-vertex subgraphs. This means there exists at least one $n$-vertex\nsubgraph that requires exactly this many edge deletions.\nThis is Definition 3.1 in [EHS82].\n\n[EHS82] Erdős, P. and Hajnal, A. and Szemerédi, E.,\n  *On almost bipartite large chromatic graphs* Theory and practice of combinatorics (1982), 117-123.\n-/\nnoncomputable def SimpleGraph.maxSubgraphEdgeDistToBipartite\n    (G : SimpleGraph V) (n : ℕ) : ℕ := sSup <| SimpleGraph.subgraphEdgeDistsToBipartite G n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $f(n)\\to \\infty$ possibly very slowly.\nIs there a graph of infinite chromatic number such that every finite subgraph on $n$\nvertices can be made bipartite by deleting at most $f(n)$ edges?\n\nThe answer is no. A machine-checked disproof constructs a function $f(n) \\to \\infty$ for which\nevery graph satisfying this local deletion bound has finite chromatic number.\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/tadamcz/erdos74/blob/e127ee587c7c91267eecdb3569443d2b0ad64b52/Erdos74/Resolutions/Erdos74_118usd_22h.lean#L2511\"]\ntheorem erdos_74 : ¬ ∀ f : ℕ → ℕ, Tendsto f atTop atTop →\n    (∃ (V : Type u) (G : SimpleGraph V), G.chromaticNumber = ⊤ ∧\n    ∀ n, G.maxSubgraphEdgeDistToBipartite n ≤ f n) := by\n  sorry\n\n/--\nIs there a graph of infinite chromatic number such that every finite subgraph on $n$\nvertices can be made bipartite by deleting at most $\\sqrt{n}$ edges?\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_74.variants.sqrt :\n    ∃ (V : Type u) (G : SimpleGraph V), G.chromaticNumber = ⊤ ∧\n    ∀ n, G.maxSubgraphEdgeDistToBipartite n ≤ (n : ℝ).sqrt := by\n  sorry\n\n-- TODO(firsching): add the remaining statements/comments\n\nend Erdos74\n",
  "statement_hash": "c52c189542480471bf67303d2d637c98ef14c1e2e20faaa9f747b1ce6bac0df1",
  "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."
}