Finitely Presented Groups A finitely presented group (in short: FpGroup) is a group generated by a finite set of abstract generators subject to a finite set of relations that these generators satisfy. Every finite group can be represented as a finitely presented group, though in almost all cases it is computationally much more efficient to work in another representation (even the regular permutation representation).

Finitely presented groups are obtained by factoring a free group by a set of relators. Their elements know about this presentation and compare accordingly.

So to create a finitely presented group you first have to generate a free group (see  for details). There are two ways to specify a quotient of the free group: either by giving a list of relators or by giving a list of equations. Relators are just words in the generators of the free group. Equations are represented as pairs of words in the generators of the free group. In either case the generators of the quotient are the images of the free generators under the canonical homomorphism from the free group onto the quotient. So for example to create the group \langle a, b \mid a^2, b^3, (a b)^5 \rangle you can use the following commands: f := FreeGroup( "a", "b" );; gap> g := f / [ f.1^2, f.2^3, (f.1*f.2)^5 ]; gap> h := f / [ [f.1^2, f.1^0], [f.2^3, f.1^0], [(f.1*f.2)^4, f.2^-1*f.1^-1] ]; ]]>

Note that you cannot call the generators by their names. These names are not variables, but just display figures. So, if you want to access the generators by their names, you first have to introduce the respective variables and to assign the generators to them.

Unbind(a); gap> GeneratorsOfGroup( g ); [ a, b ] gap> a; Error, Variable: 'a' must have a value gap> a := g.1;; b := g.2;; # assign variables gap> GeneratorsOfGroup( g ); [ a, b ] gap> a in f; false gap> a in g; true ]]>

To relieve you of the tedium of typing the above assignments, when working interactively, there is the function .

Note that the generators of the free group are different from the generators of the FpGroup (even though they are displayed by the same names). That means that words in the generators of the free group are not elements of the finitely presented group. Vice versa elements of the FpGroup are not words.

a*b = b*a; false gap> (b^2*a*b)^2 = a^0; true ]]>

Such calculations comparing elements of an FpGroup may run into problems: There exist finitely presented groups for which no algorithm exists (it is known that no such algorithm can exist) that will tell for two arbitrary words in the generators whether the corresponding elements in the FpGroup are equal.

Therefore the methods used by ⪆ to compute in finitely presented groups may run into warning errors, run out of memory or run forever. If the FpGroup is (by theory) known to be finite the algorithms are guaranteed to terminate (if there is sufficient memory available), but the time needed for the calculation cannot be bounded a priori. See and .

(b^2*a*b)^2; (b^2*a*b)^2 gap> a^0; ]]>

A consequence of our convention is that elements of finitely presented groups are not printed in a unique way. See also .

IsSubgroupFpGroup and IsFpGroup <#Include Label="IsSubgroupFpGroup"> <#Include Label="IsFpGroup"> <#Include Label="InfoFpGroup">
Creating Finitely Presented Groups quotient creates a finitely presented group given by the presentation \langle gens \mid rels \rangle or \langle gens \mid eqns \rangle, respectively where gens are the free generators of the free group F. Relations can be entered either as words or as pairs of words in the generators of F. In the former case we refer to the words given as relators, in the latter we refer to the pairs of words as equations. The two methods can currently not be mixed.

The same result is obtained with the infix operator /, i.e., as F / rels.

f := FreeGroup( 3 );; gap> f / [ f.1^4, f.2^3, f.3^5, f.1*f.2*f.3 ]; gap> f / [ [ f.1^4, f.1^0 ], [ f.2^3, f.1^0 ], [ f.1, f.2^-1*f.3^-1 ] ]; ]]> <#Include Label="FactorGroupFpGroupByRels"> <#Include Label="ParseRelators"> <#Include Label="StringFactorizationWord">

Comparison of Elements of Finitely Presented Groups equality Two elements of a finitely presented group are equal if they are equal in this group. Nevertheless they may be represented as different words in the generators. Because of the fundamental problems mentioned in the introduction to this chapter such a test may take very long and cannot be guaranteed to finish.

The method employed by &GAP; for such an equality test use the underlying finitely presented group. First (unless this group is known to be infinite) &GAP; tries to find a faithful permutation representation by a bounded Todd-Coxeter. If this fails, a Knuth-Bendix (see ) is attempted and the words are compared via their normal form.

If only elements in a subgroup are to be tested for equality it thus can be useful to translate the problem in a new finitely presented group by rewriting (see );

The equality test of elements underlies many basic calculations, such as the order of an element, and the same type of problems can arise there. In some cases, working with rewriting systems can still help to solve the problem. The kbmag package provides such functionality, see the package manual for further details. smaller Compared with equality testing, problems get even worse when trying to compute a total ordering on the elements of a finitely presented group. As any ordering that is guaranteed to be reproducible in different runs of &GAP; or even with different groups given by syntactically equal presentations would be prohibitively expensive to implement, the ordering of elements is depending on a method chosen by &GAP; and not guaranteed to stay the same when repeating the construction of an FpGroup. The only guarantee given for the < ordering for such elements is that it will stay the same for one family during its lifetime. The attribute is used to obtain a comparison function for a family of FpGroup elements. <#Include Label="FpElmComparisonMethod"> <#Include Label="SetReducedMultiplication">

Preimages in the Free Group <#Include Label="FreeGroupOfFpGroup"> <#Include Label="FreeGeneratorsOfFpGroup"> <#Include Label="RelatorsOfFpGroup"> Let elm be an element of a group whose elements are represented as words with further properties. Then returns the word from the free group that is used as a representative for elm.

w := g.1*g.2; a*b gap> IsWord( w ); false gap> ue := UnderlyingElement( w ); a*b gap> IsWord( ue ); true ]]> <#Include Label="ElementOfFpGroup">

Operations for Finitely Presented Groups Finitely presented groups are groups and so all operations for groups should be applicable to them (though not necessarily efficient methods are available). Most methods for finitely presented groups rely on coset enumeration. See  for details.

The command can be used to obtain a faithful permutation representation, if such a representation of small degree exists. (Otherwise it might run very long or fail.) f := FreeGroup( "a", "b" ); gap> g := f / [ f.1^2, f.2^3, (f.1*f.2)^5 ]; gap> h := IsomorphismPermGroup( g ); [ a, b ] -> [ (1,2)(3,5), (2,3,4) ] gap> u:=Subgroup(g,[g.1*g.2]);;rt:=RightTransversal(g,u); RightTransversal(,Group([ a*b ])) gap> Image(ActionHomomorphism(g,rt,OnRight)); Group([ (1,2)(3,4)(5,7)(6,8)(9,10)(11,12), (1,3,2)(4,5,6)(7,8,9)(10,11,12) ]) ]]> The default algorithm for makes little sense for finitely presented or free groups, as it produces words that are extremely long.

By specifying the option radius, instead elements are taken as words in the generators of F in the ball of radius l with equal distribution in the free group.

PseudoRandom(g:radius:=20); a^3*b^2*a^-2*b^-1*a*b^-4*a*b^-1*a*b^-4 ]]>

Coset Tables and Coset Enumeration Coset enumeration (see for an explanation) is one of the fundamental tools for the examination of finitely presented groups. This section describes &GAP; functions that can be used to invoke a coset enumeration.

Note that in addition to the built-in coset enumerator there is the &GAP; package ACE. Moreover, &GAP; provides an interactive Todd-Coxeter in the &GAP; package ITC which is based on the XGAP package. <#Include Label="CosetTable"> <#Include Label="TracedCosetFpGroup"> returns the action of G on the cosets of its subgroup H.

u := Subgroup( g, [ g.1, g.1^g.2 ] ); Group([ a, b^-1*a*b ]) gap> FactorCosetAction( g, u ); [ a, b ] -> [ (2,4)(5,6), (1,2,3)(4,5,6) ] ]]> <#Include Label="CosetTableBySubgroup"> <#Include Label="CosetTableFromGensAndRels"> <#Include Label="CosetTableDefaultMaxLimit"> <#Include Label="CosetTableDefaultLimit"> <#Include Label="MostFrequentGeneratorFpGroup"> <#Include Label="IndicesInvolutaryGenerators">

Standardization of coset tables For any two coset numbers i and j with i < j the first occurrence of i in a coset table precedes the first occurrence of j with respect to the usual row-wise ordering of the table entries. Following the notation of Charles Sims' book on computation with finitely presented groups we call such a table a standard coset table.

The table entries which contain the first occurrences of the coset numbers i > 1 recursively provide for each i a representative of the corresponding coset in form of a unique word w_i in the generators and inverse generators of G. The first coset (which is H itself) can be represented by the empty word w_1. A coset table is standard if and only if the words w_1, w_2, \ldots are length-plus-lexicographic ordered (as defined in ), for short: lenlex.

This standardization of coset tables is different from that used in &GAP; versions 4.2 and earlier. Before that, we ignored the columns that correspond to inverse generators and hence only considered words in the generators of G. We call this older ordering the semilenlex standard as it also applies to the case of semigroups where no inverses of the generators are known.

We changed our default from the semilenlex standard to the lenlex standard to be consistent with . However, the semilenlex standardisation remains available and the convention used for all implicit standardisations can be selected by setting the value of the global variable to either "lenlex" or "semilenlex". Independent of the current value of you can standardize (or restandardize) a coset table at any time using . <#Include Label="CosetTableStandard"> <#Include Label="StandardizeTable">

Coset tables for subgroups in the whole group <#Include Label="CosetTableInWholeGroup"> <#Include Label="SubgroupOfWholeGroupByCosetTable">
Augmented Coset Tables and Rewriting <#Include Label="AugmentedCosetTableInWholeGroup"> <#Include Label="AugmentedCosetTableMtc"> <#Include Label="AugmentedCosetTableRrs"> <#Include Label="RewriteWord">
Low Index Subgroups <#Include Label="LowIndexSubgroupsFpGroupIterator">
Converting Groups to Finitely Presented Groups <#Include Label="IsomorphismFpGroup"> <#Include Label="IsomorphismFpGroupByGenerators">
New Presentations and Presentations for Subgroups IsomorphismFpGroup is also used to compute a new finitely presented group that is isomorphic to the given subgroup of a finitely presented group. (This is typically the only method to compute with subgroups of a finitely presented group.)

f:=FreeGroup(2);; gap> g:=f/[f.1^2,f.2^3,(f.1*f.2)^5]; gap> u:=Subgroup(g,[g.1*g.2]); Group([ f1*f2 ]) gap> hom:=IsomorphismFpGroup(u); [ <[ [ 1, 1 ] ]|f2^-1*f1^-1> ] -> [ F1 ] gap> new:=Range(hom); gap> List(GeneratorsOfGroup(new),i->PreImagesRepresentative(hom,i)); [ <[ [ 1, 1 ] ]|f2^-1*f1^-1> ] ]]>

When working with such homomorphisms, some subgroup elements are expressed as extremely long words in the group generators. Therefore the underlying words of subgroup generators stored in the isomorphism (as obtained by and displayed when ing the homomorphism) as well as preimages under the homomorphism are stored in the form of straight line program elements (see ). These will behave like ordinary words and no extra treatment should be necessary.

r:=Range(hom).1^10; F1^10 gap> p:=PreImagesRepresentative(hom,r); <[ [ 1, 10 ] ]|(f2^-1*f1^-1)^10> ]]> If desired, it also is possible to convert these underlying words using : r:=EvalStraightLineProgElm(UnderlyingElement(p)); (f2^-1*f1^-1)^10 gap> p:=ElementOfFpGroup(FamilyObj(p),r); (f2^-1*f1^-1)^10 ]]>

(If you are only interested in a finitely presented group isomorphic to the given subgroup but not in the isomorphism, you may also use the functions and (see ).)

Homomorphisms can also be used to obtain an isomorphic finitely presented group with a (hopefully) simpler presentation.

<#Include Label="IsomorphismSimplifiedFpGroup">

Preimages under Homomorphisms from an FpGroup For some subgroups of a finitely presented group the number of subgroup generators increases with the index of the subgroup. However often these generators are not needed at all for further calculations, but what is needed is the action of the cosets of the subgroup. This gives the image of the subgroup in a finite quotient and this finite quotient can be used to calculate normalizers, closures, intersections and so forth .

The same applies for subgroups that are obtained as preimages under homomorphisms. <#Include Label="SubgroupOfWholeGroupByQuotientSubgroup"> <#Include Label="IsSubgroupOfWholeGroupByQuotientRep"> <#Include Label="AsSubgroupOfWholeGroupByQuotient"> <#Include Label="DefiningQuotientHomomorphism">

Quotient Methods An important class of algorithms for finitely presented groups are the quotient algorithms which compute quotient groups of a given finitely presented group. There are algorithms for epimorphisms onto abelian groups, p-groups and solvable groups. (The low index algorithm –– can be considered as well as an algorithm that produces permutation group quotients.)

, as defined for general groups, returns the largest abelian quotient of the given group. f:=FreeGroup(2);;fp:=f/[f.1^6,f.2^6,(f.1*f.2)^12]; gap> hom:=MaximalAbelianQuotient(fp); [ f1, f2 ] -> [ f1, f3 ] gap> Size(Image(hom)); 36 ]]> <#Include Label="PQuotient"> <#Include Label="EpimorphismQuotientSystem"> <#Include Label="EpimorphismPGroup"> <#Include Label="EpimorphismNilpotentQuotient"> <#Include Label="SolvableQuotient"> <#Include Label="EpimorphismSolvableQuotient"> <#Include Label="LargerQuotientBySubgroupAbelianization">

Abelian Invariants for Subgroups Using variations of coset enumeration it is possible to compute the abelian invariants of a subgroup of a finitely presented group without computing a complete presentation for the subgroup in the first place. Typically, the operation when called for subgroups should automatically take care of this, but in case you want to have further control about the methods used, the following operations might be of use. <#Include Label="AbelianInvariantsSubgroupFpGroup"> <#Include Label="AbelianInvariantsSubgroupFpGroupMtc"> <#Include Label="AbelianInvariantsSubgroupFpGroupRrs"> <#Include Label="AbelianInvariantsNormalClosureFpGroup"> <#Include Label="AbelianInvariantsNormalClosureFpGroupRrs">
Testing Finiteness of Finitely Presented Groups As a consequence of the algorithmic insolvabilities mentioned in the introduction to this chapter, there cannot be a general method that will test whether a given finitely presented group is actually finite.

Therefore testing the finiteness of a finitely presented group can be problematic. What &GAP; actually does upon a call of (or if it is –probably implicitly– asked for a faithful permutation representation) is to test whether it can find (via coset enumeration) a cyclic subgroup of finite index. If it can, it rewrites the presentation to this subgroup. Since the subgroup is cyclic, its size can be checked easily from the resulting presentation, the size of the whole group is the product of the index and the subgroup size. Since however no bound for the index of such a subgroup (if any exist) is known, such a test might continue unsuccessfully until memory is exhausted.

On the other hand, a couple of methods exist, that might prove that a group is infinite. Again, none is guaranteed to work in every case:

The first method is to find (for example via the low index algorithm, see ) a subgroup U such that [U:U'] is infinite. If U has finite index, this can be checked by .

Note that this test has been done traditionally by checking the (see section ) of U, does a similar calculation but stops as soon as it is known whether 0 is an invariant without computing the actual values. This can be notably faster.

Another method is based on p-group quotients, see . <#Include Label="IsInfiniteAbelianizationGroup:grp"> <#Include Label="NewmanInfinityCriterion">