Much of the HAP package is aimed at computations related to specific instances of the following.
Much of the HAP package is aimed at computations related to specific instances of the following.
Let Z be an integral domain. Let Z[x_{1},x_{2},...,x_{t}] be the free associative ring over Z generated by x_{1},...,x_{t}. Let A=Z[x_{1},x_{2},...,x_{t}]/J be a quotient algebra. Let M and N be Amodules. How can we calculate the modules
for integers k >=0?
Recall that these modules are defined in terms of a sequence of module homomorphisms
such that
Such a sequence of module homomorphisms is said to be a free Aresolution of the module M.
Applying the functor Hom_{A}(,N) to each module in the resolution R_{*} we obtain a sequence of induced module homomorphisms
The module Ext_{A}^{k}(M,N) is defined to be the homology module
with the convention d^{1}=0. It can be shown that the isomorphism type of the module Ext_{A}^{k}(M,N) is unchanged if we change the choice of free resolution R_{*}.
The module Tor^{A}_{k} is defined analogously by tensoring each free module R_{n} with the module N over A, and taking homology of the resulting sequence of tensored modules.
In particular, HAP has functions aimed at the following.
Let Z be the ring of integers. Let G be a group. Let A=ZG be the group ring of G. Let M=Z be the ring of integers considered as a trivial ZGmodule. Let N be an arbitrary ZGmodule. The cohomology and homology of the group G are defined as
The integral (co)homology of G is of particular interest and is defined to be the case where N equals the trivial module Z. The mod p (co)homology is a useful approximation to integral (co)homology and corresponds to letting N be the field Z_{p} of p elements with trivial action of G.
HAP also contains some functions aimed at the following.
Let X be a bounded subspace of Euclidean space R^{n} arising as a union of
unit ncubes whose vertices have integer coordinates. The subspace X
might arise as a topological model of experimental data (such as a
medical image) or it might be the more traditional kind of CWcomplex
studied in classical algebraic topology. How can we efficiently compute
the cohomology groups (and possibly even some homotopy groups) of X ?
The typical HAP user does not need to know the precise details of how mathematical concepts are represented in HAP. However, a user who wishes to extend the HAP package will need such details.
Some of the concepts from homological algebra are represented in HAP using existing GAP data types (first table). Other concepts are represented using new gap data types (second table). For each of the new data types there is a boolean valued function IsHapNameOfDataType(X) .
Free
ZGmodule (words) 
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 ZGmodule M of rank n we use a
list of integer pairs w=[ [i_{1},g_{1}], [i_{2},g_{2}],
..., [i_{k},g_{k}] ]. The
integers i_{j} lie in the range between n and n and correspond
to the
free ZGgenerators of M and their additive inverses. The integers g_{j}
are positive and correspond to the group element eltsG[g_{j}].
The (partial) listing eltsG may contain duplicate copies of
elements of G. 
Additive
Functor (Additive Contravariant Functor) 
A
functor T(X) is a function which inputs either a ZGresolution X=R,
or else an equivariant chain map between resolutions X=(f: > 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). ) 
Homology
group (Cohomology group) 
An homology group H_{n}(C) is a finitely generated
abelian
group and is
represented by a list whose integer entries are the torsion
coefficients of the group. A homomorphism H_{n}(C) > H_{n}(D) of homology groups is represented as a group homomorphism between finitely presented groups. (Cohomology groups and homomorphisms of cohomology groups are represented similarly.) 
Homology
vector
space (Cohomology vector space) 
When the ground ring Z is the field of pelements or the
rationals, then
an homology group H_{n}(C) is actually a vector space and is
thus represented by a single integer  the dimension of the vector
space.
(The prime p is omitted in this representation.) A homomorphism H_{n}(C) > H_{n}(D) of homology vector spaces is however represented as a group homomorphism between finitely presented groups. (Mod p cohomology groups and homomorphisms of cohomology groups are represented similarly.) 
Mtxmodule  A module over the mod p group ring FG of a finite group G can
be
represented using the standard GAP notion of "meataxe" module. Such a
module consists of a record M with components All modules in HAP are assumed to act on the left. (So care is needed because in GAP's standard meataxe functions the matrix action is assumed to be on the right. A left meataxe module can be converted to a right module by replacing generators with their transposes.) 
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 = [L_{1},
... L_{t}] in which each term is itself a list L_{k} =
[v_{k}, [u_{k1},n_{k1}], [u_{k2},n_{k2}],
... [u_{km},n_{km}]] such that vertex v_{k} is
conneconcatenationted to vertex u_{kj} by an edge with label n_{kj}.
It is necessary and sufficient to list just those vertices u_{kj}
> v_{k}. We set n_{kj}=0 when the edge label is
infinity. 
Graph of Groups 
A
graph of groups is a finite graph (with at most one edge between a pair
of vertices) whose vertices are labelled by groups and whose edges are
labelled by pairs [f,g] of group monomorphisms f:S >G, g:S
> H with common
source and with ranges G and H equal to the labels of the boundary
vertices of the edge. Such a graph is represented as a list D = [L_{1}, ... L_{t}] where each L_{i} is either a group G or a pair of group monomorphisms [f,g]. Each group G arising as a term in the list, or as the range or source of a monomorphism in the list, must be such that HasName(G) is true. Furthermore, distinct groups must have dirrerent names. 
Array 
An array is defined recursively
to be a list A=[A_{1},...,A_{n}] of arrays with equal
dimension and array size. A no entry A_{i} is a list then the
array is said to have dimension 1 and array size n. In general:

ZGresolution  A ZGresolution means a free
ZGresolution of the trivial
ZGmodule Z, where G is a group and Z is the ring of integers (or the
ring of integers modulo p, or the ring of rationals). A ZGresolution ... > M_{n} > M_{n1} > ... > M_{1} > M_{0} → Z is represented by a component object R with the following components. The operation IsHapResoluton(R) returns "true" for a resolution. 
Nonfree ZGresolution 
A nonfree ZGresolution is an
exact sequence of ZGmodules ... > A_{n} > A_{n1}
> ... > A_{1}
> A_{0} → Z in which the modules are not necessarily
free. We can represent such a sequence (nonuniquely) by first choosing
free modules M_{k} mapping onto the A_{k} and
then lifting the homomorphisms to a sequence ... > M_{n}
> M_{n1}
> ... > M_{1}
> M_{0} of homomorphisms of free ZGmodules. Note
that in the lifted sequence homomorphisms will not in general
square to zero. A nonfree ZGresolution ... > M_{n} > M_{n1} > ... > M_{1} > M_{0} → Z is represented by a component object R with the following components. The operation IsHapNonFreeResoluton(R) returns "true" for a nonfree resolution. 
Equivariant chain map  An
equivariant
chain mapping f : R > S from a ZGresolution to a ZG'resolution
is
represented by a component object F with the following components. The operation IsHapEquivariantChainMap(F) returns "true" for an equivariant chain map F. 
Chain
complex (Cochain complex) 
A chain complex means
a chain complex of free Zmodules. A chain complex ... > C_{n} > C_{n1} > ... > C_{1} > C_{0 }is represented by a record C with the following components. The operation IsHapChainComplex(C) returns "true" for a chain complex C. (A cochain complex ... < C_{n} < C_{n1} < ... < C_{1} < C_{0 }is represented by a similar record C. The difference is that C!.boundary(k,j) returns an element in C_{k+1}.) 
Chain
map (Cochain map) 
A
chain mapping f : C > D between chain complexes is a component
object F
with the
following components. The operation IsHapEquivariantChainMap(F) returns "true" for a chain map F. (A cochain mapping is represented by a similar record.) 
Filtered chain compex 
A filtered chain complex means a
sequence F_{0}C < ... < F_{t1}C < F_{t}C
of inclusions of chain complexes. We call the integer t the filtration length. A filtered chain complex is represented as a chain complex C with an additional component and property:

FpGmodule  For
a finite group G, and the field F of p elements, a submodule of the
free FGmodule FG^{n} is represented by a component object M
with the following components: The operation IsHapFPGModule(M) returns "true" for an FpGmodule M. 
FpGmodule homomorphism  A
homomorphism Phi:M > N of FpGmodules (over a common group G and
field
F) is a component object with the following components: The operation IsHapFPGModuleHomomorphism(Phi) returns "true" for an FpGmodule homomorphism Phi. 
Gouter group  We'll say that a group N is a
Gouter group if there is an associated function alpha:G
> Aut(N) which induces a
homomorphism G
> Out(N). A Gouter group is represented as a component object A with the following components:
Note that a Gmodule N can be viewed as a Gouter group N for which IsAbelian(N) returns the value True. For conveninece we'll often refer to an abelian Gouter group as a Gmodule. 
Gouter group homomorphism 
A
homomorphism Phi:M > N of Gouter groups (over a common group
G) is a component object with the following components:
The operation IsGOuterGroupHomomorphism(Phi) returns "true" for a Gouter group homomorphism Phi. 
Gcomplex (Gcocomplex) 
A Gcomplex is a sequence ...
> C_{n} > C_{n1}
> ... > C_{1}
> C_{0} of Gouter group homomorphisms over a common
group G such that Image(C_{n} > C_{n1}) is
a normal Ginvariant subgroup of Kernel(C_{n1} > C_{n2}).
In particular, when each C_{n} is abelian it is a chain complex
of Gmodules. It is represented by a component object C with the following components:
(A Gcocomplex ... < C_{n} < C_{n1} < ... < C_{1} < C_{0 }is represented by a similar record C. The difference is that C!.boundary(n) is a map C_{n} > C_{n+1}.) 
Simplicial Group 
A simplicial group is
represented by a component object G with the following components:

Standard Ncocycle 
A standard Ncocycle
f:G×G×...×G
> M of a group G with coefficients in an abelian Gouter group M
(i.e. a Gmodule M) is represented
as a component object F with the following components:

Cat1group 
A cat1group is a group endowed
with a compatible category composition. It can be viewed as a group G
with endomorphisms s,t:G>G satisfying ss=s, ts=s, tt=t, st=t and
[Ker(s),Ker(t)]=1. It is represented as a component object C with the
following components.

Pure Cubical Complex 
In HAP we use the term
"pure cubical complex" to mean a subspace of Euclidean nspace R^{n} arising as a union of
unit ncubes whose vertices have integer coordinates. Such a space is
represented by a component object T having two components:
A binary array of dimension d>1 is a list b=[x_{1}, ..., x_{n}] where each x_{i} is a binary array of dimension d1 and all x_{i} have the same array size. The array size of b is defined to be the list of integers got by appending n to the array size of any x_{i}. The operation IsHapPureCubicalComplex(T) returns "true" for a pure cubical complex T. 
Filtered pure cubical complex 
A filtered pure cubical complex
is a pure cubical complex M with an additional component

Cubical Complex  In HAP we use the term
"cubical complex" to mean a cellular subspace of Euclidean nspace R^{n} arising as a union of
open unit mcubes of varying degrees whose centres have integer
coordinates. Such a space is
represented by a component object T having two components:
The operation IsHapCubicalComplex(T) returns "true" for a cubical complex T. 
Filtered cubical complex  A filtered cubical complex
is a cubical complex M with an additional component

Cubical Complex with
Vector Field 
A discret vector field on a
cubical complex T is represented by adding the following two components
to T:

Simplicial Complex  A simplicial complex is
represented by a component object T with the following components:

Regular CWComplex 
A regular CWcomplex is
represented by a component object Y with the following components:

Pseudo list 
A pseudolist L has the same
basic
functionality as that of a list except that: 
Sparse matrix 
A sparse matrix is a component
object M with the following components:

Sparse chain complex 
A sparse chain complex means
a chain complex of free Zmodules. A sparse chain complex ... > C_{n} > C_{n1} > ... > C_{1} > C_{0 }is represented by a record C with the following components. The operation IsHapSparseChainComplex(C) returns "true" for a sparse chain complex C. 