{
  "id": "3257",
  "ident": "NS.03257",
  "slug": "erdos-805",
  "title": "Erdős Problem 805",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "For which functions $g(n)$ with $n>g(n)\\geq (\\log n)^2$ is there a graph on $n$ vertices in which\nevery induced subgraph on $g(n)$ vertices contains a clique of size $\\geq \\log n$ and an\nindependent set of size $\\geq \\log n$?\n\nIn particular, is there such a graph for $g(n)=(\\log n)^3$?\n\nThis is the first part. A problem of Erdős and Hajnal [Er91]; see also\n[erdosproblems.com/804](https://www.erdosproblems.com/804). The inequalities\non `g` are required for all large `n`, and a graph is required for all large `n`.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos805.erdos_805.parts.i",
  "statement_lean": "theorem erdos_805.parts.i :\n    {g : ℕ → ℕ | (∀ᶠ n : ℕ in atTop, Real.log n ^ 2 ≤ g n ∧ g n < n) ∧ HasRamseyGraphs g} =\n      erdos_805.parts.i.answer",
  "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 805\n\n*References:*\n- [erdosproblems.com/805](https://www.erdosproblems.com/805)\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- [AlSu07] Alon, N. and Sudakov, B., *On graphs with subgraphs having large independence\n  numbers*. J. Graph Theory 56 (2007), 149-157.\n  [arXiv:0706.4099](https://arxiv.org/abs/0706.4099)\n- [ABS21] Alon, N., Bucić, M. and Sudakov, B., *Large cliques and independent sets all over the\n  place*. Proc. Amer. Math. Soc. 149 (2021), 3145-3157.\n  [arXiv:2004.04718](https://arxiv.org/abs/2004.04718)\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Erdos805\n\n/-- `IsLocallyRamsey G m k`: every set of `m` vertices of `G` contains a clique with at least `k`\nvertices and an independent set with at least `k` vertices. -/\ndef IsLocallyRamsey {n : ℕ} (G : SimpleGraph (Fin n)) (m k : ℕ) : Prop :=\n  ∀ S : Finset (Fin n), S.card = m →\n    (∃ C ⊆ S, k ≤ C.card ∧ G.IsClique (C : Set (Fin n))) ∧\n    (∃ I ⊆ S, k ≤ I.card ∧ G.IsIndepSet (I : Set (Fin n)))\n\n/-- If every set of `m` vertices contains a clique and an independent set of size `k`, so does\nevery set of `m' ≥ m` vertices. Thus \"every induced subgraph on exactly `m` vertices\" and \"every\nset of at least `m` vertices\" (the formulation of [ABS21]) agree. -/\n@[category API, AMS 5]\ntheorem IsLocallyRamsey.mono {n m m' k : ℕ} {G : SimpleGraph (Fin n)}\n    (h : IsLocallyRamsey G m k) (hm : m ≤ m') : IsLocallyRamsey G m' k := by\n  intro S hS\n  obtain ⟨T, hTS, hT⟩ := Finset.exists_subset_card_eq (show m ≤ S.card by omega)\n  obtain ⟨⟨C, hCT, hCk, hC⟩, ⟨I, hIT, hIk, hI⟩⟩ := h T hT\n  exact ⟨⟨C, hCT.trans hTS, hCk, hC⟩, ⟨I, hIT.trans hTS, hIk, hI⟩⟩\n\n/-- `HasRamseyGraphs g`: for all sufficiently large `n` there is a graph on `n` vertices in\nwhich every induced subgraph on `g n` vertices contains a clique and an independent set of size\nat least $\\log n$ (that is, of at least `⌈log n⌉` vertices; `log` is the natural logarithm). -/\ndef HasRamseyGraphs (g : ℕ → ℕ) : Prop :=\n  ∀ᶠ n : ℕ in atTop, ∃ G : SimpleGraph (Fin n), IsLocallyRamsey G (g n) ⌈Real.log n⌉₊\n\n/-- The answer: the set of functions `g` with $n>g(n)\\geq(\\log n)^2$ for which such graphs\nexist. -/\ndef erdos_805.parts.i.answer : Set (ℕ → ℕ) := sorry\n\n/--\nFor which functions $g(n)$ with $n>g(n)\\geq (\\log n)^2$ is there a graph on $n$ vertices in which\nevery induced subgraph on $g(n)$ vertices contains a clique of size $\\geq \\log n$ and an\nindependent set of size $\\geq \\log n$?\n\nIn particular, is there such a graph for $g(n)=(\\log n)^3$?\n\nThis is the first part. A problem of Erdős and Hajnal [Er91]; see also\n[erdosproblems.com/804](https://www.erdosproblems.com/804). The inequalities\non `g` are required for all large `n`, and a graph is required for all large `n`.\n-/\n@[category research open, question value, AMS 5]\ntheorem erdos_805.parts.i :\n    {g : ℕ → ℕ | (∀ᶠ n : ℕ in atTop, Real.log n ^ 2 ≤ g n ∧ g n < n) ∧ HasRamseyGraphs g} =\n      erdos_805.parts.i.answer := by\n  sorry\n\n/--\nFor which functions $g(n)$ with $n>g(n)\\geq (\\log n)^2$ is there a graph on $n$ vertices in which\nevery induced subgraph on $g(n)$ vertices contains a clique of size $\\geq \\log n$ and an\nindependent set of size $\\geq \\log n$?\n\nIn particular, is there such a graph for $g(n)=(\\log n)^3$?\n\nThis is the second part. Erdős and Hajnal thought that there is no such graph for\n$g(n)=(\\log n)^3$ [AlSu07]; we state the positive proposition, with $g(n)=\\lfloor(\\log n)^3\\rfloor$\nand a graph required for all large $n$, as in the first part.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_805.parts.ii : HasRamseyGraphs (fun n ↦ ⌊Real.log n ^ 3⌋₊) := by\n  sorry\n\n/--\nAlon and Sudakov [AlSu07] proved that there is no such graph with\n$$g(n)=\\frac{c}{\\log\\log n}(\\log n)^3$$\nfor some constant $c>0$.\n\nHere `log` is the natural logarithm, as in [AlSu07], and the statement is for all large `n`.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_805.variants.alon_sudakov :\n    ∃ c : ℝ, 0 < c ∧ ∀ᶠ n : ℕ in atTop, ¬ ∃ G : SimpleGraph (Fin n),\n      IsLocallyRamsey G ⌊c * Real.log n ^ 3 / Real.log (Real.log n)⌋₊ ⌈Real.log n⌉₊ := by\n  sorry\n\n/--\nAlon, Bucić, and Sudakov [ABS21] construct such a graph with\n$$g(n)\\leq 2^{2^{(\\log\\log n)^{1/2+o(1)}}}.$$\n\nHere all logarithms are to base $2$, as in [ABS21], so the cliques and independent sets have at\nleast $\\lceil\\log_2 n\\rceil$ vertices; this implies the natural-logarithm version of the problem.\nThe $o(1)$ is expressed as: for every $0<\\varepsilon<1/2$ and all large $n$ there is such a graph\nwith $g(n)=\\lceil 2^{2^{(\\log_2\\log_2 n)^{1/2+\\varepsilon}}}\\rceil$. This form, with the rounding,\nfollows from [ABS21, Theorem 2].\n-/\n@[category research solved, AMS 5]\ntheorem erdos_805.variants.alon_bucic_sudakov :\n    ∀ ε : ℝ, 0 < ε → ε < 1 / 2 → ∀ᶠ n : ℕ in atTop, ∃ G : SimpleGraph (Fin n),\n      IsLocallyRamsey G\n        ⌈(2 : ℝ) ^ ((2 : ℝ) ^ (Real.logb 2 (Real.logb 2 n) ^ (1 / 2 + ε)))⌉₊\n        ⌈Real.logb 2 n⌉₊ := by\n  sorry\n\nend Erdos805\n",
  "statement_hash": "ec778d87d523f248a15b23aab2d4c301d1bad155d0394e2f15e7d106e9f8ae3a",
  "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."
}