## DEFINITIONS OF SOME BASIC DATA TYPES

| In the following definitions we use Z to denote either the ring of integers, or the ring of integers modulo a prime p. (Elsewhere in these web pages we denote the latter by Zp .) A ZG-resolution means a free ZG-resolution of the trivial ZG-module Z. A chain complex means a chain complex of free Z-modules.
TYPE | DEFINITION

Free ZG-module

Let eltsG be a (partial) listing of elements in some group G (which could be finite or infinite). In order to represent a word w in a free ZG-module M of rank n we use a list of integer pairs w=[ [i1,g1], [i2,g2], ..., [ik,gk] ]. The integers ij lie in the range between -n and n and correspond to the free ZG-generators of M and their additive inverses. The integers gj are positive and correspond to the group element eltsG[gj]. The (partial) listing eltsG may contain duplicate copies of elements of G.

ZG-resolution

A ZG-resolution ... → Mn → Mn-1 → ... → M1 → M0 → Z is represented by a record R with the following components.

- R.dimension(k) is a function which returns the ZG-rank of the module Mk.
- R.boundary(k, j) is a function which returns the image in Mk-1 of the j-th free generator of Mk.
- R.homotopy(k,[i,g]) is a function which returns the image in Mk+1, under a contracting homotopy Mk → Mk+1, of the element [[i,g]] in Mk. (The elements [[i,g]] freely generate Mk as an abelian group.) For some resolutions a contracting homotopy is not constructed, in which case R.homotopy is set equal to "fail".
- R.elts is a (partial) list of (possibly duplicate) elements in G.
- R.group is the group in question (and could be a permutation group, matrix group, finitely presented group etc.).
- R.properties is a list of pairs ["name", value] where "name" is a string and value is a numerical or boolean value. Example pairs are: ["length", n] which records that there are n terms in the resolution; ["characteristic", p] which records the characteristic of Z; ["reduced", true] which record that M0 is isomorphic to ZG; ["type","resolution"] which records the type of the object R.

Equivariant
chain map

An equivariant chain mapping f : R → S from a ZG-resolution to a ZG'-resolution is represented by a record F with the following components.

- F.source is the ZG-resolution R.
- F.target is the ZG'-resolution S.
- F.mapping(k,[i,g]) is a function which returns the image in Sk, under the chain map, of the element [[i,g]] in Rk.
- F.properties is a list of pairs such as ["type", "equivariantChainMap"].

Chain complex
(Cochain
complex)

A chain complex ... → Cn → Cn-1 → ... → C1 → C0 is represented by a record C with the following components.

- C.dimension(k) is a function which returns the Z-rank of the module Ck.
- C.boundary(j, k) is a function which returns the image in Ck-1 of the j-th free generator of Ck.
- C.properties is a list of pairs ["name",value] where "name" is a string and value is a numerical or boolean value. Example pairs are: ["length", n] which would record that there are n terms in the chain complex; ["characteristic", p] which would record the characteristic of Z.

(A cochain complex ... ← Cn ← Cn-1 ← ... ← C1 ← C0 is represented by a similar record C. The only difference is that C.boundary(k,j) returns an element in Ck+1.)

Chain map
(Cochain map)

A chain mapping f : C → D between chain complexes is a record F with the following components.

- F.source is the chain complex C.
- F.target is the chain complex D.
- F.mapping(k,i) is a function which returns the image in Dk, under the chain map, of the element i-th free generator of Ck.
- F.properties is a list of pairs such as ["type", "chainMap"].

(A cochain mapping is represented by a similar record.)

Additive
Functor
(Additive
Contravariant
Functor)

A functor T(X) is a function which inputs either a ZG-resolution X=R, or else an equivariant chain map between resolutions X=(f: R→S) .

- If X=R then T(R) is a chain complex.
- If X=(f:R→S) then T(X) is a Z-chain map T(R) → T(S).

(A contavariant functor is similar, except that T(R) is a cochain complex and T(R→S) is a cochain map T(S) → T(R). )

Coxeter diagram

A Coxeter diagram is a finite graph (with at most one edge between a pair of vertices) whose edges are labelled by integers n>2 or n = infinity. The graph is represented as a list D = [L1, ... Lt] in which each term is itself a list Lk = [vk, [uk1,nk1], [uk2,nk2], ... [ukm,nkm]] such that vertex vk is connected to vertex ukj by an edge with label nkj. It is sufficient to list just those vertices ukj > vk. We set nkj=0 when the edge label is infinity.

##

## ALPHABETICAL LIST OF HAP FUNCTIONS

AddWords(v,w) | Inputs two words v,w in a free ZG-module and returns their sum v+w. If the characteristic of Z is greater than 0 then the next function should be more efficient.
AddWordsModP(v,w,p) | Inputs two words v,w in a free ZG-module and the characteristic p of Z. It returns the sum v+w. If p=0 the previous function might be fractionally quicker.
AlgebraicReduction(w) AlgebraicReduction(w,p) | Inputs a word w in a free ZG-module and returns a reduced version of the word in which all pairs of mutually inverse letters have been cancelled. The reduction is performed in a free abelian group unless the characteristic p of Z is entered.
BigStepLCS(G,n) | Inputs a group G and a positive integer n. It returns a subseries G=L1>L2>...Lk=1 of the lower central series of G such that Li/Li+1 has order greater than n.
CocycleCondition(R,n) | Inputs a resolution R and an integer n>0. It returns an integer matrix M with the following property. Suppose d=R.dimension(n). An integer vector f=[f1, ..., fd] then represents a ZG-homomorphism Rn → Zq which sends the ith generator of Rn to the integer fi in the trivial ZG-module Zq (where possibly q=0). The homomorphism f is a cocycle if and only if Mtf=0 mod q.

Cohomology(X)

Inputs either a cochain complex X=C or a cochain map X=(C→D) over the integers Z. At present only characteristic 0 is implemented.

- If X=C then the torsion coefficients of Hn(C) are retuned.
- If X=(C→D) then the induced homomorphism Hn(C) → Hn(D) is returned as a homomorphism of finitely presented groups.

CoxeterDiagram Components(D) | Inputs a Coxeter diagram D and returns a list [D1, ..., Dd] of the maximal connected subgraphs Di.
CoxeterDiagram Degree(D,v) | Inputs a Coxeter diagram D and vertex v. It returns the degree of v (i.e. the number of edges incident with v).
CoxeterDiagram FpArtinGroup(D) | Inputs a Coxeter diagram D and returns the corresponding finitely presented Artin group.
CoxeterDiagram FpCoxeterGroup(D) | Inputs a Coxeter diagram D and returns the corresponding finitely presented Coxeter group.
CoxeterDiagram IsSpherical(D) | Inputs a Coxeter diagram D and returns "true" if the associated Coxeter groups is finite, and returns "false" otherwise.
CoxeterDiagram Matrix(D) | Inputs a Coxeter diagram D and returns a matrix representation of it. The matrix is given as a function DiagramMatrix(D)(i,j) where i,j can range over the vertices.
CoxeterSubDiagram(D,V) | Inputs a Coxeter diagram D and a subset V of its vertices. It returns the full sub-diagram of D with vertex set V.
CoxeterDiagram Vertices(D) | Inputs a Coxeter diagram D and returns its set of vertices.

Epicentre(G,N)
Epicentre(G)

Inputs a finite group G and normal subgroup N and returns a subgroup Z*(G,N) of the centre of N. The group Z*(G,N) is trivial if and only if there is a crossed module d:E → G with N=Image(d) and with Ker(d) equal to the subgroup of E consisting of those elements on which G acts trivially.
If no value for N is entered then it is assumed that N=G. In this case the group Z*(G,G) is trivial if and only if G is isomorphic to a quotient G=E/Z(E) of some group E by the the centre of E. (There are probably quicker ways to compute Z*(G,G) . )

EquivariantChain
Map(R,S,f)

Inputs a ZG-resolution R, a ZG'-resolution S, and a group homomorphism f : G → G'. It outputs a record M with the following components.

- M.source is the resolution R.
- M.target is the resolution S.
- M.mapping(w,n) is a function which gives the image in Sn, under a chain map induced by f, of a word w in Rn. (Here Rn and Sn are the n-th modules in the resolutions R and S.)
- F.properties is a list of pairs such as ["type", "equivariantChainMap"].

The resolution S must have a contracting homotopy.

EvaluateProperty(X,"name") | Inputs a record X (such as a ZG-resolution or chain map) and a string "name" (such as "characteristic" or "type"). It searches X.property for the pair ["name",value] and returns value. If X.property does not exist, or if ["name",value] does not exist, it returns fail.
EvenSubgroup(G) | Inputs a group G and returns a subgroup G+. The subgroup is that generated by all products xy where x and y range over the generating set for G stored by GAP. The subgroup is probably only meaningful when G is an Artin or Coxeter group.

GroupHomology(X,n)
GroupHomology(X,n,p)

Inputs a positive integer n and either a finite group X=G or a Coxeter diagram X=D representing an infinite Artin group G. It returns the torsion coefficients of the integral homology Hn(G,Z).
There is an optional third argument which, when set equal to a prime p, causes the function to return the rank of the mod p homology Hn(G,Zp).
This function is a composite of more basic functions, and makes choices for a number of parameters. For a particular group you would almost certainly be better using the more basic functions and making the choices yourself!

HAPcopyright() | This function provides details of HAP'S GNU public copyright licence.

Homology(X,n)

Inputs either a chain complex X=C or a chain map X=(C→D).

- If X=C then the torsion coefficients of Hn(C) are retuned.
- If X=(C→D) then the induced homomorphism Hn(C) → Hn(D) is returned as a homomorphism of finitely presented groups.

HomToIntegers(X) | Inputs either a ZG-resolution X =R, or an equivariant chain map X = (F:R→S). It returns the cochain complex or cochain map obtained by applying HomZG( _ , Z) where Z is the trivial module of integers (characteristic 0).
HomToIntegralModule(R,f) | Inputs a ZG-resolution R and a group homomorphism f:G → GLn(Z) to the group of n×n invertible integer matrices. Here Z must have characteristic 0. It returns the cochain complex obtained by applying HomZG( _ , A) where A is the ZG-module Zn with G action via f.

IntegralRingGenerators(R,n)

Inputs at least n+1 terms of a ZG-resolution and integer n>0. It returns a minimal list of cohomology classes in Hn(G,Z) which, together with all cup products of lower degree classes, generate the group Hn(G,Z) .
(Let ai be the i-th canonical generator of the d-generator abelian group Hn(G,Z). The cohomology class n1a1 + ... +ndad is represented by the integer vector u=(n1, ..., nd). )

IntegralCup
Product(R,u,v,p,q)
IntegralCup
Product(R,u,v,p,q,P,Q,N)
Various functions used to construct the cup product
are also available.

Inputs a ZG-resolution R, a vector u representing an element in Hp(G,Z), a vector v representing an element in Hq(G,Z) and the two integers p,q > 0. It returns a vector w representing the cup product u·v in Hp+q(G,Z). This product is associative and u·v = (-1)pqv·u . It provides H*(G,Z) with the structure of an anti-commutative graded ring. The cup product is currently implemented for characteristic 0 only.
The resolution R needs a contracting homotopy.
To save the function from having to calculate the abelian groupsHn(G,Z) additional input variables can be used in the form IntegralCupProduct(R,u,v,p,q,P,Q,N) , where

- P is the output of the command CR_CocyclesAndCoboundaries(R,p,true)
- Q is the output of the command CR_CocyclesAndCoboundaries(R,q,true)
- N is the output of the command CR_CocyclesAndCoboundaries(R,p+q,true) .

IsAspherical(F,R)

Inputs a free group F and a set R of words in F. It performs a test on the 2-dimensional CW-space K associated to this presentation for the group G=F/<R>F.
The function returns "true" if K has trivial second homotopy group. In this case it prints: Presentation is aspherical.
Otherwise it returns "fail" and prints: Presentation is NOT piece-wise Euclidean non-positively curved. (In this case K may or may not have trivial second homotopy group. But it is NOT possible to impose a metric on K which restricts to a Euclidean metric on each 2-cell.)
The function uses Polymake software.

IsSuperperfect(G) | Inputs a group G and returns "true" if both the first and second integral homology of G is trivial. Otherwise, it returns "false".
MultiplyWord(n,w) | Inputs a word w and integer n. It returns the scalar multiple n·w .
Negate([i,j]) | Inputs a pair [i,j] of integers and returns [-i,j].
NegateWord(w) | Inputs a word w in a free ZG-module and returns the negated word -w.

NonabelianExterior
Product(G,N)

Inputs a finite group G and normal subgroup N. It returns a record E with the following components.

- E.homomorphism is a group homomorphism µ : G^N → G from the nonabelian exterior product G^N to G. The kernel of µ is the relative Schur multiplier.
- E.pairing(x,y) is a function which inputs an element x in G and an element y in N and returns x ^ y in the exterior product G^N .

This function should work for reasonably small nilpotent groups or extremely small non-nilpotent groups.

NonabelianTensor
Square(G)

Inputs a finite group G and returns a record T with the following components.

- T.homomorphism is a group homomorphism µ : G(×)G → G from the nonabelian tensor square of G to G. The kernel of µ is isomorphic to the third homotopy group of the suspension SK(G,1) of an Eilenberg-Mac Lane space.
- T.pairing(x,y) is a function which inputs two elements x, y in G and returns the tensor x (×) y in the tensor square G (×) G .

This function should work for reasonably small nilpotent groups or extremely small non-nilpotent groups.

PermToMatrixGroup(G,n) | Inputs a permutation group G and its degree n. Returns a bijective homomorphism f:G → M where M is a group of permutation matrices.

PolytopalComplex(G,v)
PolytopalComplex(G,v,n)

Inputs a permutation group or matrix group G of degree n and a rational vector v of length n. In both cases there is a natural action of G on v. Let P(G,v) be the convex polytope arising as the convex hull of the Euclidean points in the orbit of v under the action of G. The cellular chain complex C*=C*(P(G,v)) is an exact sequence of (not necessarily free) ZG-modules. The function returns a record R with components:

- R.dimension(k) is a function which returns the number of G-orbits of the k-dimensional faces in P(G,v). If each k-face has trivial stabilizer subgroup in G then Ck is a free ZG-module of rank R.dimension(k).
- R.stabilizer(k,n) is a function which returns the stabilizer subgroup for a face in the n-th orbit of k-faces.
- If all faces of dimension <k+1 have trivial stabilizer group then the first k terms of C* constitute part of a free ZG-resolution. The boundary map is described by the function boundary(k,n) . (If some faces have non-trivial stabilizer group then C* is not free and no attempt is made to determine signs for the boundary map.)
- R.elements, R.group, R.properties are as in a ZG-resolution.

If an optional third input variable n is used, then only the first n terms of the resolution C* will be computed.
The function uses Polymake software.

PolytopalGenerators(G,v)

Inputs a permutation group or matrix group G of degree n and a rational vector v of length n. In both cases there is a natural action of G on v, and the vector v must be chosen so that it has trivial stabilizer subgroup in G. Let P(G,v) be the convex polytope arising as the convex hull of the Euclidean points in the orbit of v under the action of G. The function returns a record P with components:

- P.generators is a list of all those elements g in G such that g·v has an edge in common with v. The list is a generating set for G.
- P.vector is the vector v.
- P.hasseDiagram is the Hasse diagram of the cone at v.

The function uses Polymake software.
The function is joint work with Seamus Kelly.

PresentationOfResolution(R)

Inputs at least two terms of a reduced ZG-resolution R and returns a record P with components

- P.freeGroup is a free group F
- P.relators is a list S of words in F

where G is isomorphic to F modulo the normal closure of S. This presentation for G corresponds to the 2-skeleton of the classifying CW-space from which R was constructed. The resolution R requires no contracting homotopy.

PrimePartDerived
Functor(G,R,F,n)

Inputs a finite group G, a positive integer n, at least n+1 terms of a ZP-resolution for a Sylow subgroup P<G and a "mathematically suitable" covariant additive functor F such as TensorWithIntegers . It returns the abelian invariants of the p-component of the homology Hn(F(R)) .
Warning: All calculations are assumed to be in characteristic 0. The function should not be used if the coefficient module is over the field of p elements.
"Mathematically suitable" means that the Cartan-Eilenberg double coset formula must hold.

PrintZGword(w,elts) | Inputs a word w in a free ZG-module and a (possibly partial but sufficient) listing elts of the elements of G. The function prints the word w to the screen in the form r1E1 + ... + rnEn where ri are elements in the group ring ZG, and Ei denotes the i-th free generator of the module.
RelativeSchurMultiplierG,N) | Inputs a finite group G and normal subgroup N. It returns the homology group H2(G,N,Z) that fits into the exact sequence ··· → H3(G,Z) → H3(G/N,Z) → H2(G,N,Z) → H3(G,Z) → H3(G/N,Z) → ···. This function should work for reasonably small nilpotent groups G or extremely small non-nilpotent groups.
ResolutionAbelianGroup(L,n) ResolutionAbelianGroup(G,n) | Inputs a list L:=[m1,m2, ..., md] of nonnegative integers, and a positive integer n. It returns n terms of a ZG-resolution for the abelian group G=ZL[1]+ZL[2]+···+ZL[d] . If G is finite then the first argument can also be the abelian group G itself.
ResolutionAlmostCrystalGroup(G,n) | Inputs a positive integer n and an almost crystallographic pcp group G. It returns n terms of a free ZG-resolution. (A group is almost crystallographic if it nilpotent-by-finite and has no non-trivial finite normal subgroup. Such groups can be constructed using the ACLIB package.)

ResolutionAlmostCrystal
Quotient(G,n,c)

An almost crystallographic group G is an extension of a finite group P by a nilpotent group T, and has no non-trivial finite normal subgroup. We define the relative lower central series by setting T1=T and Ti+1=[Ti,G].
This function inputs an almost crystallographic group G together with positive integers n and c. It returns n terms of a free ZQ-resolution R for the group Q=G/Tc .
In addition to the usual components, the resolution R has the component R.quotientHomomorphism which gives the quotient homomorphism G→Q.

ResolutionArtinGroup(D,n)

Inputs a Coxeter diagram D and an integer n>1. It returns n terms of a free ZG-resolution R where G is the Artin monoid associated to D. It is conjectured that R is also a free resolution for the Artin group G. The conjecture is known to hold in certain cases.
G=R.group is infinite and returned as a finitely presented group. The list R.elts is a partial listing of the elements of G which grows as R is used. Initially R.elts is empty and then, any time the boundary of a resolution generator is called, R.elts is updated to include elements of G involved in the boundary.
The contracting homotopy on R has not yet been implemented!

ResolutionAspherical
Presentation(F,R,n)

Inputs a free group F, a set R of words in F which constitute an aspherical presentation for a group G, and a positive integer n. (Asphericity can be a difficult property to verify. The function IsAspherical(F,R) could be of help.)
The function returns n terms of a free ZG-resolution R which has generators in dimensions <3 only. No contracting homotopy on R will be returned.

ResolutionDirectProduct(R,S) ResolutionDirect Product(R,S,"internal") | Inputs a ZG-resolution R and ZH-resolution S. It outputs a ZD-resolution for the direct product D=G×H. If G and H lie in a common group K, and if they commute and have trivial intersection, then an optional third variable "internal" can be used. This will force D to be the subgroup GH in K.

ResolutionExtension(g,R,S)
ResolutionExtension
(g,R,S,"TestFiniteness")
ResolutionExtension
(g,R,S,"NoTest",GmapE)

Inputs a surjective group homomorphism g:E→G with kernel N. It also inputs a ZN-resolution R and a ZG-resolution S. It returns a ZE-resolution. The groups E and G can be infinite.
If an optional fourth argument is set equal to "TestFiniteness" then the groups N and G will be tested to see if they are finite. If they are finite then some speed saving routines will be invoked.
If the homomorphism g is such that the GAP function PreImagesElement(g,x) doesn't work, then a function GmapE() should be included as a fifth input. For any x in G this function should return an element GmapE(x) in E which gets mapped onto x by g.
The contracting homotopy on the ZE-resolution has not yet been fully implemented for infinite groups!

ResolutionFiniteDirectProduct(R,S)
ResolutionFiniteDirect
Product(R,S,"internal")

Inputs a ZG-resolution R and ZH-resolution S where G and H are finite groups. It outputs a ZD-resolution for the direct product D=G×H.
If G and H lie in a common group K, and if they commute and have trivial intersection, then an optional third variable "internal" can be used. This will force D to be the subgroup GH in K.

ResolutionFiniteExtension
(gensE,gensG,R,n)
ResolutionFiniteExtension
(gensE,gensG,R,n,true)
ResolutionFiniteExtension
(gensE,gensG,R,n,false,S)

Inputs: a set gensE of generators for a finite group E; a set gensG equal to the image of gensE in a quotient group G of E; a ZG-resolution R up to dimension at least n; a positive integer n. It uses the TwistedTensorProduct() construction to return n terms of a ZE-resolution.
The function has an optional fourth argument which, when set equal to true, invokes tietze reductions in the construction of a resolution for the kernel of E-->G.
If a ZN-resolution S is available, where N is the kernel of the quotient E→G, then this can be incorporated into the computations using an optional fifth argument.

ResolutionFinite
Group(gens,n)
ResolutionFinite
Group(gens,n,true)
ResolutionFinite
Group(gens,n,false,p)

Inputs a set gens of generators for a finite group G and a positive integer n. It outputs n terms of a ZG-resolution.
The function has an optional third argument which, when set equal to true, invokes tietze reductions in the construction of the resolution.
The function has an optional fourth argument which, when set equal to a prime p, records the fact that the resolution will only be used for mod p calculations. This could speed up subsequent constructions.

ResolutionFinite
Subgroup(R,K)
ResolutionFinite
Subgroup(R,gensG,gensK)

Inputs a ZG-resolution for a finite group G and a subgroup K of index |G:K|. It returns a free ZK-resolution whose ZK-rank is |G:K| times the ZG-rank in each dimension.
Generating sets gensG, gensK for G and K can also be input to the function (though the method does not depend on a choice of generators).
This ZK-resolution has more than one generator in dimension 0. So PresentationOfResolution() should not be applied to it!

ResolutionNilpotentGroup(G,n)
ResolutionNilpotentGroup
(G,n,"TestFiniteness")

Inputs a nilpotent group G and positive integer n. It returns n terms of a free ZG-resolution. The resolution is computed using a divide-and-conquer technique involving the lower central series.
This function can be applied to infinite groups G. For finite groups the function ResolutionNormalSeries() probably gives better results.
If an optional third argument is set equal to "TestFiniteness" then the groups N and G will be tested to see if they are finite. If they are finite then some speed saving routines will be invoked.
The contracting homotopy on the ZE-resolution has not yet been fully implemented for infinite groups.

ResolutionNormalSeries(L,n)
ResolutionNormalSeries
(L,n,true)
ResolutionNormalSeries
(L,n,false,p)

Inputs a positive integer n and a list L = [L1 , ..., Lk] of normal subgroups Li of a finite group G satisfying G = L1>L2 ... >Lk. Alternatively, L = [gensL1, ... gensLk] can be a list of generating sets for the Li (and these particular generators will be used in the construction of resolutions). It returns a Z(G/Lk)-resolution by repeatedly using the function ResolutionFiniteExtension(). Typically Lk=1 in which case a ZG-resolution is returned.
The function has an optional third argument which, if set equal to true, invokes tietze reductions in the construction of resolutions.
The function has an optional fourth argument which, if set equal to p>0, produces a resolution which is only valid for mod p calculations.

ResolutionPrimePower
Group(G,n)

Inputs a p-group G and integer n>0. It uses GAP's standard linear algebra functions over the field Zp to construct a ZG-resolution for mod p calculations only. The resolution is minimal - meaning that the number of generators of Rn equals the rank of Hn(G,Zp). (I suspect this function could be implemented far more efficiently.)
The contracting homotopy on the ZG-resolution has not yet been implemented!

ResolutionSmall
FpGroup(G,n)
ResolutionSmall
FpGroup(G,n,p)

Inputs a small finitely presented group G and an integer n>0. It returns n terms of a ZG-resolution which, in dimensions 1 and 2, corresponds to the given presentation for G. The method returns no contracting homotopy for the resolution.
The function has an optional fourth argument which, when set equal to a prime p, records the fact that the resolution will only be used for mod p calculations. This could speed up subsequent constructions.
This function was written by Irina Kholodna.

Resolution
Subgroup(R,K)

Inputs a ZG-resolution for an (infinite) group G and a subgroup K of finite index |G:K|. It returns a free ZK-resolution whose ZK-rank is |G:K| times the ZG-rank in each dimension.
If G is finite then the function ResolutionFiniteSubgroup(R,G,K) will probably work better. In particular, resolutions from this function probably won't work with the function EquivariantChainMap().
This ZK-resolution has more than one generator in dimension 0. So PresentationOfResolution() should not be applied to it!

ResolutionSubnormalSeries(L,n)

Inputs a positive integer n and a list L = [L1 , ..., Lk] of subgroups Li of a finite group G=L1 such that L1>L2 ... >Lk is a subnormal series in G (meaning that each Li+1 must be normal in Li). It returns a Z(G/Lk)-resolution by repeatedly using the function ResolutionFiniteExtension(). Typically Lk=1 in which case a ZG-resolution is returned.
If L is a series of normal subgroups in G then the function ResolutionNormalSeries(L,n) will possibly work more efficiently.

StandardCocycle(R,f,n)
StandardCocycle(R,f,n,q)

Inputs a ZG-resolution R (with contracting homotopy), a positive integer n and an integer vector f representing an n-cocycle Rn → Zq where G acts trivially on Zq. It is assumed q=0 unless a value for q is entered. The command returns a function F(g1, ..., gn) which is the standard cocycle Gn → Zq corresponding to f. At present the command is implemented only for n=2 or 3.

Syzygy(R,g) | Inputs a ZG-resolution R (with contracting homotopy) and a list g = [g[1], ..., g[n]] of elements in G. It returns a word w in Rn. The word w is the image of the n-simplex in the standard bar resolution corresponding to the n-tuple g. This function can be used to construct explicit standard n-cocycles. (Currently implemented only for n<4.)
TensorWithIntegers(X) | Inputs either a ZG-resolution X =R, or an equivariant chain map X = (F:R→S). It returns the chain complex or chain map obtained by tensoring with the trivial module of integers (characteristic 0).
TensorWith IntegersModP(X,p) | Inputs either a ZG-resolution X =R, or an equivariant chain map X = (F:R→S), and a prime p. It returns the chain complex or chain map obtained by tensoring with the trivial module of integers modulo p.
TensorWithRationals(R) | Inputs a ZG-resolution R and returns the chain complex obtained by tensoring with the trivial module of rational numbers.
TestHap() | This runs a representative sample of HAP functions and checks to see that they produce the correct output.
ThirdHomotopyGroup OfSuspensionB(G) | Inputs a finite group G and returns the abelian invariants of the third homotopy group of the suspension SB(G) of the Eilenberg-Mac Lane space K(G,1). This function should work for reasonably small nilpotent groups or extremely small non-nilpotent groups.
TietzeReduction(S,w) | Inputs a set S of words in a free ZG-module, and a word w in the module. The function returns a word w' such that {S,w'} generates the same abelian group as {S,w}. The word w' is possibly shorter (and certainly no longer) than w. This function needs to be improved!
TorsionGeneratorsAbelianGroup(G) | Inputs an abelian group G and returns a generating set [x1, ...,xn] where no pair of generators have coprime orders.

TwistedTensorProduct(R,S,
EhomG,GmapE,NhomE,
NEhomN,EltsE,Mult,InvE)

Inputs a ZG-resolution R, a ZN-resolution S, and other data relating to a short exact sequence 1→N→E→G→1. It uses a perturbation technique of CTC Wall to construct a ZE-resolution F. Both G and N could be infinite. The "length" of F is equal to the minimum of the "length"s of R and S. The resolution R needs no contracting homotopy if no such homotopy is requied for F.

VectorStabilizer(G,v) | Inputs a permutation group or matrix group G of degree n and a rational vector of degree n. In both cases there is a natural action of G on v and the function returns the group of elements in G that fix v.