model -- construct a Model

Synopsis

• Usage:
model(G,B,aut)
• Inputs:
• G, a list, the group elements
• B, a list, of lists of which group elements have identified parameters
• aut, a list, of pairs, assigning pairs of identified group elements to automorphisms of the group that switch the pair
• Outputs:
• an instance of the type Model,

Description

The elements of G must have an addition operation meaning that if two elements $g, h \in G$, then $g+h$ must work. The usual choices for G are the list of elements of $\mathbb{Z}/2$ or $(\mathbb{Z}/2)^2$.

 i1 : (a,b) = (0_(ZZ/2),1_(ZZ/2)) o1 = (0, 1) o1 : Sequence i2 : G = {{a,a}, {a,b}, {b,a}, {b,b}} o2 = {{0, 0}, {0, 1}, {1, 0}, {1, 1}} o2 : List

The elements of B are lists of the elements of G with the same parameter value.

In the following example, the first two elements of G receive distinct parameters, while the last two share a parameter. This is precisely the Kimura 2-parameter model.

 i3 : B = {{G#0}, {G#1}, {G#2,G#3}} o3 = {{{0, 0}}, {{0, 1}}, {{1, 0}, {1, 1}}} o3 : List

Finally, for every ordered pair of group elements sharing a parameter, aut must provide an automorphism of the group that switches those two group elements. In aut all of the group elements are identified by their index in $G$, and an automorphism is given by a list of permuted index values.

In our example, the pairs requiring an automorphism are \{2,3\} and \{3,2\}.

 i4 : aut = {({2,3}, {0,1,3,2}), ({3,2}, {0,1,3,2})} o4 = {({2, 3}, {0, 1, 3, 2}), ({3, 2}, {0, 1, 3, 2})} o4 : List i5 : model(G,B,aut) o5 = Model{AList => HashTable{{0, 0} => {1, 0, 0}} } {0, 1} => {0, 1, 0} {1, 0} => {0, 0, 1} {1, 1} => {0, 0, 1} Automorphisms => HashTable{{2, 3} => HashTable{{0, 0} => {0, 0}}} {0, 1} => {0, 1} {1, 0} => {1, 1} {1, 1} => {1, 0} {3, 2} => HashTable{{0, 0} => {0, 0}} {0, 1} => {0, 1} {1, 0} => {1, 1} {1, 1} => {1, 0} Buckets => {{{0, 0}}, {{0, 1}}, {{1, 0}, {1, 1}}} Group => {{0, 0}, {0, 1}, {1, 0}, {1, 1}} o5 : Model