Reindexing Marchal trees #
Equivalences of finite vertex sets transport both graphs and leaf labels. Swaps then place the leaf to be pruned, and optionally its neighbour, last.
noncomputable def
BGW.StableTrees.Marchal.LTree.reindex
{n m : ℕ}
(T : LTree n)
(e : Fin m ≃ Fin T.m)
:
LTree n
Transport a labelled tree along an equivalence from the new vertex set.
Equations
- T.reindex e = { m := m, G := SimpleGraph.comap (⇑e) T.G, tree := ⋯, labels := T.labels.trans e.symm.toEmbedding, leaf := ⋯, branch := ⋯ }
Instances For
Every state with two labelled leaves is the initial edge.
noncomputable def
BGW.StableTrees.Marchal.placeLast
{m M : ℕ}
(e : Fin (m + 1) ≃ Fin M)
(z : Fin M)
:
A swap places a specified vertex last under a given indexing equivalence.
Equations
- BGW.StableTrees.Marchal.placeLast e z = e.trans (Equiv.swap (e (Fin.last m)) z)
Instances For
noncomputable def
BGW.StableTrees.Marchal.placeLastTwo
{m M : ℕ}
(e : Fin (m + 2) ≃ Fin M)
(z u : Fin M)
:
Two swaps place distinct specified vertices at the midpoint and last indices.
Equations
- BGW.StableTrees.Marchal.placeLastTwo e z u = Equiv.trans (Equiv.swap (Fin.last m).castSucc ((BGW.StableTrees.Marchal.placeLast e z).symm u)) (BGW.StableTrees.Marchal.placeLast e z)