{
  "id": "2778",
  "ident": "NS.02778",
  "slug": "erdos-667",
  "title": "Erdős Problem 667",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $p, q \\geq 1$ be fixed integers. Define $H(n) = H(n; p, q)$ to be the largest $m$ such that any\ngraph on $n$ vertices where every set of $p$ vertices spans at least $q$ edges must contain a\ncomplete graph on $m$ vertices. Is\n$$ c(p, q) = \\liminf_{n \\to \\infty} \\frac{\\log H(n)}{\\log n} $$\na strictly increasing function of $q$ for $1 \\leq q \\leq \\binom{p-1}{2} + 1$?\n\nA problem of Erdős, Faudree, Rousseau, and Schelp. When $q = 1$ this corresponds exactly to the\nclassical Ramsey problem, and hence $\\tfrac{1}{p-1} \\leq c(p, 1) \\leq \\tfrac{2}{p+1}$ for\n$p \\geq 3$. It is easy to see that if $q = \\binom{p-1}{2} + 1$ then $c(p, q) = 1$.\n\nerdosproblems.com/667 also states that Erdős, Faudree, Rousseau and Schelp showed\n$c(p, \\binom{p-1}{2}) \\leq 1/2$. This cannot hold for all $p$: for $p = 6$, $q = 10$, the\ncomplement of a $(6, 10)$-locally dense graph is $C_6$-free, so Bondy–Simonovits together with\n$\\alpha(F) \\geq n^2 / (2e(F) + n)$ gives $c(6, 10) \\geq 2/3$. That remark is therefore not\nformalised here.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos667.erdos_667",
  "statement_lean": "theorem erdos_667 :\n    ∀ p : ℕ, StrictMonoOn (c p) (Set.Icc 1 (Nat.choose (p - 1) 2 + 1))",
  "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-/\n\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 667\n\nA problem of Erdős, Faudree, Rousseau, and Schelp on the growth exponent of the largest clique\nthat is guaranteed inside a locally dense graph.\n\n*References:*\n* [erdosproblems.com/667](https://www.erdosproblems.com/667)\n* [Er97f] P. Erdős, _Some unsolved problems_. In: Combinatorics, Geometry and Probability\n  (Cambridge, 1993), Cambridge Univ. Press (1997), 1-10.\n* [EFRS94] P. Erdős, R. J. Faudree, C. C. Rousseau and R. H. Schelp,\n  _A local density condition for triangles_. Discrete Math. 127 (1994), 153-161.\n-/\n\n@[expose] public section\nopen SimpleGraph Filter\n\nnamespace Erdos667\n\n/-- A graph `G` on `n` vertices is *`(p, q)`-locally dense* if every set of `p` of its vertices\nspans at least `q` edges of `G`; equivalently, every induced subgraph on `p` vertices has at\nleast `q` edges. -/\ndef LocallyDense (p q : ℕ) {n : ℕ} (G : SimpleGraph (Fin n)) : Prop :=\n  ∀ s : Finset (Fin n), s.card = p → q ≤ (G.induce s).edgeSet.ncard\n\nopen Classical in\n/-- `H p q n` is `H(n) = H(n; p, q)`: the largest `m` such that *every* `(p, q)`-locally dense\ngraph on `n` vertices must contain a complete graph on `m` vertices `Kₘ`.\n\nThe condition \"`G` contains `Kₘ`\" is `¬ G.CliqueFree m`. Any `m`-clique needs `m ≤ n` vertices,\nand the property is downward closed in `m`, so `Nat.findGreatest _ n` returns the genuine maximum. -/\nnoncomputable def H (p q n : ℕ) : ℕ :=\n  Nat.findGreatest\n    (fun m => ∀ G : SimpleGraph (Fin n), LocallyDense p q G → ¬ G.CliqueFree m) n\n\n/-- The growth exponent `c(p, q) = liminf_{n → ∞} (log H(n)) / (log n)`. -/\nnoncomputable def c (p q : ℕ) : ℝ :=\n  liminf (fun n : ℕ => Real.log (H p q n) / Real.log n) atTop\n\n/--\nLet $p, q \\geq 1$ be fixed integers. Define $H(n) = H(n; p, q)$ to be the largest $m$ such that any\ngraph on $n$ vertices where every set of $p$ vertices spans at least $q$ edges must contain a\ncomplete graph on $m$ vertices. Is\n$$ c(p, q) = \\liminf_{n \\to \\infty} \\frac{\\log H(n)}{\\log n} $$\na strictly increasing function of $q$ for $1 \\leq q \\leq \\binom{p-1}{2} + 1$?\n\nA problem of Erdős, Faudree, Rousseau, and Schelp. When $q = 1$ this corresponds exactly to the\nclassical Ramsey problem, and hence $\\tfrac{1}{p-1} \\leq c(p, 1) \\leq \\tfrac{2}{p+1}$ for\n$p \\geq 3$. It is easy to see that if $q = \\binom{p-1}{2} + 1$ then $c(p, q) = 1$.\n\nerdosproblems.com/667 also states that Erdős, Faudree, Rousseau and Schelp showed\n$c(p, \\binom{p-1}{2}) \\leq 1/2$. This cannot hold for all $p$: for $p = 6$, $q = 10$, the\ncomplement of a $(6, 10)$-locally dense graph is $C_6$-free, so Bondy–Simonovits together with\n$\\alpha(F) \\geq n^2 / (2e(F) + n)$ gives $c(6, 10) \\geq 2/3$. That remark is therefore not\nformalised here.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_667 :\n    ∀ p : ℕ, StrictMonoOn (c p) (Set.Icc 1 (Nat.choose (p - 1) 2 + 1)) := by\n  sorry\n\n/--\nThat $c(p, q)$ is *nondecreasing* in $q$ for fixed $p$ is a straightforward consequence of the\ndefinitions: enlarging $q$ shrinks the family of $(p, q)$-locally dense graphs, which can only\nincrease the guaranteed clique size $H(n)$, and hence the exponent.\n-/\n@[category textbook, AMS 5, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/d16a9d73d85f1377e83798f5d9585ee4c4140979/erdos-667/Solution.lean#L41\"]\ntheorem erdos_667.variants.monotoneOn (p : ℕ) :\n    MonotoneOn (c p) (Set.Icc 1 (Nat.choose (p - 1) 2 + 1)) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe right endpoint: when $q = \\binom{p-1}{2} + 1$ one has $c(p, q) = 1$\n(stated as \"easy to see\" on erdosproblems.com/667).\n-/\n@[category research solved, AMS 5, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/d16a9d73d85f1377e83798f5d9585ee4c4140979/erdos-667/Solution.lean#L45\"]\ntheorem erdos_667.variants.endpoint (p : ℕ) (hp : 2 ≤ p) :\n    c p (Nat.choose (p - 1) 2 + 1) = 1 := by\n  sorry\n\n/--\nThe case $q = 1$ is the classical Ramsey problem, giving the bounds\n$\\tfrac{1}{p-1} \\leq c(p, 1) \\leq \\tfrac{2}{p+1}$ for $p \\geq 3$. (For $p = 2$ the condition\nforces $G$ to be complete, so $c(2, 1) = 1$ and the upper bound fails.)\n-/\n@[category research solved, AMS 5]\ntheorem erdos_667.variants.ramsey_bounds (p : ℕ) (hp : 3 ≤ p) :\n    1 / ((p : ℝ) - 1) ≤ c p 1 ∧ c p 1 ≤ 2 / ((p : ℝ) + 1) := by\n  sorry\n\nend Erdos667\n",
  "statement_hash": "dd32e109438aba1f0c5ac10d4d7a1af95dc4d440c00db56814690a22e46e8f71",
  "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."
}