/////////////////////////////////////////////////////////////////////////////// version="$id reesclos.lib,v 1.32 2001/01/16 hirsch Exp $"; category="Commutative Algebra"; info=" LIBRARY: reesclos.lib PROCEDURES TO COMPUTE THE INT. CLOSURE OF AN IDEAL AUTHOR: Tobias Hirsch, email: hirsch@math.tu-cottbus.de OVERVIEW: A library to compute the integral closure of an ideal I in a polynomial ring R=k[x(1),...,x(n)] using the Rees Algebra R[It] of I. It computes the integral closure of R[It] (in the same manner as done in the library 'normal.lib'), which is a graded subalgebra of R[t]. The degree-k-component is the integral closure of the k-th power of I. PROCEDURES: ReesAlgebra(I); computes the Rees Algebra of an ideal I normalI(I[,p[,r]]); computes the integral closure of an ideal I using R[It] "; LIB "normal.lib"; // for HomJJ LIB "standard.lib"; // for groebner /////////////////////////////////////////////////////////////////////////////// proc ReesAlgebra (ideal I) "USAGE: ReesAlgebra (I); I = ideal RETURN: The Rees algebra R[It] as an affine ring, where I is an ideal in R. The procedure returns a list containing two rings: [1]: a ring, say RR; in the ring an ideal ker such that R[It]=RR/ker [2]: a ring, say Kxt; the basering with additional variable t containing an ideal mapI that defines the map RR-->Kxt EXAMPLE: example ReesAlgebra; shows an example " { // remember the data of the basering def oldring = basering; string oldchar = charstr(basering); string oldvar = varstr(basering); string oldord = ordstr(basering); int n = ncols(I); ideal m = maxideal(1); // Create a new ring with variables for each generator of I execute ("ring Rees = "+oldchar+",("+oldvar+",U(1.."+string(n)+")),dp"); // Kxt is the old ring with additional variable t // Here I -> t*I, so the generators of I generate the subalgebra R[It] in Kxt execute ("ring Kxt = "+oldchar+",("+oldvar+",t),dp"); ideal I = fetch(oldring,I); ideal m = fetch(oldring,m); int k; for (k=1;k<=n;k++) { I[k]=t*I[k]; } // Now we map from Rees to Kxt, identity on the original variables, and // U(k) -> I[k] ideal mapI = m,I; map phi = Rees,mapI; ideal zero = 0; export (mapI); // Now the Rees-Algebra is Rees/ker(phi) setring Rees; ideal ker = preimage(Kxt,phi,zero); export (ker); list result = Rees,Kxt; return(result); } example { "EXAMPLE:"; echo=2; ring R = 0,(x,y),dp; ideal I = x2,xy4,y5; list L = ReesAlgebra(I); def Rees = L[1]; // defines the ring Rees, containing the ideal ker setring Rees; // passes to the ring Rees Rees; ker; // R[It] is isomorphic to Rees/ker } //////////////////////////////////////////////////////////////////////////// static proc ClosureRees (list L) "USAGE: ClosureRees (L); L a list ASSUME: L is a list containing - a ring L[1], inside L[1] an ideal ker such that L[1]/ker is isomorphic to the Rees Algebra R[It] of an ideal I in k[x] - a ring L[2]=k[x,t], inside L[1] an ideal mapI defining the map L[1] --> L[2] with image R[It] RETURN: quotients of elements of k[x,t] representing generators of the integral closure of R[It]. The result of ClosureRees is a list images, the first size(images)-1 entries are the numerators of the generators, the last one is the universal denominator " { int dblvl=printlevel-voice+2; // toggles how much data is printed // during the procedure def Kxt = basering; def R(1) = L[1]; setring R(1); // declaration of variables used later ideal ker(1)=ker; // in STEP 2 poly p; // some auxiliary variables int i=1; // counts the number of steps to reach the closure of R(1) int check=0; // a 'boolean' variable for several checks /////// STEP 1: /////////////////////////////////////////////////////////// // construct R(i) step by step as done in normal.lib; 2 differences: // // - since the input is a prime ideal, no splitting will occur // // - the intermediate rings and nonzerodivisors for J are remembered // /////////////////////////////////////////////////////////////////////////// if (dblvl>0) { "// STEP 1: Compute the integral closure of R[It]"; } list RS; while (check==0) // repeat until the closure is reached { // construction of HomJJ, J an ideal containing the non-normal locus // of R(i)/ker(i), as done in normalizationPrimes in normal.lib for // the special case that we are working with a prime ideal if (dblvl>0) { ""; "// We are in step",i; pause(); } if (homog(ker(i))==1) { list SM=mstd(ker(i)); } else { list SM=groebner(ker(i)),ker(i); } if (dblvl>0) { "// Standard basis of the current ideal:"; SM[1]; } // In the first iteration, we have to compute the singular locus // "from scratch". In further iterations, we can fetch it from the // previous one but have to compute its radical. if (i==1) { ideal J=minor(jacob(SM[2]),nvars(basering)-dim(SM[1])); ideal sin=J+SM[2]; if (homog(sin)==1) { list JM=mstd(sin); } else { list JM=groebner(sin),sin; } J=radical(JM[2]); } else { ideal J=radical(JM[2]); } if (dblvl>0) { "// Radical of the singular locus:"; J; } ideal SL=simplify(reduce(JM[2],SM[1]),2); JM =J,J; poly nzd=SL[1]; // universal denominator for HomJJ if (dblvl>0) { "// The non-zerodivisor"; nzd; pause(); } list RR=SM[1],SM[2],JM[2],SL[1]; RS=HomJJ(RR); if (RS[2]==1) // we've reached the integral closure { if (dblvl>0) { ""; "// We've reached the integral closure after",i,"iterations"; pause(); } check=1; } else // prepare the next iteration with new { // ring R(i+1) ideal MJ=JM[2]; def R(i+1)=RS[1]; // the data of and some variable decla- setring R(i+1); // rations in R(i+1) needed in STEP 2 ideal ker(i+1)=endid; map phi=R(i),endphi; poly p; list JM=mstd(simplify(phi(MJ)+ker(i+1),4)); // fetch the singular locus i++; } } if (i==1) // R[It] (and thus I) was integrally { // closed ==> we're already done list result="closed"; return(result); } /////// STEP 2: //////////////////////////////////////////////////////// // compute representations of the ring variables of R(i) as fractions // // of elements of R(1); // //////////////////////////////////////////////////////////////////////// int length=nvars(R(i)); // the number of variables of the last ring int j,k,n; // some counters string mapstr; // will be used while constructing preimages list preimages; // here the fractions are stored in the // form var(j)=preimages[j]/preimages[length+1] // ('=' means identification via the inclusion) // the last entry corresponds to nzd in R(i) // For each variable (counter j) and for each intermediate ring (k): // find preimages of var(j)*endphi(nzd_k-1) in R(k-1). // Finally, do the same for nzd. if (dblvl>0) { "// STEP 2: Compute fractions representing the ring variables of"; " the last ring"; } for (j=1;j<=length+1;j++) { setring R(i); if (j<=length) // do it with for ring variables... { p=var(j); } else // ...and finally for nzd in R(i) { p=1; } // get back from R(i) to R(1) step by step for (k=i;k>1;k--) { // clear the fraction in the representation in R(i) p=p*phi(nzd); // compute the preimage of [p mod ker(k)] under phi in R(k-1): // as p is an element of im(phi), there is a polynomial h such that // h(vars(R(k-1)) is mapped to [p mod ker (k)], and h can be com- // puted as the normal form of a w.r.t in R(k)[Z] // compute this normal form h... if (j==1) // in the first iteration: construct S(k)=R(k)[Z], fetch // endphi (the ideal defining phi) and ker(k) and construct // the ideal from above { execute ("ring S(k) = "+charstr(R(k))+",("+varstr(R(k))+",Z(1.."+string(ncols(endphi))+")),(dp("+string(nvars(R(k)))+"),dp("+string(ncols(endphi))+"));"); ideal endphi = imap(R(k),endphi); ideal J = imap(R(k),ker(k)); for (n=1;n<=ncols(endphi);n++) { J=J+(Z(n)-endphi[n]); } J=groebner(J); poly h=NF(imap(R(k),p),J); } else { setring S(k); h=NF(imap(R(k),p),J); } // and compute h(vars(R(k-1))) setring R(k-1); if (j==1) // in the first iteration: compute backmap:S(k)-->R(k-1) { mapstr="map backmap = S(k),"; for (n=1;n<=nvars(R(k));n++) { mapstr=mapstr+"0,"; } execute (mapstr+"maxideal(1);"); } p=NF(backmap(h),std(ker(k-1))); } // when down to R(1), store the result in the list preimages preimages=insert(preimages,p,j-1); if (dblvl>0) { if (j<=length) { "numerator of variable ",j,":",p; } else { ""; "and finally the 'universal' denominator:",p; } } } // at the end: go back to the original basering and construct gene- // rators of the closure of I setring Kxt; map psi=R(1),mapI; // from ReesAlgebra: the map Rees->Kxt list images=psi(preimages); if (dblvl>-1) { pause(); ""; "// Get back to the original basering and construct the"; "// generators of the closure of I"; ""; "// Back in k[x,t], the fractions, stored in the list images:"; for (int j=1;j<=size(images);j++) { if (j0) { pow=#[1]; } computepow=pow; if (dblvl>0) { ""; "// The generators of the closure of R[It]:"; } intmat m[nvars(basering)-1][1]; // an intvec used for jet and maxdeg1 intvec tw=m,1; // such that t has weight 1 and all // other variables have weight 0 // Construct the generators of the closure of R[It] as elements of k[x,t] // If # is not given, determine the highest degree pow in t that occurs. for (j=1;j<=length;j++) { images[j] = (images[j]/denominator); // construct the fraction image = images[j]; if (dblvl>0) { "generator",j,":",image; } if (computepow==0) // #[1] not given or ==0 => compute pow { if (maxdeg1(image,tw)>pow) // from poly.lib { pow=maxdeg1(image,tw); } } } if (dblvl>0) { ""; if (computepow==0) { "// Compute the closure up to the given powers of I"; } else { "// Compute the closure up to the maximal power of t that occured:",pow; } } // Construct a list consisting of #[1] resp. pow times the zero ideal ideal CurrentPower=0; list result; for (k=1;k<=pow;k++) { result=insert(result,CurrentPower); } // For each generator and each k, add its degree-k-coefficient to the # // closure of I^k for (j=1;j<=length;j++) { for (k=1;k<=pow;k++) { image=images[j]-jet(images[j],k-1,tw); if (image<>0) { image=subst(image/t^k,t,0); if (image<>0) { result[k]=result[k]+image; } } } } if (dblvl>0) { ""; "// The 'pure' parts of degrees 1..pow:"; result; ""; } // finally, add the suitable products of generators in lower degrees for (k=2;k<=pow;k++) { for (j=1;j<=(k div 2);j++) { result[k]=result[k]+result[j]*result[k-j]; } } return(result); } //////////////////////////////////////////////////////////////////////////// proc normalI(ideal I, list #) "USAGE: normalI (I [,p[,r]]); I an ideal, p and r optional integers RETURN: the integral closure of I, ..., I^p, where I is an ideal in the polynomial ring R=k[x(1),...x(n)]. If p is not given, or p==0, compute the closure of all powers up to the maximum degree in t occurring in the closure of R[It] (so this is the last power whose closure is not just the sum/product of the smaller). If r is given and r==1, normalI starts with a check whether I is already a radical ideal. The result is a list containing the closure of the desired powers of I as ideals of the basering. DISPLAY: The procedure displays more comments for higher printlevel. EXAMPLE: example normalI; shows an example " { int dblvl=printlevel-voice+2; // toggles how much data is printed // during the procedure def BAS=basering; // remember the basering // two simple cases: principal ideals and radical ideals are always // integrally closed if (size(I)<=1) // includes the case I=(0) { if (dblvl>0) { "// Trivial case: I is a principal ideal"; } list result=I; if (size(#)>0) { for (int k=1;k<=#[1]-1;k++) { result=insert(result,I*result[k],k); } } return(result); } int testrad=0; // do the radical check? if (size(#)>1) { testrad=#[2]; } if (testrad==1) { if (dblvl>0) { "//Check whether I is radical"; } if (size(reduce(radical(I),std(I)))==0) { if (dblvl>0) { "//Trivial case: I is a radical ideal"; } list result=I; if (size(#)>0) { for (int k=1;k<=#[1]-1;k++) { result=insert(result,I*result[k],k); } } return(result); } } // start with the computation of the Rees Algebra R[It] of I if (dblvl>0) { "// We start with the Rees Algebra of I:"; } list Rees = ReesAlgebra(I); def R(1)=Rees[1]; def Kxt=Rees[2]; setring R(1); if (dblvl>0) { R(1); ker; ""; "// Now ClosureRees computes generators for the integral closure"; "// of R[It] step by step"; } // ClosureRees computes fractions in R[x,t] representing the generators // of the closure of R[It] in k[x,t], which is the same as the closure // in Q(R[It]). // the first size(images)-1 entries are the numerators of the gene- // rators, the last entry is the 'universal' denominator setring Kxt; list images = ClosureRees(Rees); // ClosureRees was done after the first HomJJ-call // ==> I is integrally closed, and images consists of the only entry "closed" if ((size(images)==1) && (typeof(images[1])=="string")) { if (dblvl>0) { "//I is integrally closed!"; } setring BAS; list result=I; if (size(#)>0) { for (int k=1;k<=#[1]-1;k++) { result=insert(result,I*result[k],k); } } return(result); } // construct the fractions corresponding to the generators of the // closure of I and its powers, depending on # (in fact, they will // not be real fractions, of course). This is done in ClosurePower. list result = ClosurePower(images,#); // finally fetch the result to the old basering setring BAS; list result=fetch(Kxt,result); return(result); } example { "EXAMPLE:"; echo=2; ring R=0,(x,y),dp; ideal I = x2,xy4,y5; list J = normalI(I); I; J; // J[1] is the integral closure of I } /* LIB"reesclos.lib"; // 1. x^i,y^i in k[x,y] // geht bis i = 19 (800sec), bis i=10 wenige Sekunden, // bei i = 20 ueber 1GB Hauptspeicher, in der 9. Iteration no memory // (braucht 20 Iterationen) ring r = 0,(x,y),dp; int i = 6; ideal I = x^i,y^i; list J = normalI(I); I; J; //================================================================ // 2. x^i,y^i,z^i in k[x,y,z] // aehnlich wie 1., funktioniert aber nur bis i=5 und dauert dort // >1 h //================================================================ // 3. scheitert in der ersten Iteration beim Radikal // Standardbasis des singulaeren Ortes: 7h (in char0), // in char(p) viel schneller, obwohl kleine Koeffizienten // schon bei Radikal -Test braucht er zu lang (>1h) ring r = 0,(x,y,z),dp; //ring r = 32003,(x,y,z),dp; ideal I = x2+xy3-5z,z3+y2-xzy,x2y3z5+y3-y5; list l= ReesAlgebra(I); list J = normalI(I); I; J; */