About HAP: Introduction
HAP can be used to make basic calculations in the cohomology of finite and infinite groups. For example, to calculate the integral homology Hn(S3,Z) of the symmetric group S3 in dimensions 100 < n <105 we could proceed naively as follows. First choose a set of generators for S3, for instance the two permutations (1,2) and (1,2,3). Then, with HAP loaded into GAP, perform the following commands.
gap>  gensG:=[(1,2), (1,2,3)];
[ (1,2), (1,2,3) ]

gap>  IntegralGroupHomology([gensG,101);
[ 2 ]

gap>  IntegralGroupHomology([gensG,102);
[  ]

gap>  IntegralGroupHomology(gensG,103);
[ 6 ]

gap>  IntegralGroupHomology(gensG,104);
[  ]

The HAP command IntegralGroupHomology(gens,n) returns the abelian group invariants of the n-dimensional homology of the group G generated by gens with coefficients in the trivial G-module Z. We see that H101(S3,Z) = Z2, H102(S3,Z) = 0, H103(S3,Z) = Z6 and H104(S3,Z) = 0.

This example has two features that dramatically help the computations. Firstly, S3 is an extremely small group. Secondly, S3 has periodic homology with period 4 (meaning that Hn(S3,Z)=Hn+4(S3,Z) for n>0) and so the homology groups themselves are also extremely small. 

Computations typically require a more careful approach. For example, to compute the low dimensional homology of the Sylow 2-subgroup P of the Mathieu simple group M23 we could try the same approach using using the set of six generators for P produced by GAP. However, we would run into a memory problem in dimension 4. The following commands show how to solve this problem by choosing a smaller set of generators.
>gap  P:=SylowSubgroup(MathieuGroup(23),2);
<permutation group with 6 generators>

gap>  S:=GeneratorsOfGroup(P);; gensP:=[S[4],S[6],S[2]];;

gap>  Order(Group(gensP))=Order(P);
true

gap>  IntegralGroupHomology(gensP,1);
[2,2,2]

gap>  IntegralGroupHomology(gensP,2);
[2,2,4]

gap>  IntegralGroupHomology(gensP,3);
[2,2,2,4,4,8]

gap>  IntegralGroupHomology(gensP,4);
[2,2,2,2,2,2,2,2]

Thus H1(P,Z)=(Z2)3, H2(P,Z)=(Z2)2+Z4, H3(P,Z)=(Z2)3+(Z4)2+Z8 and H4(P,Z)=(Z2)8. In order to compute the higher homology of P, or the low dimensional homology of M23  itself, we need more sophisticated tricks. To explain these, and also to explain the role of group generators in HAP's homology computations, we should recall the definition of group homology.

Next page