  
  [1X2 [33X[0;0YGeneral remarks[133X[101X
  
  [33X[0;0YIn this chapter we define notation used throughout this manual and recollect
  basic  facts  about  nilpotent  groups.  We  also  provide  some  background
  information about the functionality implemented in this package.[133X
  
  
  [1X2.1 [33X[0;0YCommutators and the Lower Central Series[133X[101X
  
  [33X[0;0YThe  [13Xcommutator[113X  of  two  elements  [22Xh_1[122X  and [22Xh_2[122X of a group [22XG[122X is the element
  [22Xh_1^-1h_2^-1h_1h_2[122X  and  is  denoted by [22X[h_1,h_2][122X. It satisfies the equation
  [22Xh_1h_2  = h_2h_1[h_1,h_2][122X and can be interpreted as the correction term that
  has  to  be  introduced  into  a  word  if  two  elements  of  a  group  are
  interchanged.  Iterated  commutators  are  written  in  [13Xleft-normed fashion[113X:
  [22X[h_1,h_2,...,h_n-1,h_n]=[[h_1,h_2,...,h_n-1],h_n][122X.[133X
  
  [33X[0;0YThe [13Xlower central series[113X of [22XG[122X is defined inductively as [22Xγ_1(G) = G, γ_i(G) =
  [γ_i-1(G),G][122X  for  [22Xi  ≥ 2[122X. Each term in the lower central series is a normal
  (even  fully  invariant)  subgroup  of  [22XG[122X.  The factors of the lower central
  series  are  abelian  groups.  On  each  factor  the induced action of [22XG[122X via
  conjugation is the trivial action.[133X
  
  [33X[0;0YThe factor [22Xγ_k(G)/γ_k+1(G)[122X is generated by the elements [22X[g,h]γ_k+1(G),[122X where
  [22Xg[122X  runs  through a set of (representatives of) generators for [22XG/γ_2(G)[122X and [22Xh[122X
  runs  through  a set of (representatives of) generators for [22Xγ_k-1(G)/γ_k(G).[122X
  Therefore,  each factor of the lower central series is finitely generated if
  [22XG[122X is finitely generated.[133X
  
  [33X[0;0YIf  one  factor  of  the lower central series is finite, then all subsequent
  factors  are  finite. Then the exponent of the [22Xk+1[122X-th factor is a divisor of
  the  exponent of the [22Xk[122X-th factor of the lower central series. In particular,
  the  exponents of all factors of the lower central series are bounded by the
  exponent of the first finite factor of the lower central series.[133X
  
  
  [1X2.2 [33X[0;0YNilpotent groups[133X[101X
  
  [33X[0;0YA group [22XG[122X is called [13Xnilpotent[113X if there is a positive integer [22Xc[122X such that all
  [22X(c+1)[122X-fold  commutators  are  trivial  in  [22XG.[122X The smallest integer with this
  property  is called the [13Xnilpotency class[113X of [22XG[122X. In terms of the lower central
  series  a group [22XG not= 1[122X has nilpotency class [22Xc[122X if and only if [22Xγ_c(G) not= 1[122X
  and [22Xγ_c+1(G) = 1[122X.[133X
  
  [33X[0;0YExamples of nilpotent groups are finite [22Xp[122X-groups, the group of unitriangular
  matrices  over  a ring with one and the factor groups of a free group modulo
  the terms of its lower central series.[133X
  
  [33X[0;0YFiniteness  of  a  nilpotent  group can be decided by the group's commutator
  factor  group.  A  nilpotent  group  is finite if and only if its commutator
  factor  group is finite. A group whose commutator factor group is finite can
  only have finite nilpotent quotient groups.[133X
  
  [33X[0;0YBy refining the lower central series of a finitely generated nilpotent group
  one   can  obtain  a  (sub)normal  series  [22XG_1>G_2>...>G_k+1=1[122X  with  cyclic
  (central)  factors.  Therefore,  every finitely generated nilpotent group is
  [13Xpolycyclic[113X.  Such  a [13Xpolycyclic series[113X gives rise to a polycyclic generating
  sequence by choosing a generator [22Xa_i[122X for each cyclic factor [22XG_i/G_i+1[122X. Let [22XI[122X
  be  the  set  of  indices  such that [22XG_i/G_i+1[122X is finite. A simple induction
  argument  shows that every element of the group can be written uniquely as a
  [13Xnormal word[113X [22Xa_1^e_1... a_n^e_n[122X with integers [22Xe_i[122X and [22X0≤ e_i<m_i[122X for [22Xi∈ I[122X.[133X
  
  
  [1X2.3 [33X[0;0YNilpotent presentations[133X[101X
  
  [33X[0;0YFrom   a   polycyclic  generating  sequence  one  can  obtain  a  [13Xpolycyclic
  presentation[113X  for  the  group.  The  following  set  of power and commutator
  relations  is  a  defining  set  of  relations.  The [13Xpower relations[113X express
  [22Xa_i^m_i[122X  in  terms  of  the  generators  [22Xa_i+1,...,a_n[122X whenever [22XG_i/G_i+1[122X is
  finite  with  order [22Xm_i[122X. The [13Xcommutator relations[113X are obtained by expressing
  [22X[a_j,a_i][122X  for  [22Xj>i[122X  as  a  word  in  the  generators  [22Xa_i+1,...,a_n[122X. If the
  polycyclic  series  is obtained from refining the lower central series, then
  [22X[a_j,a_i][122X  is  even  a  word  in  [22Xa_j+1,...,a_n[122X.  In  this  case we obtain a
  nilpotent presentation.[133X
  
  [33X[0;0YTo  be more precise, a [13Xnilpotent presentation[113X is given on a finite number of
  generators  [22Xa_1,...,a_n[122X.  Let [22XI[122X be the set of indices such that [22XG_i/G_i+1[122X is
  finite.  Let  [22Xm_i[122X  be  the  order  of  [22XG_i/G_i+1[122X  for [22Xi∈ I[122X. Then a nilpotent
  presentation has the form[133X
  
  
  [24X[33X[0;6Y\langle  a,\ldots,a_n  | a_i^{m_i} = w_{ii}(a_{i+1},\ldots,a_n) \mbox{ for }
  i\in  I;\;  [a_j,a_i]  =  w_{ij}(a_{j+1},\ldots,a_n)  \mbox{ for } 1\leq i <
  j\leq n\rangle[133X
  
  [124X
  
  [33X[0;0YHere, [22Xw_ij(a_k,...,a_n)[122X denotes a group word in the generators [22Xa_k,...,a_n[122X.[133X
  
  [33X[0;0YIn  a group given by a polycyclic presentation each element in the group can
  be  written  as  a [13Xnormal word[113X [22Xa_1^e_1... a_n^e_n[122X with [22Xe_i ∈ Z[122X and [22X0 ≤ e_i <
  m_i[122X  for  [22Xi  ∈  I[122X.  A  procedure called [13Xcollection[113X can be used to convert an
  arbitrary word in the generators into an equivalent normal word. In general,
  the  resulting  normal  word  need not be unique. The result of collecting a
  word  may  depend  on  the  steps  chosen during the collection procedure. A
  polycyclic  presentation  with  the property that two different normal words
  are never equivalent is called [13Xconsistent[113X. A polycyclic presentation derived
  from a polycyclic series as above is consistent. The following example shows
  an inconsistent polycyclic presentation[133X
  
  
  [24X[33X[0;6Y\langle a,b\mid a^2, b^a = b^2 \rangle[133X
  
  [124X
  
  [33X[0;0Yas  [22Xb  =  baa  =  ab^2a = a^2b^4 = b^4[122X which implies [22Xb^3=1[122X. Here we have the
  equivalent  normal  words  [22Xb^3[122X  and  the  empty  word. It can be proved that
  consistency  can  be  checked  by collecting a finite number of words in the
  given  generating  set in two essentially different ways and checking if the
  resulting normal forms are the same in both cases. See Chapter 9 of the book
  [Sim94]   for   an   introduction   to   polycyclic  groups  and  polycyclic
  presentations.[133X
  
  [33X[0;0YFor  computations  in a polycyclic group one chooses a consistent polycyclic
  presentation  as  it  offers a simple solution to the word problem: Equality
  between  two  words  is decided by collecting both words to their respective
  normal  forms and comparing the normal forms. Nilpotent groups and nilpotent
  presentations   are  special  cases  of  polycyclic  groups  and  polycyclic
  presentations.  Nilpotent presentations allow specially efficient collection
  methods.   The  package  [5XPolycyclic[105X  provides  algorithms  to  compute  with
  polycyclic groups given by a polycyclic presentation.[133X
  
  [33X[0;0YHowever,   inconsistent  nilpotent  presentations  arise  naturally  in  the
  nilpotent  quotient algorithm. There is an algorithm based on the test words
  for   consistency   mentioned  above  to  modify  the  arising  inconsistent
  presentations suitably to obtain a consistent one for the same group.[133X
  
  
  [1X2.4 [33X[0;0YA sketch of the algorithm[133X[101X
  
  [33X[0;0YThe  input  for  the  ANU NQ in its simplest form is a finite presentation [22X⟨
  X|R⟩[122X  for  a group [22XG[122X. The first step of the algorithm determines a nilpotent
  presentation for the commutator quotient of [22XG[122X. This is a presentation of the
  class-[22X1[122X quotient of [22XG[122X. Call its generators [22Xa_1,...,a_d[122X. It also determines a
  homomorphism  of  [22XG[122X  onto  the  commutator  quotient  and  describes  it  by
  specifying the image of each generator in [22XX[122X as a word in the [22Xa_i[122X.[133X
  
  [33X[0;0YFor  the  general  step  assume  that the algorithm has computed a nilpotent
  presentation  for  the  class-[22Xc[122X  quotient  of [22XG[122X and that [22Xa_1,...,a_d[122X are the
  generators introduced in the first step of the algorithm. Furthermore, there
  is  a map from X into the class-[22Xc[122X quotient describing the epimorphism from [22XG[122X
  onto [22XG/γ_c+1(G)[122X.[133X
  
  [33X[0;0YLet  [22Xb_1,...b_k[122X  be  the generators from the last step of the algorithm, the
  computation   of   [22Xγ_c(G)/γ_c+1(G)[122X.  This  means  that  [22Xb_1,...b_k[122X  generate
  [22Xγ_c(G)/γ_c+1(G)[122X.  Then the commutators [22X[b_j,a_i][122X generate [22Xγ_c+1(G)/γ_c+2(G)[122X.
  The algorithm introduces new, central generators [22Xc_ij[122X into the presentation,
  adds  the  relations [22X[b_j,a_i] = c_ij[122X and modifies the existing relations by
  appending  suitable words in the [22Xc_ij[122X, called [13Xtails[113X, to the right hand sides
  of  the  power  and  commutator  relations.  The resulting presentation is a
  nilpotent  presentation for the [13Xnilpotent cover[113X of [22XG/γ_c+1(G)[122X. The nilpotent
  cover  is  the  largest  central  extension  of  [22XG/γ_c+1(G)[122X  generated  by [22Xd[122X
  elements. It is is uniquely determined up to isomorphism.[133X
  
  [33X[0;0YThe   resulting   presentation   of   the  nilpotent  cover  is  in  general
  inconsistent.  Consistency is achieved by running the consistency test. This
  results  in  relations  among  the  generators  [22Xc_ij[122X  which  can  be used to
  eliminate  some of those generators or introduce power relations. After this
  has  been done we have a consistent nilpotent presentation for the nilpotent
  cover of [22XG/γ_c+1(G)[122X.[133X
  
  [33X[0;0YFurthermore,  the  nilpotent  cover  need not satisfy the relations of [22XG[122X. In
  other  words,  the epimorphism from [22XG[122X onto [22XG/γ_c+1(G)[122X cannot be lifted to an
  epimorphism  onto  the  nilpotent  cover.  Applying  the epimorphism to each
  relator  of  [22XG[122X  and  collecting  the  resulting words of the nilpotent cover
  yields  a set of words in the [22Xc_ij[122X. This gives further relations between the
  [22Xc_ij[122X  which  leads  to  further  eliminations  or modifications of the power
  relations for the [22Xc_ij[122X.[133X
  
  [33X[0;0YAfter  this,  the  inductive step of the ANU NQ is complete and a consistent
  nilpotent   presentation   for  [22XG/γ_c+2(G)[122X  is  obtained  together  with  an
  epimorphism from [22XG[122X onto the class-[22X(c+1)[122X quotient.[133X
  
  [33X[0;0YChapter  11  of the book [Sim94] discusses a nilpotent quotient algorithm. A
  description of the implementation in the ANU NQ is contained in [Nic96][133X
  
  
  [1X2.5 [33X[0;0YIdentical Relations[133X[101X
  
  [33X[0;0YLet  [22Xw[122X  be  a  word  in free generators [22Xx_1,...,x_n[122X. A group [22XG[122X satisfies the
  relation  [22Xw=1[122X  [13Xidentically[113X if each map from [22Xx_1,...,x_n[122X into [22XG[122X maps [22Xw[122X to the
  identity  element  of [22XG[122X. We also say that [22XG[122X satisfies the [13Xidentical relation[113X
  [22Xw=1[122X  or  satisfies  the  [13Xlaw[113X  [22Xw=1[122X.  In slight abuse of notation, we call the
  elements [22Xx_1,...,x_n[122X [13Xidentical[113X generators.[133X
  
  [33X[0;0YCommon  examples  of identical relations are: A group of nilpotency class at
  most  [22Xc[122X  satisfies the law [22X[x_1,...,x_c+1]=1[122X. A group that satisfies the law
  [22X[x,y,...,y]=1[122X  where  [22Xy[122X  occurs [22Xn[122X-times, is called an [22Xn[122X-Engel group. A group
  that satisfies the law [22Xx^d=1[122X is a group of exponent [22Xd[122X.[133X
  
  [33X[0;0YTo  describe  finitely  presented  groups  that satisfy one or more laws, we
  extend  a  common  notation  for finitely presented groups by specifying the
  identical generators as part of the generator list, separated from the group
  generators by a semicolon: For example[133X
  
  
  [24X[33X[0;6Y\langle a,b,c; x,y | x^5, [x,y,y,y]\rangle[133X
  
  [124X
  
  [33X[0;0Yis a group on 3 generators [22Xa,b,c[122X of exponent [22X5[122X satisfying the 3rd Engel law.
  The  presentation above is equivalent to a presentation on 3 generators with
  an infinite set of relators, where the set of relators consists of all fifth
  powers  of words in the generators and all commutators [22X[x,y,y,y][122X where [22Xx[122X and
  [22Xy[122X  run  through  all words in the generators [22Xa,b,c[122X. The standalone programme
  accepts  the notation introduced above as a description of its input. In [5XGAP
  4[105X   finitely  presented  groups  are  specified  in  a  different  way,  see
  [2XNilpotentQuotient[102X ([14X3.1-1[114X) for a description.[133X
  
  [33X[0;0YThis  notation  can  also  be  used  in  words  that mix group and identical
  generators as in the following example:[133X
  
  
  [24X[33X[0;6Y\langle a,b,c; x | [x,c], [a,x,x,x] \rangle[133X
  
  [124X
  
  [33X[0;0YThe  first  relator  specifies  a  law  which  says that [22Xc[122X commutes with all
  elements of the group. The second turns [22Xa[122X into a third right Engel element.[133X
  
  [33X[0;0YAn element [22Xa[122X is called [13Xa right [22Xn[122X-th Engel element[113X or [13Xa right [22Xn[122X-Engel element[113X
  if  it  satisfies  the  commutator  law  [22X[a,x,...,x]=1[122X  where  the identical
  generator  [22Xx[122X  occurs  [22Xn[122X-times. Likewise, an element [22Xb[122X is called an [13Xleft [22Xn[122X-th
  Engel  element[113X  or  [13Xleft  [22Xn[122X-Engel element[113X if it satisfies the commutator law
  [22X[x,b,b,...b]=1[122X.[133X
  
  [33X[0;0YLet  [22XG[122X  be  a  nilpotent  group.  Then [22XG[122X satisfies a given law if the law is
  satisfied  by a certain finite set of instances given by Higman's Lemma, see
  [Hig59].  The ANU NQ uses Higman's Lemma to obtain a finite presentation for
  groups that satisfy one or several identical relations.[133X
  
  
  [1X2.6 [33X[0;0YExpression Trees[133X[101X
  
  [33X[0;0YExpressions  involving  commutators play an important role in the context of
  nilpotent  groups.  Expanding  an iterated commutator produces a complicated
  and long expression. For example,[133X
  
  
  [24X[33X[0;6Y[x,y,z] = y^{-1}x^{-1}yxz^{-1}x^{-1}y^{-1}xyz.[133X
  
  [124X
  
  [33X[0;0YEvaluating  a commutator [22X[a,b][122X is done efficiently by computing the equation
  [22X(ba)^-1ab[122X.   Therefore,   for   each  commutator  we  need  to  perform  two
  multiplications   and   one   inversion.   Evaluating   [22X[x,y,z][122X  needs  four
  multiplications  and  two  inversions.  Evaluation of an iterated commutator
  with  [22Xn[122X  components  takes  [22X2n-1[122X  multiplications  and  [22Xn-1[122X  inversions. The
  expression  on  the  right  hand  side  above  needs [22X9[122X multiplications and [22X5[122X
  inversions  which  is  clearly  much  more  expensive  than  evaluating  the
  commutator directly.[133X
  
  [33X[0;0YAssuming  that no cancellations occur, expanding an iterated commutator with
  n  components  produces  a word with [22X2^n+1-2^n-1-2[122X factors half of which are
  inverses.  A similar effect occurs whenever a compact expression is expanded
  into a word in generators and inverses, for example [22X(ab)^49[122X.[133X
  
  [33X[0;0YTherefore,  it  is  important  not  to  expand  expressions  into  a word in
  generators  and  inverses.  For this purpose we provide a mechanism which we
  call  here [13Xexpression trees[113X. An expression tree preserves the structure of a
  given  expression.  It  is a (binary) tree in which each node is assigned an
  operation  and  whose leaves are generators of a free group or integers. For
  example,  the expression [22X[(xy)^2, z][122X is stored as a tree whose top node is a
  commutator  node.  The right subtree is just a generator node (corresponding
  to [22Xz[122X). The left subtree is a power node whose subtrees are a product node on
  the  left  and  an integer node on the right. An expression tree can involve
  products, powers, conjugates and commutators. However, the list of available
  operations can be extended.[133X
  
  [33X[0;0YEvaluation  of  an  expression tree is done recursively and requires as many
  operations  as  there  are  nodes  in  the  tree.  An expression tree can be
  evaluated in a specific group by the function [2XEvaluateExpTree[102X ([14X3.2-2[114X).[133X
  
  [33X[0;0YA presentation specified by expression trees is a record with the components
  [11X.generators[111X  and  [11X.relations[111X.  See  section  [14X3.2[114X  for  a  description of the
  functions that produce and manipulate expression trees.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLoadPackage( "nq" );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xgens := ExpressionTrees( 2 );[127X[104X
    [4X[28X[ x1, x2 ][128X[104X
    [4X[25Xgap>[125X [27Xr1 := LeftNormedComm( [gens[1],gens[2],gens[2]] );[127X[104X
    [4X[28XComm( x1, x2, x2 )[128X[104X
    [4X[25Xgap>[125X [27Xr2 := LeftNormedComm( [gens[1],gens[2],gens[2],gens[1]] );[127X[104X
    [4X[28XComm( x1, x2, x2, x1 )[128X[104X
    [4X[25Xgap>[125X [27Xpres := rec( generators := gens, relations := [r1,r2] );[127X[104X
    [4X[28Xrec( generators := [ x1, x2 ], [128X[104X
    [4X[28Xrelations := [ Comm( x1, x2, x2 ), Comm( x1, x2, x2, x1 ) ] )[128X[104X
  [4X[32X[104X
  
  
  [1X2.7 [33X[0;0YA word about the implementation[133X[101X
  
  [33X[0;0YThe  ANU  NQ  is  written in C, but not in ANSI C. I hope to make one of the
  next  versions  ANSI compliable. However, it uses a fairly restricted subset
  of the language so that it should be easy to compile it in new environments.
  The  code is 64-bit clean. If you have difficulties with porting it to a new
  environment, let me know and I'll be happy to assist if time permits.[133X
  
  [33X[0;0YThe  program  has  two  collectors:  a  simple  collector  from  the left as
  described  in  [LGS90]  and  a  combinatorial  from  the  left  collector as
  described  in  [VL90]. The combinatorial collector is always faster than the
  simple  collector,  therefore,  it  is the collector used by this package by
  default.   This   can   be   changed   by   modifying  the  global  variable
  [2XNqDefaultOptions[102X ([14X3.4-2[114X).[133X
  
  [33X[0;0YIn  a  polycyclic  group  with  generators that do not have power relations,
  exponents  may  become arbitrarily large. Experience shows that this happens
  rarely  in the computations done by the ANU NQ. Exponents are represented by
  32-bit  integers.  The  collectors  perform  an overflow check and abort the
  computation if an overflow occurred. In a GNU environment the program can be
  compiled  using  the `long long' 64-bit integer type. For this uncomment the
  relevant line in src/Makefile and recompile the program.[133X
  
  [33X[0;0YAs  part  of  the  step  that  enforces consistency and the relations of the
  group,  the  ANU NQ performs computations with integer matrices and converts
  them  to  Hermite Normal Form. The algorithm used here is a variation of the
  Kanan-Bachem  algorithm  based  on the GNU multiple precision package GNU MP
  [GMP].  Experience shows that the integer matrices are usually fairly sparse
  and  Kanan-Bachem  seems  to  be  sufficient  in  this context. However, the
  implementation  might  benefit  from a more efficient strategy for computing
  Hermite Normal Forms. This is a topic for further investigations.[133X
  
  [33X[0;0YAs the program does not compute the Smith Normal Form for each factor of the
  lower  central  series  but the Hermite Normal Form, it does not necessarily
  obtain a minimal generating set for each factor of the lower central series.
  The   following  is  a  simple  example  of  this  behaviour.  We  take  the
  presentation[133X
  
  
  [24X[33X[0;6Y\langle x, y | x^2 = y \rangle[133X
  
  [124X
  
  [33X[0;0YThe  group  is  clearly  isomorphic  to  the additive group of the integers.
  Applying  the  ANU  NQ  to  this  presentation gives the following nilpotent
  presentation:[133X
  
  
  [24X[33X[0;6Y\langle A,B | A^2 = B, [B,A] \rangle[133X
  
  [124X
  
  [33X[0;0YA   nilpotent  presentation  on  a  minimal  generating  set  would  be  the
  presentation of the free group on one generator:[133X
  
  
  [24X[33X[0;6Y\langle A | \; \rangle[133X
  
  [124X
  
  
  [1X2.8 [33X[0;0YThe input format of the standalone[133X[101X
  
  [33X[0;0YThe  input  format  for  finite  presentations resembles the way many people
  write  down a presentation on paper. Here are some examples of presentations
  that the ANU NQ accepts:[133X
  
  
      < a, b | >                       # free group of rank 2
  
      < a, b, c; x, y | 
                  [a,b,c],             # a left normed commutator
                  [b,c,c,c]^6,         # another one raised to a power
                  a^2 = c^-3*a^2*c^3,  # a relation
                  a^(b*c) = a,         # a conjugate relation
                  (a*[b,(a*c)])^6,     # something that looks complicated
                  [x,y,y,y,y],         # an identical relation
                  [c,x,x,x,x,x]        # c is a fifth right Engel element
      >
  
  [33X[0;0YA presentation starts with '<' followed by a list of generators separated by
  commas.  Generator  names are strings that contain only upper and lower case
  letters,  digits,  dots  and underscores and that do not start with a digit.
  The list of generator names is separated from the list of relators/relations
  by  the  symbol  '[22X∣[122X'.  The  list  of generators can be followed by a list of
  identical  generators  separated  by a semicolon. Relators and relations are
  separated by commas and can be mixed arbitrarily. Parentheses can be used in
  order to group subexpressions together. Square brackets can be used in order
  to form left normed commutators. The symbols '*' and '^' can be used to form
  products and powers, respectively. The presentation finishes with the symbol
  '>'.  A  comment  starts  with the symbol '#' and finishes at the end of the
  line.  The  file  src/presentation.c  contains  a  complete  grammar for the
  presentations accepted by the ANU NQ.[133X
  
  [33X[0;0YTypically,  the  input  for  the  standalone  is  put into a file by using a
  standard  text editor. The file can be passed as an argument to the function
  [2XNilpotentQuotient[102X  ([14X3.1-1[114X). It is also possible to put a presentation in the
  standalone's  input  format into a string and use the string as argument for
  [2XNilpotentQuotient[102X ([14X3.1-1[114X).[133X
  
