%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%A  grplib.tex                  GAP documentation            Martin Schoenert
%%
%A  @(#)$Id: grplib.tex,v 3.17.1.1 1994/08/31 12:12:23 mschoene Rel $
%%
%Y  Copyright 1990-1992,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
%%
%%  This file describes the  collection  of  group  data  libraries  of  GAP.
%%
%H  $Log: grplib.tex,v $
%H  Revision 3.17.1.1  1994/08/31  12:12:23  mschoene
%H  added description of transitive groups library
%H
%H  Revision 3.17  1994/06/09  12:39:27  vfelsch
%H  updated output of examples
%H
%H  Revision 3.16  1994/06/03  10:10:24  vfelsch
%H  updated an example
%H
%H  Revision 3.15  1994/06/03  08:57:20  mschoene
%H  changed a few things to avoid LaTeX warnings
%H
%H  Revision 3.14  1994/05/30  14:56:11  vfelsch
%H  changed definition of Z for integers and Q for rationals
%H
%H  Revision 3.13  1994/05/30  07:21:17  vfelsch
%H  more index entries rearranged
%H
%H  Revision 3.12  1994/05/28  14:22:35  vfelsch
%H  index entries added and rearranged
%H
%H  Revision 3.11  1994/05/20  10:25:40  vfelsch
%H  added crystallographic groups
%H
%H  Revision 3.10  1993/11/09  00:08:10  martin
%H  added section for irreducible solvable linear groups libary
%H
%H  Revision 3.9  1993/02/19  10:48:42  gap
%H  adjustments in line length and spelling
%H
%H  Revision 3.8  1993/02/18  12:44:58  felsch
%H  bug eliminated (reported by E. O'Brien)
%H
%H  Revision 3.7  1993/02/12  17:06:11  felsch
%H  examples adjusted to line length 72
%H
%H  Revision 3.6  1993/02/11  17:46:09  martin
%H  changed '@' to '&'
%H
%H  Revision 3.5  1993/02/05  16:34:37  felsch
%H  examples fixed
%H
%H  Revision 3.4  1993/01/22  19:27:36  martin
%H  added the 3-groups library
%H
%H  Revision 3.3  1993/01/22  11:52:25  fceller
%H  added Alice's minor fixes (spelling, usage of english)
%H
%H  Revision 3.2  1993/01/18  17:18:33  sam
%H  added description of GL, SL, SP, GU, SU
%H
%H  Revision 3.1  1992/04/01  18:28:29  martin
%H  initial revision under RCS
%H
%%
\Chapter{Group Libraries}

When you start {\GAP}  it already knows several groups.  Currently {\GAP}
initially knows  the following groups.  Some basic groups, such as cyclic
groups or symmetric  groups, the primitive groups of  degree  at most 50,
the solvable groups of size at least 100, the  2-groups of size  at  most
256, and the 3-groups of size at most 729.

Each of the set of groups above is called a *library*.   The whole set of
groups that {\GAP}  knows initially is  called the  {\GAP} *collection of
group libraries*.  There is usually no relation between the groups in the
different libraries.

Most  libraries are accessed in a uniform manner.  For each library there
is a so called *selection function* that allows you to select the list of
groups  that  satisfy given  criterias  from  a  library.   The  *example
function* allows  yo to select one group that  satisfies  given criterias
from the  library.   The low-level *extraction  function* allows  you  to
extract a single group from a library, using a simple indexing scheme.

The first section in this chapter  describes the library of  basic groups
(see "The Basic Groups Library").  This library is special, because it is
not accessed in the same  way as the other  libraries.  The next sections
describe the general appearance of the selection, example, and extraction
function (see "Selection Functions", "Example Functions", and "Extraction
Functions").   The  last sections  in  this  chapter describe  the  group
libraries  currently  available  in {\GAP}  (see  "The  Primitive  Groups
Library", "The Solvable  Groups  Library", "The 2-Groups  Library",  "The
Irreducible Solvable Linear Groups Library").

Note  that  a system administrator may  choose  to install  all, or  only
several, or  even  none  of  the  libraries.   So  some of  the libraries
mentioned below may not be available on your installation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{The Basic Groups Library}

'CyclicGroup( <n> )'%
\index{CyclicGroup} \\
'CyclicGroup( <D>, <n> )'

In the first form 'CyclicGroup' returns the cyclic group of size <n> as a
permutation group.   In the second form   <D> must be   a domain of group
elements,  e.g., 'Permutations' or  'AgWords', and 'CyclicGroup'  returns
the cyclic group of size <n> as a group of elements of that type.

|    gap> c12 := CyclicGroup( 12 );
    Group( ( 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12) )
    gap> c105 := CyclicGroup( AgWords, 5*3*7 );
    Group( c105_1, c105_2, c105_3 )
    gap> Order(c105,c105.1); Order(c105,c105.2); Order(c105,c105.3);
    105
    35
    7 |

\vspace{5mm}
'AbelianGroup( <sizes> )'%
\index{AbelianGroup} \\
'AbelianGroup( <D>, <sizes> )'

In the first form  'AbelianGroup' returns the abelian group $C_{sizes[1]}
\*\ C_{sizes[2]} \*\ ... \*\ C_{sizes[n]}$, where <sizes>  must be a list
of  positive  integers, as a permutation  group.  In the  second form <D>
must  be a  domain of group elements,  e.g., 'Permutations' or 'AgWords',
and  'AbelianGroup' returns the  abelian group as a  group of elements of
this type.

|    gap> g := AbelianGroup( AgWords, [ 2, 3, 7 ] );
    Group( a, b, c )
    gap> Size( g );
    42
    gap> IsAbelian( g );
    true |

The default function 'GroupElementsOps.AbelianGroup' uses  the  functions
'CyclicGroup' and 'DirectProduct' (see "DirectProduct")  to construct the
abelian group.

\vspace{5mm}
'ElementaryAbelianGroup( <n> )'%
\index{ElementaryAbelianGroup} \\
'ElementaryAbelianGroup( <D>, <n> )'

In the first form 'ElementaryAbelianGroup' returns the elementary abelian
group of size <n> as a  permutation group.  <n>  must be a positive prime
power of course.   In the  second form <D>  must be  a  domain of   group
elements, e.g., 'Permutations' or 'AgWords', and 'ElementaryAbelianGroup'
returns the elementary abelian group as a group of elements of this type.

|    gap> ElementaryAbelianGroup( 16 );
    Group( (1,2), (3,4), (5,6), (7,8) )
    gap> ElementaryAbelianGroup( AgWords, 3 ^ 10 );
    Group( m59049_1, m59049_2, m59049_3, m59049_4, m59049_5, m59049_6,
    m59049_7, m59049_8, m59049_9, m59049_10 ) |

The  default    function  'GroupElementsOps.ElementaryAbelianGroup'  uses
'CyclicGroup'  and 'DirectProduct'  (see "DirectProduct" to construct the
elementary abelian group.

\vspace{5mm}
'DihedralGroup( <n> )'%
\index{DihedralGroup} \\
'DihedralGroup( <D>, <n> )'

In  the first form 'DihedralGroup' returns the dihedral group of size <n>
as a permutation group.   <n> must be a positive  even  integer.   In the
second form  <D> must be a domain of group elements, e.g., 'Permutations'
or 'AgWords', and 'DihedralGroup'  returns the dihedral group  as a group
of elements of this type.

|    gap> DihedralGroup( 12 );
    Group( (1,2,3,4,5,6), (2,6)(3,5) ) |

\vspace{5mm}
'PolyhedralGroup( <p>, <q> )'%
\index{PolyhedralGroup} \\
'PolyhedralGroup( <D>, <p>, <q> )'

In the  first form 'PolyhedralGroup' returns the polyhedral group of size
'<p> \*\  <q>'  as a  permutation group.   <p> and  <q> must  be positive
integers and there must exist a  nontrivial <p>-th root  of  unity modulo
every prime factor  of <q>.  In the  second form <D> must be a domain  of
group  elements,  e.g., 'Permutations' or  'Words', and 'PolyhedralGroup'
returns the polyhedral group as a group of elements of this type.

|    gap> PolyhedralGroup( 3, 13 );
    Group( ( 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13), ( 2, 4,10)( 3, 7, 6)
    ( 5,13,11)( 8, 9,12) )
    gap> Size( last );
    39 |

\vspace{5mm}
'SymmetricGroup( <d> )'%
\index{SymmetricGroup} \\
'SymmetricGroup( <D>, <d> )'

In the first form 'SymmetricGroup' returns the symmetric group of  degree
<d>  as  a  permutation group.   <d>  must be a positive integer.  In the
second form <D>  must be a domain of group elements, e.g., 'Permutations'
or 'Words',  and 'SymmetricGroup' returns the symmetric group as a  group
of elements of this type.

|    gap> SymmetricGroup( 8 );
    Group( (1,8), (2,8), (3,8), (4,8), (5,8), (6,8), (7,8) )
    gap> Size( last );
    40320 |

\vspace{5mm}
'AlternatingGroup( <d> )'%
\index{AlternatingGroup} \\
'AlternatingGroup( <D>, <d> )'

In the  first  form  'AlternatingGroup' returns the alternating  group of
degree <d> as a permutation group.  <d> must be a  positive integer.   In
the  second  form  <D>  must  be  a  domain  of  group   elements,  e.g.,
'Permutations' or 'Words', and 'AlternatingGroup' returns the alternating
group as a group of elements of this type.

|    gap> AlternatingGroup( 8 );
    Group( (1,2,8), (2,3,8), (3,4,8), (4,5,8), (5,6,8), (6,7,8) )
    gap> Size( last );
    20160 |

\vspace{5mm}
'GeneralLinearGroup( <n>, <q> )'%
\index{GeneralLinearGroup} \\
'GeneralLinearGroup( <D>, <n>, <q> )'

In the first  form 'GeneralLinearGroup' returns the general  linear group
$GL(  <n>, <q> )$ as a  matrix group.  In the second form <D>  must  be a
domain  of  group  elements,  e.g.,  'Permutations'  or  'AgWords',   and
'GeneralLinearGroup' returns $GL( <n>,  <q>  )$ as a group of elements of
that type.

|    gap> g:= GeneralLinearGroup( 2, 4 ); Size( g );
    GL(2,4)
    180 |

\vspace{5mm}
'SpecialLinearGroup( <n>, <q> )'%
\index{SpecialLinearGroup} \\
'SpecialLinearGroup( <D>, <n>, <q> )'

In the first form 'SpecialLinearGroup' returns  the special  linear group
$SL( <n>, <q>  )$ as a matrix group.   In the second form  <D> must  be a
domain  of  group  elements,  e.g.,  'Permutations'   or  'AgWords',  and
'SpecialLinearGroup' returns $SL(  <n>, <q> )$ as a  group of elements of
that type.

|    gap> g:= SpecialLinearGroup( 3, 4 ); Size( g );
    SL(3,4)
    60480 |

\vspace{5mm}
'SymplecticGroup( <n>, <q> )'%
\index{SymplecticGroup} \\
'SymplecticGroup( <D>, <n>, <q> )'

In the  first  form 'SymplecticGroup'  returns the symplectic  group $SP(
<n>,  <q> )$ as a  matrix group.  In the second form <D> must be a domain
of    group   elements,   e.g.,    'Permutations'   or   'AgWords',   and
'SymplecticGroup' returns $SP( <n>, <q> )$ as a group of elements of that
type.

|    gap> g:= SymplecticGroup( 4, 2 ); Size( g );
    SP(4,2)
    720 |

\vspace{5mm}
'GeneralUnitaryGroup( <n>, <q> )'%
\index{GeneralUnitaryGroup} \\
'GeneralUnitaryGroup( <D>, <n>, <q> )'

In the first form 'GeneralUnitaryGroup' returns the general unitary group
$GU(  <n>, <q> )$ as  a  matrix group.  In the second  form <D> must be a
domain  of  group  elements,   e.g.,  'Permutations'  or  'AgWords',  and
'GeneralUnitaryGroup' returns $GU( <n>, <q> )$ as  a group of elements of
that type.

|    gap> g:= GeneralUnitaryGroup( 3, 3 ); Size( g );
    GU(3,3)
    24192 |

\vspace{5mm}
'SpecialUnitaryGroup( <n>, <q> )'%
\index{SpecialUnitaryGroup} \\
'SpecialUnitaryGroup( <D>, <n>, <q> )'

In the first form 'SpecialUnitaryGroup' returns the special unitary group
$SU( <n>,  <q> )$ as a matrix  group.  In the second form  <D>  must be a
domain  of  group  elements,  e.g.,  'Permutations'  or  'AgWords',   and
'SpecialUnitaryGroup' returns $SU( <n>, <q> )$ as  a group of elements of
that type.

|    gap> g:= SpecialUnitaryGroup( 3, 3 ); Size( g );
    SU(3,3)
    6048 |

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Selection Functions}

'All<Library>Groups( <fun1>, <val1>, <fun2>, <val2>, ... )'

For each  group library there  is a  *selection function*.  This function
allows you to select all groups from the library that have a given set of
properties.

The name of the selection functions always  begins with 'All' and  always
ends with 'Groups'.  Inbetween is a name  that hints at the nature of the
group library.  For example the selection function for the library of all
primitive groups  of  degree  at  most  50  (see  "The  Primitive  Groups
Library") is called 'AllPrimitiveGroups', and the  selection function for
the library of  all  2-groups of  size  at  most 256 (see  "The  2-Groups
Library") is called 'AllTwoGroups'.

These  functions take an  arbitrary number of  pairs of  arguments.   The
first argument in such a pair  is a function  that can  be applied to the
groups in the library,  and the second  argument is either a single value
that this  function must return in  order  to have this group included in
the selection, or a list of such values.

For example

|    AllPrimitiveGroups( DegreeOperation,  [10..15],
                        Size,             [1..100],
                        IsAbelian,        false    );|

should return a list of all primitive  groups with  degree between 10 and
15, size less than 100, that are not abelian.

Thus  the 'AllPrimitiveGroups'  behaves  as if   it was implemented  by a
function similar to the one defined below, where 'PrimitiveGroupsList' is
a list of all primitive groups.  Note, in  the definition below we assume
for simplicity that 'AllPrimitiveGroups' accepts exactly 4 arguments.  It
is of course  obvious how to change this  definition so that the function
would accept a variable number of arguments.

|    AllPrimitiveGroups := function ( fun1, val1, fun2, val2 )
        local    groups, g, i;
        groups := [];
        for i  in [ 1 .. Length( PrimitiveGroupsList ) ] do
            g := PrimitiveGroupsList[i];
            if      fun1(g) = val1  or IsList(val1) and fun1(g) in val1
                and fun2(g) = val2  or IsList(val2) and fun2(g) in val2
            then
                Add( group, g );
            fi;
        od;
        return groups;
    end; |

Note that the real  selection functions are considerably more  difficult,
to improve the efficiency.  Most important, each recognizes a certain set
of  functions and handles those  properties using  an index  (see  "About
Group Libraries").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Example Functions}

'One<Library>Group( <fun1>, <val1>, <fun2>, <val2>, ... )'

For  each  group library there  is  a  *example function*.  This function
allows you to find one group  from  the  library that has a given  set of
properties.

The name of the example  functions always  begins  with  'One' and always
ends with 'Group'.  Inbetween is a name that hints  at the nature of  the
group  library.  For example the example function for the  library of all
primitive  groups  of  degree  at  most  50 (see  "The  Primitive  Groups
Library") is called 'OnePrimitiveGroup', and the example function for the
library of  all 2-groups of size at most 256 (see "The 2-Groups Library")
is called 'OneTwoGroup'.

These  functions take an  arbitrary number of  pairs of  arguments.   The
first argument in such a pair  is a function  that can  be applied to the
groups in the library,  and the second  argument is either a single value
that this  function must return in  order  to have this group returned by
the example function, or a list of such values.

For example

|    OnePrimitiveGroup( DegreeOperation,  [10..15],
                        Size,             [1..100],
                        IsAbelian,        false    );|

should return  one primitive  group with  degree  between 10 and 15, size
less than 100, that is not abelian.

Thus  the 'OnePrimitiveGroup'  behaves  as  if it  was  implemented by  a
function similar to the one defined below, where 'PrimitiveGroupsList' is
a list of all primitive groups.   Note, in the definition below we assume
for simplicity that 'OnePrimitiveGroup'  accepts exactly 4 arguments.  It
is of course obvious how to change  this  definition so that the function
would accept a variable number of arguments.

|    OnePrimitiveGroup := function ( fun1, val1, fun2, val2 )
        local    g, i;
        for i  in [ 1 .. Length( PrimitiveGroupsList ) ] do
            g := PrimitiveGroupsList[i];
            if      fun1(g) = val1  or IsList(val1) and fun1(g) in val1
                and fun2(g) = val2  or IsList(val2) and fun2(g) in val2
            then
                return g;
            fi;
        od;
        return false;
    end; |

Note that the real example functions are  considerably more difficult, to
improve the efficiency.  Most important, each recognizes a certain set of
functions and handles those properties using an  index (see "About  Group
Libraries").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Extraction Functions}

For each group library there is an *extraction function*.  This function
allows you to extract single groups from the library.

The  name of the extraction function always ends with 'Group'  and begins
with a name that hints at  the  nature  of the  library.  For example the
extraction  function  for  the library  of  primitive  groups  (see  "The
Primitive Groups Library") is called 'PrimitiveGroup', and the extraction
function for  the library of all 2-groups  of size at most 256  (see "The
2-Groups Library") is called 'TwoGroup'.

What  arguments  the  extraction  function  accepts,  and  how  they  are
interpreted is described in the  sections  that  describe  the individual
group libraries.

For example

|    PrimitiveGroup( 10, 4 ); |

returns the 4-th primitive group of degree 10.

The reason for the extraction function is as follows.  A group library is
usually  not  stored  as  a  list  of  groups.   Instead a  more  compact
representation for  the groups is used.   For  example  the groups in the
library  of  2-groups are  represented  by 4  integers.   The  extraction
function hides this representation from you, and allows you to access the
group library  as  if it was  a  table of groups  (two dimensional in the
above example).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The Primitive Groups Library}

This  group  library  contains all primitive groups of degree at most 50.
There are a total of 406 such groups.   Actually to be a little  bit more
precise, there are 406  inequivalent  primitive operations on  at most 50
points.  Quite a few of the 406 groups are isomorphic.

\vspace{5mm}
'AllPrimitiveGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{AllPrimitiveGroups}

'AllPrimitiveGroups' returns a list containing all primitive groups  that
have  the properties given  as arguments.  Each property  is specified by
passing a  pair of  arguments, the first being a function,  which will be
applied to all  groups in the library,  and the second being a value or a
list of values,  that  this  function must return in order to  have  this
group included in the list returned by 'AllPrimitiveGroups'.

The  first argument must  be  'DegreeOperation'  and the  second argument
either  a degree or a list of degree, otherwise 'AllPrimitiveGroups' will
print a warning to the effect that the library  contains only groups with
degrees between 1 and 50.

|    gap> l := AllPrimitiveGroups( Size, 120, IsSimple, false );
    &W  AllPrimitiveGroups: degree automatically restricted to [1..50]
    [ S(5), PGL(2,5), S(5) ]
    gap> List( l, g -> g.generators );
    [ [ (1,2,3,4,5), (1,2) ], [ (1,2,3,4,5), (2,3,5,4), (1,6)(3,4) ],
      [ ( 1, 8)( 2, 5, 6, 3)( 4, 9, 7,10), ( 1, 5, 7)( 2, 9, 4)( 3, 8,10)
         ] ] |

\vspace{5mm}
'OnePrimitiveGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{OnePrimitiveGroup}

'OnePrimitiveGroup'  returns one primitive  group that has the properties
given  as  argument.  Each property  is specified  by passing  a pair  of
arguments,  the  first  being  a function, which will  be applied to  all
groups in the library, and the second being a value  or a list of values,
that this function must  return in order to  have this group  returned by
'OnePrimitiveGroup'.  If no such group exists, 'false' is returned.

The  first  argument  must  be 'DegreeOperation'  and the second argument
either  a degree or a list of degree, otherwise  'OnePrimitiveGroup' will
print a warning to the  effect that the library contains only groups with
degrees between 1 and 50.

|    gap> g := OnePrimitiveGroup( DegreeOperation,5, IsSolvable,false );
    A(5)
    gap> Size( g );
    60 |

'AllPrimitiveGroups'  and  'OnePrimitiveGroup'  recognize  the  following
functions  and handle  them usually quite efficient.   'DegreeOperation',
'Size', 'Transitivity', and 'IsSimple'.  You should  pass those functions
first, e.g., it  is more efficient to say 'AllPrimitiveGroups( Size,120 ,
IsAbelian,false  )' than  to  say  'AllPrimitiveGroups(  IsAbelian,false,
Size,120 )' (see "About Group Libraries").

\vspace{5mm}
'PrimitiveGroup( <deg>, <nr> )'%
\index{PrimitiveGroup}

'PrimitiveGroup' returns the  <nr>-th  primitive group  of degree  <deg>.
Both  <deg> and <nr> must be positive integers.  The primitive  groups of
equal degree are  sorted  with respect to  their  size,  so  for  example
'PrimitiveGroup( <deg>, 1  )' is  the smallest primitive group  of degree
<deg>,  e.g,  the  cyclic  group  of size  <deg>,  if  <deg> is a  prime.
Primitive groups of equal degree and size are in no particular order.

|    gap>  g := PrimitiveGroup( 8, 1 );
    AGL(1,8)
    gap> g.generators;
    [ (1,2,3,4,5,6,7), (1,8)(2,4)(3,7)(5,6) ] |

Apart from the usual components described in  "Group Records", the  group
records returned by the above functions have the following components.

'transitivity': \\
        degree of transitivity of <G>.

'isSharpTransitive': \\
        'true' if <G> is sharply '<G>.transitivity'-fold  transitive  and
        'false' otherwise.

'isKPrimitive': \\
        'true' if <G> is <k>-fold primitive, and 'false' otherwise.

'isOdd': \\
        'false' if <G> is a subgroup of the alternating  group  of degree
        '<G>.degree' and 'true' otherwise.

'isFrobeniusGroup': \\
        'true' if <G> is a  Frobenius group  \index{Frobenius group}  and
        'false' otherwise.

This  library  was  computed  by  Charles Sims.   The  list  of primitive
permutation groups  of  degree  at most 20 was published in \cite{Sim70}.
The    library   was    brought    into   {\GAP}    format    by   Martin
Sch{\accent127o}nert.  He assumes the responsibility for all mistakes.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The Transitive Groups Library}
\index{AllTransitiveGroups}
\index{TransitiveGroup}
\index{TransitiveIdentification}

The transitive groups library contains representatives for all transitive
permutation groups of degree at most 11.  Two permutations groups of the
same degree are considered to be equivalent, if there is a renumbering of
points, which maps one group into the other one.  In other words, if they
lie in the save conjugacy class under operation of the full symmetric
group by conjugation.

% There are a total of 650 such groups up to degree 15.
There are a total of 174 such groups up to degree 11.

\vspace{5mm}
'AllTransitiveGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'

'AllTransitiveGroups' returns a list containing all transitive groups
that have the properties given as arguments.  Each property is specified
by passing a pair of arguments, the first being a function, and the
second being a value or a list of values.  'AllTransitiveGroups' will
return all groups from the transitive groups library, for which all
specified functions have the specified values.

If the degree is not restricted to 11 at most, 'AllTransitiveGroups' will
print a warning.

\vspace{5mm}
'OneTransitiveGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'

'OneTransitiveGroup' returns one transitive group that has the properties
given as argument.  Each property is specified by passing a pair of
arguments, the first being a function, and the second being a value or a
list of values.  'OneTransitiveGroup' will return one groups from the
transitive groups library, for which all specified functions have the
specified values.  If no such group exists, 'false' is returned.

If the degree is not restricted to 11 at most, 'OneTransitiveGroup' will
print a warning.

'AllTransitiveGroups' and 'OneTransitiveGroup' recognize the following
functions and get the corresponding properties from a precomputed list to
speed up processing{\:}\\
'DegreeOperation', 'Size', 'Transitivity', and 'IsPrimitive'.  You do not
need to pass those functions first, as the selection function picks the
these properties first.

\vspace{5mm}
'TransitiveGroup( <deg>, <nr> )'

'TransitiveGroup' returns the <nr>-th transitive group of degree <deg>.
Both <deg> and <nr> must be positive integers.  The transitive groups of
equal degree are sorted with respect to their size, so for example
'TransitiveGroup( <deg>, 1 )' is the smallest transitive group of degree
<deg>, e.g, the cyclic group of size <deg>, if <deg> is a prime.  The
ordering of the groups corresponds to the list in Butler/McKay
\cite{BM83}.

This library was computed by Gregory Butler and John McKay.  The list of
transitive groups up to degree 11 was published in \cite{BM83}.
%, the complete list will be published in \cite{BMK}.
The library was brought into {\GAP} format by Alexander Hulpke, who is
responsible for all mistakes.

|    gap> TransitiveGroup(10,22);
    2[x]S(5)
    gap> l:=AllTransitiveGroups(DegreeOperation,12,Size,1440,
    > IsSolvable,false);
    [ 2[]s6, [s6-]2 ]
    gap> List(l,IsSolvable);
    [ false, false ]|

\vspace{5mm}
'TransitiveIdentification( <G> )'

Let <G> be a permutation group, acting transitively on a set of up to 11
points.  Then 'TransitiveIdentification' will return the position of this
group in the transitive groups library.  This means, if <G> operates on
$m$ points and 'TransitiveIdentification' returns $n$, then <G> is
permutation isomorphic to the group 'TransitiveGroup(m,n)'.

|     gap> TransitiveIdentification(Group((1,2),(1,2,3)));
     2|

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The Solvable Groups Library}

{\GAP} has a library of the 1045 solvable  groups  of size between 2  and
100.   The  groups are  from lists  computed by  M.~Hall and J.~K.~Senior
(size  64, see  \cite{HS64}),  R.~Laue (size 96,  see  \cite{Lau82})  and
J.~Neub{\accent127u}ser (other sizes, see \cite{Neu67}).

\vspace{5mm}
'AllSolvableGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{AllSolvableGroups}

'AllSolvableGroups'  returns a  list  containing all solvable groups that
have the properties  given  as arguments.  Each property is specified  by
passing a pair of arguments, the first  being  a function, which will  be
applied to all the groups in the library, and the second being a value or
a list of  values, that this function must return in  order to have  this
group included in the list returned by 'AllSolvableGroups'.

|    gap> AllSolvableGroups(Size,24,IsNontrivialDirectProduct,false);
    [ 12.2, grp_24_11, D24, Q8+S3, Sl(2,3), S4 ] |

\vspace{5mm}
'OneSolvableGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{OneSolvableGroup}

'OneSolvableGroup'   returns   a   solvable  group  with   the  specified
properties.   Each property is specified by passing  a pair of arguments,
the first being a  function, which will  be applied to all  the groups in
the library, and the second being  a value or a list of values, that this
function  must   return  in  order   to   have  this  group  returned  by
'OneSolvableGroup'.  If no such group exists, 'false' is returned.

|    gap> OneSolvableGroup(Size,100,x->Size(DerivedSubgroup(x)),10);
    false
    gap> OneSolvableGroup(Size,24,IsNilpotent,false);
    S3x2^2|

\vspace{5mm}
'SolvableGroup( <size>, <nr> )'%
\index{SolvableGroup}

'SolvableGroup' returns the <nr>-th group of size  <size> in the library.
'SolvableGroup'  will signal an error if <size> is not between 2 and 100,
or if <nr> is larger  than the number of solvable groups of  size <size>.
The group is returned as finite polycyclic  group (see "Finite Polycyclic
Groups").

|    gap> SolvableGroup( 32 , 15 );
    Q8x4 |

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The 2-Groups Library}%
\index{2-groups}

The  library  of 2-groups contains all the 2-groups of size dividing 256.
There  are a total of 58760 such groups, 1  of size 2,  2 of size 4, 5 of
size  8, 14 of size 16, 51  of size 32, 267 of size 64, 2328 of size 128,
and 56092 of size 256.

\vspace{5mm}
'AllTwoGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{AllTwoGroups}

'AllTwoGroups'  returns the  list  of  all  the  2-groups that  have  the
properties given as arguments.   Each property  is specified by passing a
pair of arguments,  the first  is  a function that can be applied to each
group, the second is either a  single value or  a list of values that the
function must return in order to select that group.

|    gap> l := AllTwoGroups( Size, 256, Rank, 3, pClass, 2 );
    [ Group( a1, a2, a3, a4, a5, a6, a7, a8 ),
      Group( a1, a2, a3, a4, a5, a6, a7, a8 ),
      Group( a1, a2, a3, a4, a5, a6, a7, a8 ),
      Group( a1, a2, a3, a4, a5, a6, a7, a8 ) ]
    gap> List( l, g -> Length( ConjugacyClasses( g ) ) );
    [ 112, 88, 88, 88 ] |

\vspace{5mm}
'OneTwoGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{OneTwoGroup}

'OneTwoGroup' returns a single 2-group that  has the  properties given as
arguments.   Each property is  specified by passing a pair of  arguments,
the first is a function that can  be applied to each group, the second is
either a single value or a list  of values that the function  must return
in order to select that group.

|    gap> g := OneTwoGroup( Size, [64..128], Rank, [2..3], pClass, 5 );
    &I  size restricted to [ 64, 128 ]
    Group( a1, a2, a3, a4, a5, a6 )
    gap> Size( g );
    64
    gap> Rank( g );
    2 |

'AllTwoGroups' and  'OneTwoGroup' recognize the  following  functions and
handle them usually very efficiently.  'Size', 'Rank' for the rank of the
Frattini quotient  of the group, and  'pClass' for the exponent-$p$ class
of the group.  Note that  'Rank' and  'pClass'  are  dummy functions that
can  be  used  only in  this context, i.e., they  can not  be  applied to
arbitrary groups.

\vspace{5mm}
'TwoGroup( <size>, <nr> )'%
\index{TwoGroup}

'TwoGroup'  returns  the <nr>-th  group of  size  <size>.   The  group is
returned as a finite polycyclic group  (see "Finite Polycyclic  Groups").
'TwoGroup'  will signal an error if <size> is not  a power of 2 between 2
and 256, or <nr> is larger than the number of groups of size <size>.

Within each size the  following criteria have  been  used,  in  turn,  to
determine the index position of a group in the list

1:      increasing generator number;

2:      increasing exponent-2 class;

3:      the position of its parent in the list of groups  of  appropriate
        size;

4:      the  list  in which the Newman and O\'Brien implementation of the
        $p$-group generation algorithm outputs the immediate  descendants
        of a group.

|    gap> g := TwoGroup( 32, 45 );
    Group( a1, a2, a3, a4, a5 )
    gap> Rank( g );
    4
    gap> pClass( g );
    2
    gap> g.abstractRelators;
    [ a1^2*a5^-1, a2^2, a2^-1*a1^-1*a2*a1, a3^2, a3^-1*a1^-1*a3*a1,
      a3^-1*a2^-1*a3*a2, a4^2, a4^-1*a1^-1*a4*a1, a4^-1*a2^-1*a4*a2,
      a4^-1*a3^-1*a4*a3, a5^2, a5^-1*a1^-1*a5*a1, a5^-1*a2^-1*a5*a2,
      a5^-1*a3^-1*a5*a3, a5^-1*a4^-1*a5*a4 ] |

Apart from the usual components described in  "Group Records", the  group
records returned by the above functions have the following components.

'rank':\\
        rank of Frattini quotient of <G>.

'pclass': \\
        exponent-$p$ class of <G>.

'abstractGenerators': \\
        a list of abstract generators of <G> (see "AbstractGenerator").

'abstractRelators': \\
        a  list of  relators  of <G>  stored  as  words in  the  abstract
        generators.

Descriptions of the algorithms used in constructing  the library data may
be found in \cite{OBr90,OBr91}.  Using  these techniques,  a library  was
first  prepared  in  1987 by  M.F.~Newman  and  E.A.~O\'Brien; a  partial
description may be found in \cite{NO89}.

The  library was brought into  the {\GAP} format by Werner Nickel,  Alice
Niemeyer, and E.A.~O\'Brien.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The 3-Groups Library}%
\index{3-groups}

The  library  of 3-groups contains all the 3-groups of size dividing 729.
There  are  a total of 594 such groups, 1  of size 3,  2 of size 9,  5 of
size 27,  15 of size 81,   67 of size 243, and  504 of size 729.

\vspace{5mm}
'AllThreeGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{AllThreeGroups}

'AllThreeGroups'  returns the  list  of  all the 3-groups that  have  the
properties given as arguments.  Each  property  is specified by passing a
pair of arguments,  the first  is  a function that can be applied to each
group, the second is either a  single value or  a list of values that the
function must return in order to select that group.

|    gap> l := AllThreeGroups( Size, 243, Rank, [2..4], pClass, 3 );;
    gap> Length ( l );
    33
    gap>  List( l, g -> Length( ConjugacyClasses( g ) ) );
    [ 35, 35, 35, 35, 35, 35, 35, 243, 99, 99, 51, 51, 51, 51, 51, 51,
      51, 51, 99, 35, 243, 99, 99, 51, 51, 51, 51, 51, 35, 35, 35, 35, 35
     ] |

\vspace{5mm}
'OneThreeGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{OneThreeGroup}

'OneThreeGroup' returns a single 3-group that has the properties given as
arguments.   Each property is  specified by passing a pair of  arguments,
the first is a function that can  be applied to each group, the second is
either a single value or a list  of values that the function  must return
in order to select that group.

|    gap> g := OneThreeGroup( Size, 729, Rank, 4, pClass, [3..5] );
    Group( a1, a2, a3, a4, a5, a6 )
    gap> IsAbelian( g );
    true |

'AllThreeGroups' and  'OneThreeGroup' recognize the  following  functions
and handle them usually very efficiently.  'Size', 'Rank' for the rank of
the Frattini quotient  of the  group, and  'pClass' for  the exponent-$p$
class  of  the group. Note that 'Rank' and  'pClass' are  dummy functions
that can be  used only  in  this context, i.e., they cannot be applied to
arbitrary groups.

\vspace{5mm}
'ThreeGroup( <size>, <nr> )'%
\index{ThreeGroup}

'ThreeGroup' returns  the <nr>-th  group of  size  <size>. The  group is
returned as a finite polycyclic group  (see "Finite Polycyclic  Groups").
'ThreeGroup' will signal an error if <size> is not  a power of 3 between
3 and 729, or <nr> is larger than the number of groups of size <size>.

Within each size the  following criteria have  been  used,  in  turn,  to
determine the index position of a group in the list

1:      increasing generator number;

2:      increasing exponent-3 class;

3:      the position of its parent in the list of groups  of  appropriate
        size;

4:      the  list  in which the Newman and O\'Brien implementation of the
        $p$-group generation algorithm outputs the immediate  descendants
        of a group.

|    gap> g := ThreeGroup( 243, 56 );
    Group( a1, a2, a3, a4, a5 )
    gap> pClass( g );
    3
    gap> g.abstractRelators;
    [ a1^3, a2^3, a2^-1*a1^-1*a2*a1*a4^-1, a3^3, a3^-1*a1^-1*a3*a1,
      a3^-1*a2^-1*a3*a2*a5^-1, a4^3, a4^-1*a1^-1*a4*a1*a5^-1,
      a4^-1*a2^-1*a4*a2, a4^-1*a3^-1*a4*a3, a5^3, a5^-1*a1^-1*a5*a1,
      a5^-1*a2^-1*a5*a2, a5^-1*a3^-1*a5*a3, a5^-1*a4^-1*a5*a4 ] |

Apart from the usual components described in  "Group Records", the  group
records returned by the above functions have the following components.

'rank':\\
        rank of Frattini quotient of <G>.

'pclass': \\
        exponent-$p$ class of <G>.

'abstractGenerators': \\
        a list of abstract generators of <G> (see "AbstractGenerator").

'abstractRelators': \\
        a  list of  relators  of <G>  stored  as  words in  the  abstract
        generators.

Descriptions of the algorithms used in constructing  the library data may
be found in \cite{OBr90,OBr91}.

The library was generated and brought into {\GAP} format by E.A.~O\'Brien
and  Colin Rhodes.  David Baldwin,  M.F.~Newman,  and   Maris Ozols  have
contributed in various ways to this  project and to correctly determining
these groups.  The library  design is modelled on and borrows extensively
from  the  2-groups  library, which  was  brought  into {\GAP}  format by
Werner Nickel, Alice Niemeyer, and E.A.~O\'Brien.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The Irreducible Solvable Linear Groups Library}

The *IrredSol* group library  provides access to the irreducible solvable
subgroups of $GL(n,p)$,  where $n >  1$, $p$ is prime  and $p^n \<\ 256$.
The  library contains exactly one member  from each  of the 370 conjugacy
classes of such subgroups.

By well known theory, this library also doubles as a library of primitive
solvable permutation groups of non-prime degree less than 256.  To access
the  data in  this form, you   must first  build  the  matrix group(s) of
interest and then call the function \\{}
'PrimitivePermGroupIrreducibleMatGroup( <matgrp> )' \\{}
This  function returns a permutation  group  isomorphic to the semidirect
product of an   irreducible matrix group  (over a  finite field) and  its
underlying vector space.

\vspace{5mm}
'AllIrreducibleSolvableGroups( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{AllIrreducibleSolvableGroups}

'AllIrreducibleSolvableGroups' returns a  list containing all irreducible
solvable linear groups that have the properties given as arguments.  Each
property is specified by  passing a pair  of arguments, the first being a
function which will be   applied to all  groups  in the library, and  the
second being a  value or a list of  values that this function must return
in  order to     have this group    included  in  the   list  returned by
'AllIrreducibleSolvableGroups'.

|    gap> AllIrreducibleSolvableGroups( Dimension, 2,
    >                                   CharFFE, 3,
    >                                   Size, 8 );
    [ Group( [ [ 0*Z(3), Z(3)^0 ], [ Z(3)^0, 0*Z(3) ] ],
        [ [ Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0 ] ],
        [ [ Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3) ] ] ),
      Group( [ [ 0*Z(3), Z(3)^0 ], [ Z(3), 0*Z(3) ] ],
        [ [ Z(3)^0, Z(3) ], [ Z(3), Z(3) ] ] ),
      Group( [ [ 0*Z(3), Z(3)^0 ], [ Z(3)^0, Z(3) ] ] ) ] |

\vspace{5mm}
'OneIrreducibleSolvableGroup( <fun1>, <val1>, <fun2>, <val2>, ... )'%
\index{OneIrreducibleSolvableGroup}

'OneIrreducibleSolvableGroup'  returns   one irreducible  solvable linear
group  that has  the properties   given  as arguments.  Each  property is
specified by  passing  a pair of   arguments, the first being  a function
which will be applied to all groups in  the library, and the second being
a value  or a list of values  that this function  must return in order to
have  this group returned by  'OneIrreducibleSolvableGroup'.   If no such
group exists, 'false' is returned.

|    gap> OneIrreducibleSolvableGroup( Dimension, 4,
    >                                  IsLinearlyPrimitive, false );
    Group( [ [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ],
      [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ],
      [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ],
      [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ] ],
    [ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ],
      [ Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ],
      [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ],
      [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ],
    [ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ],
      [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ],
      [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ],
      [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ] ] ) |

'AllIrreducibleSolvableGroups'     and      'OneIrreducibleSolvableGroup'
recognize the following   functions  and  handle them very    efficiently
(because the information is stored with the groups and so no computations
are needed)\: 'Dimension' for the linear  degree, 'CharFFE' for the field
characteristic,         'Size',          'IsLinearlyPrimitive',       and
'MinimalBlockDimension'.  Note that the last two are dummy functions that
can be used  only in this context. Their  meaning is explained at the end
of this section.

\vspace{5mm}
'IrreducibleSolvableGroup( <n>, <p>, <i> )'%
\index{IrreducibleSolvableGroup}

'IrreducibleSolvableGroup'   returns  the   <i>-th  irreducible  solvable
subgroup  of $GL$(  <n>,  <p> ).  The  irreducible  solvable subgroups of
$GL(n,p)$ are ordered with respect to the following criteria:
\begin{enumerate}
\item increasing size;
\item increasing guardian number.
\end{enumerate}
If two groups have the same size and guardian, they  are in no particular
order.  (See the library documentation   or  [Sho92] for the meaning   of
guardian.)

|    gap> g := IrreducibleSolvableGroup( 3, 5, 12 );
    Group( [ [ 0*Z(5), Z(5)^2, 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5) ],
      [ 0*Z(5), 0*Z(5), Z(5)^2 ] ],
    [ [ 0*Z(5), Z(5)^0, 0*Z(5) ], [ 0*Z(5), 0*Z(5), Z(5)^0 ],
      [ Z(5)^0, 0*Z(5), 0*Z(5) ] ],
    [ [ Z(5)^2, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ],
      [ 0*Z(5), 0*Z(5), Z(5)^2 ] ],
    [ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^2, 0*Z(5) ],
      [ 0*Z(5), 0*Z(5), Z(5)^2 ] ],
    [ [ Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5), 0*Z(5) ],
      [ 0*Z(5), 0*Z(5), Z(5) ] ] ) |

Apart from the usual components described in  "Group Records", the  group
records returned by the above functions have the following components.

'size': \\
	size of <G>.

'isLinearlyPrimitive': \\
        'false'  if  <G>  preserves  a  direct sum  decomposition  of the
	underlying vector space, and 'true' otherwise.

'minimalBlockDimension': \\
        not bound  if <G>  is linearly  primitive;  otherwise  equals the
	dimension of the blocks in an unrefinable system of imprimitivity
	for <G>.

This library was computed  and brought into  {\GAP} format by Mark Short.
Descriptions of the algorithms used in computing  the library data can be
found in \cite{Sho92}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\Section{The Crystallographic Groups Library}%
\index{crystallographic groups}

{\GAP} provides a library of  crystallographic groups of dimensions 2, 3,
and 4.

For  the definition of the  concepts used in this  section  see chapter 1
(Basic   definitions)     of  the  book   ``Crystallographic    groups of
four-dimensional   space\'\'\   \cite{BBNWZ78}.  However, note   that the
definition of the  concept of a crystal  system given on  page 16 of that
book relies on the following statement about $\Q$-classes\:
\begin{itemize}
\item[] For a  $\Q$-class  $C$  there is a unique holohedry $H$ such that
        each  f.\,u. group in $C$  is a subgroup of some  f.\,u. group in
        $H$,  but is not  a subgroup of any  f.\,u. group  belonging to a
        holohedry of smaller order.
        \vspace{-2mm}
\end{itemize}
This statement is correct  for dimensions 1,  2, 3, and  4, and hence the
definition of ``crystal system\'\'\ given on page 16 of \cite{BBNWZ78} is
known to be unambiguous for the dimensions 1, 2, 3, and 4. However, there
is a  counterexample  to  it  in  seven-dimensional  space  so that   the
definition breaks down for some higher dimensions.

Therefore,  the authors of  the book have  since proposed to replace this
definition of ``crystal system\'\'\  by the  following much simpler  one,
which has been discussed in more detail in \cite{NPW81}. To formulate it,
we use    the   intersections  of $\Q$-classes    and  Bravais  flocks as
introduced on page 17 of \cite{BBNWZ78}, and we define the classification
of the set of all $\Z$-classes into crystal systems as follows\:
\vspace{-2mm}
\begin{itemize}
\item[] *Definition*\:\  A crystal system contains full geometric crystal
        classes.  The $\Z$-classes  of  two  (geometric)  crystal classes
        belong to the same crystal system  if and only if these geometric
        crystal  classes  intersect  the same  set of  Bravais  flocks of
        $\Z$-classes.
        \vspace{-2mm}
\end{itemize}
From  this  definition  of  a  crystal system  of  $\Z$-classes  one then
obtains  crystal systems of f.\,u.  groups,  of space-group types, and of
space groups in the same manner as with the  preceding definitions in the
book.

The new definition is unambiguous for all dimensions. Moreover, it can be
checked  from  the   tables   in the  book   that  it   defines  the same
classification as the old one for dimensions 1, 2, 3, and 4.

It should  be noted that  the concept of  crystal  family is well-defined
independently of the dimension if one uses the ``more natural\'\'\ second
definition of it at the end of page 17. Moreover, the first definition of
crystal family on page  17 defines the same concept  as the second one if
the now proposed definition of crystal system is used.

\vspace{5mm}
The  functions offered by the  {\GAP}  library of crystallographic groups
can be used to access  data which are given  also in the Tables 1, 5, and
6 of \cite{BBNWZ78}\:
\begin{itemize}
\item The information  on the crystal families  listed in Table 1  can be
      reproduced using the 'DisplayCrystalFamily' function.
\item Similarly,  the  'DisplayCrystalSystem'  function  can  be  used to
      reproduce the information on the crystal systems  which is provided
      in Table 1.
\item The information  given in the $\Q$-class  headlines  of Table 1 can
      be  displayed   by  the   'DisplayQClass'  function,   whereas  the
      'FpGroupQClass' function can be used to reproduce the presentations
      which are listed  in Table 1  for the  $\Q$-class  representatives.
\item The information  given in the $\Z$-class  headlines of Table 1 will
      be covered by the results of the 'DisplayZClass' function,  and the
      matrix  generators   of  the  $\Z$-class  representatives   can  be
      constructed by calling the 'MatGroupZClass' function.
\item The  'DisplaySpaceGroupType' and the  'DisplaySpaceGroupGenerators'
      functions  can be used  to reproduce  all of the information on the
      space-group types which is provided in Table 1.
\item The normalizers  listed in Table 5 can be reproduced by calling the
      'NormalizerZClass' function.
\item Finally,  the 'CharTableQClass' function will compute the character
      tables  listed in Table 6,  whereas the  isomorphism types given in
      Table 6  may be received  by calling the  'DisplayQClass' function.
      \vspace{-2mm}
\end{itemize}
The display functions mentioned in the above list print their output with
different  indentation.  So, calling them in  a suitably nested loop, you
may produce a  listing  in which  the  information about  the objects  of
different type will be properly  indented as has been  done in Table 1 of
\cite{BBNWZ78}.

Further functions for crystallographic groups, e.\,g. determining Wyckoff
positions, or certain  selection or  example  functions may be added at a
later time. We would appreciate reactions from the users.

\vspace{5mm}
Finally, before we describe the available functions in detail, let us add
just  a last remark concerning a  different terminology in  the tables of
\cite{BBNWZ78} and in the current library. In group theory, the number of
elements of a  finite group  usually is  called  the ``order\'\'\ of  the
group.   This notation has  been  used throughout   in  the book.   Here,
however,  we  will follow the    {\GAP}   conventions and use  the   term
``size\'\'\ instead.

\vspace{5mm}
'NrCrystalFamilies( <dim> )'%
\index{NrCrystalFamilies}

'NrCrystalFamilies' returns  the number of   crystal families in  case of
dimension  <dim>.  It can  be used  to formulate  loops over  the crystal
families.

There are 4, 6, and 23 crystal families of dimension 2, 3, and 4,
respectively.

|    gap> n := NrCrystalFamilies( 4 );
    23 |

\vspace{5mm}
'DisplayCrystalFamily( <dim>, <family> )'%
\index{DisplayCrystalFamily}

'DisplayCrystalFamily'   displays  for    the specified  crystal   family
essentially the same information as is  provided for that family in Table
1 of \cite{BBNWZ78}, namely
\vspace{-1mm}
\begin{itemize}
\item the family name,
      \vspace{-2mm}
\item the number of parameters,
      \vspace{-2mm}
\item the common rational decomposition pattern,
      \vspace{-2mm}
\item the common real decomposition pattern,
      \vspace{-2mm}
\item the number of crystal systems in the family, and
      \vspace{-2mm}
\item the number of Bravais flocks in the family.
      \vspace{-2mm}
\end{itemize}
For details see \cite{BBNWZ78}.

|    gap> DisplayCrystalFamily( 4, 17 );
    &I Family XVII: cubic orthogonal; 2 free parameters;
    &I  Q-decomposition pattern 1+3; R-decomposition pattern 1+3;
    &I  2 crystal systems; 6 Bravais flocks
    gap> DisplayCrystalFamily( 4, 18 );
    &I Family XVIII: octagonal; 2 free parameters;
    &I  Q-irreducible; R-decomposition pattern 2+2;
    &I  1 crystal system; 1 Bravais flock
    gap> DisplayCrystalFamily( 4, 21 );
    &I Family XXI: di-isohexagonal orthogonal; 1 free parameter;
    &I  R-irreducible; 2 crystal systems; 2 Bravais flocks |

\vspace{5mm}
'NrCrystalSystems( <dim> )'%
\index{NrCrystalSystems}

'NrCrystalSystems'  returns  the number  of  crystal  systems  in case of
dimension  <dim>. It  can  be  used  to  formulate loops over the crystal
systems.

There are 4,   7, and 33  crystal  systems of  dimension   2, 3,  and  4,
respectively.

|    gap> n := NrCrystalSystems( 2 );
    4 |

\vspace{5mm}
The following two functions are functions of crystal systems.

Each crystal system is characterized by a pair '(<dim>,\,<system>)' where
<dim>  is the associated dimension,  and  <system> is  the number of  the
crystal system.

\vspace{5mm}
'DisplayCrystalSystem( <dim>, <system> )'%
\index{DisplayCrystalSystem}

'DisplayCrystalSystem'  displays    for  the  specified   crystal  system
essentially the same information as is  provided for that system in Table
1 of \cite{BBNWZ78}, namely
\vspace{-2mm}
\begin{itemize}
\item the number of $\Q$-classes in the crystal system and
      \vspace{-2mm}
\item the     identification      number,      i.\,e.,      the     tripel
      '(<dim>,\,<system>,\,<q-class>)' described below, of the  $\Q$-class
      that is the holohedry of the crystal system.
      \vspace{-2mm}
\end{itemize}
For details see \cite{BBNWZ78}.

|    gap> for sys in [ 1 .. 4 ] do  DisplayCrystalSystem( 2, sys );  od;
    &I  Crystal system 1: 2 Q-classes; holohedry (2,1,2)
    &I  Crystal system 2: 2 Q-classes; holohedry (2,2,2)
    &I  Crystal system 3: 2 Q-classes; holohedry (2,3,2)
    &I  Crystal system 4: 4 Q-classes; holohedry (2,4,4) |

\vspace{5mm}
'NrQClassesCrystalSystem( <dim>, <system> )'%
\index{NrQClassesCrystalSystem}

'NrQClassesCrystalSystem' returns the number  of $\Q$-classes  within the
given  crystal  system.  It  can be  used  to  formulate  loops  over the
$\Q$-classes.

\vspace{5mm}
The following five functions are functions of $\Q$-classes.

In general,   the parameters characterizing  a  $\Q$-class  will  form  a
triple  '(<dim>,\,<system>,\,<q-class>)'  where <dim>  is  the associated
dimension,  <system> is the number  of the associated crystal system, and
<q-class> is  the number of  the $\Q$-class  within  the  crystal system.
However,  in case of  dimensions  2  or 3, a    $\Q$-class  may  also  be
characterized by  a pair '(<dim>,  <IT-number>)' where <IT-number> is the
number in the International Tables   for Crystallography \cite{Hah83}  of
any space-group type   lying in (a $\Z$-class  of)  that  $\Q$-class,  or
just by the  Hermann-Mauguin symbol of any  space-group type lying  in (a
$\Z$-class of) that $\Q$-class.

The Hermann-Mauguin symbols \index{Hermann-Mauguin  symbol} which  we use
in  {\GAP} are  the short  Hermann-Mauguin symbols  defined  in the  1983
edition  of the International   Tables \cite{Hah83},   but any  occurring
indices  are expressed  by  ordinary integers,  and bars  are replaced by
minus    signs.     For    example,     the     Hermann-Mauguin    symbol
<P>$\overline{4}2_1m$ will be represented by the string '\"P-421m\"'.

\vspace{5mm}
'DisplayQClass( <dim>, <system>, <q-class> )'%
\index{DisplayQClass} \\
'DisplayQClass( <dim>, <IT-number> )' \\
'DisplayQClass( <Hermann-Mauguin-symbol> )'

'DisplayQClass' displays for   the specified $\Q$-class  essentially  the
same  information as  is  provided  for  that  $\Q$-class  in  Table 1 of
\cite{BBNWZ78} (except for the defining relations given there), namely
\vspace{-2mm}
\begin{itemize}
\item the size of the groups in the $\Q$-class,
      \vspace{-2mm}
\item the isomorphism type of the groups in the $\Q$-class,
      \vspace{-2mm}
\item the Hurley pattern,
      \vspace{-2mm}
\item the rational constituents,
      \vspace{-2mm}
\item the number of $\Z$-classes in the $\Q$-class, and
      \vspace{-2mm}
\item the number of space-group types in the $\Q$-class.
      \vspace{-2mm}
\end{itemize}
For details see \cite{BBNWZ78}.

|    gap> DisplayQClass( "p2" );
    &I   Q-class H (2,1,2): size 2; isomorphism type 2.1 = C2;
    &I    Q-constituents 2*(2,1,2); cc; 1 Z-class; 1 space group
    gap> DisplayQClass( "R-3" );
    &I   Q-class (3,5,2): size 6; isomorphism type 6.1 = C6;
    &I    Q-constituents (3,1,2)+(3,4,3); ncc; 2 Z-classes; 2 space grps
    gap> DisplayQClass( 3, 195 );
    &I   Q-class (3,7,1): size 12; isomorphism type 12.5 = A4;
    &I    C-irreducible; 3 Z-classes; 5 space grps
    gap> DisplayQClass( 4, 27, 4 );
    &I   Q-class H (4,27,4): size 20; isomorphism type 20.3 = D10xC2;
    &I    Q-irreducible; 1 Z-class; 1 space group
    gap> DisplayQClass( 4, 29, 1 );
    &I  *Q-class (4,29,1): size 18; isomorphism type 18.3 = D6xC3;
    &I    R-irreducible; 3 Z-classes; 5 space grps |

Note   in the preceding  examples  that, as pointed  out  above, the term
``size\'\'\ denotes the order of a representative  group of the specified
$\Q$-class and, of course, not the (infinite) class length.

\vspace{5mm}
'FpGroupQClass( <dim>, <system>, <q-class> )'%
\index{FpGroupQClass} \\
'FpGroupQClass( <dim>, <IT-number> )' \\
'FpGroupQClass( <Hermann-Mauguin-symbol> )'

'FpGroupQClass' returns  a finitely presented group  $F$,  say, which  is
isomorphic to the groups in the specified $\Q$-class.

The presentation    of  that group    is the same   as  the corresponding
presentation given in Table 1 of  \cite{BBNWZ78} except for the fact that
its generators are  listed in reverse order.  The  reason for this change
is  that,  whenever the  group   in question is   solvable, the resulting
generators will,  in fact, form  an AG-system (as  defined in  {\GAP}) if
they are  numbered ``from the  top to the bottom\'\'. The 'AgGroupQClass'
function described next will make use of  this fact in order to construct
an ag group isomorphic to $F$.

Note that, for any $\Z$-class  in the  specified $\Q$-class,  the  matrix
group  returned by the 'MatGroupZClass'  function (see below) not only is
isomorphic to $F$, but also its  generators satisfy the defining relators
of $F$.

Besides  of the usual components,  the group record  of  $F$ will have an
additional component  $F$'.crQClass' which saves a list of the parameters
that specify the given $\Q$-class.

|    gap> F := FpGroupQClass( 4, 20, 3 );
    FpGroupQClass( 4, 20, 3 )
    gap> F.generators;
    [ f.1, f.2 ]
    gap> F.relators;
    [ f.2^6, f.1^2*f.2^-3, f.2^-1*f.1^-1*f.2*f.1*f.2^-4 ]
    gap> F.size;
    12
    gap> F.crQClass;
    [ 4, 20, 3 ] |

\vspace{5mm}
'AgGroupQClass( <dim>, <system>, <q-class> )'%
\index{AgGroupQClass} \\
'AgGroupQClass( <dim>, <IT-number> )' \\
'AgGroupQClass( <Hermann-Mauguin-symbol> )'

'AgGroupQClass' returns an ag group $A$, say, isomorphic to the groups in
the specified  $\Q$-class,  if these  groups are  solvable,  or the value
'false' (together with an appropriate warning), otherwise.

$A$  is constructed by first  establishing a finitely presented group (as
it would be returned by the 'FpGroupQClass' function described above) and
then constructing from it an isomorphic ag group by possibly refining the
underlying AG-system.

Besides of the  usual components, the group   record of $A$  will have an
additional component  $A$'.crQClass' which saves a list of the parameters
that specify the given $\Q$-class.

|    gap> A := AgGroupQClass( 4, 31, 3 );
    &I  Warning: a non-solvable group can't be represented as an ag group
    false
    gap> A := AgGroupQClass( 4, 20, 3 );
    AgGroupQClass( 4, 20, 3 )
    gap> A.generators;
    [ f.1, f.21, f.22 ]
    gap> A.size;
    12
    gap> A.crQClass;
    [ 4, 20, 3 ] |

\vspace{5mm}
'CharTableQClass( <dim>, <system>, <q-class> )'%
\index{CharTableQClass} \\
'CharTableQClass( <dim>, <IT-number> )' \\
'CharTableQClass( <Hermann-Mauguin-symbol> )'

'CharTableQClass'   returns   the   character    table   $T$,  say,  of a
representative group of (a $\Z$-class of) the specified $\Q$-class.

Although the set of characters  can be considered as  an invariant of the
specified $\Q$-class,  the resulting  table  will depend on  the order in
which {\GAP} sorts the conjugacy classes of  elements and the irreducible
characters  and    hence,  in  general,   will  not   coincide  with  the
corresponding table presented in \cite{BBNWZ78}.

'CharTableQClass'  proceeds   as follows.  If  the  groups  in  the given
$\Q$-class   are  solvable,  then  it    first calls the  'AgGroupQClass'
function to get an isomorphic ag group, and then it calls the 'CharTable'
function to compute the character table of that ag group.  In the case of
one of the five   $\Q$-classes  of  dimension  4  whose groups  are   not
solvable,   it first  calls   the 'FpGroupQClass'    function to get   an
isomorphic finitely  presented group, then    it constructs a   specially
chosen faithful permutation representation of low  degree for that group,
and    finally  it determines  the  character    table  of the  resulting
permutation group again by calling the 'CharTable' function.

In general,  the above  strategy will be   much  more efficient than  the
alternative  possibilities of   calling the 'CharTable'    function for a
finitely presented group provided by  the 'FpGroupQClass' function or for
a matrix group provided by the 'MatGroupZClass' function.

|    gap> T := CharTableQClass( 4, 20, 3 );;
    gap> DisplayCharTable( T );
    CharTableQClass( 4, 20, 3 )

         2  2  1  1  2  2  2
         3  1  1  1  1  .  .

           1a 3a 6a 2a 4a 4b
        2P 1a 3a 3a 1a 2a 2a
        3P 1a 1a 2a 2a 4b 4a
        5P 1a 3a 6a 2a 4a 4b

    X.1     1  1  1  1  1  1
    X.2     1  1  1  1 -1 -1
    X.3     1  1 -1 -1  A -A
    X.4     1  1 -1 -1 -A  A
    X.5     2 -1  1 -2  .  .
    X.6     2 -1 -1  2  .  .

    A = E(4)
      = ER(-1) = i |

\vspace{5mm}
'NrZClassesQClass( <dim>, <system>, <q-class> )'%
\index{NrZClassesQClass} \\
'NrZClassesQClass( <dim>, <IT-number> )' \\
'NrZClassesQClass( <Hermann-Mauguin-symbol> )'

'NrZClassesQClass' returns the number of  $\Z$-classes  within  the given
$\Q$-class. It can be used to formulate loops over the $\Z$-classes.

\vspace{5mm}
The following functions are functions of $\Z$-classes.

In  general,  the parameters  characterizing  a  $\Z$-class  will  form a
quadruple  '(<dim>,\,<system>, \mbox{<q-class>},\,<z-class>)' where <dim>
is the  associated dimension, <system>  is the  number of the  associated
crystal system,  <q-class> is  the  number of the  associated  $\Q$-class
within the crystal system, and <z-class> is the number  of the $\Z$-class
within the  $\Q$-class.  However, in   case   of dimensions   2 or 3,   a
$\Z$-class  may also be characterized  by  a pair '(<dim>,  <IT-number>)'
where <IT-number> is the number  in the International Tables \cite{Hah83}
of  any  space-group  type lying  in  that $\Z$-class,  or   just  by the
Hermann-Mauguin symbol of any space-group  type lying in that $\Z$-class.

\vspace{5mm}
'DisplayZClass( <dim>, <system>, <q-class>, <z-class> )'%
\index{DisplayZClass} \\
'DisplayZClass( <dim>, <IT-number> )' \\
'DisplayZClass( <Hermann-Mauguin-symbol> )'

'DisplayZClass'  displays for the  specified  $\Z$-class  essentially the
same information  as  is provided  for  that  $\Z$-class  in Table   1 of
\cite{BBNWZ78}  (except    for  the  generating    matrices   of a  class
representative group given there), namely
\vspace{-2mm}
\begin{itemize}
\item for  dimensions  2  and  3,   the  Hermann-Mauguin   symbol   of  a
      representative space-group type  which belongs  to that $\Z$-class,
      \vspace{-2mm}
\item the Bravais type,
      \vspace{-2mm}
\item some decomposability information,
      \vspace{-2mm}
\item the number of space-group types belonging to the $\Z$-class,
      \vspace{-2mm}
\item the size of the associated cohomology group.
      \vspace{-2mm}
\end{itemize}
For details see \cite{BBNWZ78}.

|    gap> DisplayZClass( 2, 3 );
    &I    Z-class (2,2,1,1) = Z(pm): Bravais type II/I; fully Z-reducible;
    &I     2 space groups; cohomology group size 2
    gap> DisplayZClass( "F-43m" );
    &I    Z-class (3,7,4,2) = Z(F-43m): Bravais type VI/II; Z-irreducible;
    &I     2 space groups; cohomology group size 2
    gap> DisplayZClass( 4, 2, 3, 2 );
    &I    Z-class B (4,2,3,2): Bravais type II/II; Z-decomposable;
    &I     2 space groups; cohomology group size 4
    gap> DisplayZClass( 4, 21, 3, 1 );
    &I   *Z-class (4,21,3,1): Bravais type XVI/I; Z-reducible;
    &I     1 space group; cohomology group size 1 |

\vspace{5mm}
'MatGroupZClass( <dim>, <system>, <q-class>, <z-class> )'%
\index{MatGroupZClass} \\
'MatGroupZClass( <dim>, <IT-number> )' \\
'MatGroupZClass( <Hermann-Mauguin-symbol> )'

'MatGroupZClass' returns a $dim \times dim$ matrix  group $M$, say, which
is a representative of  the specified $\Z$-class.  Its generators satisfy
the  defining  relators  of the   finitely  presented group  which may be
computed  by  calling the  'FpGroupQClass' function  (see above)  for the
$\Q$-class which contains the given $\Z$-class.

The generators of $M$ are the same matrices as those given  in Table 1 of
\cite{BBNWZ78}. Note, however, that they will  be listed in reverse order
to  keep them  in parallel  to  the abstract  generators provided by  the
'FpGroupQClass' function (see above).

Besides of  the usual components, the group  record  of $M$ will  have an
additional component  $M$'.crZClass' which saves a list of the parameters
that  specify  the given $\Z$-class.  (In   fact,  in order  to  make the
resulting     group  record  consistent   with    those  returned  by the
'NormalizerZClass' or 'ZClassRepsDadeGroup' functions described below, it
also will have an additional component $M$.'crConjugator' containing just
the identity element of $M$.)

|    gap> M := MatGroupZClass( 4, 20, 3, 1 );
    MatGroupZClass( 4, 20, 3, 1 )
    gap> for g in M.generators do
    >  Print( "\n" ); PrintArray( g ); od; Print( "\n" );

    [ [   0,   1,   0,   0 ],
      [  -1,   0,   0,   0 ],
      [   0,   0,  -1,  -1 ],
      [   0,   0,   0,   1 ] ]

    [ [  -1,   0,   0,   0 ],
      [   0,  -1,   0,   0 ],
      [   0,   0,  -1,  -1 ],
      [   0,   0,   1,   0 ] ]

    gap> M.size;
    12
    gap> M.crZClass;
    [ 4, 20, 3, 1 ] |

\vspace{5mm}
'NormalizerZClass( <dim>, <system>, <q-class>, <z-class> )'%
\index{NormalizerZClass} \\
'NormalizerZClass( <dim>, <IT-number> )' \\
'NormalizerZClass( <Hermann-Mauguin-symbol> )'

'NormalizerZClass' returns the  normalizer $N$, say,  in $GL(dim,\Z)$  of
the representative $dim \times dim$  matrix group which is constructed by
the 'MatGroupZClass' function (see above).

If the size of $N$ is finite,  then $N$ again lies in some $\Z$-class. In
this case, the group record of $N$ will contain two additional components
$N$'.crZClass'  and $N$.'crConjugator'  which  provide the parameters  of
that  $\Z$-class  and a  matrix $g  \in  GL(dim,\Z)$,  respectively, such
that $N = g^{-1}  R  g$, where $R$ is   the representative group of  that
$\Z$-class.

|    gap> N := NormalizerZClass( 4, 20, 3, 1 );
    NormalizerZClass( 4, 20, 3, 1 )
    gap> for g in N.generators do Print( "\n" ); PrintArray( g ); od;

    [ [   1,   0,   0,   0 ],
      [   0,   1,   0,   0 ],
      [   0,   0,   1,   0 ],
      [   0,   0,  -1,  -1 ] ]

    [ [   1,   0,   0,   0 ],
      [   0,  -1,   0,   0 ],
      [   0,   0,  -1,  -1 ],
      [   0,   0,   1,   0 ] ]

    [ [   0,   1,   0,   0 ],
      [  -1,   0,   0,   0 ],
      [   0,   0,   1,   0 ],
      [   0,   0,   0,   1 ] ]

    [ [  -1,   0,   0,   0 ],
      [   0,  -1,   0,   0 ],
      [   0,   0,  -1,   0 ],
      [   0,   0,   0,  -1 ] ]

    gap> N.size;
    96
    gap> N.crZClass;
    [ 4, 20, 22, 1 ]
    gap> N.crConjugator = N.identity;
    true |

|    gap> L := NormalizerZClass( 3, 42 );
    NormalizerZClass( 3, 3, 2, 4 )
    gap> L.size;
    16
    gap> L.crZClass;
    [ 3, 4, 7, 2 ]
    gap> L.crConjugator;
    [ [ 0, 0, -1 ], [ 1, 0, 0 ], [ 0, -1, -1 ] ]
    gap> M := NormalizerZClass( "C2/m" );
    Group( [ [ -1, 0, 0 ], [ 0, -1, 0 ], [ 0, 0, -1 ] ],
    [ [ 0, -1, 0 ], [ -1, 0, 0 ], [ 0, 0, -1 ] ],
    [ [ 1, 0, 1 ], [ 0, 1, 1 ], [ 0, 0, 1 ] ],
    [ [ -1, 0, 0 ], [ 0, -1, 0 ], [ -1, -1, 1 ] ],
    [ [ 0, 1, -1 ], [ 1, 0, -1 ], [ 0, 0, -1 ] ] )
    gap> M.size;
    "infinity"
    gap> IsBound( M.crZClass );
    false |

\newpage
'NrSpaceGroupTypesZClass( <dim>, <system>, <q-class>, <z-class> )'%
\index{NrSpaceGroupTypesZClass} \\
'NrSpaceGroupTypesZClass( <dim>, <IT-number> )' \\
'NrSpaceGroupTypesZClass( <Hermann-Mauguin-symbol> )'

'NrSpaceGroupTypes'  returns the number  of  space-group types within the
given $\Z$-class.  It can be used to formulate loops over the space-group
types.

|    gap> N := NrSpaceGroupTypesZClass( 4, 4, 1, 1 );
    13 |

\vspace{5mm}
Some of the $\Z$-classes  of   dimension $d$, say, are ``maximal\'\'\  in
the sense  that the groups in these  classes are maximal finite subgroups
of $GL(d,\Z)$.  Generalizing a term which is  being used for dimension 4,
we call the representatives   of these  maximal $\Z$-classes  the ``*Dade
groups*\'\'\ of dimension $d$.

\vspace{5mm}
'NrDadeGroups( <dim> )'%
\index{NrDadeGroups}

'NrDadeGroups' returns the  number of Dade groups  of dimension <dim>. It
can be used to formulate loops over the Dade groups.

There are 2, 4, and 9 Dade groups of dimension 2, 3, and 4, respectively.

|    gap> NrDadeGroups( 4 );
    9 |

\vspace{5mm}
'DadeGroup( <dim>, <n> )'%
\index{DadeGroup}

'DadeGroup' returns the $n$th Dade group of dimension $dim$.

|    gap> D := DadeGroup( 4, 7 );
    MatGroupZClass( 4, 31, 7, 2 ) |

\vspace{5mm}
'DadeGroupNumbersZClass( <dim>, <system>, <q-class>, <z-class> )'%
\index{DadeGroupNumbersZClass} \\
'DadeGroupNumbersZClass( <dim>, <IT-number> )' \\
'DadeGroupNumbersZClass( <Hermann-Mauguin-symbol> )'

'DadeGroupNumbersZClass' returns the set of  all those integers $n_i$ for
which the $n_i$th  Dade   group of dimension  $dim$ contains   a subgroup
which, in  $GL(dim,\Z)$,  is conjugate to the representative group of the
given $\Z$-class.

|    gap> dadeNums := DadeGroupNumbersZClass( 4, 4, 1, 2 );
    [ 1, 5, 8 ]
    gap> for d in dadeNums do
    >     D := DadeGroup( 4, d );
    >     Print( D, " of size ", Size( D ), "\n" );
    > od;
    MatGroupZClass( 4, 20, 22, 1 ) of size 96
    MatGroupZClass( 4, 30, 13, 1 ) of size 288
    MatGroupZClass( 4, 32, 21, 1 ) of size 384 |

\vspace{5mm}
'ZClassRepsDadeGroup( <dim>, <system>, <q-class>, <z-class>, <n> )'%
\index{ZClassRepsDadeGroup} \\
'ZClassRepsDadeGroup( <dim>, <IT-number>, <n> )' \\
'ZClassRepsDadeGroup( <Hermann-Mauguin-symbol>, <n> )'

'ZClassRepsDadeGroup' determines in  the  $n$th Dade group  of  dimension
$dim$ all  those  conjugacy classes  whose groups  are,  in $GL(dim,\Z)$,
conjugate to the $\Z$-class  representative group $R$,  say, of the given
$\Z$-class.   It  returns  a  list  of  representative  groups of   these
conjugacy classes.

Let $M$ be any group in the resulting list.  Then the group record of $M$
provides   two components  $M$'.crZClass'   and $M$'.crConjugator'  which
contain the list  of $\Z$-class  parameters of $R$  and a suitable matrix
$g$ from $GL(dim,\Z)$,  respectively,  such that $M$ equals $g^{-1} R g$.

|    gap> DadeGroupNumbersZClass( 2, 2, 1, 2 );
    [ 1, 2 ]
    gap> ZClassRepsDadeGroup( 2, 2, 1, 2, 1 );
    [ MatGroupZClass( 2, 2, 1, 2 )^[ [ 0, 1 ], [ -1, 0 ] ] ]
    gap> ZClassRepsDadeGroup( 2, 2, 1, 2, 2 );
    [ MatGroupZClass( 2, 2, 1, 2 )^[ [ 1, -1 ], [ 0, -1 ] ],
      MatGroupZClass( 2, 2, 1, 2 )^[ [ 1, 0 ], [ -1, 1 ] ] ]
    gap> R := last[2];;
    gap> R.crZClass;
    [ 2, 2, 1, 2 ]
    gap> R.crConjugator;
    [ [ 1, 0 ], [ -1, 1 ] ] |

\vspace{5mm}
The following functions are functions of space-group types.

In general, the parameters characterizing a space-group  type will form a
quintuple '(<dim>,  <system>,\,<q-class>,\,<z-class>,\,<sg-type>)'  where
<dim>  is  the   associated dimension,  <system>  is the   number  of the
associated crystal system, <q-class> is    the number of the   associated
$\Q$-class  within  the  crystal system, <z-class> is  the  number of the
$\Z$-class  within the $\Q$-class,  and <sg-type> is the space-group type
within  the $\Z$-class.  However, in  case of dimensions  2 or 3, you may
instead specify a $\Z$-class  by a pair  '(<dim>, <IT-number>)' or by its
Hermann-Mauguin  symbol (as  described  above).  Then  the  function will
handle the  first  space-group   type within that    $\Z$-class,  i.\,e.,
<sg-type> $= 1$, that is, the corresponding symmorphic space group (split
extension).

\vspace{5mm}
'DisplaySpaceGroupType( <dim>,  <system>, <q-class>, <z-class>, <sg-type>
)'%
\index{DisplaySpaceGroupType} \\
'DisplaySpaceGroupType( <dim>, <IT-number> )' \\
'DisplaySpaceGroupType( <Hermann-Mauguin-symbol> )'

'DisplaySpaceGroupType' displays for  the specified space-group type some
of the information which is provided for that space-group type in Table 1
of \cite{BBNWZ78}, namely
\vspace{-2mm}
\begin{itemize}
\item the orbit size associated with that space-group type and,
      \vspace{-2mm}
\item for dimensions  2 and 3,  the <IT-number>  and  the Hermann-Mauguin
      symbol.
      \vspace{-2mm}
\end{itemize}
For details see \cite{BBNWZ78}.

|    gap> DisplaySpaceGroupType( 2, 17 );
    &I     Space-group type (2,4,4,1,1); IT(17) = p6mm; orbit size 1
    gap> DisplaySpaceGroupType( "Pm-3" );
    &I     Space-group type (3,7,2,1,1); IT(200) = Pm-3; orbit size 1
    gap> DisplaySpaceGroupType( 4, 32, 10, 2, 4 );
    &I    *Space-group type (4,32,10,2,4); orbit size 18
    gap> DisplaySpaceGroupType( 3, 6, 1, 1, 4 );
    &I    *Space-group type (3,6,1,1,4); IT(169) = P61, IT(170) = P65;
    &I      orbit size 2; fp-free |

\vspace{5mm}
'DisplaySpaceGroupGenerators(   <dim>,  <system>,  <q-class>,  <z-class>,
<sg-type> )'%
\index{DisplaySpaceGroupGenerators} \\
'DisplaySpaceGroupGenerators( <dim>, <IT-number> )' \\
'DisplaySpaceGroupGenerators( <Hermann-Mauguin-symbol> )'

'DisplaySpaceGroupGenerators'  displays the non-translation generators of
a representative  space group  of the specified space-group type  without
actually constructing that matrix group.

In more details\: \ Let $n  = dim$ be  the given dimension, and let $M_1,
\ldots, M_r$ be the generators of the representative  $n \times n$ matrix
group of the given  $\Z$-class  (this is the  group which you will get if
you call the 'MatGroupZClass' function (see above) for that  $\Z$-class).
Then, for the given space-group type, the 'SpaceGroup' function described
below will construct as representative of that space-group type an $(n+1)
\times (n+1)$ matrix group which is generated  by the $n$ translations by
the basis  vectors and $r$ additional matrices  $S_1, \ldots, S_r$ of the
form $S_i  = \left(  \catcode`\|=12  \begin{tabular}{c|c}  \catcode`\|=13
$M_i$ & $C_i$ \\ \hline 0 & 1 \end{tabular} \right)$, where the $n \times
n$ submatrices $M_i$ are as defined  above, and the $C_i$ are $n$-columns
with rational entries.   The 'DisplaySpaceGroupGenerators' function saves
time by not constructing the group, but  just displaying the $r$ matrices
$S_1,
\ldots, S_r$.

|    gap> DisplaySpaceGroupGenerators( "P61" );
    &I  The non-translation generators of SpaceGroup( 3, 6, 1, 1, 4 ) are

    [ [   -1,    0,    0,    0 ],
      [    0,   -1,    0,    0 ],
      [    0,    0,    1,  1/2 ],
      [    0,    0,    0,    1 ] ]

    [ [    0,   -1,    0,    0 ],
      [    1,   -1,    0,    0 ],
      [    0,    0,    1,  1/3 ],
      [    0,    0,    0,    1 ] ] |

\vspace{5mm}
'SpaceGroup( <dim>, <system>, <q-class>, <z-class>, <sg-type> )'%
\index{SpaceGroup} \\
'SpaceGroup( <dim>, <IT-number> )' \\
'SpaceGroup( <Hermann-Mauguin-symbol> )'

'SpaceGroup' returns a  $(dim+1) \times (dim+1  )$ matrix group $S$, say,
which is a  representative of the given   space-group type (see also  the
description of the 'DisplaySpaceGroupGenerators' function above).

Besides of the  usual components, the  group  record of $S$ will  have an
additional component  $S$'.crSpaceGroupType' which  saves  a  list of the
parameters that specify the given space-group type.

|    gap> S := SpaceGroup( "P61" );
    SpaceGroup( 3, 6, 1, 1, 4 )
    gap> for s in S.generators do
    >  Print( "\n" ); PrintArray( s ); od; Print( "\n" );

    [ [   -1,    0,    0,    0 ],
      [    0,   -1,    0,    0 ],
      [    0,    0,    1,  1/2 ],
      [    0,    0,    0,    1 ] ]

    [ [    0,   -1,    0,    0 ],
      [    1,   -1,    0,    0 ],
      [    0,    0,    1,  1/3 ],
      [    0,    0,    0,    1 ] ]

    [ [  1,  0,  0,  1 ],
      [  0,  1,  0,  0 ],
      [  0,  0,  1,  0 ],
      [  0,  0,  0,  1 ] ]

    [ [  1,  0,  0,  0 ],
      [  0,  1,  0,  1 ],
      [  0,  0,  1,  0 ],
      [  0,  0,  0,  1 ] ]

    [ [  1,  0,  0,  0 ],
      [  0,  1,  0,  0 ],
      [  0,  0,  1,  1 ],
      [  0,  0,  0,  1 ] ]

    gap> S.crSpaceGroupType;
    [ 3, 6, 1, 1, 4 ] |

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%E  Emacs . . . . . . . . . . . . . . . . . . . . . local Emacs variables
%%
%%  Local Variables:
%%  mode:               outline
%%  outline-regexp:     "\\\\Chapter\\|\\\\Section"
%%  fill-column:        73
%%  eval:               (hide-body)
%%  End:
%%



