| LIB "purityfiltration.lib";
ring D = 0,(x1,x2,d1,d2),dp;
def S=Weyl();
setring S;
int i;
matrix R[3][3]=0,d2-d1,d2-d1,d2,-d1,-d1-d2,d1,-d1,-2*d1;
print(R);
==> 0, -d1+d2,-d1+d2,
==> d2,-d1, -d1-d2,
==> d1,-d1, -2*d1
list T=purityFiltration(transpose(R));
// the purity filtration of coker(M)
print(T[1][1]);
==> 0, -d1+d2,-d1+d2,
==> d2,-d1, -d1-d2,
==> d1,-d1, -2*d1
print(T[1][2]);
==> d2, d2,
==> d1-d2,0,
==> d2, d1
print(T[1][3]);
==> 1,0,
==> 0,d2,
==> 0,d1
// factor modules of the filtration
print(T[2][1]);
==> 0, 1,1,
==> -1,0,1
print(T[2][2]);
==> 1, 1,
==> d1-d2,0
print(T[2][3]);
==> 1,0,
==> 0,d2,
==> 0,d1
|