%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%W  nq.tex		NQL Doc				Rene Hartung
%%
%H  $Id: nq.tex,v 1.6 2007/05/25 08:30:53 gap Exp $
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Nilpotent Quotients of L-presented groups}

Our method to determine polycyclic presentations for nilpotent quotients of
L-presented groups generalizes Nickel's nilpotent quotient algorithm for
finitely presented groups. We refer to the documentation of the {\NQ}-package
for further details on the algorithm.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{New methods for L-presented groups}

\> NilpotentQuotientLpGroup( <LpGroup>[, <c>] ) O

returns a polycyclic presentation for
%display{nonhtml}
${\rm <LpGroup>}/\gamma_{c+1}({\rm <LpGroup>})$
%enddisplay
%display{html}
%<var>LpGroup/&gamma;<sub>c+1</sub>(LpGroup)</var>
%enddisplay
if <c> is specified.  If <c> is not given, this method attempts to compute the largest nilpotent
quotient of <LpGroup> and will terminate only if <LpGroup> has a largest 
nilpotent quotient.

The following example computes the class-5-quotient of the Grigorchuk group on 
four generators.
\beginexample
gap> G:=ExamplesOfLPresentations(1);;
gap> H:=NilpotentQuotientLpGroup(G,5);
Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ] 
gap> lcs:=LowerCentralSeries(H);
[ Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], 
  Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2 ], 
  Pcp-group with orders [ 2, 2, 2, 2, 2 ], Pcp-group with orders [ 2, 2, 2 ], 
  Pcp-group with orders [ 2, 2 ], Pcp-group with orders [  ] ]
gap> List([1..5],x->lcs[x]/lcs[x+1]); 
[ Pcp-group with orders [ 2, 2, 2 ], Pcp-group with orders [ 2, 2 ], 
  Pcp-group with orders [ 2, 2 ], Pcp-group with orders [ 2 ], 
  Pcp-group with orders [ 2, 2 ] ]
\endexample

\> LargestNilpotentQuotient( <LpGroup> )  A

returns the largest nilpotent quotient of the L-presented group <LpGroup>
if such quotient exists. It uses the `NilpotentQuotientLpGroup'-method of the 
{\NQL}-package. If <LpGroup> does not have a largest nilpotent quotient, this
method will not terminate.

\> NqEpimorphismNilpotentQuotientLpGroup( <LpGroup>[, <c>] ) O
\> NqEpimorphismNilpotentQuotientLpGroup( <LpGroup>[, <PcpGroup>] ) O

In the first case, this method returns an epimorphism from the L-presented
group <LpGroup> into its 
class-<c> quotient 
%display{nonhtml}
${\rm <LpGroup>}/\gamma_{c+1}({\rm <LpGroup>})$
%enddisplay
%display{html}
%<var>LpGroup/&gamma;<sub>c+1</sub>(LpGroup)</var>
%enddisplay
if <c> is specified. If <c> is not given, this method attempts to 
compute an epimorphism into the largest
nilpotent quotient of <LpGroup>. If <LpGroup> does not have a largest 
nilpotent quotient this method will not terminate.

If a pcp-group <PcpGroup> is given as additional parameter, then <PcpGroup> 
has to be a nilpotent quotient of <LpGroup>. The method computes an epimorphism
from the L-presented group <LpGroup> into <PcpGroup>.

The following example computes an epimorphism from the Grigorchuk group on
four generators into its class-5-quotient.
\beginexample
gap> G:=ExamplesOfLPresentations(1);
<L-presented group on the generators [ a, b, c, d ]>
gap> epi:=NqEpimorphismNilpotentQuotientLpGroup(G,5);
[ a, b, c, d ] -> [ g1, g2*g3, g2, g3 ]
gap> H:=Image(epi);
Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
gap> NilpotencyClassOfGroup(H);
5
gap> H:=NilpotentQuotientLpGroup(G,7);
Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
gap> NilpotentQuotientLpGroup(G,10);
Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
gap> NqEpimorphismNilpotentQuotientLpGroup(G,H);
[ a, b, c, d ] -> [ g1, g2*g3, g2, g3 ]
gap> Image(last);
Pcp-group with orders [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
\endexample

\> AbelianInvariants( <LpGroup> ) O

returns the Abelian invariants of the Abelian quotient of the L-presented
group <LpGroup>. It uses functions of the `NilpotentQuotientLpGroup' method
(see~"NilpotentQuotientLpGroup"). 

\beginexample
gap> G:=ExamplesOfLPresentations(1);;
gap> AbelianInvariants(G);
[ 2, 2, 2 ]
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{A short description of the algorithm}

In the following we give a short description of the 
nilpotent quotient algorithm for non-invariant L-pre\-sen\-ta\-tions.

Let 
%display{nonhtml}
$\langle S\mid Q\mid\Phi\mid R\rangle$
%enddisplay
%display{html}
%<var>&lang; S | Q | &Phi; | R &rang;</var>
%enddisplay
be an L-presentation for the L-presented group $G$ with underlying invariant
L-presentation
%display{nonhtml}
$\langle S\mid Q'\mid\Phi\mid R\rangle$. 
%enddisplay
%display{html}
%<var>&lang; S | Q' | &Phi; | R &rang;</var>
%enddisplay
Denote the L-presented group given by the underlying invariant
L-presentation by 
%display{nonhtml}
$\bar G$. 
%enddisplay
%display{html}
%&Gamma;.
%enddisplay

%Note that such invariant L-presentation always exists since $Q'=\emptyset$
%yields an ascending and hence invariant L-presentation. 

The first step in computing a polycyclic presentation for 
%display{nonhtml}
$G/\gamma_c(G)$
%enddisplay
%display{html}
%<var>G/&gamma;<sub>c</sub>(G)</var>
%enddisplay
of the L-presented group $G$ is to determine a polycyclic presentation for 
%display{nonhtml}
$\bar G/\gamma_c(\bar G)$. 
%enddisplay
%display{html}
%<var>&Gamma;/&gamma;<sub>c</sub>(&Gamma;)</var>
%enddisplay

This will be done by induction on $c$. The induction step is a generalization
of Nickel's nilpotent quotient algorithm. It returns a nilpotent presentation
$H$ for 
%display{nonhtml}
$\bar G/\gamma_c(\bar G)$ and an epimorphism $\delta:\bar G\to H$.
%enddisplay
%display{html}
%<var>&Gamma;/&gamma;<sub>c</sub>(&Gamma;)</var> and an epimorphism <var>&delta; :&Gamma;&rarr;H</var>.
%enddisplay

Then a nilpotent presentation for
%display{nonhtml}
$G/\gamma_c(G)$
%enddisplay
%display{html}
%<var>G/&gamma;<sub>c</sub>(G)</var>
%enddisplay
can be determined using the nilpotent presentation $H$ and an extension
%display{nonhtml}
$\delta':F_S\to H$
%enddisplay
%display{html}
%<var>&delta;': F<sub>S</sub>&rarr;H</var>
%enddisplay
of the epimorphism $\delta$. The nilpotent quotient
%display{nonhtml}
$G/\gamma_c(G)$ 
%enddisplay
%display{html}
%<var>G/&gamma;<sub>c</sub>(G)</var>
%enddisplay
is isomorphic to the factor 
%display{nonhtml}
$H/\langle Q^{\delta'}\rangle^H$
%enddisplay
%display{html}
%<var>H/&lang; Q<sup>&delta;'</sup>&rang;<sup>H</sup></var>
%enddisplay
of $H$ and the {\Polycyclic}-package can be used to compute a polycyclic 
presentation for 
%display{nonhtml}
$G/\gamma_c(G)$. 
%enddisplay
%display{html}
%<var>G/&gamma;<sub>c</sub>(G)</var>.
%enddisplay

The efficiency of this general approach depends on the underlying invariant 
L-presentation 
%display{nonhtml}
$\langle S\mid Q'\mid \Phi\mid R\rangle$.
%enddisplay
%display{html}
%<var>&lang; S | Q' | &Phi; | R &rang;</var>.
%enddisplay
The set of fixed relators $Q'$ should be as large as possible. Otherwise, the
nilpotent quotient $H$ gets unnecessarily large and slows down the induction 
step for the underlying invariant L-presentation.

The Grigorchuk group on four generators has the L-presentation 
%display{nonhtml}
$$
\langle a,c,b,d\mid a^2,b^2,c^2,d^2,bcd\mid \sigma\mid
	 [d,d^a],[d,d^{acaca}]\rangle.
$$
%enddisplay
%display{html}
%<center><var>&lang; a,c,b,d | a<sup>2</sup>,b<sup>2</sup>,c<sup>2</sup>,
%d<sup>2</sup>,bcd | &sigma; | [d,d<sup>a</sup>],[d,d<sup>acaca</sup>]&rang;.
%</var></center>
%enddisplay
This L-presentation is invariant and hence the underlying invariant 
L-presentation is the same as above. There are two ways to compute 
nilpotent quotients of these groups: First, one can manually set the property
`IsInvariantLPresentation' for this group.

\beginexample
gap> F:=FreeGroup("a","b","c","d");
<free group on the generators [ a, b, c, d ]>
gap> AssignGeneratorVariables(F);
#I  Assigned the global variables [ a, b, c, d ]
gap> rels:=[a^2,b^2,c^2,d^2,b*d*c];;
gap> endos:=[GroupHomomorphismByImagesNC(F,F,[a,b,c,d],[c^a,d,b,c])];;
gap> itrels:=[Comm(d,d^a),Comm(d,d^(a*c*a*c*a))];;
gap> G:=LPresentedGroup(F,rels,endos,itrels);
<L-presented group on the generators [ a, b, c, d ]>
gap> List(rels,x->x^endos[1]);
[ a^-1*c^2*a, d^2, b^2, c^2, d*c*b ]
gap> SetIsInvariantLPresentation(G,true);
\endexample

Second, one can define the underlying invariant L-presentation as the same 
L-presentation as the group itself.

\beginexample
gap> F:=FreeGroup("a","b","c","d");
<free group on the generators [ a, b, c, d ]>
gap> AssignGeneratorVariables(F);
#I  Assigned the global variables [ a, b, c, d ]
gap> rels:=[a^2,b^2,c^2,d^2,b*d*c];;
gap> endos:=[GroupHomomorphismByImagesNC(F,F,[a,b,c,d],[c^a,d,b,c])];;
gap> itrels:=[Comm(d,d^a),Comm(d,d^(a*c*a*c*a))];;
gap> G:=LPresentedGroup(F,rels,endos,itrels);
<L-presented group on the generators [ a, b, c, d ]>
gap> U:=LPresentedGroup(F,rels,endos,itrels);;
gap> SetUnderlyingInvariantLPresentation(G,U);
\endexample

For saving memory the first method should be preferred. In general 
the L-presentation is not invariant and thus the second method is 
the method of choice.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
