{
  "id": "3158",
  "ident": "NS.03158",
  "slug": "erdos-777",
  "title": "Erdős Problem 777",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "If $\\mathcal{F}$ is a family of subsets of $\\{1,\\ldots,n\\}$ then we write $G_{\\mathcal{F}}$ for the\ngraph on $\\mathcal{F}$ where $A\\sim B$ if $A$ and $B$ are comparable - that is, $A\\subseteq B$ or\nvice versa.\n\nIs it true that, if $\\epsilon>0$ and $n$ is sufficiently large, whenever\n$m\\leq (2-\\epsilon)2^{n/2}$ the graph $G_\\mathcal{F}$ has $<2^{n}$ many edges?\n\nA problem of Daykin and Erdős [Gu83]; here $m=\\lvert\\mathcal{F}\\rvert$. The answer is yes, which\nfollows from Theorem 1.4 and Corollary 1.5 of Alon, Das, Glebov, and Sudakov [ADGS15].",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos777.erdos_777.parts.i",
  "statement_lean": "theorem erdos_777.parts.i :\n    ∀ ε : ℝ, 0 < ε → ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n → ∀ 𝓕 : Finset (Finset (Fin n)),\n      (𝓕.card : ℝ) ≤ (2 - ε) * (2 : ℝ) ^ ((n : ℝ) / 2) → comparableEdges 𝓕 < 2 ^ n",
  "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 777\n\n*References:*\n- [erdosproblems.com/777](https://www.erdosproblems.com/777)\n- [Gu83] Guy, R. K., *A miscellany of Erdős problems*. Amer. Math. Monthly (1983), 118-120.\n- [AlFr85] Alon, N. and Frankl, P., *The maximum number of disjoint pairs in a family of\n  subsets*. Graphs Combin. (1985), 13-21.\n- [ADGS15] Alon, N., Das, S., Glebov, R. and Sudakov, B., *Comparable pairs in families of\n  sets*. J. Combin. Theory Ser. B (2015), 164-185. [arXiv](https://arxiv.org/abs/1411.4196)\n-/\n\n@[expose] public section\n\nnamespace Erdos777\n\n/-- The comparability graph $G_{\\mathcal{F}}$ of a finite family $\\mathcal{F}$ of subsets of\n$\\{1,\\ldots,n\\}$ (modelled by `Fin n`): its vertices are the members of $\\mathcal{F}$, and two\nmembers are adjacent when one is a proper subset of the other (equivalently, they are distinct\nand comparable; a graph has no loops). -/\ndef comparableGraph {n : ℕ} (𝓕 : Finset (Finset (Fin n))) : SimpleGraph {A // A ∈ 𝓕} where\n  Adj A B := A.1 < B.1 ∨ B.1 < A.1\n  symm := ⟨by intro A B; tauto⟩\n  loopless := ⟨by intro A h; exact (lt_irrefl A.1) (h.elim id id)⟩\n\n/-- Two members of $\\mathcal{F}$ are adjacent in `comparableGraph 𝓕` if and only if one is a\nproper subset of the other. -/\n@[category API, AMS 5]\ntheorem comparableGraph_adj {n : ℕ} {𝓕 : Finset (Finset (Fin n))} {A B : {S // S ∈ 𝓕}} :\n    (comparableGraph 𝓕).Adj A B ↔ A.1 < B.1 ∨ B.1 < A.1 :=\n  Iff.rfl\n\nopen scoped Classical in\n/-- The number of edges of $G_{\\mathcal{F}}$, i.e. of unordered pairs of distinct comparable\nmembers of $\\mathcal{F}$. -/\nnoncomputable def comparableEdges {n : ℕ} (𝓕 : Finset (Finset (Fin n))) : ℕ :=\n  (comparableGraph 𝓕).edgeFinset.card\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIf $\\mathcal{F}$ is a family of subsets of $\\{1,\\ldots,n\\}$ then we write $G_{\\mathcal{F}}$ for the\ngraph on $\\mathcal{F}$ where $A\\sim B$ if $A$ and $B$ are comparable - that is, $A\\subseteq B$ or\nvice versa.\n\nIs it true that, if $\\epsilon>0$ and $n$ is sufficiently large, whenever\n$m\\leq (2-\\epsilon)2^{n/2}$ the graph $G_\\mathcal{F}$ has $<2^{n}$ many edges?\n\nA problem of Daykin and Erdős [Gu83]; here $m=\\lvert\\mathcal{F}\\rvert$. The answer is yes, which\nfollows from Theorem 1.4 and Corollary 1.5 of Alon, Das, Glebov, and Sudakov [ADGS15].\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos777.lean#L1759\"]\ntheorem erdos_777.parts.i :\n    ∀ ε : ℝ, 0 < ε → ∃ n₀ : ℕ, ∀ n : ℕ, n₀ ≤ n → ∀ 𝓕 : Finset (Finset (Fin n)),\n      (𝓕.card : ℝ) ≤ (2 - ε) * (2 : ℝ) ^ ((n : ℝ) / 2) → comparableEdges 𝓕 < 2 ^ n := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIf $\\mathcal{F}$ is a family of subsets of $\\{1,\\ldots,n\\}$ then we write $G_{\\mathcal{F}}$ for the\ngraph on $\\mathcal{F}$ where $A\\sim B$ if $A$ and $B$ are comparable - that is, $A\\subseteq B$ or\nvice versa.\n\nIs it true that if $G_{\\mathcal{F}}$ has $\\geq cm^2$ edges then $m\\ll_c 2^{n/2}$?\n\nThe answer is no, by Alon and Frankl [AlFr85, Example 6.1]: for every $d\\geq 1$ there are\nfamilies with $m\\gg n^d2^{n/2}$ and at least $2^{-2d-1}\\binom{m}{2}$ comparable pairs. Here\n$m=\\lvert\\mathcal{F}\\rvert$, and the question is read as: for every $c>0$ there is $C=C(c)$ such\nthat $m\\leq C2^{n/2}$ for all $n$ and all such families, so the answer is the negation.\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos777.lean#L353\"]\ntheorem erdos_777.parts.ii :\n    ¬ ∀ c : ℝ, 0 < c → ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, ∀ 𝓕 : Finset (Finset (Fin n)),\n      c * (𝓕.card : ℝ) ^ 2 ≤ comparableEdges 𝓕 →\n        (𝓕.card : ℝ) ≤ C * (2 : ℝ) ^ ((n : ℝ) / 2) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIf $\\mathcal{F}$ is a family of subsets of $\\{1,\\ldots,n\\}$ then we write $G_{\\mathcal{F}}$ for the\ngraph on $\\mathcal{F}$ where $A\\sim B$ if $A$ and $B$ are comparable - that is, $A\\subseteq B$ or\nvice versa.\n\nIs it true that, for any $\\epsilon>0$, there exists some $\\delta>0$ such that if there are\n$>m^{2-\\delta}$ edges then $m<(2+\\epsilon)^{n/2}$?\n\nThe answer is yes, proved by Alon and Frankl [AlFr85, Theorem 1.4, the case $k=1$]. Here\n$m=\\lvert\\mathcal{F}\\rvert$.\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos777.lean#L945\"]\ntheorem erdos_777.parts.iii :\n    ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ ∀ n : ℕ, ∀ 𝓕 : Finset (Finset (Fin n)),\n      (𝓕.card : ℝ) ^ (2 - δ) < comparableEdges 𝓕 →\n        (𝓕.card : ℝ) < (2 + ε) ^ ((n : ℝ) / 2) := by\n  sorry\n\nend Erdos777\n",
  "statement_hash": "65a3ef6c6bbb20fec62bc923d6a2e51b98955ab82863b278e200a45efec58e82",
  "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."
}