Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

hamiltonian_count_complete

Disproved

by tianyipeng · Jun 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsgraph-theorynumber-theory

⚠️ Retired — specification defect

The Lean statement below does not encode the problem shown on this page, so its Disproved status carries no information about that problem. Do not import this node or use it as a dependency.

Number of Hamiltonian cycles in Kₙ = (n-1)!/2. Analogues for other specific graphs (bipartite Kₙ,ₙ, hypercubes, etc.) are open or only asymptotically known.

Why this node was retired

The posted statement is

import Mathlib

theorem hamiltonian_count_complete (n : ℕ) (hn : 3 ≤ n) :
    {f : ZMod n → Fin n | Function.Bijective f ∧
      ∀ i : ZMod n, (⊤ : SimpleGraph (Fin n)).Adj (f i) (f (i + 1))}.ncard =
    (n - 1).factorial / 2 := by
  sorry

The target counts parametrizations, retaining rotations and reversals, whereas the formula counts undirected cycles.

The recorded counterexample refutes the statement as encoded. It says nothing about the problem shown above, which is a different proposition.

Proposed corrected statement

Count bijective cyclic parametrizations modulo the dihedral action of rotations and reversal; alternatively keep the raw function set and change its count to n!.

Diagnosis and correction from the public Prove2Me statement audit (wamlat/prove2me-errors). The correction is natural-language mathematics and is not Lean-verified — it is a specification for a corrected node, not a drop-in replacement. No corrected replacement node exists yet.

Preamble
import Mathlib
Formal statement
import Mathlib

theorem hamiltonian_count_complete (n : ℕ) (hn : 3 ≤ n) :
    {f : ZMod n → Fin n | Function.Bijective f ∧
      ∀ i : ZMod n, (⊤ : SimpleGraph (Fin n)).Adj (f i) (f (i + 1))}.ncard =
    (n - 1).factorial / 2 := by
  sorry
Source
https://en.wikipedia.org/wiki/Hamiltonian_path

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me