# pRing -- Constructs the ring of probability coordinates

## Synopsis

• Usage:
S = pRing(T,M)
S = pRing(n,M)
• Inputs:
• T, an instance of the type LeafTree, A tree
• n, an integer, The number of leaves
• M, an instance of the type Model, The model (CNFmodel, JCmodel, etc)
• Outputs:
• S, a ring, The ring of probability coordinates

## Description

The probability coordinates for a phylogenetic tree model have one coordinate for each possible outcome of the model. A possible outcome is any labeling of the leaves of the tree by elements of the group G of the model. Thus the number of coordinates is |G|n where n is the number of leaves.

The variables use symbol p.

 ```i1 : pRing(4,CFNmodel) o1 = QQ[p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p ] 0,0,0,0 0,0,0,1 0,0,1,0 0,0,1,1 0,1,0,0 0,1,0,1 0,1,1,0 0,1,1,1 1,0,0,0 1,0,0,1 1,0,1,0 1,0,1,1 1,1,0,0 1,1,0,1 1,1,1,0 1,1,1,1 o1 : PolynomialRing``` ```i2 : pRing(3,JCmodel) o2 = QQ[p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p , p ] 0,0,0 0,0,1 0,0,2 0,0,3 0,1,0 0,1,1 0,1,2 0,1,3 0,2,0 0,2,1 0,2,2 0,2,3 0,3,0 0,3,1 0,3,2 0,3,3 1,0,0 1,0,1 1,0,2 1,0,3 1,1,0 1,1,1 1,1,2 1,1,3 1,2,0 1,2,1 1,2,2 1,2,3 1,3,0 1,3,1 1,3,2 1,3,3 2,0,0 2,0,1 2,0,2 2,0,3 2,1,0 2,1,1 2,1,2 2,1,3 2,2,0 2,2,1 2,2,2 2,2,3 2,3,0 2,3,1 2,3,2 2,3,3 3,0,0 3,0,1 3,0,2 3,0,3 3,1,0 3,1,1 3,1,2 3,1,3 3,2,0 3,2,1 3,2,2 3,2,3 3,3,0 3,3,1 3,3,2 3,3,3 o2 : PolynomialRing```