{
  "id": "3278",
  "ident": "NS.03278",
  "slug": "erdos-813",
  "title": "Erdős Problem 813",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $h(n)$ be minimal such that every graph on $n$ vertices where every set of $7$ vertices\ncontains a triangle must contain a clique on at least $h(n)$ vertices. Estimate $h(n)$. In\nparticular, do there exist constants $c_1, c_2 > 0$ such that\n$$n^{1/3+c_1} \\ll h(n) \\ll n^{1/2-c_2}?$$\n\nThe lower half has a positive answer (`Erdos813.erdos_813.variants.lower`); the upper half is\n`Erdos813.erdos_813.variants.upper`.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos813.erdos_813",
  "statement_lean": "theorem erdos_813 :\n    ∃ c₁ > (0 : ℝ), ∃ c₂ > (0 : ℝ),\n      (fun n : ℕ ↦ (n : ℝ) ^ (1 / 3 + c₁ : ℝ)) =O[atTop] (fun n ↦ (h n : ℝ)) ∧\n        (fun n : ℕ ↦ (h n : ℝ)) =O[atTop] (fun n : ℕ ↦ (n : ℝ) ^ (1 / 2 - c₂ : ℝ))",
  "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 813\n\n*References:*\n- [erdosproblems.com/813](https://www.erdosproblems.com/813)\n- [Er91] Erdős, P., *Problems and results in combinatorial analysis and combinatorial number\n  theory*. Graph theory, combinatorics, and applications, Vol. 1 (Kalamazoo, MI, 1988) (1991),\n  397-406.\n- [BuSu23] Bucić, M. and Sudakov, B., *Large independent sets from local considerations*.\n  Combinatorica 43 (2023), 505-546. [arXiv:2007.03667](https://arxiv.org/abs/2007.03667)\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos813\n\n/--\nEvery set of $7$ vertices of `G` contains a triangle, that is, three pairwise adjacent\nvertices. For $n < 7$ there is no such set, so the condition is vacuous.\n-/\ndef EverySevenHasTriangle {n : ℕ} (G : SimpleGraph (Fin n)) : Prop :=\n  ∀ S : Finset (Fin n), S.card = 7 → ∃ t ⊆ S, G.IsNClique 3 t\n\n/--\n`h n` is $h(n)$: the smallest clique number of a graph on $n$ vertices in which every set of\n$7$ vertices contains a triangle. The complete graph satisfies the condition, so the set is\nnever empty and `sInf` is a true minimum.\n-/\nnoncomputable def h (n : ℕ) : ℕ :=\n  sInf {k : ℕ | ∃ G : SimpleGraph (Fin n), EverySevenHasTriangle G ∧ G.cliqueNum = k}\n\n/-- The complete graph on $n$ vertices satisfies the condition. -/\n@[category test, AMS 5]\ntheorem everySevenHasTriangle_top (n : ℕ) :\n    EverySevenHasTriangle (⊤ : SimpleGraph (Fin n)) := by\n  intro S hS\n  obtain ⟨t, htS, ht⟩ := Finset.exists_subset_card_eq (show 3 ≤ S.card by omega)\n  exact ⟨t, htS, ⟨(SimpleGraph.isClique_univ.2 rfl).subset (Set.subset_univ _), ht⟩⟩\n\n/-- For $n = 7$ the graph must contain a triangle, and a triangle plus $4$ isolated vertices\nhas clique number $3$, so $h(7) = 3$. -/\n@[category test, AMS 5]\ntheorem h_seven : h 7 = 3 := by\n  -- The triangle on `{0, 1, 2}` together with four isolated vertices.\n  set G : SimpleGraph (Fin 7) :=\n    { Adj := fun v w => v ≠ w ∧ v.val < 3 ∧ w.val < 3\n      symm := by constructor; intro v w h; exact ⟨h.1.symm, h.2.2, h.2.1⟩\n      loopless := by constructor; intro v h; exact h.1 rfl } with hG\n  have hmem3 : ∀ a : Fin 7, a ∈ ({0, 1, 2} : Finset (Fin 7)) ↔ a.val < 3 := by decide\n  have htri : G.IsNClique 3 ({0, 1, 2} : Finset (Fin 7)) := by\n    constructor\n    · intro a ha b hb hab\n      exact ⟨hab, (hmem3 a).1 ha, (hmem3 b).1 hb⟩\n    · decide\n  have hclique : G.cliqueNum = 3 := by\n    refine le_antisymm ?_ (htri.card_eq ▸ htri.isClique.card_le_cliqueNum)\n    obtain ⟨s, hs⟩ := G.exists_isNClique_cliqueNum\n    rw [← hs.card_eq]\n    by_cases hcard : s.card ≤ 1\n    · omega\n    · have hsub : s ⊆ ({0, 1, 2} : Finset (Fin 7)) := by\n        intro v hv\n        obtain ⟨w, hw, hne⟩ := Finset.exists_mem_ne (by omega : 1 < s.card) v\n        exact (hmem3 v).2 (hs.isClique hv hw hne.symm).2.1\n      simpa using Finset.card_le_card hsub\n  have hESH : EverySevenHasTriangle G := by\n    intro S hS\n    have hU : S = Finset.univ := S.eq_univ_of_card (by simp [hS])\n    exact ⟨{0, 1, 2}, hU ▸ Finset.subset_univ _, htri⟩\n  have h3 : (3 : ℕ) ∈\n      {k : ℕ | ∃ G : SimpleGraph (Fin 7), EverySevenHasTriangle G ∧ G.cliqueNum = k} :=\n    ⟨G, hESH, hclique⟩\n  refine le_antisymm (Nat.sInf_le h3) (le_csInf ⟨3, h3⟩ ?_)\n  rintro k ⟨G', hG', rfl⟩\n  obtain ⟨t, -, ht⟩ := hG' Finset.univ (by simp)\n  exact ht.card_eq ▸ ht.isClique.card_le_cliqueNum\n\n/--\nLet $h(n)$ be minimal such that every graph on $n$ vertices where every set of $7$ vertices\ncontains a triangle must contain a clique on at least $h(n)$ vertices. Estimate $h(n)$. In\nparticular, do there exist constants $c_1, c_2 > 0$ such that\n$$n^{1/3+c_1} \\ll h(n) \\ll n^{1/2-c_2}?$$\n\nThe lower half has a positive answer (`Erdos813.erdos_813.variants.lower`); the upper half is\n`Erdos813.erdos_813.variants.upper`.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_813 :\n    ∃ c₁ > (0 : ℝ), ∃ c₂ > (0 : ℝ),\n      (fun n : ℕ ↦ (n : ℝ) ^ (1 / 3 + c₁ : ℝ)) =O[atTop] (fun n ↦ (h n : ℝ)) ∧\n        (fun n : ℕ ↦ (h n : ℝ)) =O[atTop] (fun n : ℕ ↦ (n : ℝ) ^ (1 / 2 - c₂ : ℝ)) := by\n  sorry\n\n/--\nErdős and Hajnal proved (see [Er91]) that\n$$n^{1/3} \\ll h(n) \\ll n^{1/2}.$$\n-/\n@[category research solved, AMS 5]\ntheorem erdos_813.variants.erdos_hajnal :\n    (fun n : ℕ ↦ (n : ℝ) ^ (1 / 3 : ℝ)) =O[atTop] (fun n ↦ (h n : ℝ)) ∧\n      (fun n : ℕ ↦ (h n : ℝ)) =O[atTop] (fun n : ℕ ↦ (n : ℝ) ^ (1 / 2 : ℝ)) := by\n  sorry\n\n/--\nBucić and Sudakov [BuSu23] proved that $h(n) \\gg n^{5/12-o(1)}$. Their result is stated for\ngraphs in which every $7$ vertices contain an independent set of size $3$; it applies to $h$\nby taking complements.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_813.variants.bucic_sudakov :\n    ∀ ε > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (n : ℝ) ^ (5 / 12 - ε : ℝ) ≤ (h n : ℝ) := by\n  sorry\n\n/--\nThe lower half of `Erdos813.erdos_813` has a positive answer: there is a constant $c_1 > 0$\nwith $n^{1/3+c_1} \\ll h(n)$. This follows from the bound $h(n) \\gg n^{5/12-o(1)}$ of Bucić and\nSudakov [BuSu23], since $5/12 > 1/3$.\n-/\n@[category research solved, question, AMS 5]\ntheorem erdos_813.variants.lower :\n    ∃ c₁ > (0 : ℝ), (fun n : ℕ ↦ (n : ℝ) ^ (1 / 3 + c₁ : ℝ)) =O[atTop] (fun n ↦ (h n : ℝ)) := by\n  sorry\n\n/--\nThe upper half of `Erdos813.erdos_813`: is there a constant $c_2 > 0$ with\n$h(n) \\ll n^{1/2-c_2}$?\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_813.variants.upper :\n    ∃ c₂ > (0 : ℝ), (fun n : ℕ ↦ (h n : ℝ)) =O[atTop] (fun n : ℕ ↦ (n : ℝ) ^ (1 / 2 - c₂ : ℝ)) := by\n  sorry\n\nend Erdos813\n",
  "statement_hash": "bc3a652c82f19d148398f28317c6ab21283d48457f2a52683a9ef715524cc9bc",
  "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."
}