{
  "id": "2459",
  "ident": "NS.02459",
  "slug": "erdos-557",
  "title": "Erdős Problem 557",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $R_k(G)$ denote the minimal $m$ such that if the edges of $K_m$ are $k$-coloured then there\nis a monochromatic copy of $G$. Is it true that\n$$R_k(T)\\leq kn+O(1)$$\nfor any tree $T$ on $n$ vertices?\n\nThe answer is yes, with an absolute constant: $R_k(T) \\leq kn + 3$ for all $k$ and $n$. For\n$n \\geq 2$ this follows from the explicit bound $R_k(T) \\leq k(n-2)+3$, a consequence of the\nErdős–Sós theorem (Erdős problem 548) by the pigeonhole principle, as recorded on the problem page;\nReed and Stein [ReSt26] derived that bound for $n$ large in terms of $k$ from their dense-graph case\nof Erdős–Sós. For the one-vertex tree, $R_k(T) \\leq 2$.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos557.erdos_557",
  "statement_lean": "theorem erdos_557 :\n    ∃ c : ℕ, ∀ (k n : ℕ) (T : SimpleGraph (Fin n)), T.IsTree →\n      multicolourGraphRamsey k T ≤ k * n + 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 557\n\n*References:*\n- [erdosproblems.com/557](https://www.erdosproblems.com/557)\n- [ErGr75] Erdős, P. and Graham, R. L., *On partition theorems for finite graphs*. Infinite and\n  finite sets (Colloq., Keszthely, 1973), Vol. I, Colloq. Math. Soc. János Bolyai 10 (1975),\n  515-527.\n- [ReSt26] Reed, Bruce and Stein, Maya, *The Erdős-Sós conjecture in dense graphs*.\n  [arXiv:2609.05417](https://arxiv.org/abs/2609.05417) (2026).\n-/\n\n@[expose] public section\n\nopen SimpleGraph\n\nnamespace Erdos557\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $R_k(G)$ denote the minimal $m$ such that if the edges of $K_m$ are $k$-coloured then there\nis a monochromatic copy of $G$. Is it true that\n$$R_k(T)\\leq kn+O(1)$$\nfor any tree $T$ on $n$ vertices?\n\nThe answer is yes, with an absolute constant: $R_k(T) \\leq kn + 3$ for all $k$ and $n$. For\n$n \\geq 2$ this follows from the explicit bound $R_k(T) \\leq k(n-2)+3$, a consequence of the\nErdős–Sós theorem (Erdős problem 548) by the pigeonhole principle, as recorded on the problem page;\nReed and Stein [ReSt26] derived that bound for $n$ large in terms of $k$ from their dense-graph case\nof Erdős–Sós. For the one-vertex tree, $R_k(T) \\leq 2$.\n-/\n@[category research solved, AMS 5,\n  formal_proof using lean4 at \"https://github.com/zhangjun725/erdos557/blob/c4e0ab13027f8bb50defade11cf8a53c7b8b0ba9/Erdos557/Basic.lean#L153\"]\ntheorem erdos_557 :\n    ∃ c : ℕ, ∀ (k n : ℕ) (T : SimpleGraph (Fin n)), T.IsTree →\n      multicolourGraphRamsey k T ≤ k * n + c := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe explicit bound $R_k(T) \\leq k(n-2)+3$ for every $k$ and every tree $T$ on $n \\geq 2$ vertices.\nThe problem page states this bound for $n$ sufficiently large in terms of $k$.\n\nThe Lean statement uses natural-number subtraction, so for $n = 1$ it reads $R_k(T) \\leq 3$, which\nalso holds (the one-vertex tree has $R_k(T) \\leq 2$). With ordinary subtraction the displayed formula\nwould be false for $n = 1$ and $k \\geq 3$.\n-/\n@[category research solved, AMS 5,\n  formal_proof using lean4 at \"https://github.com/zhangjun725/erdos557/blob/c4e0ab13027f8bb50defade11cf8a53c7b8b0ba9/Erdos557/Basic.lean#L147\"]\ntheorem erdos_557.variants.explicit (k n : ℕ) (T : SimpleGraph (Fin n)) (hT : T.IsTree) :\n    multicolourGraphRamsey k T ≤ k * (n - 2) + 3 := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe best-possible bound $R_k(T) \\leq k(n-2)+2$ for every $k$ and every tree $T$ on $n \\geq 2$\nvertices, attained by stars. It follows from the sharp form of the Erdős–Sós theorem (a graph on\n$m$ vertices with more than $(n-2)m/2$ edges contains every tree on $n$ vertices) by the\npigeonhole principle.\n-/\n@[category research solved, AMS 5,\n  formal_proof using lean4 at \"https://github.com/zhangjun725/erdos557/blob/828ad6fdb5d0f1a72b8dcd812f4c91c285570ff6/Erdos557/Tight.lean#L108\"]\ntheorem erdos_557.variants.tight (k n : ℕ) (hn : 2 ≤ n) (T : SimpleGraph (Fin n))\n    (hT : T.IsTree) : multicolourGraphRamsey k T ≤ k * (n - 2) + 2 := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nWhen $n$ is odd and $k \\geq 2$ is even, $R_k(T) \\leq k(n-2)+1$ for every tree $T$ on $n$ vertices,\nagain attained by stars: with $m = k(n-2)+1$ some colour class has at least $(n-2)m/2$ edges, and\n$(n-2)m$ is odd, so it has more than $(n-2)m/2$ edges.\n-/\n@[category research solved, AMS 5,\n  formal_proof using lean4 at \"https://github.com/zhangjun725/erdos557/blob/828ad6fdb5d0f1a72b8dcd812f4c91c285570ff6/Erdos557/Tight.lean#L114\"]\ntheorem erdos_557.variants.tight_odd (k n : ℕ) (hk : 0 < k) (hke : Even k) (hn : 2 ≤ n)\n    (hno : Odd n) (T : SimpleGraph (Fin n)) (hT : T.IsTree) :\n    multicolourGraphRamsey k T ≤ k * (n - 2) + 1 := by\n  sorry\n\nend Erdos557\n",
  "statement_hash": "66d0a5d57defb22c0a9e6e565e9fc5916bf790c7cfdacc38a2af0442af47af4e",
  "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."
}