Table Of
Contents

About HAP: Introduction Next

HAP can be used to make basic calculations in the cohomology of finite and infinite groups. For example, to calculate the integral homology Hn(D201,Z) of the dihedral group of order 402 in dimension n=99 we could perform the following commands.
gap> F:=FreeGroup(2);; x:=F.1;; y:=F.2;;

gap> G:=F/[x^2,y^201,(x*y)^2];; G:=Image(IsomorphismPermGroup(G));;

gap> GroupHomology(G,99);
[ 2, 3, 67 ]

gap> time;
11918
The HAP command GroupHomology(G,n) returns the abelian group invariants of the n-dimensional homology of the group G with coefficients in the integers Z with trivial G-action. We see that H99(D201,Z) = Z402, (Timings are in milliseconds, and measured on a 1.4GHz laptop with 256MB memory using an uncompiled version of HAP.)

The above example has two features that dramatically help the computations. Firstly, D201 is a relatively small group. Secondly, D201 has periodic homology with period 4 (meaning that Hn(D201,Z) = Hn+4(D201,Z) for n>0) and so the homology groups themselves are small. 

Typically, the homology of larger non-periodic groups can only be computed in low dimensions. The following commands show that:
  • the alternating group A7 (of order 2520) has H10(A7,Z) = Z6+(Z3)2
  • the special linear group SL3(Z3) (of order 5616) has H8(SL3(Z3),Z)=Z6 ,
  • the group SL3(Z5) (of order 372000) has H3(SL3(Z5),Z) = Z24 .
  • the abelian group G=C2×C4×C6×C8×C10 ×C12 (of order 46080) has H6(G,Z)=(Z2)280+(Z4)12+(Z12)3 .
gap> GroupHomology(AlternatingGroup(7),10);time;
[ 2, 3, 3, 3 ]
3899

gap> S:=Image(IsomorphismPermGroup(SL(3,3)));;
gap> GroupHomology(S,8);time;
[ 2, 3 ]
28797

gap> S:=Image(IsomorphismPermGroup(SL(3,5)));;
gap> GroupHomology(S,3);time;
[ 8, 3 ]
246062

gap>G:=AbelianGroup([2,4,6,8,10,12]);;
gap> GroupHomology(G,6);time;
[ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12 ]
67193
The command GroupHomology() returns the mod p homology when an optional third argument is set equal to a prime p. The following shows that the Sylow 2-subgroup P of the Mathieu simple group M24 has 6-dimensional mod 2 homology H6(P,Z2)=(Z2)143 . (The group P has order 1024 and the computation took over two hours to complete.)
gap> GroupHomology(SylowSubgroup(MathieuGroup(24),2),6,2);
143
The homology of certain infinite groups can also be calculated. The following shows that the classical braid group B on eight strings (represented by a linear Coxeter diagram D with seven vertices) has 5-dimensional integral homology H5(B,Z) = Z3 .
gap> D:=[  [1,[2,3]],  [2,[3,3]],  [3,[4,3]],  [4,[5,3]],  [5,[6,3]],  [6,[7,3]]  ];;

gap> GroupHomology(D,5);time;
[ 3 ]
13885
The command GroupHomology(G,n) is a composite of several more basic HAP functions and attempts, in a fairly crude way, to make reasonable choices for a number of parameters in the calculation of group homology. For a particular group G you would almost certainly be better off using the more basic functions directly and making the choices yourself! Similar comments apply to functions for cohomology (ring) calculations.

The subsequent pages of this manual explain the basic HAP functions.
The intending reader should be aware that many of the examples are intended to illustrate the full potential of HAP and  consequently may take many minutes (and in one or two cases hours) to run.

                
Contents
Next page