ModPCohomologyRing(R):: FreeResolution --> SCAlgebra
ModPCohomologyRing(R,level):: FreeResolution, String --> SCAlgebra
ModPCohomologyRing(G,n):: Group, Int --> SCAlgebra
ModPCohomologyRing(G,n,level):: Group, Int, String --> SCAlgebra

Inputs either a p-group G and positive integer n, or else n terms of a minimal \mathbb FG-resolution R of the field \mathbb F of p elements. It returns the cohomology ring A=H^\ast(G,\mathbb F) modulo all elements in degree greater than n. The ring is returned as a structure constant algebra A.

The ring A is graded. It has a component A!.degree(x) which is a function returning the degree of each (homogeneous) element x in GeneratorsOfAlgebra(A).

An optional input variable "level" can be set to one of the strings "medium" or "high". These settings determine parameters in the algorithm. The default setting is "medium".

When "level" is set to "high" the ring A is returned with a component A!.niceBasis. This component is a pair [Coeff,Bas]. Here Bas is a list of integer lists; a "nice" basis for the vector space A can be constructed using the command List(Bas,x->Product(List(x,i->Basis(A)[i])). The coefficients of the canonical basis element Basis(A)[i] are stored as Coeff[i].

If the ring A is computed using the setting "level"="medium" then the component A!.niceBasis can be added to A using the command A:=ModPCohomologyRing\_part\_2(A).