Pensieve header: Computing the quotient of the envelope of the w-Alexander polynomial by link relations.

{s0, s1} = {1, 1};
Gens[_, -1] = {};
Gens[_, 0] = {1};
Gens[n_,m_] := Gens[n,m]= (List @@ Expand[
(Sum[x[i], {i,n}]+Sum[a[i,j], {i,n}, {j,n}])^m
]) /. (_Integer*b_) :> b;
LR1[i_,j_][Z_] := Module[
{tails},
tails = Union[Cases[{Z}, a[k_,i] :> k, Infinity]];
Expand[Plus[
If[i==j, s0 x[i]Z, 0],
Sum[
(x[i]a[k,j]-x[k]a[i,j])D[Z, a[k,i]],
{k, tails}
]
]]
];
LR2[i_,j_][Z_] := Module[
{tails, heads},
tails = Union[Cases[{Z}, a[k_,j] :> k, Infinity]];
heads = Union[Cases[{Z}, a[j,k_] :> k, Infinity]];
Expand[Plus[
If[i==j, s1 x[i]Z, 0],
Sum[
(x[i]a[k,j]-x[k]a[i,j])D[Z, a[k,j]],
{k, tails}
],
Sum[
(x[j]a[i,k]-x[i]a[j,k])D[Z, a[j,k]],
{k, heads}
]
]]
];
Rels[n_,m_] := DeleteCases[
Union[Flatten[
Table[
{LR1[i,j] /@ Gens[n, m-1], LR2[j,i] /@ Gens[n, m-1]},
{i,2,n}, {j,n}
]
]],
0];
RRels[n_,m_] := Module[
{gens, rels, mat},
gens = Gens[n,m];
rels = Rels[n,m];
mat = rels /. Thread[gens -> IdentityMatrix[Length[gens]]];
DeleteCases[RowReduce[mat].gens, 0]
]

Gens[2,0]

Gens[2,1]

Gens[2,2]

Union[LR1[1,2] /@ Gens[2,2]]

LR2[1,2][a[2,1]]

{LR2[2,2][a[1,2]],LR2[2,2][a[1,2]]}

LR2[2,2] /@ Gens[2,2]

Rels[2,1]

gens=Gens[2,2]

rels=Rels[2,2]

(mat = rels /. Thread[gens -> IdentityMatrix[Length[gens]]]) // MatrixForm

rrels=DeleteCases[RowReduce[mat].gens, 0]

rrels = RRels[2,2]

Length[gens]-Length[rrels]

RRels[2,3]

RRels[2,4]

Study[M_] := Module[
{t,r, dims2},
dims2 = Table[
Print[{2,m} -> {t=Length[Gens[2,m]], r=Length[RRels[2,m]], t-r}];
{t,r,t-r},
{m,M}
];
{dims2, Last /@ dims2, Factor[InterpolatingPolynomial[Last /@ dims2, m]]}
];

{s0, s1} = {1,1}; Study[8]

{s0, s1} = {1,-1}; Study[8]

{s0, s1} = {-1,1}; Study[8]

{s0, s1} = {-1,-1}; Study[8]

Factor[(1/6) (6+17 m+3 (m^2)+4 (m^3))-(1/6) (6+14 m+9 (m^2)+(m^3))]

Factor[(1/6) (6+17 m+3 (m^2)+4 (m^3))-(1/6) (6+13 m+9 (m^2)+2 (m^3))]

Factor[(1/6) (6+13 m+9 (m^2)+2 (m^3))-(1/6) (6+14 m+9 (m^2)+(m^3))]

PrimitivesToFull[p_List] := Module[
{lp, x, ser},
lp = Length[p];
ser = Normal[Series[
Product[(1-x^i)^(-p[[i]]), {i, lp}],
{x, 0, lp}
]];
Table[Coefficient[ser, x, i], {i,0, lp}]
];
FullToPrimitives[{1}] = {};
FullToPrimitives[{1, mid___, last_}] := Module[{prev},
prev=FullToPrimitives[{1,mid}];
Append[
prev,
last - Last[PrimitivesToFull[Append[prev, 0]]]
]
];
PrimitivesToFull[{4,0,0,0,0,0}]

FullToPrimitives[Table[(1/6) (1+m) (2+m) (3+2 m), {m,0,20}]]

FullToPrimitives[Table[(1/6) (1+m) (6+8 m+(m^2)), {m,0,20}]]

FullToPrimitives[Table[(1/6) (6+17 m+3 (m^2)+4 (m^3)), {m,0,20}]]

FullToPrimitives[Table[m!, {m,0,10}]]

FullToPrimitives[Table[1+m^2, {m,0,10}]]

Study[n_, M_] := Module[
{t,r, dims},
dims = Table[
Print[{n,m} -> {t=Length[Gens[n,m]], r=Length[RRels[n,m]], t-r}];
{t,r,t-r},
{m,M}
];
{dims, Last /@ dims, Factor[InterpolatingPolynomial[Last /@ dims, m]]}
];

{s0, s1} = {-1,1}; Study[3, 8]