// The simple curve singularity E8 and all non-free
// indecomposable MCM modules
LIB "conn.lib";
ring s = 0, (x,y), dp;
ideal i = x3+y5;
qring a = std(i);
matrix M1[2][2] = x2,y4,y,-x;
matrix M2[2][2] = x2,y3,y2,-x;
matrix N1[2][2] = x,y4,y,-x2;
matrix N2[2][2] = x,y3,y2,-x2;
matrix P1[3][3] = y,-x,0,0,y,-x,x,0,y3;
matrix P2[3][3] = y,-x,0,0,y2,-x,x,0,y2;
matrix Q1[3][3] = y4,xy3,x2,-x2,y4,xy,-xy,-x2,y2;
matrix Q2[3][3] = y4,xy2,x2,-x2,y3,xy,-xy2,-x2,y3;
matrix R1[4][4] = y,-x,0,y3,x,0,-y3,0,-y2,0,-x2,0,0,-y2,-xy,-x2;
matrix R2[4][4] = x,y2,0,y,y3,-x2,-xy2,0,0,0,x2,y2,0,0,y3,-x;
matrix S1[4][4] = 0,x2,-y3,0,-x2,xy,0,-y3,0,-y2,-x,0,y2,0,y,-x;
matrix S2[4][4] = x2,y2,0,xy,y3,-x,-y2,0,0,0,x,y2,0,0,y3,-x2;
matrix T1[6][6] = y4,xy2,x2,0,0,xy,-x2,y3,xy,-x,0,0,-xy2,-x2,y3,0,-xy,0,0,0,0,y,-x,0,0,0,0,0,y2,-x,0,0,0,x,0,y2;
matrix T2[5][5] = y4,x2,0,-xy2,0,-x2,xy,0,-y3,0,0,-y2,-x,0,y3,-xy2,y3,0,x2,0,-y3,0,-y2,xy,-x2;
matrix U1[6][6] = y,-x,0,0,0,-x,0,y2,-x,xy,0,0,x,0,y2,0,xy,0,0,0,0,y4,xy2,x2,0,0,0,-x2,y3,xy,0,0,0,-xy2,-x2,y3;
matrix U2[5][5] = y,-x,0,0,0,x,0,0,y2,0,-y2,0,-x2,0,-y3,0,-y2,0,x,0,0,0,y2,y,-x;
list MCM = M1,M2,N1,N2,P1,P2,Q1,Q2,R1,R2,S1,S2,T1,T2,U1,U2;
matrix sM1[2][2] = x,y4,y,-x2;
matrix sM2[2][2] = x,y3,y2,-x2;
matrix sN1[2][2] = x2,y4,y,-x;
matrix sN2[2][2] = x2,y3,y2,-x;
matrix sP1[3][3] = y4,xy3,x2,-x2,y4,xy,-xy,-x2,y2;
matrix sP2[3][3] = y4,xy2,x2,-x2,y3,xy,-xy2,-x2,y3;
matrix sQ1[3][3] = y,-x,0,0,y,-x,x,0,y3;
matrix sQ2[3][3] = y,-x,0,0,y2,-x,x,0,y2;
matrix sR1[4][4] = 0,x2,-y3,0,-x2,xy,0,-y3,0,-y2,-x,0,y2,0,y,-x;
matrix sR2[4][4] = x2,y2,0,xy,y3,-x,-y2,0,0,0,x,y2,0,0,y3,-x2;
matrix sS1[4][4] = y,-x,0,y3,x,0,-y3,0,-y2,0,-x2,0,0,-y2,-xy,-x2;
matrix sS2[4][4] = x,y2,0,y,y3,-x2,-xy2,0,0,0,x2,y2,0,0,y3,-x;
matrix sT1[6][6] = y,-x,0,0,0,-x,0,y2,-x,xy,0,0,x,0,y2,0,xy,0,0,0,0,y4,xy2,x2,0,0,0,-x2,y3,xy,0,0,0,-xy2,-x2,y3;
matrix sT2[5][5] = y,-x,0,0,0,x,0,0,y2,0,-y2,0,-x2,0,-y3,0,-y2,0,x,0,0,0,y2,y,-x;
matrix sU1[6][6] = y4,xy2,x2,0,0,xy,-x2,y3,xy,-x,0,0,-xy2,-x2,y3,0,-xy,0,0,0,0,y,-x,0,0,0,0,0,y2,-x,0,0,0,x,0,y2;
matrix sU2[5][5] = y4,x2,0,-xy2,0,-x2,xy,0,-y3,0,0,-y2,-x,0,y3,-xy2,y3,0,x2,0,-y3,0,-y2,xy,-x2;
list sMCM = sM1,sM2,sN1,sN2,sP1,sP2,sQ1,sQ2,sR1,sR2,sS1,sS2,sT1,sT2,sU1,sU2;
print("Curve E8:");
print("-------");
int i;
for(i=1;i<=size(MCM);i++)
{
print("Module:");
print("-------");
print(MCM[i]);
print("-------");
print("Obstructions:");
print("-------");
print(KSKernel(MCM[i]));
print(LClass(MCM[i]));
print("-------");
}