 LIB "normal.lib";
//  first example: rational quadruple point 
ring R=32003,(x,y,z),wp(3,5,15);
ideal I=z*(y3x5)+x10;
list pr=normal(I);
==>
==> // 'normal' created a list, say nor, of two elements.
==> // To see the list type
==> nor;
==>
==> // * nor[1] is a list of 1 ring(s).
==> // To access the ith ring nor[1][i], give it a name, say Ri, and type
==> def R1 = nor[1][1]; setring R1; norid; normap;
==> // For the other rings type first (if R is the name of your base ring)
==> setring R;
==> // and then continue as for R1.
==> // Ri/norid is the affine algebra of the normalization of R/P_i where
==> // P_i is the ith component of a decomposition of the input ideal id
==> // and normap the normalization map from R to Ri/norid.
==>
==> // * nor[2] is a list of 1 ideal(s). Let ci be the last generator
==> // of the ideal nor[2][i]. Then the integral closure of R/P_i is
==> // generated as Rsubmodule of the total ring of fractions by
==> // 1/ci * nor[2][i].
def S=pr[1][1];
setring S;
norid;
==> norid[1]=T(2)*x+y*z
==> norid[2]=T(1)*x^2T(2)*y
==> norid[3]=T(1)*y+x^7x^2*z
==> norid[4]=T(1)*y^2*z+T(2)*x^8T(2)*x^3*z
==> norid[5]=T(1)^2+T(2)*z+x^4*y*z
==> norid[6]=T(1)*T(2)+x^6*zx*z^2
==> norid[7]=T(2)^2+T(1)*x*z
==> norid[8]=x^10x^5*z+y^3*z
//  second example: union of straight lines 
ring R1=0,(x,y,z),dp;
ideal I=(xy)*(xz)*(yz);
list qr=normal(I);
==>
==> // 'normal' created a list, say nor, of two elements.
==> // To see the list type
==> nor;
==>
==> // * nor[1] is a list of 2 ring(s).
==> // To access the ith ring nor[1][i], give it a name, say Ri, and type
==> def R1 = nor[1][1]; setring R1; norid; normap;
==> // For the other rings type first (if R is the name of your base ring)
==> setring R;
==> // and then continue as for R1.
==> // Ri/norid is the affine algebra of the normalization of R/P_i where
==> // P_i is the ith component of a decomposition of the input ideal id
==> // and normap the normalization map from R to Ri/norid.
==>
==> // * nor[2] is a list of 2 ideal(s). Let ci be the last generator
==> // of the ideal nor[2][i]. Then the integral closure of R/P_i is
==> // generated as Rsubmodule of the total ring of fractions by
==> // 1/ci * nor[2][i].
def S1=qr[1][1]; def S2=qr[1][2];
setring S1; norid;
==> norid[1]=T(1)*y+T(1)*z+xz
==> norid[2]=T(1)*xT(1)*y
==> norid[3]=T(1)^2T(1)
==> norid[4]=x^2x*yx*z+y*z
setring S2; norid;
==> norid[1]=yz
