Title:Erdős Problem 619
Statement:Erdős Problem 619 [EGR98, Er99]: For a triangle-free graph let be the smallest number of edges that need to be added to so that it has diameter (while preserving the property of being triangle-free). Is it true that there exists a constant such that if is a connected graph on vertices then ?
The answer is no: for every there exist connected triangle-free graphs on vertices with , so no such constant exists. The original proof was generated by Claude Fable 5; the Lean formalization was sketched by Fable and implemented by GPT 5.5 with Codex (see the linked
formal_proof).
| Subjects: | Combinatorics (math.CO) |
| MSC classes: | 05 |
| Tags: | question, formal_proof |
| Cite as: | NS.02626 [math.CO] · NS.02626v1 for this version |
| Declaration: | Erdos619.erdos_619 |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | eebc7e39f545d43a56f1ec49c5fe5d3e4e8a9871a252f43489ff71c8e8a89820 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/ErdosProblems/619.lean |
Formal statement
theorem erdos_619 :
¬ ∃ c > (0 : ℝ), ∀ (V : Type) [Fintype V] (G : SimpleGraph V),
G.Connected → G.CliqueFree 3 →
(minNewEdges 4 G : ℝ) < (1 - c) * Fintype.card VShow the full Challenge.lean (146 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Erdős Problem 619
*References:*
- [erdosproblems.com/619](https://www.erdosproblems.com/619)
- [EGR98] Erdős, Paul and Gyárfás, András and Ruszinkó, Miklós, *How to decrease the
diameter of triangle-free graphs*. Combinatorica **18** (1998), 493-501.
- [Er99] Erdős, Paul, *A selection of problems and results in combinatorics*.
Combin. Probab. Comput. **8** (1999), 1-6.
-/
@[expose] public section
open SimpleGraph
namespace Erdos619
/--
For a graph $G$, `minNewEdges r G` is the smallest number of edges that need to be added
to $G$ so that it has diameter at most $r$, while preserving the property of being
triangle-free. Erdős, Gyárfás and Ruszinkó denote this quantity by $h_r(G)$ in [EGR98].
Adding edges is formalised as passing to a supergraph `H ≥ G` on the same vertex set, the
number of added edges being the (finite) cardinality of the edge set of `H \ G`. We use
the extended diameter `SimpleGraph.ediam` (valued in `ℕ∞`) so that disconnected
supergraphs, which have infinite diameter, do not qualify. If no triangle-free supergraph
of `G` of diameter at most `r` exists, then `minNewEdges r G = 0` by the `Nat.sInf`
convention on the empty set; `erdos_619.variants.add_edges_diam_three` shows this
degenerate case does not occur for connected triangle-free `G` when `3 ≤ r`.
-/
noncomputable def minNewEdges {V : Type*} (r : ℕ) (G : SimpleGraph V) : ℕ :=
sInf {k | ∃ H : SimpleGraph V,
G ≤ H ∧ H.CliqueFree 3 ∧ H.ediam ≤ r ∧ (H \ G).edgeSet.ncard = k}
set_option linter.style.formal_proof_palomar false in
/--
**Erdős Problem 619** [EGR98, Er99]: For a triangle-free graph $G$ let $h_r(G)$ be the
smallest number of edges that need to be added to $G$ so that it has diameter $r$ (while
preserving the property of being triangle-free). Is it true that there exists a constant
$c>0$ such that if $G$ is a connected graph on $n$ vertices then $h_4(G)<(1-c)n$?
The answer is **no**: for every $\eta>0$ there exist connected triangle-free graphs on
$n$ vertices with $h_4(G)\geq(1-\eta)n$, so no such constant $c$ exists. The original proof
was generated by Claude Fable 5; the Lean formalization was sketched by Fable and
implemented by GPT 5.5 with Codex (see the linked `formal_proof`).
-/
@[category research solved, question, AMS 5,
formal_proof using formal_conjectures at
"https://github.com/google-deepmind/formal-conjectures/blob/b8c7a76f267c29eaa41d1212c211a920be8b05ea/FormalConjectures/ErdosProblems/619.lean#L6009",
formal_proof using lean4 at
"https://github.com/nick-kuhn/erdos-619/blob/7f65718b8c1019ecc24e6c9a6b04ec4c66a4e26f/Solution.lean#L5869"]
theorem erdos_619 :
¬ ∃ c > (0 : ℝ), ∀ (V : Type) [Fintype V] (G : SimpleGraph V),
G.Connected → G.CliqueFree 3 →
(minNewEdges 4 G : ℝ) < (1 - c) * Fintype.card V := by
sorry
/-
## Partial results
-/
/--
Erdős, Gyárfás and Ruszinkó [EGR98]: every connected triangle-free graph on a finite
vertex set can be extended, by adding edges, to a triangle-free graph of diameter at
most $3$. This shows that the infimum defining `minNewEdges r G` ranges over a nonempty
set for every `3 ≤ r`.
-/
@[category research solved, AMS 5]
theorem erdos_619.variants.add_edges_diam_three {V : Type*} [Fintype V]
(G : SimpleGraph V) (hG : G.Connected) (hG' : G.CliqueFree 3) :
∃ H : SimpleGraph V, G ≤ H ∧ H.CliqueFree 3 ∧ H.ediam ≤ 3 := by
sorry
/--
Erdős, Gyárfás and Ruszinkó [EGR98]: $h_3(G) \leq n$ for every connected triangle-free
graph $G$ on $n$ vertices.
-/
@[category research solved, AMS 5]
theorem erdos_619.variants.h_three_le {V : Type*} [Fintype V]
(G : SimpleGraph V) (hG : G.Connected) (hG' : G.CliqueFree 3) :
minNewEdges 3 G ≤ Fintype.card V := by
sorry
/--
Erdős, Gyárfás and Ruszinkó [EGR98]: $h_5(G) \leq \frac{n-1}{2}$ for every connected
triangle-free graph $G$ on $n$ vertices.
-/
@[category research solved, AMS 5]
theorem erdos_619.variants.h_five_le {V : Type*} [Fintype V]
(G : SimpleGraph V) (hG : G.Connected) (hG' : G.CliqueFree 3) :
(minNewEdges 5 G : ℝ) ≤ (Fintype.card V - 1) / 2 := by
sorry
/--
Erdős, Gyárfás and Ruszinkó [EGR98]: there is a constant $c > 0$ such that for every
$n$ there exist connected triangle-free graphs $G$ on $n$ vertices with
$h_3(G) \geq n - c$.
-/
@[category research solved, AMS 5]
theorem erdos_619.variants.h_three_lower :
∃ c > (0 : ℝ), ∀ n : ℕ, 0 < n →
∃ (V : Type) (_ : Fintype V) (G : SimpleGraph V),
Fintype.card V = n ∧ G.Connected ∧ G.CliqueFree 3 ∧
(n : ℝ) - c ≤ minNewEdges 3 G := by
sorry
/-
## Sanity checks
-/
/-- A triangle-free graph that already has diameter at most `r` needs no new edges. -/
@[category test, AMS 5]
theorem erdos_619.test.minNewEdges_eq_zero {V : Type*} {r : ℕ} {G : SimpleGraph V}
(hG : G.CliqueFree 3) (hdiam : G.ediam ≤ r) :
minNewEdges r G = 0 :=
Nat.sInf_eq_zero.mpr <| Or.inl ⟨G, le_rfl, hG, hdiam, by simp⟩
/-- The graph with a single vertex is triangle-free and has diameter `0`, so it needs no
new edges to reach diameter at most `4`. -/
@[category test, AMS 5]
theorem erdos_619.test.minNewEdges_singleton :
minNewEdges 4 (⊥ : SimpleGraph (Fin 1)) = 0 :=
erdos_619.test.minNewEdges_eq_zero (cliqueFree_bot (by norm_num))
(by simp [ediam_eq_zero_of_subsingleton])
end Erdos619
To prove it: keep every definition of Challenge.lean unchanged and prove Erdos619.erdos_619 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_erdos_619 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch erdos-619 nosorry submit erdos-619 nosorry/erdos-619/Solution.lean --wait
Formal variants
Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.
- erdos-619-variants-add-edges-diam-three — known result
- erdos-619-variants-h-three-le — known result
- erdos-619-variants-h-five-le — known result
- erdos-619-variants-h-three-lower — known result
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.