graceful_tree_conjecture
Openalgebracombinatoricsconjecturegraph-labelinggraph-theory
Graceful tree conjecture (Ringel 1963, Rosa 1967): Every tree with n edges has a graceful labeling: a bijection f from vertices to {0,...,n} where the edge labels |f(u)-f(v)| are all distinct.
Preamble
import Mathlib
Formal statement
import Mathlib
theorem graceful_tree_conjecture (V : Type*) [Fintype V] [DecidableEq V]
(T : SimpleGraph V) [DecidableRel T.Adj]
(hT : T.IsTree) :
let n := T.edgeFinset.card
∃ f : V → Fin (n + 1),
Function.Injective f ∧
(T.edgeFinset.image (fun e =>
max (f e.out.1).val (f e.out.2).val -
min (f e.out.1).val (f e.out.2).val)).card = n := by
sorrySource