Title:Erdős Problem 816
Statement:Let be a graph with vertices and edges. Must contain two vertices of the same degree which are joined by a path of length ?
A problem of Erdős and Hajnal. The example of shows that this fails if we only have edges.
This is true, and was proved by Chen and Ma [ChMa25], who prove the stronger statement that, provided , all graphs with vertices and at least edges contain two vertices of the same degree joined by a path of length , except .
For the graph is a triangle, which contains no path of length , so we assume .
| Subjects: | Combinatorics (math.CO) |
| MSC classes: | 05 |
| Tags: | question, formal_proof |
| Cite as: | NS.03286 [math.CO] · NS.03286v1 for this version |
| Declaration: | Erdos816.erdos_816 |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | bb01638986790f13a35de24d6b865e89812085987a7efe37bb5ab1c44f2c9f50 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/ErdosProblems/816.lean |
Formal statement
theorem erdos_816 : ∀ n : ℕ, 2 ≤ n → ∀ G : SimpleGraph (Fin (2 * n + 1)),
G.edgeFinset.card = n ^ 2 + n + 1 → HasEqualDegreePathThree GShow the full Challenge.lean (88 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Erdős Problem 816
*References:*
- [erdosproblems.com/816](https://www.erdosproblems.com/816)
- [Er91] Erdős, P., *Problems and results in combinatorial analysis and combinatorial number
theory*. Graph theory, combinatorics, and applications, Vol. 1 (Kalamazoo, MI, 1988) (1991),
397-406.
- [ChMa25] K. Chen and J. Ma, *A problem of Erdős and Hajnal on paths with equal-degree
endpoints*. arXiv:2503.19569 (2025).
-/
@[expose] public section
open SimpleGraph
namespace Erdos816
open scoped Classical in
/--
`G` contains two vertices of the same degree which are joined by a path of length `3`.
-/
def HasEqualDegreePathThree {V : Type*} [Fintype V] (G : SimpleGraph V) : Prop :=
∃ u v : V, u ≠ v ∧ G.degree u = G.degree v ∧ ∃ p : G.Walk u v, p.IsPath ∧ p.length = 3
open scoped Classical in
set_option linter.style.formal_proof_palomar false in
/--
Let $G$ be a graph with $2n+1$ vertices and $n^2+n+1$ edges. Must $G$ contain two vertices of the
same degree which are joined by a path of length $3$?
A problem of Erdős and Hajnal. The example of $K_{n,n+1}$ shows that this fails if we only have
$n^2+n$ edges.
This is true, and was proved by Chen and Ma [ChMa25], who prove the stronger statement that,
provided $n\geq 600$, all graphs with $2n+1$ vertices and at least $n^2+n$ edges contain two
vertices of the same degree joined by a path of length $3$, except $K_{n,n+1}$.
For $n = 1$ the graph is a triangle, which contains no path of length $3$, so we assume $n \geq 2$.
-/
@[category research solved, question, AMS 5, formal_proof using lean4 at
"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos816.lean#L939"]
theorem erdos_816 : ∀ n : ℕ, 2 ≤ n → ∀ G : SimpleGraph (Fin (2 * n + 1)),
G.edgeFinset.card = n ^ 2 + n + 1 → HasEqualDegreePathThree G := by
sorry
open scoped Classical in
/--
Chen and Ma [ChMa25] proved that, provided $n\geq 600$, all graphs with $2n+1$ vertices and at
least $n^2+n$ edges contain two vertices of the same degree joined by a path of length $3$, except
$K_{n,n+1}$.
-/
@[category research solved, AMS 5]
theorem erdos_816.variants.chen_ma : ∀ n : ℕ, 600 ≤ n →
∀ G : SimpleGraph (Fin (2 * n + 1)), n ^ 2 + n ≤ G.edgeFinset.card →
¬ Nonempty (G ≃g completeBipartiteGraph (Fin n) (Fin (n + 1))) →
HasEqualDegreePathThree G := by
sorry
open scoped Classical in
/-- The example of $K_{n,n+1}$ shows that this fails if we only have $n^2+n$ edges. -/
@[category research solved, AMS 5]
theorem erdos_816.variants.complete_bipartite : ∀ n : ℕ,
(completeBipartiteGraph (Fin n) (Fin (n + 1))).edgeFinset.card = n ^ 2 + n ∧
¬ HasEqualDegreePathThree (completeBipartiteGraph (Fin n) (Fin (n + 1))) := by
sorry
end Erdos816
To prove it: keep every definition of Challenge.lean unchanged and prove Erdos816.erdos_816 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_erdos_816 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch erdos-816 nosorry submit erdos-816 nosorry/erdos-816/Solution.lean --wait
Formal variants
Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.
- erdos-816-variants-chen-ma — known result
- erdos-816-variants-complete-bipartite — 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.