Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Alspach's conjecture on cycle decompositions of complete graphs (1981; proved 2014)

Source:Wikipedia lists of open problems
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Alspach's conjecture (1981), proved by Bryant, Horsley and Pettersson (2014).

Let nn be odd and let m1,…,mtm_1, \dots, m_t be integers with 3≤mi≤n3 \le m_i \le n and m1+⋯+mt=(n2)m_1 + \dots + m_t = \binom{n}{2}. Then the complete graph KnK_n decomposes into cycles of lengths m1,…,mtm_1, \dots, m_t. (These conditions are clearly necessary: KnK_n has all degrees even only for odd nn, and its edges must be split exactly among the cycles.)

Subjects:Combinatorics (math.CO)
MSC classes:05
Cite as:NS.07621 [math.CO] · NS.07621v1 for this version
Declaration:AlspachConjecture.alspach_conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:65b00c2b67319542c7ad0271978b6ab577d23b8efac76f3c451421596fee498d
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/AlspachConjecture.lean

Formal statement

theorem alspach_conjecture :
    ∀ (n : ℕ), Odd n → ∀ m : Multiset ℕ, (∀ x ∈ m, 3 ≤ x ∧ x ≤ n) → m.sum = n.choose 2 →
      ∃ C : Multiset (Cycle (completeGraph (Fin n))),
        IsCycleDecomposition (completeGraph (Fin n)) C ∧ lengths C = m
Show the full Challenge.lean (193 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Alspach's conjecture on cycle decompositions of complete graphs (1981; proved 2014)

*References:*
* [Wikipedia](https://en.wikipedia.org/wiki/Alspach%27s_conjecture)
* [Al81] Alspach, B. (1981). "Research problems, Problem 3." *Discrete Math.* 36, p. 333.
* [BHP14] Bryant, D., Horsley, D. and Pettersson, W. (2014). "Cycle decompositions V:
  Complete graphs into cycles of arbitrary lengths." *Proc. London Math. Soc.* 108,
  pp. 1153--1192. [arXiv:1204.3709](https://arxiv.org/abs/1204.3709)
* [GJKKO21] Glock, S., Joos, F., Kim, J., Kühn, D. and Osthus, D. (2021). "Resolution of the
  Oberwolfach problem." *J. Eur. Math. Soc.* 23, pp. 2511--2547.
  [arXiv:1806.04644](https://arxiv.org/abs/1806.04644)
-/

@[expose] public section

open SimpleGraph Finset

namespace AlspachConjecture

variable {V : Type*} [Fintype V] [DecidableEq V]

open Classical in
/-- A multiset of cycles `C` is a **cycle decomposition** of `G` if every edge of `G` lies on
exactly one of the cycles. -/
def IsCycleDecomposition (G : SimpleGraph V) [DecidableRel G.Adj] (C : Multiset (Cycle G)) :
    Prop :=
  ∀ e ∈ G.edgeFinset, (C.filter fun c => e ∈ c.edges).card = 1

/-- The multiset of cycle lengths of a family of cycles. -/
def lengths {G : SimpleGraph V} (C : Multiset (Cycle G)) : Multiset ℕ :=
  C.map SimpleGraph.Cycle.length

/--
**Alspach's conjecture (1981), proved by Bryant, Horsley and Pettersson (2014).**

Let $n$ be odd and let $m_1, \dots, m_t$ be integers with $3 \le m_i \le n$ and
$m_1 + \dots + m_t = \binom{n}{2}$. Then the complete graph $K_n$ decomposes into cycles of
lengths $m_1, \dots, m_t$. (These conditions are clearly necessary: $K_n$ has all degrees even
only for odd $n$, and its edges must be split exactly among the cycles.)
-/
@[category research solved, AMS 5]
theorem alspach_conjecture :
    ∀ (n : ℕ), Odd n → ∀ m : Multiset ℕ, (∀ x ∈ m, 3 ≤ x ∧ x ≤ n) → m.sum = n.choose 2 →
      ∃ C : Multiset (Cycle (completeGraph (Fin n))),
        IsCycleDecomposition (completeGraph (Fin n)) C ∧ lengths C = m := by
  sorry

open Classical in
/--
**The even case (Bryant–Horsley–Pettersson 2014).**

For even $n$, the complete graph minus a perfect matching, $K_n - I$, decomposes into cycles of
lengths $m_1, \dots, m_t$ whenever $3 \le m_i \le n$ and $\sum m_i = \binom{n}{2} - n/2$.
Since Mathlib has no canonical perfect matching of $K_n$, we state this for any perfect
matching `I`.

*Reference:* [BHP14].
-/
@[category research solved, AMS 5]
theorem alspach_conjecture.variants.even (n : ℕ) (hn : Even n)
    (I : (completeGraph (Fin n)).Subgraph) (hI : I.IsPerfectMatching)
    (m : Multiset ℕ) (hm : ∀ x ∈ m, 3 ≤ x ∧ x ≤ n) (hsum : m.sum = n.choose 2 - n / 2) :
    ∃ C : Multiset (Cycle (completeGraph (Fin n) \ I.spanningCoe)),
      IsCycleDecomposition (completeGraph (Fin n) \ I.spanningCoe) C ∧ lengths C = m := by
  sorry

/--
A long-cycle corollary of the Alspach theorem (Bryant–Horsley–Pettersson 2014).

For odd $n$, the conjecture holds whenever all the prescribed lengths $m_i$ are at least
$\lceil(n+4)/2\rceil$. This follows from [BHP14, Theorem 1].
-/
@[category research solved, AMS 5]
theorem alspach_conjecture.variants.long_cycles (n : ℕ) (hn : Odd n) (m : Multiset ℕ)
    (hm : ∀ x ∈ m, (n + 5) / 2 ≤ x ∧ x ≤ n) (hsum : m.sum = n.choose 2) :
    ∃ C : Multiset (Cycle (completeGraph (Fin n))),
      IsCycleDecomposition (completeGraph (Fin n)) C ∧ lengths C = m := by
  sorry

/-- The empty family decomposes an edgeless graph. -/
@[category API, AMS 5]
lemma isCycleDecomposition_zero {G : SimpleGraph V} [DecidableRel G.Adj]
    (h : G.edgeFinset = ∅) : IsCycleDecomposition G 0 :=
  fun e he => by simp [h] at he

/--
**The case $n = 1$.**

$K_1$ has no edges, so the only admissible multiset of lengths is empty and the empty
decomposition works.
-/
@[category test, AMS 5]
theorem alspach_conjecture.variants.one (m : Multiset ℕ) (hm : ∀ x ∈ m, 3 ≤ x ∧ x ≤ 1)
    (hsum : m.sum = Nat.choose 1 2) :
    ∃ C : Multiset (Cycle (completeGraph (Fin 1))),
      IsCycleDecomposition (completeGraph (Fin 1)) C ∧ lengths C = m := by
  have hm0 : m = 0 := by
    rw [Multiset.eq_zero_iff_forall_notMem]
    intro x hx
    have := hm x hx
    omega
  subst hm0
  refine ⟨0, isCycleDecomposition_zero ?_, Multiset.map_zero _⟩
  decide

/-- The triangle `0 → 1 → 2 → 0` as a cycle of `K₃`. -/
def triangle : Cycle (completeGraph (Fin 3)) where
  base := 0
  walk := Walk.cons (by decide : (completeGraph (Fin 3)).Adj 0 1)
    (Walk.cons (by decide : (completeGraph (Fin 3)).Adj 1 2)
      (Walk.cons (by decide : (completeGraph (Fin 3)).Adj 2 0) Walk.nil))
  isCycle := by
    rw [Walk.isCycle_def, Walk.isTrail_def]
    exact ⟨by decide, by simp, by decide⟩

/--
**The case $n = 3$.**

$K_3$ has three edges, so the only admissible multiset of lengths is $\{3\}$, realised by the
triangle itself.
-/
@[category test, AMS 5]
theorem alspach_conjecture.variants.three (m : Multiset ℕ) (hm : ∀ x ∈ m, 3 ≤ x ∧ x ≤ 3)
    (hsum : m.sum = Nat.choose 3 2) :
    ∃ C : Multiset (Cycle (completeGraph (Fin 3))),
      IsCycleDecomposition (completeGraph (Fin 3)) C ∧ lengths C = m := by
  -- Every element of `m` is `3`, and the sum is `3`, so `m = {3}`.
  have hm3 : m = Multiset.replicate m.card 3 := by
    rw [Multiset.eq_replicate]; exact ⟨rfl, fun x hx => le_antisymm (hm x hx).2 (hm x hx).1⟩
  have hcard : m.card = 1 := by
    have := hsum; rw [hm3, Multiset.sum_replicate, smul_eq_mul] at this; simp at this; omega
  rw [hm3, hcard, Multiset.replicate_one]
  refine ⟨{triangle}, fun e he => ?_, by simp [lengths, triangle]; decide⟩
  rw [Multiset.filter_singleton]
  split_ifs with h
  · rfl
  · exfalso
    apply h
    have he' : e ∈ (completeGraph (Fin 3)).edgeSet := mem_edgeFinset.mp he
    induction e using Sym2.ind with
    | h a b =>
      rw [mem_edgeSet, completeGraph_eq_top, top_adj] at he'
      fin_cases a <;> fin_cases b <;> first | exact absurd rfl he' | decide

/-- The exceptional Oberwolfach $2$-factor `C₄ + C₅` on nine vertices. -/
def oberwolfachException9 : SimpleGraph (Fin 4 ⊕ Fin 5) :=
  cycleGraph 4 ⊕g cycleGraph 5

/-- The exceptional Oberwolfach $2$-factor `C₃ + C₃ + C₅` on eleven vertices. -/
def oberwolfachException11 : SimpleGraph ((Fin 3 ⊕ Fin 3) ⊕ Fin 5) :=
  (cycleGraph 3 ⊕g cycleGraph 3) ⊕g cycleGraph 5

/--
**The Oberwolfach problem (Ringel 1967).**

For odd $n$ and a $2$-regular graph $F$ on $n$ vertices, can $K_n$ be decomposed into
$(n-1)/2$ spanning subgraphs isomorphic to $F$? The decomposition is known to be impossible for
exactly two pairs with odd $n$ — $(9, C_4 + C_5)$ and $(11, C_3 + C_3 + C_5)$ — and is
conjectured to exist in every other case. Known for all sufficiently large $n$ [GJKKO21].
-/
@[category research open, AMS 5]
theorem alspach_conjecture.variants.oberwolfach :
    ∀ (n : ℕ), Odd n → 3 ≤ n →
      ∀ (F : SimpleGraph (Fin n)) [DecidableRel F.Adj], (∀ v, F.degree v = 2) →
      IsEmpty (F ≃g oberwolfachException9) → IsEmpty (F ≃g oberwolfachException11) →
      ∃ D : Fin ((n - 1) / 2) → SimpleGraph (Fin n),
        (∀ i, Nonempty (D i ≃g F)) ∧
        ∀ u v, (completeGraph (Fin n)).Adj u v ↔ ∃! i, (D i).Adj u v := by
  sorry

end AlspachConjecture

To prove it: keep every definition of Challenge.lean unchanged and prove AlspachConjecture.alspach_conjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_alspach_conjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch wikipedia-alspachconjecture
nosorry submit wikipedia-alspachconjecture nosorry/wikipedia-alspachconjecture/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.