{
  "id": "1255",
  "ident": "NS.01255",
  "slug": "erdos-19",
  "title": "Erdős Problem 19",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "If $G$ is an edge-disjoint union of $n$ copies of $K_n$, then is $\\chi(G) = n$?",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos19.erdos_19",
  "statement_lean": "theorem erdos_19 :\n    ∀ (V : Type) (n : ℕ) (C : EFLConfig V n), C.graph.chromaticNumber = 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 19\n\nThe Erdős–Faber–Lovász conjecture: if $G$ is an edge-disjoint union of $n$ copies of $K_n$,\nis $\\chi(G) = n$?\n\nWe model $G$ by a family of $n$ vertex sets of size $n$ (the copies of $K_n$) which pairwise\nshare at most one vertex and which cover the vertex type. Two copies of $K_n$ are\nedge-disjoint exactly when their vertex sets share at most one vertex.\n\n*References:*\n* [erdosproblems.com/19](https://www.erdosproblems.com/19)\n* [Hi81] Hindman, N., *On a conjecture of Erdős, Faber, and Lovász about $n$-colorings*.\n  Canad. J. Math. (1981).\n* [Ka92] Kahn, J., *Coloring nearly-disjoint hypergraphs with $n + o(n)$ colors*.\n  J. Combin. Theory Ser. A (1992).\n* [KKKMO21] Kang, D. Y., Kelly, T., Kühn, D., Methuku, A. and Osthus, D., *A proof of the\n  Erdős–Faber–Lovász conjecture*. Ann. of Math. (2023).\n  [arXiv:2101.04698](https://arxiv.org/abs/2101.04698)\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Erdos19\n\nopen scoped Classical in\n/-- A configuration of `n` pairwise edge-disjoint copies of $K_n$ covering the vertex type `V`. -/\nstructure EFLConfig (V : Type*) (n : ℕ) where\n  /-- The vertex sets of the `n` cliques. -/\n  A : Fin n → Finset V\n  /-- Each clique has exactly `n` vertices. -/\n  card_eq : ∀ i, (A i).card = n\n  /-- Two different cliques share at most one vertex, i.e. they are edge-disjoint. -/\n  inter_le : ∀ i j, i ≠ j → (A i ∩ A j).card ≤ 1\n  /-- Every vertex lies in one of the cliques. -/\n  cover : ∀ v, ∃ i, v ∈ A i\n\nnamespace EFLConfig\n\nvariable {V : Type*} {n : ℕ} (C : EFLConfig V n)\n\n/-- The union graph: distinct vertices are adjacent iff they lie in a common clique. -/\ndef graph : SimpleGraph V where\n  Adj u v := u ≠ v ∧ ∃ i, u ∈ C.A i ∧ v ∈ C.A i\n  symm := ⟨fun _ _ ⟨h, i, hu, hv⟩ => ⟨h.symm, i, hv, hu⟩⟩\n  loopless := ⟨fun _ h => h.1 rfl⟩\n\n/-- A vertex is *shared* if it lies in two different cliques. -/\ndef IsShared (v : V) : Prop := ∃ i j, i ≠ j ∧ v ∈ C.A i ∧ v ∈ C.A j\n\nopen scoped Classical in\n/-- The finite set of shared vertices. -/\nnoncomputable def sharedSet : Finset V :=\n  ((Finset.univ : Finset (Fin n)).biUnion C.A).filter C.IsShared\n\n/-- The graph $G$ contains a copy of $K_n$, so $n \\le \\chi(G)$. -/\n@[category textbook, AMS 5]\ntheorem le_chromaticNumber : (n : ℕ∞) ≤ C.graph.chromaticNumber := by\n  rcases Nat.eq_zero_or_pos n with rfl | hn\n  · simp\n  have hcl : C.graph.IsClique (C.A ⟨0, hn⟩ : Set V) := by\n    intro u hu v hv huv\n    exact ⟨huv, ⟨0, hn⟩, hu, hv⟩\n  have := hcl.card_le_chromaticNumber\n  rwa [C.card_eq] at this\n\n/-- A vertex that is not shared lies in exactly one clique. -/\n@[category API, AMS 5]\nlemma eq_of_not_shared {v : V} (hv : ¬ C.IsShared v) {i j : Fin n}\n    (hi : v ∈ C.A i) (hj : v ∈ C.A j) : i = j := by\n  by_contra h\n  exact hv ⟨i, j, h, hi, hj⟩\n\nopen scoped Classical in\n/-- If the shared vertices can be coloured with $n$ colours so that shared vertices in a common\nclique get distinct colours, then $G$ is $n$-colourable. -/\n@[category textbook, AMS 5]\ntheorem colorable_of_sharedColoring (c : V → Fin n)\n    (hc : ∀ i u v, u ∈ C.A i → v ∈ C.A i → C.IsShared u → C.IsShared v → c u = c v → u = v) :\n    C.graph.Colorable n := by\n  -- private vertices and free colours of each clique\n  let P : Fin n → Finset V := fun i => (C.A i).filter (fun v => ¬ C.IsShared v)\n  let U : Fin n → Finset V := fun i => (C.A i).filter C.IsShared\n  let F : Fin n → Finset (Fin n) := fun i => Finset.univ \\ (U i).image c\n  have hcard : ∀ i, (P i).card ≤ (F i).card := by\n    intro i\n    have h1 : (U i).card + (P i).card = n := by\n      rw [← C.card_eq i]; exact Finset.card_filter_add_card_filter_not _\n    have h2 : ((U i).image c).card ≤ (U i).card := Finset.card_image_le\n    have h3 : (F i).card = n - ((U i).image c).card := by\n      simp [F, Finset.card_sdiff]\n    omega\n  have hne : ∀ i, Nonempty (P i ↪ F i) := fun i =>\n    Function.Embedding.nonempty_of_card_le (by simpa using hcard i)\n  let e : ∀ i, P i ↪ F i := fun i => Classical.choice (hne i)\n  let idx : V → Fin n := fun v => Classical.choose (C.cover v)\n  have hidx : ∀ v, v ∈ C.A (idx v) := fun v => Classical.choose_spec (C.cover v)\n  let col : V → Fin n := fun v =>\n    if h : C.IsShared v then c v\n    else ((e (idx v) ⟨v, Finset.mem_filter.2 ⟨hidx v, h⟩⟩ : F (idx v)) : Fin n)\n  have col_priv : ∀ v (hv : ¬ C.IsShared v) j (hj : v ∈ C.A j),\n      col v = ((e j ⟨v, Finset.mem_filter.2 ⟨hj, hv⟩⟩ : F j) : Fin n) := by\n    intro v hv j hj\n    have key : ∀ i (hi : i = j) (p : v ∈ P i), ((e i ⟨v, p⟩ : F i) : Fin n) =\n        ((e j ⟨v, Finset.mem_filter.2 ⟨hj, hv⟩⟩ : F j) : Fin n) := by\n      rintro i rfl p; rfl\n    simp only [col, dif_neg hv]\n    exact key _ (C.eq_of_not_shared hv (hidx v) hj) _\n  have col_free : ∀ v (hv : ¬ C.IsShared v) j (hj : v ∈ C.A j), col v ∈ F j := by\n    intro v hv j hj\n    rw [col_priv v hv j hj]; exact Subtype.property _\n  refine ⟨SimpleGraph.Coloring.mk col ?_⟩\n  rintro u v ⟨huv, j, hu, hv⟩ heq\n  by_cases su : C.IsShared u <;> by_cases sv : C.IsShared v\n  · have : col u = c u := dif_pos su\n    have : col v = c v := dif_pos sv\n    exact huv (hc j u v hu hv su sv (by simp_all))\n  · have h1 := col_free v sv j hv\n    have : col u = c u := dif_pos su\n    simp only [F, Finset.mem_sdiff, Finset.mem_univ, true_and, Finset.mem_image] at h1\n    exact h1 ⟨u, Finset.mem_filter.2 ⟨hu, su⟩, by rw [← this, heq]⟩\n  · have h1 := col_free u su j hu\n    have : col v = c v := dif_pos sv\n    simp only [F, Finset.mem_sdiff, Finset.mem_univ, true_and, Finset.mem_image] at h1\n    exact h1 ⟨v, Finset.mem_filter.2 ⟨hv, sv⟩, by rw [← this, ← heq]⟩\n  · rw [col_priv u su j hu, col_priv v sv j hv] at heq\n    have := (e j).injective (Subtype.ext heq)\n    exact huv (congrArg Subtype.val this)\n\nopen scoped Classical in\n/-- There are at most $\\binom{n}{2}$ shared vertices, since two cliques share at most one\nvertex. -/\n@[category textbook, AMS 5]\ntheorem card_sharedSet_le : C.sharedSet.card ≤ n.choose 2 := by\n  -- assign to each shared vertex a pair of cliques containing it\n  let f : V → Finset (Fin n) := fun v =>\n    if h : C.IsShared v then {Classical.choose h, Classical.choose (Classical.choose_spec h)}\n    else ∅\n  have hf : ∀ v ∈ C.sharedSet, f v ∈ (Finset.univ : Finset (Fin n)).powersetCard 2 ∧\n      ∀ x ∈ f v, v ∈ C.A x := by\n    intro v hv\n    have hs : C.IsShared v := (Finset.mem_filter.1 hv).2\n    obtain ⟨hij, hi, hj⟩ := Classical.choose_spec (Classical.choose_spec hs)\n    simp only [f, dif_pos hs]\n    refine ⟨Finset.mem_powersetCard.2 ⟨Finset.subset_univ _, Finset.card_pair hij⟩, ?_⟩\n    intro x hx\n    rcases Finset.mem_insert.1 hx with rfl | hx\n    · exact hi\n    · rw [Finset.mem_singleton.1 hx]; exact hj\n  have hinj : Set.InjOn f C.sharedSet := by\n    intro u hu v hv huv\n    obtain ⟨hpu, hu'⟩ := hf u hu\n    obtain ⟨hpv, hv'⟩ := hf v hv\n    obtain ⟨a, b, hab, hfab⟩ := Finset.card_eq_two.1 (Finset.mem_powersetCard.1 hpu).2\n    have ha : a ∈ f u := by rw [hfab]; simp\n    have hb : b ∈ f u := by rw [hfab]; simp\n    have hle := C.inter_le a b hab\n    have hu2 : u ∈ C.A a ∩ C.A b := Finset.mem_inter.2 ⟨hu' a ha, hu' b hb⟩\n    have hv2 : v ∈ C.A a ∩ C.A b :=\n      Finset.mem_inter.2 ⟨hv' a (huv ▸ ha), hv' b (huv ▸ hb)⟩\n    exact Finset.card_le_one.1 hle u hu2 v hv2\n  have := Finset.card_le_card_of_injOn f (t := (Finset.univ : Finset (Fin n)).powersetCard 2)\n    (fun v hv => (hf v hv).1) hinj\n  simpa [Finset.card_powersetCard] using this\n\nend EFLConfig\n\nopen EFLConfig\n\n/--\nIf $G$ is an edge-disjoint union of $n$ copies of $K_n$, then is $\\chi(G) = n$?\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_19 :\n    ∀ (V : Type) (n : ℕ) (C : EFLConfig V n), C.graph.chromaticNumber = n := by\n  sorry\n\nopen scoped Classical in\n/--\nThe Erdős–Faber–Lovász conjecture holds for $n \\le 3$.\n-/\n@[category test, AMS 5]\ntheorem erdos_19.variants.le_three {V : Type*} {n : ℕ} (C : EFLConfig V n) (hn : n ≤ 3) :\n    C.graph.chromaticNumber = n := by\n  refine le_antisymm ?_ C.le_chromaticNumber\n  apply SimpleGraph.Colorable.chromaticNumber_le\n  have hS : C.sharedSet.card ≤ n := by\n    have h1 := C.card_sharedSet_le\n    have h2 : n.choose 2 ≤ n := by interval_cases n <;> decide\n    omega\n  -- colour the shared vertices injectively\n  let c : V → Fin n := fun v =>\n    if h : v ∈ C.sharedSet then Fin.castLE hS (C.sharedSet.equivFin ⟨v, h⟩)\n    else ⟨0, by\n      obtain ⟨i, hi⟩ := C.cover v\n      rw [← C.card_eq i]; exact Finset.card_pos.2 ⟨v, hi⟩⟩\n  refine C.colorable_of_sharedColoring c ?_\n  intro i u v hu hv su sv huv\n  have mu : u ∈ C.sharedSet := Finset.mem_filter.2 ⟨Finset.mem_biUnion.2 ⟨i, by simp, hu⟩, su⟩\n  have mv : v ∈ C.sharedSet := Finset.mem_filter.2 ⟨Finset.mem_biUnion.2 ⟨i, by simp, hv⟩, sv⟩\n  simp only [c, dif_pos mu, dif_pos mv] at huv\n  have := C.sharedSet.equivFin.injective (Fin.castLE_injective hS huv)\n  exact congrArg Subtype.val this\n\n/--\nHindman [Hi81] proved the Erdős–Faber–Lovász conjecture for $n < 10$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_19.variants.lt_ten :\n    ∀ (V : Type) (n : ℕ) (C : EFLConfig V n), n < 10 → C.graph.chromaticNumber = n := by\n  sorry\n\n/--\nKahn [Ka92] proved that $\\chi(G) \\le (1 + o(1))n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_19.variants.kahn :\n    ∀ ε > (0 : ℝ), ∀ᶠ n in atTop, ∀ (V : Type) (C : EFLConfig V n),\n      C.graph.Colorable ⌊(1 + ε) * n⌋₊ := by\n  sorry\n\n/--\nKang, Kelly, Kühn, Methuku and Osthus [KKKMO21] proved the Erdős–Faber–Lovász conjecture for\nall sufficiently large $n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_19.variants.large_n :\n    ∀ᶠ n in atTop, ∀ (V : Type) (C : EFLConfig V n), C.graph.chromaticNumber = n := by\n  sorry\n\nend Erdos19\n",
  "statement_hash": "0e59c5965a296b0f63b642301dcfc9f2c96e605eac61b7c209ea9e47ceefd13f",
  "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."
}