// Example 7 in the notes: // computing Milnor and Tjurina number of a plane curve singularity // Step 1: define a local ring and the singularity ring r=0,(x,y),ds; // local ring in 2 variables ideal I=(x^2-y^3)*(x^3-y^2); // the curve // Step 2: compute Milnor and Tjurina number ideal Jac=jacob(I); // jacobian ideal of I groebner(Jac); // let's look at this first vdim(groebner(Jac)); // the Milnor number vdim(groebner(Jac+I)); // the Tjurina number // alternatively, we can use the library commands LIB "sing.lib"; milnor(I); // the Milnor number tjurina(I); // the Tjurina number // Question: What happens if we choose a global ordering? ring r2=0,(x,y),dp; // global ordering ideal I=(x^2-y^3)*(x^3-y^2); // the curve ideal Jac=jacob(I); // jacobian ideal of I groebner(Jac); vdim(groebner(Jac)); vdim(groebner(Jac+I)); // contributions outside the origin adding up to 10 for the critical locus // contributions outside the origin adding up to 5 for the singular locus // Consider these more closely LIB "primdec.lib"; minAssGTZ(slocus(I)); // components of singular locus setring r; // go back to local ring map m1=r2,x+1,y+1; // translation of (1,1) to origin def I2=m1(I); // move our curve, to study at (1,1) I2; milnor(I2); // Milnor number tjurina(I2); // Tjurina number // found contribution of 1 at (1,1) // extend basefield to look // at the 4 points ring r2a=(0,a),(x,y),ds; // adjoining parameter a minpoly=a4+a3+a2+a+1; // minimal polynomial map m2=r2,x-a3-a2-a-1,y+a; // go to one of the points def I3=m2(I); // map the curve milnor(I3); // Milnor number tjurina(I3); // Tjurina number // Now the same for the set of critical points setring r2; // go back to r2 minAssGTZ(jacob(I)); // decompose set of critical points // now consider the Puiseux expansion of our curve setring r; LIB "hnoether.lib"; // load Hamburger-Noether library poly f=I[1]; // hnexpansion needs argument of type poly hnexpansion(f); // call Hamburger-Noether expansion //def S=_[1]; // give that ring the name S //setring S; // and change to it //hne; // result can be found in hne def hne=_; // technical data, not really readable // rather view it with displayHNE(hne); // the better way to look at it ;-) // Invariants related to the Puiseux expansion displayInvariants(hne);