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




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

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

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

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

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



