ModPCohomologyGenerators(G,n):: Group, Int --> List
ModPCohomologyGenerators(R):: FreeResolution --> List

Inputs either a p-group G and positive integer n, or else n+1 terms of a minimal \mathbb FG-resolution R of the field \mathbb F of p elements. It returns a pair whose first entry is a minimal list of homogeneous generators for the cohomology ring A=H^\ast(G,\mathbb F) modulo all elements in degree greater than n. The second entry of the pair is a function deg which, when applied to a minimal generator, yields its degree.

WARNING: the following rule must be applied when multiplying generators x_i together. Only products of the form x_1*(x_2*(x_3*(x_4*...))) with deg(x_i) \le deg(x_{i+1}) should be computed (since the x_i belong to a structure constant algebra with only a partially defined structure constants table).