Cohomology OCP^2

Generators

PartOCP gives the partitions; PowOCP translates to powers; GenOCP spits out a list of generators in dimension n.

PartOCP[n_]:=IntegerPartitions[n,All,{2,8}]
PowOCP[n_]:=Table[{Count[PartOCP[n][[i]],2],Count[PartOCP[n][[i]],8]} ,{i,1, Length[PartOCP[n]]}]
GenOCP[n_]:=Table[t^PowOCP[n][[i]][[1]] * w^PowOCP[n][[i]][[2]], {i,1, Length[PartOCP[n]]}]

Transpose[{Table[n, {n,0,34}],Table[Length[GenOCP[n]], {n,0,34}],Table[GenOCP[n], {n,0,34}]}]//MatrixForm

Dimension; number of generators; list of generators.

Relations

PartRelOCP gives the partitions into 2 and 8 of n-dim(relation); PowRelOCP translates to powers, with j labeling different relations; RelOCP spits out the multiples of the relation j that live in dimension n; RelsOCP combines the different relations into a list of all relations in dimension n.

r18=t^9-3w^2 t;
r24=w^3+15w^2t^4-9w t^8;

R={r18,r24};
Rdim={18,24};

PartRelOCP[n_]:=
Table[IntegerPartitions[n-Rdim[[i]],All,{2,8}],
{i, 1,Length[R] }]
PowRelOCP[n_,j_]:=Table[{Count[PartRelOCP[n][[j]][[i]],2],Count[PartRelOCP[n][[j]][[i]],8]} ,{i,1, Length[PartRelOCP[n][[j]]]}]
RelOCP[n_,j_]:=If[ n⩾Rdim[[j]],
If[n==Rdim[[j]],R[[j]],
Table[
t^PowRelOCP[n,j][[i]][[1]] * w^PowRelOCP[n,j][[i]][[2]]*R[[j]], {i,1, Length[PowRelOCP[n,j]]}]],{}]
RelsOCP[n_]:=Expand[Flatten[Table[RelOCP[n,j],{j,1,Length[R]}]]]

Transpose[{Table[n, {n,18,34}], Table[Length[RelsOCP[n]], {n,18,34}],Table[RelsOCP[n], {n,18,34}]}]//MatrixForm

Solving

Replacee replaces the generators in dimension n with (Subscript[a, i]); ReplacedGen gives a list of the (Subscript[a, i]); Replaceeback replaces (Subscript[a, i]) with the generators. Replaced gives the relations with the (Subscript[a, i]) replaced in.
ReduceOCP solves the system of equation given by the relations in dimension n in terms of the (Subscript[a, i])’s, over ℤ. In the answer, all the mentioned variable that are “in ℤ” are generators of a copy of ℤ, and the other generators are given by C[1], C[2] etc.

Replacee[n_]:=Table[GenOCP[n][[i]]-> (Subscript[a, i]),{i,1,Length[GenOCP[n]]}]
ReplacedGen[n_]:=Table[(Subscript[a, i]),{i,1,Length[GenOCP[n]]}]
Replaceeback[n_]:=Table[ (Subscript[a, i])-> GenOCP[n][[i]],{i,1,Length[GenOCP[n]]}]
Replaced[n_]:=RelsOCP[n]/.Replacee[n]

Transpose[{Table[n, {n,18,34}], Table[Length[RelsOCP[n]], {n,18,34}],Table[RelsOCP[n], {n,18,34}], Table[Replaced[n], {n,18,34}]}]//MatrixForm

ReduceOCP[n_]:=Reduce[Table[Replaced[n][[i]]==0,{i,1, Length[RelsOCP[n]]}]
,ReplacedGen[n]
,Integers]

Transpose[{Table[n,{n,0,34}],Table[GenOCP[n],{n,0,34}],Table[ReduceOCP[n]/. Replaceeback[n],{n,0,34}]}]//MatrixForm

Signature

σ= {{78,45,26}, {45,26,15},{26,15,9}};
σ//MatrixForm

Eigenvalues[σ]//N

Binomial[10,2]