% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\GroupPresentationXmpTitle}{GroupPresentation}
\newcommand{\GroupPresentationXmpNumber}{9.34}
%
% =====================================================================
\begin{page}{GroupPresentationXmpPage}{9.34 GroupPresentation}
% =====================================================================
\beginscroll
The domain \spadtype{GroupPresentation} implements group
presentations.

\xtc{
We first expose it to simplify notation.
}{
\spadpaste{)expose GroupPresentation}
}

\xtc{
We create cyclic group.
}{
\spadpaste{c3 := groupPresentation([1], [[1, 1, 1]]) \bound{c3}}
}

\xtc{
And we convert it to \spadtype{PermutationGroup} using Todd-Coxeter
coset enumeration.
}{
\spadpaste{toPermutationIfCan(c3)}
}

For nicer input there is package \spadtype{GroupPresentationFunctions1}.

\xtc{
We first assign generators of free group to variables.
}{
\spadpaste{fG := FreeGroup(Symbol) \bound{fG}}
}
\xtc{
}{
\spadpaste{a := (^$fG)('a, 1) \free{fG} \bound{a}}
}
\xtc{
}{
\spadpaste{b := (^$fG)('b, 1) \free{fG} \bound{b}}
}
\xtc{
}{
\spadpaste{c := (^$fG)('c, 1) \free{fG} \bound{c}}
}

\xtc{
Now we give presentation of Mathieu group M12.
}{
\spadpaste{m12f := [a^11, b^2, c^2, (a*b)^3, (a*c)^3, (b*c)^10, a^2*(b*c)^2*a*(b*c)^(-2)] \free{a b c} \bound{m11f}}
}
\xtc{
}{
\spadpaste{cP := GroupPresentationFunctions1(Symbol) \bound{cP}}
}
\xtc{
}{
\spadpaste{m12pres := convert(['a, 'b, 'c], m12f)$cP \free{m12f cP} \bound{m12pres}}
}
\xtc{
And convert it to permutation group.  Since Mathieu group has
many elements we compute representation on cosets of group
generated by \spad{a} and \spad{b}.
}{
\spadpaste{m12per := toPermutationIfCan(m12pres, [[1], [2]], false) \free{m12pres} \bound{m12per}}
}

\xtc{
To check the result we compute order.
}{
\spadpaste{order(m12per::PermutationGroup(Integer))}
}
\endscroll
\autobuttons
\end{page}
%
