# phyloToricFP -- compute the invariants of a group-based phylogenetic model with toric fiber products

## Synopsis

• Usage:
phyloToricFP(T,M)
phyloToricFP(n,E,M)
• Inputs:
• T, an instance of the type LeafTree,
• n, an integer, the number of leaves
• E, an instance of the type LeafTree, the internal edges of the tree, given by one part of the bipartition on leaves
• M, an instance of the type Model,
• Optional inputs:
• QRing => ..., default value null, optional argument to specify Fourier coordinate ring
• Outputs:

## Description

This function computes the invariants of a group-based phylogenetic tree model based on Theorem 24 of the paper Toric Ideals of Phylogenetic Invariants by Sturmfels and Sullivant.

Invariants are formed in three different ways. The linear and quadratic invariants are computed as in phyloToricLinears and phyloToricQuads respectively. Finally higher degree invariants are built using a toric fiber product construction from the invariants of claw trees.

 i1 : T = leafTree(4, {{0,1}}) o1 = {{0, 1, 2, 3}, {set {0, 1}, set {0}, set {1}, set {2}, set {3}}} o1 : LeafTree i2 : phyloToricFP(T, CFNmodel) o2 = ideal (- q q + q q , q q - 0,0,1,1 1,1,0,0 0,0,0,0 1,1,1,1 0,0,1,1 1,1,0,0 ------------------------------------------------------------------------ q q , q q - q q , - 0,0,0,0 1,1,1,1 0,0,1,1 1,1,0,0 0,0,0,0 1,1,1,1 ------------------------------------------------------------------------ q q + q q , - q q + 0,0,1,1 1,1,0,0 0,0,0,0 1,1,1,1 0,1,1,0 1,0,0,1 ------------------------------------------------------------------------ q q , q q - q q , q q 0,1,0,1 1,0,1,0 0,1,1,0 1,0,0,1 0,1,0,1 1,0,1,0 0,1,1,0 1,0,0,1 ------------------------------------------------------------------------ - q q , - q q + q q ) 0,1,0,1 1,0,1,0 0,1,1,0 1,0,0,1 0,1,0,1 1,0,1,0 o2 : Ideal of QQ[q , q , q , q , q , q , q , q ] 0,0,0,0 0,0,1,1 0,1,0,1 0,1,1,0 1,0,0,1 1,0,1,0 1,1,0,0 1,1,1,1