`GroupPresentations`

is a port of some GAP3/VkCurve functionality on *presentations* of *finitely presented groups*.

We have defined just enough functionality on finitely presented groups so that presentations can be translated to finitely presented groups and vice-versa. The focus is on presentations, the goal being to simplify them.

The elements of finitely presented groups are `AbsWord`

or abstract words, representing elements of a free group.

```
julia> @AbsWord a,b,c,d,e,f # same as a=AbsWord(:a);b=AbsWord(:b)...
julia> F=FpGroup([a,b,c,d,e,f])
FreeGroup(a,b,c,d,e,f)
julia> G=F/[a^2,b^2,d*f^-1,e^2,f^2,a*b^-1*c,a*e*c^-1,b*d^-1*c,c*d*e^-1,a*f*c^-2,c^4]
FreeGroup(a,b,c,d,e,f)/[aĀ²,bĀ²,dfā»Ā¹,eĀ²,fĀ²,abā»Ā¹c,aecā»Ā¹,bdā»Ā¹c,cdeā»Ā¹,afcā»Ā²,cā“]
julia> simplify(F) # the main function of this package
Presentation: 2 generators, 4 relators, total length 16
Presentation: 2 generators, 3 relators, total length 10
FreeGroup(a,c)/[aĀ²,acā»Ā¹acā»Ā¹,cā“]
```

The simplification is done by the following process:

```
julia> P=Presentation(G);simplify(P);G=FpGroup(P)
```

The functions `Presentation`

and `FpGroup`

create a presentation from a finitely presented group and vice versa.

In order to speed up the algorithms, the relators in a presentation are not represented internally by `AbsWord`

s, but by lists of positive or negative generator numbers which we call *Tietze words*. Here is another example with a few functions to explore presentations.

```
julia> @AbsWord a,b
julia> F=FpGroup([a,b])
FreeGroup(a,b)
julia> G=F/[a^2,b^7,comm(a,a^b),comm(a,a^(b^2))*inv(b^a)]
FreeGroup(a,b)/[aĀ²,bā·,aā»Ā¹bā»Ā¹aā»Ā¹babā»Ā¹ab,aā»Ā¹bā»Ā²aā»Ā¹bĀ²abā»Ā²abĀ²aā»Ā¹bā»Ā¹a]
julia> P=Presentation(G) # by default give a summary
Presentation: 2 generators, 4 relators, total length 30
julia> relators(P)
4-element Vector{AbsWord}:
aĀ²
bā·
abā»Ā¹ababā»Ā¹ab
bā»Ā²abĀ²abā»Ā²abĀ²abā»Ā¹
```

```
julia> showgens(P)
1. a 10 occurrences involution
2. b 20 occurrences
julia> dump(P) # here in relators inverses are represented by capitalizing
# F relator
1:3 aa
2:0 bbbbbbb
3:0 aBabaBab
4:0 abbaBBabbaBBB
gens=AbsWord[a, b] involutions:AbsWord[a] modified=false numredunds=0
julia> display_balanced(P)
1: a=A
2: bbbbbbb=1
3: aBab=BAbA
4: BBabbaBBabbaB=1
julia> P=tryconjugate(P) # try to conjugate the generators
Presentation: 2 generators, 4 relators, total length 30
Bab=> Presentation: 2 generators, 3 relators, total length 28
# Bab gives Presentation: 2 generators, 3 relators, total length 28
Presentation: 2 generators, 3 relators, total length 28
julia> FpGroup(P) # slightly simplified group
FreeGroup(a,b)/[bā·,babā»Ā¹ababā»Ā¹a,bā»Ā¹abĀ²abā»Ā²abĀ²abā»Ā²]
```

for more information look at the help strings of `AbsWord, FpGroup, Presentation, relators, display_balanced, simplify, conjugate, tryconjugate`

.

A minimal thing to add to this package so it would be a reasonable package for finitely presented groups is the Coxeter-Todd algorithm.