We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
p.getVert
1 parent bba67ba commit 5d6602eCopy full SHA for 5d6602e
1 file changed
Mathlib/Combinatorics/SimpleGraph/Hamiltonian.lean
@@ -74,6 +74,13 @@ end
74
theorem isHamiltonian_iff_support_get_bijective : p.IsHamiltonian ↔ (p.support.get ·).Bijective :=
75
p.support.get_bijective_iff.symm
76
77
+theorem IsHamiltonian.getVert_surjective (hp : p.IsHamiltonian) : (p.getVert ·).Surjective := by
78
+ intro v
79
+ have ⟨n, h⟩ := List.mem_iff_get.mp <| p.support.one_le_count_iff.mp <| le_of_eq <| hp v |>.symm
80
+ refine ⟨n, p.getVert_eq_support_getElem ?_ |>.trans h⟩
81
+ have := p.length_support
82
+ cutsat
83
+
84
/-- A Hamiltonian cycle is a cycle that visits every vertex once. -/
85
structure IsHamiltonianCycle (p : G.Walk a a) : Prop extends p.IsCycle where
86
isHamiltonian_tail : p.tail.IsHamiltonian
0 commit comments