File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,21 @@ lemma IsHamiltonian.length_support (hp : p.IsHamiltonian) : p.support.length = F
7676
7777end
7878
79+ /-- If a path `p` is Hamiltonian, then `p.support.get` defines an equivalence between
80+ `Fin p.support.length` and `α`. -/
81+ @[simps!]
82+ def IsHamiltonian.supportGetEquiv (hp : p.IsHamiltonian) : Fin p.support.length ≃ α :=
83+ p.support.getEquivOfForallCountEqOne hp
84+
85+ /-- If a path `p` is Hamiltonian, then `p.getVert` defines an equivalence between
86+ `Fin p.support.length` and `α`. -/
87+ @[simps]
88+ def IsHamiltonian.getVertEquiv (hp : p.IsHamiltonian) : Fin p.support.length ≃ α where
89+ toFun := p.getVert ∘ Fin.val
90+ invFun := hp.supportGetEquiv.invFun
91+ left_inv := p.getVert_comp_val_eq_get_support ▸ hp.supportGetEquiv.left_inv
92+ right_inv := p.getVert_comp_val_eq_get_support ▸ hp.supportGetEquiv.right_inv
93+
7994theorem isHamiltonian_iff_support_get_bijective : p.IsHamiltonian ↔ p.support.get.Bijective :=
8095 p.support.get_bijective_iff.symm
8196
You can’t perform that action at this time.
0 commit comments