{
  "id": "3064",
  "ident": "NS.03064",
  "slug": "erdos-743",
  "title": "Erdős Problem 743",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $T_2,\\ldots,T_n$ be a collection of trees such that $T_k$ has $k$ vertices. Can we always\nwrite $K_n$ as the edge disjoint union of the $T_k$?\n\nA conjecture of Gyárfás, known as the tree packing conjecture. We state it as a packing. For\nevery $n$ and all trees $T_k$ on the vertex set `Fin k`, $2 \\leq k \\leq n$, there are injective\nmaps\n$f_k : \\{0, \\ldots, k - 1\\} \\to \\{0, \\ldots, n - 1\\}$ such that the graphs $f_k(T_k)$ are\npairwise edge-disjoint (see `IsPacking`). Every tree with $k$ vertices is isomorphic to a tree\non `Fin k`, so this covers every collection of trees.\n\nA tree with $k$ vertices has $k - 1$ edges, and $\\sum_{k=2}^{n} (k - 1) = \\binom{n}{2}$ is the\nnumber of edges of $K_n$. Hence the copies $f_k(T_k)$ of a packing cover every edge of $K_n$.\nSo a packing is the same as a decomposition of $K_n$ into copies of $T_2, \\ldots, T_n$.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos743.erdos_743",
  "statement_lean": "theorem erdos_743 :\n    ∀ n : ℕ, ∀ T : (k : ℕ) → SimpleGraph (Fin k),\n      (∀ k ∈ Set.Icc 2 n, (T k).IsTree) → IsPacking n (Set.Icc 2 n) T",
  "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 743\n\n*References:*\n- [erdosproblems.com/743](https://www.erdosproblems.com/743)\n- [ABCHPT21] Allen, Peter and Böttcher, Julia and Clemens, Dennis and Hladký, Jan and Piguet,\n  Diana and Taraz, Anusch, *The tree packing conjecture for trees of almost linear maximum\n  degree*. arXiv:2106.11720 (2021).\n- [Bo83] Bollobás, Béla, *Some remarks on packing trees*. Discrete Math. (1983), 203-204.\n- [Er81] Erdős, P., *On the combinatorial problems which I would most like to see solved*.\n  Combinatorica (1981), 25-42.\n- [Fi83] Fishburn, P. C., *Balanced integer arrays: a matrix packing theorem*. J. Combin. Theory\n  Ser. A (1983), 98-101.\n- [Fi83b] Fishburn, P. C., *Packing graphs with odd and even trees*. J. Graph Theory (1983),\n  369-383.\n- [GyLe78] Gyárfás, A. and Lehel, J., *Packing trees of different order into $K_n$*.\n  Combinatorics (Proc. Fifth Hungarian Colloq., Keszthely, 1976), Colloq. Math. Soc. János Bolyai\n  18 (1978), 463-469.\n- [JKKO19] Joos, Felix and Kim, Jaehoon and Kühn, Daniela and Osthus, Deryk, *Optimal packings\n  of bounded degree trees*. J. Eur. Math. Soc. (JEMS) (2019), 3573-3647.\n- [JaMo24] Janzer, Barnabás and Montgomery, Richard, *Packing the largest trees in the tree\n  packing conjecture*. arXiv:2403.10515 (2024).\n-/\n\n@[expose] public section\n\nopen Filter SimpleGraph\n\nnamespace Erdos743\n\n/-- `IsPacking n S T` says that the graphs `T k`, for `k ∈ S`, pack into the complete graph\n$K_n$ on `Fin n`.\n\nThat is, for each $k \\in S$ there is an injective map $f_k : \\{0, \\ldots, k - 1\\} \\to\n\\{0, \\ldots, n - 1\\}$, such that the graphs `(T k).map (f k)` have pairwise disjoint edge sets.\nEvery graph on `Fin n` is a subgraph of $K_n$, so this says that $K_n$ contains pairwise\nedge-disjoint copies of the graphs `T k`. -/\ndef IsPacking (n : ℕ) (S : Set ℕ) (T : (k : ℕ) → SimpleGraph (Fin k)) : Prop :=\n  ∃ f : (k : S) → Fin k → Fin n, (∀ k : S, Function.Injective (f k)) ∧\n    ∀ k l : S, (k : ℕ) < (l : ℕ) →\n      Disjoint ((T k).map (f k)).edgeSet ((T l).map (f l)).edgeSet\n\n/-- A packing of the graphs indexed by `S` gives a packing of those indexed by a subset `S'`. -/\n@[category API, AMS 5]\ntheorem IsPacking.mono {n : ℕ} {S S' : Set ℕ} {T : (k : ℕ) → SimpleGraph (Fin k)}\n    (h : IsPacking n S T) (hS : S' ⊆ S) : IsPacking n S' T := by\n  obtain ⟨f, hinj, hdisj⟩ := h\n  exact ⟨fun k => f ⟨k, hS k.2⟩, fun k => hinj ⟨k, hS k.2⟩,\n    fun k l hkl => hdisj ⟨k, hS k.2⟩ ⟨l, hS l.2⟩ hkl⟩\n\n/-- The numbers of edges $k - 1$ of trees on $k$ vertices, for $2 \\leq k \\leq n$, add up to the\nnumber $\\binom{n}{2}$ of edges of $K_n$. -/\n@[category test, AMS 5]\ntheorem sum_Icc_two_sub_one (n : ℕ) : ∑ k ∈ Finset.Icc 2 n, (k - 1) = n.choose 2 := by\n  induction n with\n  | zero => simp\n  | succ n ih =>\n    rcases Nat.lt_or_ge n 1 with h | h\n    · interval_cases n\n      simp\n    · rw [Finset.sum_Icc_succ_top (by omega), ih,\n        show (n + 1).choose 2 = n.choose 1 + n.choose 2 from Nat.choose_succ_succ n 1,\n        Nat.choose_one_right]\n      omega\n\n/--\nLet $T_2,\\ldots,T_n$ be a collection of trees such that $T_k$ has $k$ vertices. Can we always\nwrite $K_n$ as the edge disjoint union of the $T_k$?\n\nA conjecture of Gyárfás, known as the tree packing conjecture. We state it as a packing. For\nevery $n$ and all trees $T_k$ on the vertex set `Fin k`, $2 \\leq k \\leq n$, there are injective\nmaps\n$f_k : \\{0, \\ldots, k - 1\\} \\to \\{0, \\ldots, n - 1\\}$ such that the graphs $f_k(T_k)$ are\npairwise edge-disjoint (see `IsPacking`). Every tree with $k$ vertices is isomorphic to a tree\non `Fin k`, so this covers every collection of trees.\n\nA tree with $k$ vertices has $k - 1$ edges, and $\\sum_{k=2}^{n} (k - 1) = \\binom{n}{2}$ is the\nnumber of edges of $K_n$. Hence the copies $f_k(T_k)$ of a packing cover every edge of $K_n$.\nSo a packing is the same as a decomposition of $K_n$ into copies of $T_2, \\ldots, T_n$.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_743 :\n    ∀ n : ℕ, ∀ T : (k : ℕ) → SimpleGraph (Fin k),\n      (∀ k ∈ Set.Icc 2 n, (T k).IsTree) → IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\n/--\nGyárfás and Lehel [GyLe78] proved that this holds if all but at most $2$ of the trees are stars,\nor if all the trees are stars or paths. This variant is the second case: each tree is a star or a\npath.\n\nHere a star on `Fin k` is `starGraph c` for a centre `c`, and a path is a graph isomorphic to\n`pathGraph k`.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.stars_or_paths (n : ℕ) (T : (k : ℕ) → SimpleGraph (Fin k))\n    (hT : ∀ k ∈ Set.Icc 2 n, (T k).IsTree ∧\n      ((∃ c : Fin k, T k = starGraph c) ∨ Nonempty (T k ≃g pathGraph k))) :\n    IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\n/--\nGyárfás and Lehel [GyLe78] proved that this holds if all but at most $2$ of the trees are stars,\nor if all the trees are stars or paths. This variant is the first case.\n\nHere a star on `Fin k` is `starGraph c` for a centre `c`. The two trees that may fail to be\nstars are $T_a$ and $T_b$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.all_but_two_stars (n : ℕ) (T : (k : ℕ) → SimpleGraph (Fin k))\n    (hT : ∀ k ∈ Set.Icc 2 n, (T k).IsTree)\n    (hstar : ∃ a b : ℕ, ∀ k ∈ Set.Icc 2 n, k ≠ a → k ≠ b → ∃ c : Fin k, T k = starGraph c) :\n    IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\n/--\nFishburn [Fi83b] proved this for $n\\leq 9$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.fishburn (n : ℕ) (hn : n ≤ 9) (T : (k : ℕ) → SimpleGraph (Fin k))\n    (hT : ∀ k ∈ Set.Icc 2 n, (T k).IsTree) :\n    IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\n/--\nBollobás [Bo83] proved that the smallest $\\lfloor n/\\sqrt{2}\\rfloor$ many trees can always be\npacked greedily into $K_n$.\n\nThe smallest trees are $T_1, \\ldots, T_m$ with $m = \\lfloor n/\\sqrt{2} \\rfloor$. The tree $T_1$ is\na single vertex, so we only pack $T_2, \\ldots, T_m$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.bollobas (n : ℕ) (T : (k : ℕ) → SimpleGraph (Fin k))\n    (hT : ∀ k ∈ Set.Icc 2 ⌊(n : ℝ) / Real.sqrt 2⌋₊, (T k).IsTree) :\n    IsPacking n (Set.Icc 2 ⌊(n : ℝ) / Real.sqrt 2⌋₊) T := by\n  sorry\n\nopen scoped Classical in\n/--\nJoos, Kim, Kühn, and Osthus [JKKO19] proved that this conjecture holds when the trees have\nbounded maximum degree. That is, for every $d$ there is $N$ such that for all $n \\geq N$ the\nfollowing holds. If $T_k$ is a tree with $k$ vertices and maximum degree at most $d$ for\n$2 \\leq k \\leq n$, then $K_n$ decomposes into $T_2, \\ldots, T_n$.\n\nThey even allow the first $o(n)$ trees to have arbitrary maximum degree.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.bounded_degree (d : ℕ) :\n    ∃ N : ℕ, ∀ n : ℕ, N ≤ n → ∀ T : (k : ℕ) → SimpleGraph (Fin k),\n      (∀ k ∈ Set.Icc 2 n, (T k).IsTree ∧ (T k).maxDegree ≤ d) →\n        IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\nopen scoped Classical in\n/--\nAllen, Böttcher, Clemens, Hladký, Piguet, and Taraz [ABCHPT21] proved that this conjecture holds\nwhen all the trees have maximum degree $\\leq c\\frac{n}{\\log n}$ for some constant $c>0$. That is,\nthere is $c > 0$ such that for all sufficiently large $n$ the following holds. If $T_k$ is a tree\nwith $k$ vertices and maximum degree at most $cn/\\log n$ for $2 \\leq k \\leq n$, then $K_n$\ndecomposes into $T_2, \\ldots, T_n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.almost_linear_degree :\n    ∃ c : ℝ, 0 < c ∧ ∀ᶠ n : ℕ in atTop, ∀ T : (k : ℕ) → SimpleGraph (Fin k),\n      (∀ k ∈ Set.Icc 2 n,\n        (T k).IsTree ∧ ((T k).maxDegree : ℝ) ≤ c * (n : ℝ) / Real.log (n : ℝ)) →\n        IsPacking n (Set.Icc 2 n) T := by\n  sorry\n\n/--\nJanzer and Montgomery [JaMo24] have proved that there exists some $c>0$ such that the largest $cn$\ntrees can be packed into $K_n$.\n\nWe state this for all sufficiently large $n$. The trees are $T_k$ with $n - cn < k \\leq n$, and\nwe also require $2 \\leq k$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_743.variants.largest_trees :\n    ∃ c : ℝ, 0 < c ∧ ∀ᶠ n : ℕ in atTop, ∀ T : (k : ℕ) → SimpleGraph (Fin k),\n      (∀ k : ℕ, 2 ≤ k → k ≤ n → (n : ℝ) - c * n < k → (T k).IsTree) →\n        IsPacking n {k : ℕ | 2 ≤ k ∧ k ≤ n ∧ (n : ℝ) - c * n < k} T := by\n  sorry\n\nend Erdos743\n",
  "statement_hash": "5bbfe5c9b328f371843585d438a1fd12a255ba691e4f67b516b9ee428212b26a",
  "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."
}