<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  pres.msk                   GAP documentation             Volkmar Felsch -->
<!-- %A                                                           Alexander Hulpke -->
<!-- %% -->
<!-- %A  @(#)<M>Id: pres.msk,v 1.24 2003/10/28 04:55:03 gap Exp </M> -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Presentations and Tietze Transformations">
<Heading>Presentations and Tietze Transformations</Heading>

A finite presentation describes a group, but usually there is a multitude of
presentations that describe isomorphic groups. Therefore a presentation in
&GAP; is different from a finitely presented group though there are ways to
translate between both.
<P/>
An important feature of presentations is that they can be modified (see
sections <Ref Sect="Changing Presentations"/>
to <Ref Sect="Tietze Transformations that introduce new Generators"/>).
<P/>
<!-- %%  The code for presentations was designed and implemented by Volkmar Felsch. -->
If you only want to get new presentations for subgroups of a finitely
presented group (and do not want to manipulate presentations yourself),
chances are that the operation <Ref Attr="IsomorphismFpGroup"/> already does
what you want
(see&nbsp;<Ref Sect="New Presentations and Presentations for Subgroups"/>).


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Creating Presentations">
<Heading>Creating Presentations</Heading>

Most of the functions creating presentations and all functions performing
Tietze transformations on them sort the relators by increasing lengths.
The function <Ref Func="PresentationFpGroup"/> is an exception because it is
intended to reflect the relators that were used to define the involved
f. p. group.
You may use the command <Ref Func="TzSort"/> to sort the presentation.

<#Include Label="PresentationFpGroup">
<#Include Label="TzSort">
<#Include Label="GeneratorsOfPresentation">
<#Include Label="FpGroupPresentation">
<#Include Label="PresentationViaCosetTable">
<#Include Label="SimplifiedFpGroup">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Subgroup Presentations">
<Heading>Subgroup Presentations</Heading>

<Index>Schreier</Index>
<#Include Label="PresentationSubgroup">
<#Include Label="PresentationSubgroupRrs">
<#Include Label="PrimaryGeneratorWords">
<#Include Label="PresentationSubgroupMtc">
<#Include Label="PresentationNormalClosureRrs">
<#Include Label="PresentationNormalClosure">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Relators in a Presentation">
<Heading>Relators in a Presentation</Heading>

In order to speed up the Tietze transformation routines,
each relator in a presentation is internally represented by a
list of positive or negative generator numbers, i.e., each factor of the
proper &GAP; word is represented by the position number of the
corresponding generator with respect to the current list of generators,
or by the respective negative number, if the factor is the inverse of a
generator. Note that the numbering of the generators in Tietze words is
always relative to a generator list and bears no relation to the internal
numbering of generators in a family of associative words.

<#Include Label="TietzeWordAbstractWord">
<#Include Label="AbstractWordTietzeWord">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Printing Presentations">
<Heading>Printing Presentations</Heading>

Whenever you create a presentation <M>P</M>, say, or assign it to a variable,
&GAP; will respond by printing <M>P</M>.
However, as <M>P</M> may contain a lot of generators and many relators
of large length, it would be annoying if the standard print facilities
displayed all this information in detail.
So they restrict the printout to just one line of text containing the number
of generators, the number of relators, and the total length of all relators
of <M>P</M>. As compensation, &GAP; offers some special print commands which
display various details of a presentation.

Note that there is also a function <Ref Func="TzPrintOptions"/>.
It is described in Section <Ref Sect="Tietze Options"/>.

<#Include Label="TzPrintGenerators">
<#Include Label="TzPrintRelators">
<#Include Label="TzPrintLengths">
<#Include Label="TzPrintStatus">
<#Include Label="TzPrintPresentation">
<#Include Label="TzPrint">
<#Include Label="TzPrintPairs">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Changing Presentations">
<Heading>Changing Presentations</Heading>

The functions described in this section may be used to change a presentation.
Note, however, that in general they do not perform Tietze transformations
because they change or may change the isomorphism type of the group defined
by the presentation.

<#Include Label="AddGenerator">
<#Include Label="TzNewGenerator">
<#Include Label="AddRelator">
<#Include Label="RemoveRelator">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Tietze Transformations">
<Heading>Tietze Transformations</Heading>

The commands in this section can be used to modify a presentation by Tietze
transformations.
<P/>
In general, the aim of such modifications will be to <E>simplify</E> the given
presentation, i.e., to reduce the number of generators and the number of
relators without increasing too much the sum of all relator lengths which
we will call the <E>total length</E> of the presentation. Depending on the
concrete presentation under investigation one may end up with a nice,
short presentation or with a very huge one.
<P/>
Unfortunately there is no algorithm which could be applied to find the
shortest presentation which can be obtained by Tietze transformations
from a given one. Therefore, what &GAP; offers are some lower-level
Tietze transformation commands and, in addition, some higher-level
commands which apply the lower-level ones in a kind of default strategy
which of course cannot be the optimal choice for all presentations.
<P/>
The design of these commands follows closely the concept of the ANU
Tietze transformation program <Cite Key="Hav69"/> and its
later revisions (see <Cite Key="HKRR84"/>, <Cite Key="Rob88"/>).

<#Include Label="TzGo">
<#Include Label="SimplifyPresentation">
<#Include Label="TzGoGo">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Elementary Tietze Transformations">
<Heading>Elementary Tietze Transformations</Heading>

<#Include Label="TzEliminate">
<#Include Label="TzSearch">
<#Include Label="TzSearchEqual">
<#Include Label="TzFindCyclicJoins">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Tietze Transformations that introduce new Generators">
<Heading>Tietze Transformations that introduce new Generators</Heading>

Some of the Tietze transformation commands listed so far may eliminate
generators and hence change the given presentation to a presentation on a
subset of the given set of generators, but they all do <E>not</E> introduce
new generators. However, sometimes there will be the need to substitute
certain words as new generators in order to improve a presentation.
Therefore &GAP; offers the two commands
<Ref Func="TzSubstitute" Label="for a presentation and a word"/> and
<Ref Func="TzSubstituteCyclicJoins"/> which introduce new generators.

<#Include Label="TzSubstitute">
<#Include Label="TzSubstituteCyclicJoins">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Tracing generator images through Tietze transformations">
<Heading>Tracing generator images through Tietze transformations</Heading>

Any sequence of Tietze transformations applied to a presentation,
starting from some presentation <M>P_1</M> and ending up with some
presentation <M>P_2</M>, defines an  isomorphism, <M>\varphi</M> say,
between the groups defined by <M>P_1</M> and <M>P_2</M>, respectively.
Sometimes it is desirable to know the images of the (old) generators of
<M>P_1</M> or the preimages of the (new) generators of <M>P_2</M>
under <M>\varphi</M>.
The &GAP; Tietze transformation functions are able to trace these images.
This is not automatically done because the involved words may grow to
tremendous length, but it will be done if you explicitly request
for it by calling the function <Ref Func="TzInitGeneratorImages"/>.

<#Include Label="TzInitGeneratorImages">
<#Include Label="OldGeneratorsOfPresentation">
<#Include Label="TzImagesOldGens">
<#Include Label="TzPreImagesNewGens">
<#Include Label="TzPrintGeneratorImages">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="sect:DecodeTree">
<Heading>The Decoding Tree Procedure</Heading>

<#Include Label="DecodeTree">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Tietze Options">
<Heading>Tietze Options</Heading>

Several of the Tietze transformation commands described above are
controlled by certain parameters, the <E>Tietze options</E>, which often have
a tremendous influence on their performance and results.  However, in
each application of the commands, an appropriate choice of these option
parameters will depend on the concrete presentation under investigation.
Therefore we have implemented the Tietze options in such a way that they
are associated to the presentation: Each presentation
keeps its own set of Tietze option parameters as an attribute.

<#Include Label="TzOptions">
<#Include Label="TzPrintOptions">

</Section>
</Chapter>

