CupProduct(Y):: RegCWComplex --> Function
CupProduct(R,p,q,P,Q):: FreeRes, Int, Int, List, List --> List

Inputs a regular CW-complex Y and returns a function f(p,q,P,Q). This function f inputs two integers p,q \ge 0 and two integer lists P=[p_1, \ldots, p_m], Q=[q_1, \ldots, q_n] representing elements P\in H^p(Y,\mathbb Z) and Q\in H^q(Y,\mathbb Z). The function f returns a list P \cup Q representing the cup product P \cup Q \in H^{p+q}(Y,\mathbb Z).

Inputs a free \mathbb ZG resolution R of \mathbb Z for some group G, together with integers p,q \ge 0 and integer lists P, Q representing cohomology classes P\in H^p(G,\mathbb Z), Q\in H^q(G,\mathbb Z). An integer list representing the cup product P\cup Q \in H^{p+q}(G,\mathbb Z) is returned.