Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Mathlib/Combinatorics/SimpleGraph/Hamiltonian.lean
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ lemma IsHamiltonian.length_eq (hp : p.IsHamiltonian) : p.length = Fintype.card
rw [← length_support, ← List.sum_toFinset_count_eq_length, Finset.sum_congr rfl fun _ _ ↦ hp _,
← card_eq_sum_ones, hp.support_toFinset, card_univ]

/-- The length of the support of a Hamiltonian path equals the number of vertices of the graph. -/
lemma IsHamiltonian.support_length_eq (hp : p.IsHamiltonian) :
p.support.length = Fintype.card α := by
have : Inhabited α := ⟨a⟩
grind [Fintype.card_ne_zero, length_support, length_eq]

end

/-- A Hamiltonian cycle is a cycle that visits every vertex once. -/
Expand Down