<Verb>CupProduct(Y):: RegCWComplex --> Function</Verb>
<Verb>CupProduct(R,p,q,P,Q):: FreeRes, Int, Int, List, List --> List</Verb><P/>
<P/> Inputs a regular CW-complex <M>Y</M>
and returns a function <M>f(p,q,P,Q)</M>. This function <M>f</M> inputs two
integers <M>p,q \ge 0</M> and two integer lists <M>P=[p_1, \ldots, p_m]</M>,
<M>Q=[q_1, \ldots, q_n]</M> representing elements <M>P\in H^p(Y,\mathbb Z)</M>
and <M>Q\in H^q(Y,\mathbb Z)</M>. The function <M>f</M> returns a list
<M>P \cup Q</M> representing the cup product <M>P \cup Q \in H^{p+q}(Y,\mathbb Z)</M>.
<P/> Inputs a free <M>\mathbb ZG</M> resolution <M>R</M>
of <M>\mathbb Z</M> for some group <M>G</M>, together with
integers <M>p,q \ge 0</M>
and integer lists <M>P, Q</M> representing cohomology classes
<M>P\in H^p(G,\mathbb Z)</M>, <M>Q\in H^q(G,\mathbb Z)</M>. An integer
list representing the cup product
<M>P\cup Q \in H^{p+q}(G,\mathbb Z)</M> is returned.