Functions involving combinations of trees

Grafting

pybs.combinations.functions.graft(other, base)[source]

Grafting other \(\curvearrowright\) base.

pybs.combinations.functions.tree_commutator(op1, op2)[source]

Return \(op1 \curvearrowright op2 - op2 \curvearrowright op1\) as a LinearCombination.

pybs.combinations.functions.linCombCommutator(op1, op2, max_order=None)[source]

Tree commutator for linear combinations of trees.

Splitting

pybs.combinations.functions.split(tree, truncate=False)[source]

Return the splittings of a tree as a linear combination.

The return value is a linear combination of tuples. The 0th element is the cutting, the 1st element is the subtree. Both elements are UnorderedTree, except if it is the empty tree.

pybs.combinations.functions._split(tree)[source]

Return the splitting of tree except for \(tree \otimes \emptyset\).

Used by split().

pybs.combinations.functions.symp_split(tree)[source]

Perform the split needed for symplecticity checks.

It differs from the split-function by only splitting off leaves.

Coproduct and Antipode

pybs.combinations.functions.subtrees(tree)[source]

Return the HCK coproduct.

This is function does the heavy lifting when composing B-series. The return value is a LinearCombination of 2 tuples. The 0th element in the tuples are the forests of cutting, while the 1st element is the subtree.

pybs.combinations.functions.antipode_ck(tree)[source]

Return the antipode in the Butcher, Connes, Kreimer Hopf-algebra.

pybs.combinations.functions._subtrees_for_antipode(tree)[source]

Slightly modified edition of subtrees used by antipode_ck

Does not include \(\tau \otimes \emptyset\) and \(\emptyset \otimes \tau\).