{
  "id": "3059",
  "ident": "NS.03059",
  "slug": "erdos-742--plesnik-bound",
  "title": "Erdős Problem 742 · plesnik_bound",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Plesník [Pl75] proved the bound $|E(G)| < 3n(n-1)/8$ for any diameter-$2$-critical graph\non $n$ vertices.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos742.variants.plesnik_bound",
  "statement_lean": "theorem plesnik_bound (G : SimpleGraph V) [DecidableRel G.Adj] (hG : IsDiameter2Critical G) :\n    (G.edgeFinset.card : ℝ) < 3 * (Fintype.card V : ℝ) * ((Fintype.card V : ℝ) - 1) / 8",
  "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 742\n\n*References:*\n- [erdosproblems.com/742](https://www.erdosproblems.com/742)\n- [Pl75] Plesník, Ján, Critical graphs of given diameter. Acta Fac. Rerum Natur. Univ. Comenian.\n  Math. 30 (1975), 71-93.\n- [CaHa79] Caccetta, L. and Häggkvist, R., On diameter critical graphs.\n  Discrete Math. 28 (1979), 223-229.\n- [Fa87] Fan, Genghua, On diameter 2-critical graphs. Discrete Math. 67 (1987), 235-240.\n- [Fü92] Füredi, Zoltán, The maximum number of edges in a minimal graph of diameter 2.\n  J. Graph Theory 16 (1992), 81-98.\n-/\n\n@[expose] public section\n\nopen SimpleGraph\n\nnamespace Erdos742\n\nvariable {V : Type*} [Fintype V] [DecidableEq V]\n\n/-- A graph is diameter-2-critical if it has diameter $2$ and removing any edge\nincreases the diameter beyond $2$. -/\ndef IsDiameter2Critical (G : SimpleGraph V) : Prop :=\n  G.diam = 2 ∧ ∀ e ∈ G.edgeSet, (G.deleteEdges {e}).diam ≠ 2\n\n/--\n**Murty-Simon Conjecture**\n\nLet $G$ be a graph on $n$ vertices with diameter $2$ such that deleting any edge increases the\ndiameter. Is it true that $G$ has at most $\\lfloor n^2 / 4 \\rfloor$ edges? Equality is conjectured\nto hold for the complete balanced bipartite graph $K_{\\lceil n/2 \\rceil, \\lfloor n/2 \\rfloor}$.\n\nThe conjecture is resolved up to a finite check: Fan [Fa87] verified it for $n \\leq 24$ and\n$n = 26$, and Füredi [Fü92] proved it for all sufficiently large $n$.\n-/\n@[category research open, question, AMS 5]\ntheorem erdos_742 :\n    ∀ (V : Type*) [Fintype V] [DecidableEq V]\n    (G : SimpleGraph V) [DecidableRel G.Adj], IsDiameter2Critical G →\n    G.edgeFinset.card ≤ (Fintype.card V) ^ 2 / 4 := by\n  sorry\n\n/--\nThe complete bipartite graph $K_{a, b}$ has exactly $a \\cdot b$ edges. The bound\n$\\lfloor n^2 / 4 \\rfloor$ in the Murty-Simon conjecture is attained by the balanced\ncase $K_{\\lceil n/2 \\rceil, \\lfloor n/2 \\rfloor}$.\n-/\n@[category test, AMS 5]\ntheorem complete_bipartite_edge_count (a b : ℕ) :\n    (completeBipartiteGraph (Fin a) (Fin b)).edgeSet.ncard = a * b := by\n  -- The edge set equals the image of `Fin a × Fin b` under the map\n  -- `(i, j) ↦ s(Sum.inl i, Sum.inr j)`.\n  let φ : Fin a × Fin b → Sym2 (Fin a ⊕ Fin b) :=\n    fun p => s(Sum.inl p.1, Sum.inr p.2)\n  have hedge : (completeBipartiteGraph (Fin a) (Fin b)).edgeSet = φ '' Set.univ := by\n    ext e\n    simp only [φ, Set.mem_image, Set.mem_univ, true_and]\n    constructor\n    · intro hadj\n      induction e using Quot.ind\n      rename_i p\n      cases p with | mk a b =>\n      cases a <;> cases b <;> simp_all [completeBipartiteGraph]\n    · rintro ⟨⟨i, j⟩, rfl⟩\n      simp [completeBipartiteGraph]\n  have hinj : Function.Injective φ := by\n    intro ⟨i₁, j₁⟩ ⟨i₂, j₂⟩ h\n    simp only [φ, Sym2.eq_iff] at h\n    rcases h with ⟨h1, h2⟩ | ⟨h1, _⟩\n    · exact Prod.ext (Sum.inl.inj h1) (Sum.inr.inj h2)\n    · exact absurd h1 (by simp)\n  rw [hedge, Set.ncard_image_of_injective _ hinj, Set.ncard_univ,\n    Nat.card_prod, Nat.card_fin, Nat.card_fin]\n\nnamespace variants\n\n/--\nPlesník [Pl75] proved the bound $|E(G)| < 3n(n-1)/8$ for any diameter-$2$-critical graph\non $n$ vertices.\n-/\n@[category research solved, AMS 5]\ntheorem plesnik_bound (G : SimpleGraph V) [DecidableRel G.Adj] (hG : IsDiameter2Critical G) :\n    (G.edgeFinset.card : ℝ) < 3 * (Fintype.card V : ℝ) * ((Fintype.card V : ℝ) - 1) / 8 := by\n  sorry\n\n/--\nFan [Fa87] verified the Murty-Simon conjecture for all $n \\leq 24$ and for $n = 26$.\n-/\n@[category research solved, AMS 5]\ntheorem fan_bound (G : SimpleGraph V) [DecidableRel G.Adj]\n    (hn : Fintype.card V ≤ 24 ∨ Fintype.card V = 26) (hG : IsDiameter2Critical G) :\n    G.edgeFinset.card ≤ (Fintype.card V) ^ 2 / 4 := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nFüredi [Fü92] proved the Murty-Simon conjecture for all sufficiently large $n$, that is, there\nexists $n_0$ such that every diameter-$2$-critical graph on $n \\geq n_0$ vertices has at most\n$\\lfloor n^2 / 4 \\rfloor$ edges.\n-/\n@[category research solved, AMS 5, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos742.lean#L4279\"]\ntheorem furedi_bound : ∃ n₀ : ℕ, ∀ (V : Type*) [Fintype V] [DecidableEq V]\n    (G : SimpleGraph V) [DecidableRel G.Adj],\n    n₀ ≤ Fintype.card V → IsDiameter2Critical G →\n      G.edgeFinset.card ≤ (Fintype.card V) ^ 2 / 4 := by\n  sorry\n\nend variants\n\nend Erdos742\n",
  "statement_hash": "ff2655987ae91cb6e250efbbad3df87d9fe33666eebcb2c9d332453d2693bdb5",
  "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."
}