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; 4845

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.)
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 K=Ker( SL2(Z53) → SL2(Z5) ) (of order 15625) has H3(K,Z) = (Z5)6+Z125. (This reproduces a calculation of W.Browder and J.Pakianathan which was used to produce a counter-example to a conjecture of A. Adem.)
- the abelian group G=C2×C4×C6×C8×C10 ×C12 (of order 46080) has H6(G,Z) = (Z2)280+(Z4)12+(Z12)3 .
- the Mathieu simple group M23 (of order 10200960) has H2(M23,Z) = H3(M23,Z) = 0. (This reproduces J. Milgram's counter-example to a conjecture of J.-L. Loday.)

gap> GroupHomology(AlternatingGroup(7),10);time;
[ 2, 3, 3, 3 ]
1756
gap> S:=Image(IsomorphismPermGroup(SL(3,3)));;
gap> GroupHomology(S,8);time;
[ 2, 3 ]
6340
gap> K:=MaximalSubgroups(SylowSubgroup(SL(2,Integers mod 5^3),5))[2];
gap> K:=Image(IsomorphismPcGroup(K));
gap> GroupHomology(K,3);time;
[ 5, 5, 5, 5, 5, 5, 125 ]
3254
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 ]
23265
gap> GroupHomology(MathieuGroup(23),2);time;
[ ]
9395
gap> GroupHomology(MathieuGroup(23),3);time;
[ ]
157961

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 commands show 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 .
- the amalgamated product G=S5*AS4 of the symmetric groups S5 and S4 over the canonical subgroup A=S3 has 5-dimensional integral homology H5(G,Z) = (Z2)5 . (The amalgamated product can be represented as a graph of groups.)
- The 3-dimensional crystallographic space group S with Hermann-Mauguin symbol "P62" has 5-dimensional integral homology H5(S,Z) = Z2+Z2.
- the Heisenberg group H in five complex variables (a torsion free nilpotent group of class two) has 5-dimensional integral homology H5(H,Z) = (Z2)43+Z6+Z132.
- the free nilpotent group N of class 2 on four generators has 4-dimensional integral homology H4(N,Z) = (Z3)4+Z84. (The full range of homology groups for N were first calculated in a paper by L. Lambe.)

(The last three examples require the "AClib", "Polycyclic" and "nq" packages. HAP can be loaded without these packages if such examples are not required..)

gap> D:=[ [1,[2,3]], [2,[3,3]], [3,[4,3]], [4,[5,3]], [5,[6,3]], [6,[7,3]] ];;
gap> CoxeterDiagramDisplay(D);;
gap> GroupHomology(D,5);time;
[ 3 ]
13885
gap> S5:=SymmetricGroup(5);SetName(S5,"S5");
gap> S4:=SymmetricGroup(4);SetName(S4,"S4");
gap> A:=SymmetricGroup(3);SetName(A,"S3");
gap> AS5:=GroupHomomorphismByFunction(A,S5,x->x);
gap> AS4:=GroupHomomorphismByFunction(A,S4,x->x);
gap> D:=[S5,S4,[AS5,AS4]];
gap> GraphOfGroupsDisplay(D);
gap> GroupHomology(D,5);time;
[ 2, 2, 2, 2, 2 ]
22004
gap> GroupHomology(SpaceGroupBBNWZ("P62"),5);time;
[ 2, 2 ]
4336
gap> GroupHomology(HeisenbergPcpGroup(5),5);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, 6, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 ]
73765
gap> F:=FreeGroup(4);; N:=NilpotentQuotient(F,2);;
gap> GroupHomology(N,4);time;
[ 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
41967

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.

We end this introduction by mentioning that HAP can also be used to make calculations such as:

- The mod 2 cohomology ring H*(D32,Z2) for the dihedral group of order 64 is generated by two elements of degree 1 and one element of degree 2 and possibly (though not very likely) some generators of degree greater than 15.
- The Lie algebra M3(Z) of all integer 3×3 matrices has 5-dimensional Lie homology H5(A,Z)=(Z2)8+Z.
- The suspension X=SK(G,1) of an Eilenberg-Mac Lane space for the free nilpotent group of class 2 on four generators has third homotopy group pi3X = Z30.
- The group presentation P = <x,y,z,a,b,c, | a=xy, b=yz, c=zx, ax=ya, by=zb, cz=xc > is aspherical.

The following commands yield these four calculations.

gap> A:=ModPCohomologyRing(DihedralGroup(64),15);
<algebra of dimension 136 over GF(2)>
gap> List(ModPRingGenerators(A),a->A!.degree(a));
[ 0, 1, 1, 2 ]
gap> A:=MatLieAlgebra(Integers,3);;
gap> LieAlgebraHomology(A,5);
[ 2, 2, 2, 2, 2, 2, 2, 2, 0 ]
gap> F:=FreeGroup(4);;G:=NilpotentQuotient(F,2);;
gap> ThirdHomotopyGroupOfSuspensionB(G);
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0 ]
gap> F:=FreeGroup(6);;x:=F.1;;y:=F.2;;z:=F.3;;a:=F.4;;b:=F.5;;c:=F.6;;
gap> rels:=[a^-1*x*y, b^-1*y*z, c^-1*z*x, a*x*(y*a)^-1, b*y*(z*b)^-1, c*z*(x*c)^-1];;
gap> IsAspherical(F,rels);;
Presentation is aspherical.

| Contents | Next page