Homology and cohomology groups

Cohomology
Cohomology(X,n)

Inputs either a cochain complex X=C (or G-cocomplex C) or a cochain map X=(C \longrightarrow D) in characteristic p together with a non-negative intereg n.

If X=C and p=0 then the torsion coefficients of H^n(C) are retuned. If X=C and p is prime then the dimension of H^n(C) are retuned.
If X=(C \longrightarrow D) then the induced homomorphism H^n(C)\longrightarrow H^n(D) is returned as a homomorphism of finitely presented groups.
A G-cocomplex C can also be input. The cohomology groups of such a complex may not be abelian. Warning: in this case Cohomology(C,n) returns the abelian invariants of the n-th cohomology group of C.

CohomologyModule
CohomologyModule(C,n)

Inputs a G-cocomplex C together with a non-negative integer n. It returns the cohomology H^n(C) as a G-outer group. If C was constructed from a resolution R by homing to an abelian G-outer group A then, for each x in H:=CohomologyModule(C,n), there is a function f:=H!.representativeCocycle(x) which is a standard n-cocycle corresponding to the cohomology class x. (At present this works only for n=1,2,3.)

CohomologyPrimePart
CohomologyPrimePart(C,n,p)

Inputs a cochain complex C in characteristic 0, a positive integer n, and a prime p. It returns a list of those torsion coefficients of H^n(C) that are positive powers of p.

The function uses the EDIM package by Frank Luebeck.
GroupCohomology
GroupCohomology(X,n)
GroupCohomology(X,n,p)

Inputs a positive integer n and either a finite group X=G or a nilpotent Pcp-group X=G or a space group X=G or a list X=D representing a graph of groups or a pair X=["Artin",D] where D is a Coxeter diagram representing an infinite Artin group G. or a pair X=["Coxeter",D] where D is a Coxeter diagram representing a finite Coxeter group G. It returns the torsion coefficients of the integral cohomology H^n(G,Z).

There is an optional third argument which, when set equal to a prime p, causes the function to return the the mod p cohomology H^n(G,Z_p) as a list of length equal to its rank.

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!
GroupHomology
GroupHomology(X,n)
GroupHomology(X,n,p)

Inputs a positive integer n and either a finite group X=G or a nilpotent Pcp-group X=G or a space group X=G or a list X=D representing a graph of groups or a pair X=["Artin",D] where D is a Coxeter diagram representing an infinite Artin group G. or a pair X=["Coxeter",D] where D is a Coxeter diagram representing a finite Coxeter group G.

It returns the torsion coefficients of the integral homology H_n(G,Z).

There is an optional third argument which, when set equal to a prime p, causes the function to return the mod p homology H_n(G,Z_p) as a list of lenth equal to its rank.

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!
PersistentHomologyOfQuotientGroupSeries
PersistentHomologyOfQuotientGroupSeries(S,n)
PersistentHomologyOfQuotientGroupSeries(S,n,p,Resolution_Algorithm)

Inputs a positive integer n and a decreasing chain S=[S_1, S_2, ..., S_k] of normal subgroups in a finite p-group G=S_1.

It returns the bar code of the persistent mod p homology in degree n of the sequence of quotient homomorphisms G \rightarrow G/S_k \rightarrow G/S_{k-1} \rightarrow ... \rightarrow G/S_2 . The bar code is returned as a matrix containing the dimensions of the images of the induced homology maps.

If one sets p=0 then the integral persitent homology bar code is returned. This is a matrix whose entries are pairs of the lists: the list of abelian invariants of the images of the induced homology maps and the cokernels of the induced homology maps. (The matrix probably does not uniquely determine the induced homology maps.)

Non prime-power (and possibly infinite) groups G can also be handled; in this case the prime must be entered as a third argument, and the resolution algorithm (e.g. ResolutionNilpotentGroup) can be entered as a fourth argument. (The default algorithm is ResolutionFiniteGroup, so this must be changed for infinite groups.)
PersistentCohomologyOfQuotientGroupSeries
PersistentCohomologyOfQuotientGroupSeries(S,n)
PersistentCohomologyOfQuotientGroupSeries(S,n,p,Resolution_Algorithm)

Inputs a positive integer n and a decreasing chain S=[S_1, S_2, ..., S_k] of normal subgroups in a finite p-group G=S_1.

It returns the bar code of the persistent mod p cohomology in degree n of the sequence of quotient homomorphisms G \rightarrow G/S_k \rightarrow G/S_{k-1} \rightarrow ... \rightarrow G/S_2 . The bar code is returned as a matrix containing the dimensions of the images of the induced homology maps.

If one sets p=0 then the integral persitent cohomology bar code is returned. This is a matrix whose entries are pairs of the lists: the list of abelian invariants of the images of the induced cohomology maps and the cokernels of the induced cohomology maps. (The matrix probably does not uniquely determine the induced homology maps.)

Non prime-power (and possibly infinite) groups G can also be handled; in this case the prime must be entered as a third argument, and the resolution algorithm (e.g. ResolutionNilpotentGroup) can be entered as a fourth argument. (The default algorithm is ResolutionFiniteGroup, so this must be changed for infinite groups.)

(The implementation is possibly a little less efficient than that of the corresponding persistent homology function.)

UniversalBarCode
UniversalBarCode("UpperCentralSeries",n,d)
UniversalBarCode("UpperCentralSeries",n,d,k)

Inputs integers n,d that identify a prime power group G=SmallGroup(n,d), together with one of the strings "UpperCentralSeries", LowerCentralSeries", "DerivedSeries", "UpperPCentralSeries", "LowerPCentralSeries". The function returns a matrix of rational functions; the coefficients of x^k in their expansions yield the persistence matrix for the degree k homology with trivial mod p coefficients associated to the quotients of G by the terms of the given series.

If the additional integer argument k is supplied then the function returns the degree k homology persistence matrix.
PersistentHomologyOfSubGroupSeries
PersistentHomologyOfSubGroupSeries(S,n)
PersistentHomologyOfSubGroupSeries(S,n,p,Resolution_Algorithm)

Inputs a positive integer n and a decreasing chain S=[S_1, S_2, ..., S_k] of subgroups in a finite p-group G=S_1.

It returns the bar code of the persistent mod p homology in degree n of the sequence of inclusion homomorphisms S_k \rightarrow S_{k-1} \rightarrow ... \rightarrow S_1=G . The bar code is returned as a binary matrix.

Non prime-power (and possibly infinite) groups G can also be handled; in this case the prime must be entered as a third argument, and the resolution algorithm (e.g. ResolutionNilpotentGroup) must be entered as a fourth argument.
PersistentHomologyOfFilteredChainComplex
PersistentHomologyOfFilteredChainComplex(C,n,p)

Inputs a filtered chain complex C (of characteristic 0 or p) together with a positive integer n and prime p.

It returns the bar code of the persistent mod p homology in degree n of the filtered chain complex C. (This function needs a more efficient implementation. Its fine as it stands for investigation in group homology, but not sufficiently efficient for the homology of large complexes arising in applied topology.)

PersistentHomologyOfCommutativeDiagramOfPGroups(D,n)

Inputs a commutative diagram D of finite p-groups and a positive integer n. It returns a list containing, for each homomorphism in the nerve of D, a triple [k,l,m] where k is the dimension of the source of the induced mod p homology map in degree n, l is the dimension of the image, and m is the dimension of the cokernel.
PersistentHomologyOfFilteredCubicalComplex
PersistentHomologyOfFilteredCubicalComplex(M,n)

Inputs a filtered pure cubical complex M and a non-negative integer n. It returns the degree n persistent homology of M with rational coefficients.
PersistentHomologyOfPureCubicalComplex
PersistentHomologyOfPureCubicalComplex(L,n,p)

Inputs a positive integer n, a prime p and an increasing chain L=[L_1, L_2, ..., L_k] of subcomplexes in a pure cubical complex L_k.

It returns the bar code of the persistent mod p homology in degree n of the sequence of inclusion maps. The bar code is returned as a matrix. (This function is extremely inefficient and it is better to use PersistentHomologyOFilteredfPureCubicalComplex.

ZZPersistentHomologyOfPureCubicalComplex
ZZPersistentHomologyOfPureCubicalComplex(L,n,p)

Inputs a positive integer n, a prime p and any sequence L=[L_1, L_2, ..., L_k] of subcomplexes of some pure cubical complex.

It returns the bar code of the zig-zag persistent mod p homology in degree n of the sequence of maps L_1 \rightarrow L_1 \cup L_2 \leftarrow L_2 \rightarrow L_2 \cup L_3 \leftarrow L_4 \rightarrow ... \leftarrow L_k. The bar code is returned as a matrix.

RipsHomology
RipsHomology(G,n)
RipsHomology(G,n,p)

Inputs a graph G, a non-negative integer n (and optionally a prime number p). It returns the integral homology (or mod p homology) in degree n of the Rips complex of G.

BarCode
BarCode(P)

Inputs an integer persistence matrix P and returns the same information in the form of a binary matrix (corresponding to the usual bar code).

BarCodeDisplay
BarCodeCompactDisplay
BarCodeDisplay(P)
BarCodeDisplay(P,"mozilla")
BarCodeCompactDisplay(P)
BarCodeCompactDisplay(P,"mozilla")

Inputs an integer persistence matrix P, and an optional string specifying a viewer/browser. It displays a picture of the bar code (using GraphViz software). The compact display is better for large bar codes.
Homology
Homology(X,n)

Inputs either a chain complex X=C or a chain map X=(C \longrightarrow D). If X=C then the torsion coefficients of H_n(C) are retuned. If X=(C \longrightarrow D) then the induced homomorphism H_n(C) \longrightarrow H_n(D) is returned as a homomorphism of finitely presented groups. A G-complex C can also be input. The homology groups of such a complex may not be abelian. Warning: in this case Homology(C,n) returns the abelian invariants of the n-th homology group of C.
HomologyPb
HomologyPb(C,n)

This is a back-up function which might work in some instances where Homology(C,n) fails. It is most useful for chain complexes whose boundary homomorphisms are sparse.

It inputs a chain complex C in characteristic 0 and returns the torsion coefficients of H_n(C) . There is a small probability that an incorrect answer could be returned. The computation relies on probabilistic Smith Normal Form algorithms implemented in the Simplicial Homology GAP package. This package therefore needs to be loaded. The computation is stored as a component of C so, when called a second time for a given C and n, the calculation is recalled without rerunning the algorithm.

The choice of probabalistic algorithm can be changed using the command

SetHomologyAlgorithm(HomologyAlgorithm[i]);

where i = 1,2,3 or 4. The upper limit for the probability of an incorrect answer can be set to any rational number 0&tlt;e&tlt;= 1 using the following command.

SetUncertaintyTolerence(e);

See the Simplicial Homology package manual for further details.
HomologyVectorSpace
HomologyVectorSpace(X,n)

Inputs either a chain complex X=C or a chain map X=(C \longrightarrow D) in prime characteristic. If X=C then H_n(C) is retuned as a vector space. If X=(C \longrightarrow D) then the induced homomorphism H_n(C) \longrightarrow H_n(D) is returned as a homomorphism of vector spaces.
HomologyPrimePart
HomologyPrimePart(C,n,p)

Inputs a chain complex C in characteristic 0, a positive integer n, and a prime p. It returns a list of those torsion coefficients of H_n(C) that are positive powers of p.

The function uses the EDIM GAP package by Frank Luebeck.
LeibnizAlgebraHomology
LeibnizAlgebraHomology(A,n)

Inputs a Lie or Leibniz algebra X=A (over the ring of integers Z or over a field K), together with a positive integer n. It returns the n-dimensional Leibniz homology of A.
LieAlgebraHomology
LieAlgebraHomology(A,n)

Inputs a Lie algebra A (over the integers or a field) and a positive integer n. It returns the homology H_n(A,k) where k denotes the ground ring.
PrimePartDerivedFunctor
PrimePartDerivedFunctor(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&tlt;G and a "mathematically suitable" covariant additive functor F such as TensorWithIntegers . It returns the abelian invariants of the p-component of the homology H_n(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.
RankHomologyPGroup
RankHomologyPGroup(G,n)
RankHomologyPGroup(R,n)
RankHomologyPGroup(G,n,"empirical")

Inputs a (smallish) p-group G, or n terms of a minimal Z_pG-resolution R of Z_p , together with a positive integer n. It returns the minimal number of generators of the integral homology group H_n(G,Z).

If an option third string argument "empirical" is included then an empirical algorithm will be used. This is one which always seems to yield the right answer but which we can't prove yields the correct answer.
RankPrimeHomology
RankPrimeHomology(G,n)

Inputs a (smallish) p-group G together with a positive integer n. It returns a function dim(k) which gives the rank of the vector space H_k(G,Z_p) for all 0 &tlt;= k &tlt;= n.