{
  "id": "393",
  "ident": "NS.00393",
  "slug": "erdos-1020",
  "title": "Erdős Problem 1020",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $f(n;r,k)$ be the maximal number of edges in an $r$-uniform hypergraph which contains no set of $k$ many independent edges.\n\nFor all $r\\geq 3$, $$f(n;r,k)=\\max\\left(\\binom{rk-1}{r}, \\binom{n}{r}-\\binom{n-k+1}{r}\\right).$$\n\nNote: the source states the formula with no range on `n` or `k`, but some restriction\nis needed: e.g. for `r = 3`, `k = 2`, `n = 4` no two disjoint triples fit in `4`\nvertices, so the left-hand side is `4.choose 3 = 4` while the right-hand side is\n`5.choose 3 = 10`. We require `k ≥ 1` and `n ≥ r*k - 1`: this is the smallest `n`\naccommodating the construction counted by the first term (all `r`-subsets of a fixed\n`(r*k - 1)`-set), and at `n = r*k - 1` the equality holds trivially, since the complete\n`r`-uniform hypergraph has no `k`-matching. The source's commentary likewise calls the\ncase `n < k*r` trivial.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1020.erdos_1020",
  "statement_lean": "theorem erdos_1020 (r : ℕ) (hr : 3 ≤ r) (n k : ℕ) (hk : 0 < k)\n    (hrk : r * k - 1 ≤ n) :\n    f n r k = max ((r * k - 1).choose r)\n      (n.choose r - (n - k + 1).choose r)",
  "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 1020\n\n*References:*\n- [erdosproblems.com/1020](https://www.erdosproblems.com/1020)\n- [BDE76] Bollobás, B. and Daykin, D. E. and Erdős, P., *Sets of independent edges of a hypergraph*.\n  Quart. J. Math. Oxford Ser. (2) (1976), 25--32.\n- [Er65d] Erdős, P., *A problem on independent {$r$}-tuples*. Ann. Univ. Sci. Budapest. Eötvös Sect.\n  Math. (1965), 93--95.\n- [ErGa59] Erdős, P. and Gallai, T., *On maximal paths and circuits of graphs*. Acta Math. Acad.\n  Sci. Hungar. (1959), 337-356 (unbound insert).\n- [FLM12] Frankl, Peter and Łuczak, Tomasz and Mieczkowska, Katarzyna, *On matchings in\n  hypergraphs*. Electron. J. Combin. (2012), Paper 42, 5.\n- [FRR12] Frankl, Peter and Rödl, Vojtech and Ruciński, Andrzej, *On the maximum number of edges in\n  a triple system not containing a disjoint family of a given size*. Combin. Probab. Comput. (2012),\n  141--148.\n- [Fr17] Frankl, Peter, *Proof of the {E}rdős matching conjecture in a new range*. Israel J. Math.\n  (2017), 421--430.\n- [Fr87] Frankl, Peter, *The shifting technique in extremal set theory*. (1987), 81--110.\n- [HLS12] Huang, Hao and Loh, Po-Shen and Sudakov, Benny, *The size of a hypergraph and its matching\n  number*. Combin. Probab. Comput. (2012), 442--450.\n- [Kl68] Kleitman, Daniel J., *Maximal number of subsets of a finite set no {$k$} of which are\n  pairwise disjoint*. J. Combinatorial Theory (1968), 157--163.\n- [KoKu23] Kolupaev, Dmitriy and Kupavskii, Andrey, *Erdős matching conjecture for almost perfect\n  matchings*. Discrete Math. (2023), Paper No. 113304, 9.\n- [LuMi14] Łuczak, Tomasz and Mieczkowska, Katarzyna, *On {E}rdős' extremal problem on matchings in\n  hypergraphs*. J. Combin. Theory Ser. A (2014), 178--194.\n-/\n\n@[expose] public section\n\nnamespace Erdos1020\n\n/-- The maximum number of edges in an `r`-uniform hypergraph on `n` vertices containing no\nmatching of size `k` (i.e. no `k` pairwise vertex-disjoint edges). -/\nnoncomputable def f (n r k : ℕ) : ℕ :=\n  Hypergraph.extremalNumber n r fun H ↦ ¬ H.HasHypergraphMatching k\n\n/--\nLet $f(n;r,k)$ be the maximal number of edges in an $r$-uniform hypergraph which contains no set of $k$ many independent edges.\n\nFor all $r\\geq 3$, $$f(n;r,k)=\\max\\left(\\binom{rk-1}{r}, \\binom{n}{r}-\\binom{n-k+1}{r}\\right).$$\n\nNote: the source states the formula with no range on `n` or `k`, but some restriction\nis needed: e.g. for `r = 3`, `k = 2`, `n = 4` no two disjoint triples fit in `4`\nvertices, so the left-hand side is `4.choose 3 = 4` while the right-hand side is\n`5.choose 3 = 10`. We require `k ≥ 1` and `n ≥ r*k - 1`: this is the smallest `n`\naccommodating the construction counted by the first term (all `r`-subsets of a fixed\n`(r*k - 1)`-set), and at `n = r*k - 1` the equality holds trivially, since the complete\n`r`-uniform hypergraph has no `k`-matching. The source's commentary likewise calls the\ncase `n < k*r` trivial.\n-/\n@[category research open, AMS 5]\ntheorem erdos_1020 (r : ℕ) (hr : 3 ≤ r) (n k : ℕ) (hk : 0 < k)\n    (hrk : r * k - 1 ≤ n) :\n    f n r k = max ((r * k - 1).choose r)\n      (n.choose r - (n - k + 1).choose r) := by\n  sorry\n\nend Erdos1020\n",
  "statement_hash": "477ea4a01b6644e5927875c802603c8d18bbb6b0571790a03b8e3f3d0ef32957",
  "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."
}