Question about products of group elements using GAP Background: In GAP I created the DihedralGroup of an octagon as a quotient of the freegroup on 2 variables and the presentation $r^8=s^2=s*r*(r^7*s)^{-1}=e \  $ as follows:
 gap> f:=FreeGroup(2);
 <free group on the generators [ f1, f2 ]>
 gap> r:=f.1;
 f1
 gap> s:=f.2;
 f2
 gap> G:=f/[r^8,s^2,s*r*(r^7*s)^-1];
 <fp group on the generators [ f1, f2 ]>
 gap> str(G);
 "D16"
 gap> r^8;
 f1^8
 gap> Elements(G);
[ <identity ...>, f1, f2, f1^2, f1^4, f1*f2, f1^3, f1^5, f1^6*f2, f1^4*f2,
 f1^6, f1^7*f2, f1^5*f2, f1^7, f1^2*f2, f1^3*f2 ]
 gap>

I would have expected that r^8 would return the identity element, instead it leaves r^8 unevaluated.
Question: What should I do so that GAP evaluates $r^8$ to $e$? 

You wantSetReducedMultiplicationwhich handles the monoid conversion for you.
 gap> f := FreeGroup( "r", "s" );;
 gap> g := f/ParseRelators(f,"r^8,s^2,rsr=s");;
 gap> SetReducedMultiplication( g );;
 gap> AssignGeneratorVariables(g);;
 #I  Assigned the global variables [ r, s ]
 gap> r^8;
 <identity ...>
 gap> (r*s)^5;
 r*s

