# LeafTree -- a tree described in terms of its leaves

## Description

A tree can be described in terms of its leaves by specifying a leaf set and specifying the edges as partitions of the leaf set. This leaf centric description is particularly useful for phylogenetic trees.

The main constructor method is leafTree.

 i1 : T = leafTree({a,b,c,d},{{a,b}}) o1 = {{a, b, c, d}, {set {a, b}, set {a}, set {b}, set {c}, set {d}}} o1 : LeafTree i2 : leaves T o2 = set {a, b, c, d} o2 : Set i3 : edges T o3 = {set {a, b}, set {a}, set {b}, set {c}, set {d}} o3 : List i4 : G = graph{{a,e},{b,e},{e,f},{c,f},{d,f}} o4 = Graph{a => {e} } b => {e} c => {f} d => {f} e => {a, b, f} f => {e, c, d} o4 : Graph i5 : leafTree G o5 = {{a, b, c, d}, {set {a, b}, set {a}, set {b}, set {c}, set {d}}} o5 : LeafTree

## Methods that use an object of class LeafTree :

• digraph(LeafTree,List) -- convert a LeafTree to a Digraph
• "digraph(LeafTree,Set)" -- see digraph(LeafTree,List) -- convert a LeafTree to a Digraph
• "edgeContract(LeafTree,List)" -- see edgeContract -- contract an edge of a tree
• "edgeContract(LeafTree,Set)" -- see edgeContract -- contract an edge of a tree
• "edgeCut(LeafTree,List,Thing)" -- see edgeCut -- break up a tree at an edge
• "edgeCut(LeafTree,Set,Thing)" -- see edgeCut -- break up a tree at an edge
• edges(LeafTree) -- list the edges of a tree
• graph(LeafTree) -- convert a LeafTree to Graph
• "internalEdges(LeafTree)" -- see internalEdges -- list the internal edges of a tree
• "internalVertices(LeafTree)" -- see internalVertices -- list the internal vertices of a tree
• "isIsomorphic(LeafTree,LeafTree)" -- see isIsomorphic -- check isomorphism of two tree
• "leafColorings(LeafTree,Model)" -- see leafColorings -- list the consistent colorings of a tree
• "LeafTree == LeafTree"
• leaves(LeafTree) -- list the leaves of a tree
• "phyloToric42(LeafTree,Model)" -- see phyloToric42 -- compute the invariants of a group-based phylogenetic model with 4ti2
• "phyloToricAMatrix(LeafTree,Model)" -- see phyloToricAMatrix -- construct the design matrix of a group-based phylogenetic model
• "phyloToricFP(LeafTree,Model)" -- see phyloToricFP -- compute the invariants of a group-based phylogenetic model with toric fiber products
• "phyloToricLinears(LeafTree,Model)" -- see phyloToricLinears -- compute the linear invariants of a group-based phylogenetic model