<Verb>CocycleCondition(R,n):: FreeRes, Int --> IntMat</Verb><P/>

Inputs a free <M>\mathbb ZG</M>-resolution <M>R</M> of <M>\mathbb Z</M>
 and an integer 
<M>n \ge 1</M>. 
It returns an integer matrix <M>M</M> with the following property. 
Let <M>d</M> be the <M>\mathbb ZG</M>-rank of <M>R_n</M>. 
An integer vector <M>f=[f_1, ... , f_d]</M> then represents a 
<M>\mathbb ZG</M>-homomorphism <M>R_n \rightarrow
 \mathbb Z_q</M> which sends the 
<M>i</M>th generator of <M>R_n</M> to the integer <M>f_i</M> in the trivial 
<M>\mathbb ZG</M>-module <M>\mathbb Z_q=\mathbb Z/q{\mathbb Z}</M>
 (where possibly <M>q=0</M>). The homomorphism <M>f</M> is a cocycle if and 
only if <M>M^tf=0</M> mod <M>q</M>.
