FormalConjectures/Wikipedia/GracefulLabeling.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

3 declarations, 1 contain sorry, 0 declared as axioms

Graceful Tree Conjecture (Ringel–Kotzig conjecture)

Reference: Wikipedia/Graceful_labeling

Conjectured by Ringel (1963) and Kotzig; formalized by Rosa (1967).

Imports (1)
  1. lemma GracefulLabeling.graceful_tree_one_vertex line 35 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: SimpleGraph, Unit, Bot.bot, Nat, Finset.card, Sym2, SimpleGraph.edgeFinset, Exists, And, Function.Injective, LE.le, Eq, Finset, Finset.image, Equiv, Subtype, Sym2.lift, Subtype.mk, Int.natAbs, HSub.hSub and 3 more

    Proof uses: Exists.intro, And.intro, rfl, Nat.zero_le, of_eq_true, Eq.trans, EmptyCollection.emptyCollection, True, congr, congrArg, funext, CharP.cast_eq_zero, sub_self, congrFun', Subtype.mk.congr_simp, SimpleGraph.edgeFinset_bot, Finset.Icc_eq_empty_of_lt, LT.lt, eq_self

    66 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

    Open to load the checked before-and-after goal states.

  2. lemma GracefulLabeling.graceful_tree_two_vertex line 52 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: SimpleGraph, Fin, OfNat.ofNat, Nat, Top.top, Finset.card, Sym2, SimpleGraph.edgeFinset, Exists, And, Function.Injective, LE.le, Eq, Finset, Finset.image, Equiv, Subtype, Sym2.lift, Subtype.mk, Int.natAbs and 3 more

    Proof uses: Exists.intro, And.intro, Fin.val_injective, of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    48 instances, coercions and auxiliary constants left out.

    Tactic trace: 8 steps

    Open to load the checked before-and-after goal states.

  3. theorem GracefulLabeling.graceful_tree_conjecture Every tree admits a graceful labeling sorry line 77 source

    Source documentation

    Every tree admits a graceful labeling.

    A graceful labeling of a tree $T$ with $m$ edges is an injective map $f : V \to \{0, \dots, m\}$ such that the multiset of absolute differences $|f(u) - f(v)|$ over edges $\{u,v\}$ of $T$ equals $\{1, \dots, m\}$.

    depends on sorry what this means

    Statement uses: Fintype, DecidableEq, SimpleGraph, DecidableRel, SimpleGraph.Adj, SimpleGraph.IsTree, Nat, Finset.card, Sym2, SimpleGraph.edgeFinset, Exists, And, Function.Injective, LE.le, Eq, Finset, Finset.image, Equiv, Subtype, Sym2.lift and 6 more

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    30 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

    Open to load the checked before-and-after goal states.

    theorem graceful_tree_conjecture {V : Type*} [Fintype V] [DecidableEq V]
        (T : SimpleGraph V) [DecidableRel T.Adj] (hT : T.IsTree) :
        let m := T.edgeFinset.card
    …