gap> S:=SimplicialComplex([[1,2],[2,3],[1,3]]);;
gap> S:=RegularCWComplex(S);;
gap> W:=DirectProduct(S,S,S,S);;
gap> cup:=CupProduct(W);
function( p, q, vv, ww ) ... end

gap> cup(3,1,[0,0,1,0],[0,0,1,0]);
[ 1 ]
	  
#Now test that the diagonal construction is valid.
gap> D:=DiagonalApproximation(W);;
gap> p:=D!.projection;
Map of regular CW-complexes

gap> P:=ChainMap(p);
Chain Map between complexes of length 4 . 

gap> IsIsomorphismOfAbelianFpGroups(Homology(P,0));
true
gap> IsIsomorphismOfAbelianFpGroups(Homology(P,1));
true
gap> IsIsomorphismOfAbelianFpGroups(Homology(P,2));
true
gap> IsIsomorphismOfAbelianFpGroups(Homology(P,3));
true
gap> IsIsomorphismOfAbelianFpGroups(Homology(P,4));
true
