Reflection of finite plane trees #
Mirroring reverses the children at every vertex, preserving sizes and offspring weights.
Mirror image of a plane tree: the children of every vertex in reverse order
(mirror (node ts) = node (ts.map mirror).reverse).
Equations
- BGW.PlaneTree.mirror = BGW.PlaneTree.fold fun (ts : List BGW.PlaneTree) => BGW.PlaneTree.node ts.reverse