@@General discussion

\ni Every finitely generated nilpotent group G is given as a factor
group of a free nilpotent group N of a given class, say m, by the 
normal closure  K of a given finite set of relators

\ni G = N/K.

\ni We adopt here the notation

\ni G = m < a,b, ..; r,s, ... > .

\ni So here N is the free nilpotent group of class m generated by
a,b, ..  and K is the normal closure of r,s, ... . 

\ni Finitely generated nilpotent groups have a number of interesting
properties, similar to those of finitely generated abelian groups. First 
of all, the set of elements of finite order is a subgroup, termed the
torsion subgroup. This subgroup is normal and the quotient by it is a
torsion-free nilpotent group. Every subgroup of a finitely generated 
nilpotent group is again finitely generated, which implies that a finitely
generated nilpotent group is never isomorphic to any of its proper factor
groups.  Groups posessing this property are termed "hopfian". Finitely generated
nilpotent groups are residually finite, i.e., the intersection of the
normal subgroups of finite index is the identity subgroup. 

\ni Finitely generated nilpotent groups are always finitely presentable,
i.e., in the category of all groups they can be described by finitely
many generators and finitely many relations.

\ni Finitely generated nilpotent groups have a number of good algorithmic
properties. In particular, they have solvable word and conjugacy problems
and the isomorphism problem is solvable for such groups.

\ni The successive quotients of the lower central series of a finitely
generated nilpotent group G are all finitely generated. If one chooses a
basis for each of these quotients and then chooses pre-images in G of 
these elements, the resultant set of elements is termed a basis for
G. Every element of G can be written uniquely, subject to some obvious
conditions, in terms of such a basis. This procedure is an important
tool in working with finitely generated nilpotent groups.

@@The word problem

\ni In order to decide if a word in a given nilpotent group is trivial, we
first carry out a number of preliminary checks. In particular, we check 
whether the word is non-trivial in a number of homomorphic images of the
given group, such as its abelianization and other nilpotent quotients.
If these tests fail, we compute a Mal'cev basis for the relation subgroup 
(i.e., the normal closure in the ambient free nilpotent group of the given
defining relators) and then determine whether the given word represents 
an element in this relation subgroup.


@@Equality of two words

\ni We consider the inverse of the first word followed by the second and
use the solution of the word problem to decide if the resultant word 
represents the identity. See @The word problem@General_nilpotent_groups::The word problem@).


@@Is the given group trivial?

\ni  A nilpotent group is trivial if and only if its abelianization is
trivial. Since we can decide whether a finitely generated abelian group 
is trivial, this means that we can decide whether a finitely generated 
nilpotent group is trivial 
(cf. @Is the group trivial?@General_abelian_groups::Is the group trivial?@).

@@Is the given group finite?

\ni A nilpotent group is finite if and only its abelianization is finite.
We invoke the finiteness algorithm for abelian groups to determine then
whether the given group is finite.
See @Is the group finite?@General_abelian_groups::Is the group finite?@. 

@@Is the given group abelian?

\ni We check to see if all of the commutators of the generators are
trivial, using the solution of the word problem for finitely generated
nilpotent groups (see @The word problem@General_nilpotent_groups::The word problem@).

@@Compute the class of the given group

\ni In order to see if a given finitely generated nilpotent group is 
nilpotent of class c, we check to see if all of the (c+1)-fold commutators 
of the generators are trivial and, at the same time, check to see if
one of the corresponding c-fold commutators is non-trivial. In order to 
do this, we need to invoke the solution of the word problem for a finitely 
generated nilpotent group (see @The word problem@General_nilpotent_groups::The word problem@).

@@Compute the Hirsch number of the given group 

\ni The number of infinite cyclic generators in the successive quotients
of the lower central series of a given finitely generated nilpotent group 
is the Hirsch number of that group.

@@Is the given group free nilpotent?

\ni We first determine if the abelianization of the given group is free
abelian. If this is the case, then we compute the rank r of this 
abelianization, the class c of the group and its Hirsch number h.
Finally we compute the Hirsch number of a free nilpotent group of
class c and rank r and check to see if it coincides with h. The given
group is free nilpotent if and only if this is the case.

@@A presentation for a subgroup

\ni Let G = m < a,b, ..; r,s, ... >

\ni be a finitely generated nilpotent group. So G is a factor group of the
the free nilpotent group N of class m freely generated by a,b, ..  by
the normal closure K of r,s, ... . 

\ni In order to find a presentation for a subgroup 

\ni H = gp(u,v,...)

\ni of G, we compute the preimage of H in N as follows. First we
compute a set of generators for the normal closure K of r,s,... and then
compute a Mal'cev basis

\ni d_1,d_2,...

\ni for K. Notice that G=N/K. Now H is the subgroup of G
generated by the words u, v, ... . Each of these words is a word in
the given generators of N, namely a,b, ... . Observe that H is
the factor group J/K, where J is the subgroup of N generated by

\ni u,v, .. ,d_1,d_2,...

\ni We now find a presentation for

\ni J= gp(u,v,... , d_1, d_2, ...).

\ni using the procedure in the case of a free nilpotent group to 
obtain a presentation for a subgroup. (See @Present a subgroup@General_free_nilpotent::
Present a subgroup@). 

\ni This presentation comes
equipped with a Mal'cev basis e_1,e_2,... as its generating set and defining
relations the set of commutators of the generators, expressed in normal
form. If we now re-express the generators of d_1,d_2,... of K as words
t_1,t_2,.. in the Malcev basis e_1,e_2,... , then these words
together with the commutator relations involving the e_i provide us
with a presentation of H with generating set e_1,e_2,... .

@@Compute a basis 

\ni We use the notation G_i for the i-th term of the lower central series of
the group G. In the event that G is nilpotent, a basis of G is a set of 
elements of G given as the union of sets S_1, S_2, ... . The elements of S_i
are contained in G_i and they constitute, modulo G_{i+1}, a basis for the
abelian factor group G_i/G_{i+1}. The actual procedure for computing such a
basis for

\ni G = c <a,b, ... ; r, s, ...>

is then as follows.

\ni We first find a basis for

\ni H_1= 1 <a,b, ... ; r, s, ...> = G_1/G_2,

where G_i is the subgroup of G generated by all i-fold (left-normed) 
commutators [x_1,...,x_i], with x_j one of the given generators of G,
and choose, in G, a pre-image for each such basis element. 

\ni Next, we find a presentation for the subgroup G_2/G_3 of

\ni H_2= 2 <a,b, ... ; r, s, ...>,

i.e., G/G_3. This is an abelian group and so we can compute a basis for
this abelian group and choose pre-images in G of each of these elements.

\ni We now continue this procedure, working with

\ni H_3= 3 <a,b, ... ; r, s, ...>,

\ni instead of H_2, computing now a presentation of the subgroup of
H_3 generated by all basic commutators of weight 3 in the given
generators and then finding a basis of this abelian group and chossing
pre-iamges of the elements in this basis in G itself. 

\ni This ultimately leads to a computation of a basis for G.

@@Compute the integral homology of the given group

\ni The method here is to observe that finitely generated nilpotent groups
have a finite rewriting system. This allows us to compute a chain
complex for G and then to compute its integral homology groups - this
method and the code accompanying it, is due to John Groves and the school
at the University of Melbourne, Australia.

@@The power problem

\ni  The procedure here is similar to, although somewhat more complicated than 
 the procedure described in @The power problem@General_free_nilpotent::
The power problem@. 
 

@@The maximal root of an element 

\ni This procedure has not yet been implemented. 


@@The conjugacy problem

\ni We are still in the process of implementing this algorithm, which is
described here.

\ni Let G= c <a,b,... ; r,s, ... > 

be a given finitely generated nilpotent group and let u and v be a pair of
words in the given generators. The objective is to determine whether there
exists a word z such that z^-1 u z = v in G. If G is finite, the existence
of z can be determined by allowing z to range over all of G. It suffices
therefore to consider the case where G contains an element g of infinite order.
We can assume that g lies in the last non-trivial term of the lower central
seeries of G. Then G/gp(g) has Hirsch number h-1, where h is the Hirsch
number of G. Now, inductively, we have an algorithm which decides whether or
not u and v are conjugate modulo gp(g). In the event that they are not,
u and v are not conjugate in G. If u and v are conjugate modulo gp(g),
there exists a word y such that 

\ni y^-1 u y = v g^n

for some choice of the integer n. So we lose nothing by assuming that
u = v g^n. Thus we are left with determining whether there exists a word z
such that

\ni z^-1 v g^n z = v.

\ni Since g is contained in the center of G, this equality amounts to

\ni [z,v] = g^n,

\ni i.e., does there exists a word z such that [z,v]=g^n?
 
\ni Observe that, modulo gp(g), z is contained in the centralizer of v.
The next step in the procedure is to compute the centralizer C of z, modulo
gp(g). Once that has been accomplished, we simply compute the subgroup
[C,gp(g)] and check to see if g^n is contained in this subgroup. This
completes the description of the algorithm.


@@Decompose a word in terms of a basis

\ni Given a word w in the generators of a given nilpotent group G, one can
express it in terms of a basis of G. Suppose
d_1,..., e_1,...
is a basis for G. The notation here is designed to suggest that the first
batch of generators, d_1, d_2, ... is, modulo G_2, a basis for the finitely
generated abelian group G/G_2. The process starts by expressing wG_2 in
canonical form in terms of d_1 G_2, d_2 G_2, ... . Taking the corresponding
pre-images in G yields the expression

\ni w = d_1^m_1 d_2^m_2 ... .w_2,

\ni where w_2 is in G_2 and the exponents are unique integers, associated with
the canonical form for w G_2. If we now apply the same procedure to w_2 G_3,
viewed as an element in the abelian group G_2/G_3 with its basis
e_1 G_3, e_2 G_3, ..., the corresponding canonical form, leads to the 
expression

\ni w= d_1^m_1 d_2^m_2 ... .e_1^n_1 e_2^n_2 ... .w_3,

\ni where now w_3 is in G_3. Continuing in this way, we obtain a unique
expression for w, its so-called canonical form.

@@Element in the commutator subgroup?

\ni We abelianize the given group and check to see if the image of the
given word represents the identity in the abelianization.

@@In which term of the lower central series does a word lie? 

\ni We decompose the word in terms of a basis and inspect the canonical form.
The term of the lower central series in which the element represented by 
the given word lies can be read off from the canonical form.
See @Decompose a word in terms of a basisGeneral_nilpotent_groups::
Decompose a word in terms of a basis@. 

@@Compute the order of the torsion subgroup

\ni The procedure to compute the torsion subgroup of a nilpotent group is
as follows. First we compute its abelianization and then compute the pre-image
of the torsion subgroup of the abelianization. Next we present this subgroup,
compute its abelianization and take the pre-image of the torsion subgroup. 
Again we present the subgroup and proceed in this way. Ultimately we arrive 
at a subgroup whose abelianization is finite. This subgroup is the torsion
subgroup. What we actually arrive at is a presentation of this subgroup.
In order to compute its order we may well have to apply the method of
Todd-Coxeter. 

@@Subgroup membership problem

\ni We first compute the pre-image of the given subgroup in the ambient
free group and choose a pre-image of the given word. The problem then becomes
a corresponding problem in a free nilpotent group 
(see @Subgroup membership problem@General_free_nilpotent::Subgroup membership problem@

@@Power of an element in a subgroup?

\ni We compute the pre-image of the given subgroup in the ambient free group
and a pre-image of the given word. We then apply the appropriate algorithm
in the case of a free nilpotent group 
(see @Power of an element in a subgroup?@General_free_nilpotent::
Power of an element in a subgroup?@). 


@@Subgroup containment problem

\ni We simply check to see if all of the generators of the first subgroup are
contained in the second.
See @Subgroup membership problem@General_nilpotent_groups::
Subgroup membership problem@. 

@@Subgroup equality problem

\ni We check whether the first subgroup is contained in the second and 
the second in the first.
See @Subgroup containment problem@General_nilpotent_groups::Subgroup containment problem@

@@Compute the Hirsch number of a subgroup

\ni We first find a presentation for the given subgroup H and then find a
basis for it. The number of infinite cyclic groups in this basis that arise
from infinite cyclic factors in the various quotient groups H_i/H_{i+1}
is the Hirsch number of the given subgroup.

@@Join of two subgroups

\ni We simply join the two sets of generators together and present the 
subgroup that they generate.

@@Index of a subgroup

\ni The index of a subgroup is finite if and only if the index of its
image in the abelianization is finite. In order to determine if this is
the case, we appeal to the corresponding algorithm for finitely generated
abelian groups (see @Index of a subgroup@General_abelian_groups::Index of a subgroup@).  
In the event that the index is finite, we compute it 
using the method of Todd-Coxeter. 

@@Compute a basis for a subgroup

\ni We compute a presentation for a subgroup and then invoke the procedure
for computing a basis for a nilpotent group.
See @Compute a basis for the given group@General_nilpotent_groups::
Compute a basis for the given group@. 

@@Is a subgroup trivial?

\ni We simply use the solution of the word problem in the given group to 
decide if each of the generators is trivial.
See @The word problem@General_nilpotent_groups::The word problem@. 

@@Is a subgroup finite?

\ni We compute a presentation for the subgroup and use this to determine if
its abelianization is finite (see  @Is the group finite?@General_abelian_groups::
Is the group finite?@). 
The given subgroup is finite if and only if
its abelianization is finite. 

@@Is a subgroup abelian?

\ni We simply check whether the commutators of all of the generators are
trivial, using the solution of the word problem in the containing group to
carry out this check.
See @The word problem@General_nilpotent_groups::The word problem@. 


@@Compute the class of a subgroup 

\ni We determine whether all (c+1)-fold commutators of the given generators
of the subgroup are trivial, starting with c = 1. The first such c is the 
class of the given subgroup.
See @The word problem@General_nilpotent_groups::The word problem@. 


@@Is a subgroup central?

\ni We simply compute the commutators of all of the generators of the
ambient group with all of the generators of the given subgroup. If they
are all trivial, the subgroup is central and not otherwise.
See @The word problem@General_nilpotent_groups::The word problem@. 


@@Is a subgroup normal?

\ni The subgroup is normal if and only if all of the conjugates of the
generators of the subgroup by the generators of the given group are contained
in the subgroup.
See @Subgroup membership problem@General_nilpotent_groups::
Subgroup membership problem@. 

@@Isolator of a subgroup 

\ni This algorithm has not yet been implemented.


@@The normal closure of a subgroup 

\ni We adjoin to the given subgroup all non-trivial commutators of the form
[a,b], [a,b,b], ..., [a,b,b,...,b], ... ,
where a ranges over the generators of the subgroup and b ranges over the 
generators of the ambient finitely generated nilpotent group. The resultant 
subgroup is the normal closure of the given one.

@@Is a map   a  homomorphism?

\ni As usual a map of the generators of a group given by a finite presentation
defines a homomorphism if and only if the images of the generators satisfy the
given relations. For this one needs only the solution of the word problem in 
the target group.

@@Is an endomorphism an automorphism? 

\ni Notice that an epimorphism of a finitely generated nilpotent group 
is an automorphism, since a finitely generated nilpotent group is never
isomorphic to any of its proper factor groups. Consequently, in order 
to determine if an endomorphism is an automorphism, it suffices to
check whether an endomorphism of a finitely generated nilpotent group is
an epimorphism, i.e., whether the image of the given group coincides with 
the group itself. We have therefore only to appeal to the algorithm which 
decides whether two subgroups of a finitely generated nilpotent group are equal.
See @Are two subgroups equal?@General_nilpotent_groups::Are two subgroups equal?@.

@@Is an automorphism  an IA-automorphism?

\ni An automorphism of a group is said to be an IA-automorphism if it induces
the identity automorphism of the abelianization. Since the abelianization of 
a finitely generated nilpotent group is a finitely generated abelian group,
this is easily checked. 

@@Is an automorphism inner?

\ni This algorithm has not yet been implemented.

@@Compute the product of two automorphisms

\ni We compute the composition of the two maps in the order given on the 
generators of the given group. This defines the product of the two automorphisms.


@@Order of an automorphism

\ni The order of an automorphism of a finitely generated  nilpotent group 
is either infinite or it is bounded by a function of the number of the
torsion-free rank of its abelianization. We then simply compute 
the various powers of the given automorphism up to the value of this function 
for the given finitely generated nilpotent group and check to see if it is 
the identity. 
See also @Order of an automorphism of a free abelian group@General_abelian_groups::
Order of an automorphism of a free abelian group@. 

@@Compute the inverse of an automorphism 

\ni One expresses each of the given generators of the given nilpotent group
as words in the images of the generators. If then each of the images under
the given automorphism is expressed as a word in the original generators,
the resultant words provide a description of the inverse of the given 
automorphism.

