Multi-tree insertion on rose trees #
This file defines the insertion of several guest trees into a host. For a host T and guests
gs, insertion T gs is the multiset, over all assignments of the guests to vertices of T, of
the trees obtained by grafting every guest at its vertex at once (multiGraft); insertionForest
does the same for a host forest. This is the Guin–Oudom extension of the grafting pre-Lie product
to several guests, in the form Foissy gives for decorated trees.
Main definitions #
insertion,insertionForest: multi-tree insertion into a tree and into a forest.
Main results #
insertion_node,insertionForest_cons,insertionForest_append: the guests split between the root and the children, or between two parts of the host forest.insertionForest_bind_revzip_sublists': splitting an output forest splits the hosts and the guests, each guest following its host.insertion_node_msform,insertionForest_cons_msform: the two recursions read throughUnorderedTree.mk.
References #
Assignments of guests to vertices #
An assignment of n guests to the vertices xs is a section of replicate n xs, a word of
length n over xs.
insertion T [T₁, …, Tₙ] is the multiset, over (v₁, …, vₙ) ∈ V(T)ⁿ, of
multiGraft T [(v₁, T₁), …, (vₙ, Tₙ)].
Equations
- T.insertion Ts = ↑(List.map (fun (choice : List (List ℕ)) => T.multiGraft (choice.zip Ts)) (List.replicate Ts.length T.vertices).sections)
Instances For
insertionForest: forest host #
insertionForest cs gs is the multiset, over assignments of the guests gs to vertices of
the forest cs, of the simultaneous grafts multiGraftChildren.
Equations
- RoseTree.insertionForest cs gs = ↑(List.map (fun (ch : List (List ℕ)) => RoseTree.multiGraftChildren cs (ch.zip gs)) (List.replicate gs.length (RoseTree.verticesList cs)).sections)
Instances For
Every output of insertionForest cs gs has as many trees as cs.
In a forest host, the first tree takes a sublist of the guests and the other trees take the complement.
In a concatenated host, the guests split into a sublist for the left forest and its complement for the right one.
Splits of an output list are splits of the hosts and of the guests, each guest following its
host. Stated in continuation form over a function K of the two parts.
In a node host, the guests split into a sublist prepended at the root, in guest order, and its complement grafted into the child forest.
Reading the recursion through UnorderedTree.mk #
insertion_node and insertionForest_cons with every output read through UnorderedTree.mk,
the form in which UnorderedTree.insertion_mk matches them against the nonplanar recursion.
The host-forest recursion under mk.
The node-host decomposition under mk.
Singleton hosts and empty guest lists #
Inserting no guests leaves the host unchanged.
Inserting into a one-tree forest is inserting into that tree.