Changeset afc171 in git
- Timestamp:
- Sep 7, 2009, 10:26:43 AM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- d317a90d4242efb5169bc024c79fc9c4937bc022
- Parents:
- d65c0faa4c8fc1d6650f180804a68d2a6a70acac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
rd65c0fa rafc171 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: normal.lib,v 1.5 7 2009-09-03 21:20:03 laplagneExp $";2 version="$Id: normal.lib,v 1.58 2009-09-07 08:26:43 seelisch Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" … … 45 45 Decomposition:@* 46 46 - \"equidim\" -> computes first an equidimensional decomposition, 47 and then the normalization of each component . (default)@*47 and then the normalization of each component (default).@* 48 48 - \"prim\" -> computes first the minimal associated primes, and then 49 49 the normalization of each prime. @* 50 50 - \"noDeco\" -> no preliminary decomposition is done. If the ideal is 51 51 not equidimensional radical, output might be wrong.@* 52 - \"isPrim\" -> assumes that the ideal is prime. If assumption does53 not hold,output might be wrong.@*52 - \"isPrim\" -> assumes that the ideal is prime. If this assumption 53 does not hold, the output might be wrong.@* 54 54 - \"noFac\" -> factorization is avoided in the computation of the 55 55 minimal associated primes; 56 56 Other:@* 57 57 - \"useRing\" -> uses the original ring ordering.@* 58 If the ring ordering is not global, it will change to a global 59 ordering only for computing radicals and prime or equidimensional 60 decompositions.@* 61 If this option is not set, it changes to dp ordering and perform all 62 computation with respect to this ordering.@* 63 - \"withDelta\" (or \"wd\") -> returns also the delta invariants. 64 If choose is not given or empty, the default options are used.@* 58 If this option is set and if the ring ordering is not global, normal 59 will change to a global ordering only for computing radicals and prime 60 or equidimensional decompositions.@* 61 If this option is not set, normal changes to dp ordering and performs 62 all computations with respect to this ordering.@* 63 - \"withDelta\" (or \"wd\") -> returns also the delta invariants.@* 64 If choose is not given or empty, only \"equidim\" but no other option 65 is used. 65 66 ASSUME: The ideal must be radical, for non-radical ideals the output may 66 be wrong (id=radical(id); makes id radical). However, when using 67 be wrong (id=radical(id); makes id radical). However, when using the 67 68 \"prim\" option the minimal associated primes of id are computed first 68 69 and hence normal computes the normalization of the radical of id.@* 69 70 NOTE: \"isPrim\" should only be used if id is known to be prime. 70 71 RETURN: a list, say nor, of size 2 (resp. 3 with option \"withDelta\"). 71 @format 72 * nor[1] , the first element, is a list of r rings, where r is the73 number of associated primes P_i with option \"prim\" (resp. >= no74 of equidimenensionalcomponents P_i with option \"equidim\").@*75 Each ring Ri :=nor[1][i], i=1..r, contains two ideals with given76 names @code{norid} and @code{normap} such that @*72 @format Let R denote the basering and id the input ideal. 73 * nor[1] is a list of r rings, where r is the number of associated 74 primes P_i with option \"prim\" (resp. >= no of equidimenensional 75 components P_i with option \"equidim\").@* 76 Each ring Ri := nor[1][i], i=1..r, contains two ideals with given 77 names @code{norid} and @code{normap} such that: @* 77 78 - Ri/norid is the normalization of the i-th component, i.e. the 78 integral closure in its field of fractions (as affine ring);79 - @code{normap} gives the normalization map from basering/id to79 integral closure of R/P_i in its field of fractions (as affine ring); 80 - @code{normap} gives the normalization map from R/id to 80 81 Ri/norid for each i.@* 81 82 - the direct sum of the rings Ri/norid, i=1,..r, is the normalization 82 of basering/id; @*83 of R/id as affine algebra; @* 83 84 * nor[2] is a list of size r with information on the normalization of 84 the i-th component as module over the basering :@*85 nor[2][i] is an ideal, say U, in the basering such that the integral86 closure of basering/P_i is generated as module over the basering by87 1/c * U, with cthe last element U[size(U)] of U.@*85 the i-th component as module over the basering R:@* 86 nor[2][i] is an ideal, say U, in R such that the integral closure 87 of basering/P_i is generated as module over R by 1/c * U, with c 88 the last element U[size(U)] of U.@* 88 89 * nor[3] (if option \"withDelta\" is set) is a list of an intvec 89 90 of size r, the delta invariants of the r components, and an integer, 90 91 the total delta invariant of basering/id (-1 means infinite, and 0 91 that basering/P_i resp. basering/inputis normal).92 that R/P_i resp. R/id is normal). 92 93 @end format 93 THEORY: We use a general algorithm described in [G.-M. Greuel, S. Laplagne, 94 F. Seelisch: Normalization of Rings (2009)].@* 95 The delta invariant of a reduced ring K[x1,...,xn]/id is 96 dim_K(normalization(K[x1,...,xn]/id) / K[x1,...,xn]/id) 97 We call this number also the delta invariant of id. 98 NOTE: To use the i-th ring type: @code{def R=nor[1][i]; setring R;}. 94 THEORY: We use here a general algorithm described in [G.-M.Greuel, S.Laplagne, 95 F.Seelisch: Normalization of Rings (2009)].@* 96 The procedure computes the R-module structure, the algebra structure 97 and the delta invariant of the normalization of R/id:@* 98 The normalization of R/id is the integral closure of R/id in its total 99 ring of fractions. It is a finitely generated R-module and nor[2] 100 computes R-module generators of it. More precisely: If U:=nor[2][i] 101 and c:=U[size(U)], then c is a non-zero divisor and U/c is an R-module 102 in the total ring of fractions, the integral closure of R/P_i. Since 103 U[size(U)]/c is equal to 1, R/P_i resp. R/id is contained in the 104 integral closure.@* 105 The normalization is also an affine algebra over the ground field 106 and nor[1] presents it as such. For geometric considerations nor[1] is 107 relevant since the variety of the ideal norid in Ri is the 108 normalization of the variety of the ideal P_i in R.@* 109 The delta invariant of a reduced ring A is dim_K(normalization(A)/A). 110 For A=K[x1,...,xn]/id we call this number also the delta invariant of 111 id. nor[3] returns the delta invariants of the components P_i and of 112 id. 113 NOTE: To use the i-th ring type e.g.: @code{def R=nor[1][i]; setring R;}. 99 114 @* Increasing/decreasing printlevel displays more/less comments 100 115 (default: printlevel=0). … … 102 117 @* Not implemented for quotient rings. 103 118 @* If the input ideal id is weighted homogeneous a weighted ordering may 104 be used (qhweight(id); computes weights). 119 be used together with the useRing-option (qhweight(id); computes 120 weights). 105 121 KEYWORDS: normalization; integral closure; delta invariant. 122 SEE ALSO: normalC, normalP. 106 123 EXAMPLE: example normal; shows an example 107 124 " … … 110 127 111 128 int i,j; 112 int decomp; // Preliminar decomposition:129 int decomp; // Preliminary decomposition: 113 130 // 0 -> no decomposition (id is assumed to be prime) 114 131 // 1 -> no decomposition … … 136 153 //--------------------------- define the method --------------------------- 137 154 string method; //make all options one string in order to use 138 //all combinations of options simultaneously155 //all combinations of options simultaneously 139 156 for ( i=1; i <= size(#); i++ ) 140 157 { … … 171 188 } 172 189 else 173 { 174 "WARNING: the delta invariants cannot be computed with an equidimensional";175 " decomposition.";176 " Use option \"prim\" to compute first the minimal associated primes.";177 "";190 { 191 decomp = 3; 192 withDelta = 1; 193 //Note: the delta invariants cannot be computed with an equidimensional 194 //decomposition, hence we compute first the minimal primes 178 195 } 179 196 } … … 426 443 resultNew = list(RL, MG); 427 444 } 428 445 446 sp = size(RL); //RL = list of rings 429 447 option(set, opt); 430 448 … … 440 458 "// 'normal' created a list, say nor, of three elements."; 441 459 } 442 "// * nor[1] is a list of", sp, "ring(s). To access the i-th ring nor[1][i], "; 443 "// give it a name, say Ri, and type e.g. "; 460 "// To see the list type"; 461 " nor;"; 462 ""; 463 "// * nor[1] is a list of", sp, "ring(s)."; 464 "// To access the i-th ring nor[1][i], give it a name, say Ri, and type"; 444 465 " def R1 = nor[1][1]; setring R1; norid; normap;"; 445 "// For the other rings type first "; 446 " setring r;"; 447 "// (if r is the name of your original basering) and then continue as"; 448 "// for the first ring."; 449 "// Ri/norid is the affine algebra of the normalization of the i-th "; 450 "// component r/P_i (where P_i is the i-th component of a decomposition of"; 451 "// the input ideal) and normap the normalization map from r to Ri/norid."; 452 "// * nor[2] is a list of", sp, "ideal(s) such that the integral"; 453 "// closure of basering/P_i is generated as module over the basering by"; 454 "// 1/ci * Ui, with Ui the i-th ideal of nor[2] and ci the last element"; 455 "// Ui[size(Ui)] of Ui."; 466 "// For the other rings type first (if R is the name of your base ring)"; 467 " setring R;"; 468 "// and then continue as for R1."; 469 "// Ri/norid is the affine algebra of the normalization of R/P_i where"; 470 "// P_i is the i-th component of a decomposition of the input ideal id"; 471 "// and normap the normalization map from R to Ri/norid."; 472 ""; 473 "// * nor[2] is a list of", sp, "ideal(s). Let ci be the last generator"; 474 "// of the ideal nor[2][i]. Then the integral closure of R/P_i is"; 475 "// generated as R-submodule of the total ring of fractions by"; 476 "// 1/ci * nor[2][i]."; 477 456 478 if(withDelta) 457 { 458 "// * nor[3] is a list of an intvec of size r, the delta invariants "; 459 "// of the r components, and an integer, the total delta invariant "; 460 "// of basering/id (-1 means infinite, and 0 that basering/P_i resp. "; 461 "// basering/input is normal)."; 479 { ""; 480 "// * nor[3] is a list of an intvec of size", sp, "the delta invariants "; 481 "// of the components, and an integer, the total delta invariant "; 482 "// of R/id (-1 means infinite, and 0 that R/P_i resp. R/id is normal)."; 462 483 } 463 484 } … … 796 817 //return(newR); 797 818 } 798 799 819 800 820 … … 2675 2695 proc primeClosure (list L, list #) 2676 2696 "USAGE: primeClosure(L [,c]); L a list of a ring containing a prime ideal 2677 2697 ker, c an optional integer 2678 2698 RETURN: a list L (of size n+1) consisting of rings L[1],...,L[n] such that 2679 2699 - L[1] is a copy of (not a reference to!) the input ring L[1] … … 2722 2742 } 2723 2743 2724 // R0 is the ring to work with, if we are in step one, make a copy of the2744 // R0 below is the ring to work with, if we are in step one, make a copy of the 2725 2745 // input ring, so that all objects are created in the copy, not in the original 2726 2746 // ring (therefore a copy, not a reference is defined). … … 2744 2764 setring R0; 2745 2765 ideal ker=fetch(R,ker); 2746 2747 2766 // check whether we compute the normalization of the blow up of 2748 2767 // an isolated singularity at the origin (checked in normalI) … … 2759 2778 setring R0; 2760 2779 } 2761 2762 2780 2763 2781 // In order to apply HomJJ from normal.lib, we need the radical of the singular … … 2877 2895 2878 2896 list RS = HomJJ(RR); 2879 2897 //NOTE: HomJJ creates new ring with variables X(i) and T(j) 2880 2898 //------------------------------------------------------------------------- 2881 2899 // If we've reached the integral closure (as determined by the result of … … 2999 3017 3000 3018 int n=size(L)-1; 3001 int i,j,k,l; 3019 int i,j,k,l,n2,n3; 3020 intvec V; 3002 3021 string mapstr; 3003 3022 for (i=1; i<=n; i++) { def R(i) = L[i]; } … … 3039 3058 //### noch abfragen ob Z(i) definiert ist 3040 3059 list gnirlist = ringlist(R(k)); 3041 intn2 = size(gnirlist[2]);3042 intn3 = size(gnirlist[3]);3060 n2 = size(gnirlist[2]); 3061 n3 = size(gnirlist[3]); 3043 3062 for( i=1; i<=ncols(phi); i++) 3044 3063 { 3045 3064 gnirlist[2][n2+i] = "Z("+string(i)+")"; 3046 3065 } 3047 intvec V;3066 V=0; 3048 3067 V[ncols(phi)]=0; V=V+1; 3049 3068 gnirlist[3] = insert(gnirlist[3],list("dp",V),n3-1); … … 3168 3187 int n = size(L); // the number of rings R(1)-->...-->R(n) 3169 3188 int length = nvars(L[n]); // the number of variables of the last ring 3170 int j,k,l; 3189 int j,k,l,n2,n3; 3190 intvec V; 3171 3191 string mapstr; 3172 3192 list preimages; … … 3223 3243 //### noch abfragen ob Z(i) definiert ist 3224 3244 list gnirlist = ringlist(R(k)); 3225 intn2 = size(gnirlist[2]);3226 intn3 = size(gnirlist[3]);3245 n2 = size(gnirlist[2]); 3246 n3 = size(gnirlist[3]); 3227 3247 for( i=1; i<=ncols(phi); i++) 3228 3248 { 3229 3249 gnirlist[2][n2+i] = "Z("+string(i)+")"; 3230 3250 } 3231 intvec V;3251 V=0; 3232 3252 V[ncols(phi)]=0; 3233 3253 V=V+1; … … 3294 3314 3295 3315 proc normalP(ideal id,list #) 3296 "USAGE: normalP(id [,choose]); id a radical ideal, choose a comma separated 3316 "USAGE: normalP(id [,choose]); id = radical ideal, = optional string. 3317 Optional parameters in list choose (can be entered in any order):@* 3297 3318 list of optional strings \"withRing\", \"isPrim\", \"noFac\", 3298 3319 \"noRed\", where@* 3299 - \"noFac\" ,factorization is avoided during the computation3320 - \"noFac\" -> factorization is avoided during the computation 3300 3321 of the minimal associated primes.@* 3301 - \"isPrim\" , disables the computation of the minimal associated3302 primes (should only be used if the ideal is known to be prime).@*3303 - \"withRing\" , the ring structure of the normalization is3322 - \"isPrim\" -> assumes that the ideal is prime. If the assumption 3323 does not hold, output might be wrong.@* 3324 - \"withRing\" -> the ring structure of the normalization is 3304 3325 computed. The number of variables in the new ring is reduced as much 3305 3326 as possible.@* 3306 - \"noRed\", when computing the ring structure no reduction on the 3307 number of variables is done, it creates one new variable for each 3308 of the new generators of the integral closure in the quotient field.@* 3309 ASSUME: The characteristic of the ground field must be positive. The ideal 3310 id is assumed to be radical. However, if choose does not contain 3311 \"isPrim\" the minimal associated primes of id are computed first 3312 and hence normal computes the normalization of the radical of id. 3313 If choose = \"isPrim\" the ideal must be a prime ideal (this is not 3314 tested) otherwise the result may be wrong. 3315 RETURN: a list, say 'nor' of size 2 (default) or, if \"withRing\" is given, 3316 of size 3. @* 3317 nor[1] (resp. nor[2] if \"withRing\" is given) is a list of ideals 3318 Ii, i=1..r, in the basering where r is the number of associated prime 3319 ideals P_i (irreducible components) of id.@* 3320 - Ii is an ideal given by polynomials g_1,...,g_k,g_k+1 such that 3321 g_1/g_k+1,...,g_k/g_k+1 generate the integral closure of 3322 basering/P_i as module (over the basering) in its quotient field.@* 3323 3324 nor[2] (resp. nor[3] if choose=\"withRing\") is a list of an intvec 3327 - \"noRed\" -> when computing the ring structure, no reduction on the 3328 number of variables is done, it creates one new variable for every 3329 new module generator of the integral closure in the quotient field.@* 3330 ASSUME: The characteristic of the ground field must be positive. If the 3331 option \"isPrim\" is not set, the minimal associated primes of id 3332 are computed first and hence normal computes the normalization of 3333 the radical of id. If option \"isPrim\" is set, the ideal must be 3334 a prime ideal otherwise the result may be wrong. 3335 RETURN: a list, say 'nor' of size 2 (resp. 3 if \"withRing\" is set).@* 3336 ** If option \"withRing\" is not set: @* 3337 Only the module structure is computed: @* 3338 * nor[1] is a list of ideals Ii, i=1..r, in the basering R where r 3339 is the number of minimal associated prime ideals P_i of the input 3340 ideal id, describing the module structure:@* 3341 If Ii is given by polynomials g_1,...,g_k in R, then c:=g_k is 3342 non-zero in the ring R/P_i and g_1/c,...,g_k/c generate the integral 3343 closure of R/P_i as R-module in the quotient field of R/P_i.@* 3344 * nor[2] shows the delta invariants: it is a list of an intvec 3325 3345 of size r, the delta invariants of the r components, and an integer, 3326 the total delta invariant of basering/id (-1 means infinite, and 03327 that basering/P_i resp. basering/inputis normal). @*3328 3329 If the optional string \"withRing\" is given, the ring structure of3330 the normalization is computed too andnor[1] is a list of r rings.@*3331 Each ring Ri = nor[1][i], i=1..r, contains two ideals with given names3332 @code{norid} and @code{normap} such that @*3333 - Ri/norid is the normalization of the i-th rime component P_i, i.e.3334 isomorphic to the integral closure of basering/P_i in its field3335 of fractions; @*3346 the total delta invariant of R/id 3347 (-1 means infinite, and 0 that R/P_i resp. R/id is normal). @* 3348 ** If option \"withRing\" is set: @* 3349 The ring structure is also computed, and in this case:@* 3350 * nor[1] is a list of r rings.@* 3351 Each ring Ri = nor[1][i], i=1..r, contains two ideals with given 3352 names @code{norid} and @code{normap} such that @* 3353 - Ri/norid is the normalization of R/P_i, i.e. isomorphic as 3354 K-algebra (K the ground field) to the integral closure of R/P_i in 3355 the field of fractions of R/P_i; @* 3336 3356 - the direct sum of the rings Ri/norid is the normalization 3337 of basering/id; @* 3338 - @code{normap} gives the normalization map from basering/P_i to 3339 Ri/norid (for each i).@* 3340 THEORY: The delta invariant of a reduced ring K[x1,...,xn]/id is 3341 dim_K(normalization(K[x1,...,xn]/id) / K[x1,...,xn]/id) 3342 We call this number also the delta invariant of id. normalP uses 3343 the qth-power algorithm suggested by Leonard-Pellikaan (using the 3344 Frobenius) in part similair to an implementation by Singh-Swanson. 3357 of R/id; @* 3358 - @code{normap} gives the normalization map from R to Ri/norid.@* 3359 * nor[2] gives the module generators of the normalization of R/P_i, 3360 it is the same as nor[1] if \"withRing\" is not set.@* 3361 * nor[3] shows the delta invariants, it is the same as nor[2] if 3362 \"withRing\" is not set. 3363 THEORY: normalP uses the Leonard-Pellikaan-Singh-Swanson algorithm (using the 3364 Frobenius) cf. [A. K. Singh, I. Swanson: An algorithm for computing 3365 the integral closure, arXiv:0901.0871]. 3366 The delta invariant of a reduced ring A is dim_K(normalization(A)/A). 3367 For A=K[x1,...,xn]/id we call this number also the delta invariant of 3368 id. The procedure returns the delta invariants of the components P_i 3369 and of id. 3345 3370 NOTE: To use the i-th ring type: @code{def R=nor[1][i]; setring R;}. 3346 3371 @* Increasing/decreasing printlevel displays more/less comments 3347 3372 (default: printlevel = 0). 3348 3373 @* Not implemented for local or mixed orderings or quotient rings. 3374 For local or mixed orderings use proc 'normal'. 3349 3375 @* If the input ideal id is weighted homogeneous a weighted ordering may 3350 3376 be used (qhweight(id); computes weights). 3351 @* works only in characteristic p >0.3377 @* Works only in characteristic p > 0, use proc normal in char 0. 3352 3378 KEYWORDS: normalization; integral closure; delta invariant. 3353 SEE ALSO: normal 3379 SEE ALSO: normal, normalC 3354 3380 EXAMPLE: example normalP; shows an example 3355 3381 " … … 3525 3551 { 3526 3552 "// 'normalP' created a list, say nor, of three lists: 3527 // nor[1] resp. nor[2] are lists of",sr,"ring(s) resp. ideal(s)3528 // and nor[3] is a list of an intvec and an integer.3529 3553 // To see the result, type 3530 3554 nor; 3555 3556 // * nor[1] is a list of",sr,"ring(s): 3531 3557 // To access the i-th ring nor[1][i] give it a name, say Ri, and type e.g. 3532 3558 def R1 = nor[1][1]; setring R1; norid; normap; 3533 // for the other rings type first setring r; (if ris the name of your3534 // original basering) and then continue as for the first ring;3559 // for the other rings type first setring R; (if R is the name of your 3560 // original basering) and then continue as for R1; 3535 3561 // Ri/norid is the affine algebra of the normalization of the i-th 3536 // component r/P_i (where P_i is an associated prime of the input ideal) 3537 // and normap the normalization map from r to Ri/norid; 3538 // nor[2] is a list of",sr,"ideal(s), each ideal nor[2][i] consists of 3562 // component R/P_i (where P_i is a min. associated prime of the input ideal) 3563 // and normap the normalization map from R to Ri/norid; 3564 3565 // * nor[2] is a list of",sr,"ideal(s), each ideal nor[2][i] consists of 3539 3566 // elements g1..gk of r such that the gj/gk generate the integral 3540 // closure of r/P_i as (r/P_i)-module in the quotient field of r/P_i. 3541 // nor[3] shows the delta-invariant of each component and of the input 3567 // closure of R/P_i as R-module in the quotient field of R/P_i. 3568 3569 // * nor[3] shows the delta-invariant of each component and of the input 3542 3570 // ideal (-1 means infinite, and 0 that r/P_i is normal)."; 3543 3571 } … … 3545 3573 { 3546 3574 "// 'normalP' computed a list, say nor, of two lists: 3547 // nor[1] is a list of",sr,"ideal(s), where each ideal nor[1][i] consists 3548 // of elements g1..gk of the basering such that gj/gk generate the integral 3549 // closure of the i-th component as (basering/P_i)-module in the quotient 3550 // field of basering/P_i (P_i an associated prime of the input ideal); 3551 // nor[2] shows the delta-invariant of each component and of the input ideal 3552 // (-1 means infinite, and 0 that r/P_i is normal)."; 3575 // To see the result, type 3576 nor; 3577 3578 // * nor[1] is a list of",sr,"ideal(s), where each ideal nor[1][i] consists 3579 // of elements g1..gk of the basering R such that gj/gk generate the integral 3580 // closure of R/P_i (where P_i is a min. associated prime of the input ideal) 3581 // as R-module in the quotient field of R/P_i; 3582 3583 // * nor[2] shows the delta-invariant of each component and of the input ideal 3584 // (-1 means infinite, and 0 that R/P_i is normal)."; 3553 3585 } 3554 3586 } … … 4859 4891 } 4860 4892 4861 // Up to here:procedures for normal4893 // End procedures for normal 4862 4894 /////////////////////////////////////////////////////////////////////////////// 4863 4895 4864 4896 4865 4897 /////////////////////////////////////////////////////////////////////////////// 4866 // From here:procedures for normalC4898 // Begin procedures for normalC 4867 4899 4868 4900 // We first define resp. copy some attributes to be used in proc normal and … … 5095 5127 return(id); 5096 5128 } 5129 /////////////////////////////////////////////////////////////////////////////// 5097 5130 5098 5131 proc normalC(ideal id, list #) 5099 "USAGE: normalC(id [,choose]); id = radical ideal, choose = optional string 5100 which may be a combination of \"equidim\", \"prim\", \"withGens\", 5101 \"isPrim\", \"noFac\".@* 5102 If choose is not given or empty, a default method is choosen@* 5103 If choose = \"prim\" resp. \"equidim\" normalC computes a prime resp. 5104 an equidimensional decomposition and then the normalization of each 5105 component; if choose = \"noFac\" factorization is avoided in the 5106 computation of the minimal associated primes; @* 5107 if choose = \"withGens\" the minimal associated primes P_i of id are 5132 "USAGE: normalC(id [,choose]); id = radical ideal, choose = optional string. 5133 Optional parameters in list choose (can be entered in any order):@* 5134 Decomposition:@* 5135 - \"equidim\" -> computes first an equidimensional decomposition, 5136 and then the normalization of each component (default).@* 5137 - \"prim\" -> computes first the minimal associated primes, and then 5138 the normalization of each prime. @* 5139 - \"noDeco\" -> no preliminary decomposition is done. If the ideal is 5140 not equidimensional radical, output might be wrong.@* 5141 - \"isPrim\" -> assumes that the ideal is prime. If the assumption does 5142 not hold, output might be wrong.@* 5143 - \"noFac\" -> factorization is avoided in the computation of the 5144 minimal associated primes; 5145 Other:@* 5146 - \"withGens\" -> the minimal associated primes P_i of id are 5108 5147 computed and for each P_i, algebra generators of the integral closure 5109 5148 of basering/P_i are computed as elements of its quotient field;@* 5110 \"isPrim\" disables \"equidim\" and \"prim\".@*5149 If choose is not given or empty, the default options are used.@* 5111 5150 ASSUME: The ideal must be radical, for non-radical ideals the output may 5112 be wrong (id=radical(id); makes id radical). However, if choose =5113 \"prim\" the minimal associated primes of idare computed first5151 be wrong (id=radical(id); makes id radical). However, if option 5152 \"prim\" is set the minimal associated primes are computed first 5114 5153 and hence normalC computes the normalization of the radical of id. 5115 5154 \"isPrim\" should only be used if id is known to be irreducible. 5116 RETURN: a list, say nor, of size 2 (resp. 3 if choose=\"withGens\"). 5117 The first list nor[1] consists of r rings, where r is the number 5118 of irreducible components if choose = \"prim\" (resp. >= no of 5119 equidimenensional components if choose = \"equidim\"). 5120 @format 5155 RETURN: a list, say nor, of size 2 (resp. 3 if option \"withGens\" is set).@* 5156 * nor[1] is always a of r rings, where r is the number of associated 5157 primes with option \"prim\" (resp. >= no of equidimenensional 5158 components with option \"equidim\").@* 5121 5159 Each ring Ri=nor[1][i], i=1..r, contains two ideals with given 5122 5160 names @code{norid} and @code{normap} such that @* 5123 5161 - Ri/norid is the normalization of the i-th component, i.e. the 5124 integral closure in its field of fractions (as affine ring); 5162 integral closure in its field of fractions as affine ring, i.e. Ri is 5163 given in the form K[X(1..p),T(1..q)], where K is the ground field; 5164 - normap gives the normalization map from basering/id to 5165 Ri/norid for each i (the j-th element of normap is mapped to the 5166 j-th variable of R).@* 5125 5167 - the direct sum of the rings Ri/norid is the normalization 5126 5168 of basering/id; @* 5127 - @code{normap} gives the normalization map from basering/id to 5128 Ri/norid for each j.@* 5129 5130 If choose=\"withGens\", nor[2] is a list of size r of ideals Ii= 5131 nor[2][i] in the basering, generating the integral closure of 5132 basering/P_i in its quotient field, i=1..r, in two different ways: 5133 - Ii is given by polynomials 5134 g_1,...,g_k,g_k+1 such that the variables T(j) of the ring Ri 5135 satisfy T(1)=g_1/g_k+1,..,T(k)=g_k/g_k+1. Hence the g_j/g_k+1 5136 are algebra generators of the integral closure of basering/P_i 5137 as sub-algebra in the quotient field of basering/P_i. 5138 5139 nor[2] (resp. nor[3] if choose=\"withGens\") is a list of an intvec 5140 of size r, the delta invariants of the r components, and an integer, 5141 the total delta invariant of basering/id (-1 means infinite, and 0 5142 that basering/P_i resp. basering/input is normal). 5143 Return value -2 means that delta resp. delta of one of the components 5144 is not computed (which may happen if \"equidim\" is given) . 5145 @end format 5146 THEORY: The delta invariant of a reduced ring K[x1,...,xn]/id is 5147 dim_K(normalization(K[x1,...,xn]/id) / K[x1,...,xn]/id) 5148 We call this number also the delta invariant of id. 5149 We use the algorithm described in [G.-M. Greuel, G. Pfister: 5150 A SINGULAR Introduction to Commutative Algebra, 2nd Edition. 5169 ** If option \"withGens\" is not set: @* 5170 * nor[2] shows the delta invariants: nor[2] is a list of an intvec of 5171 size r, the delta invariants of the r components, and an integer, the 5172 delta invariant of basering/id. (-1 means infinite, 0 that basering/P_i 5173 resp. basering/input is normal, -2 means that delta resp. delta of one 5174 of the components is not computed (which may happen if \"equidim\" is 5175 given). @* 5176 ** If option \"withGens\" is set: 5177 * nor[2] is a list of ideals Ii=nor[2][i], i=1..r, in the basering, 5178 generating the integral closure of basering/P_i in its quotient field 5179 as K-algebra (K the ground field):@* 5180 If Ii is given by polynomials g_1,...,g_k, then c:=g_k is a non-zero 5181 divisor and the j-th variables of the ring Ri satisfies var(j)=g_j/c, 5182 j=1..k-1, as element in the quotient field of basering/P_i. The 5183 g_j/g_k+1 are K-algebra generators of the integral closure of 5184 basering/P_i.@* 5185 * nor[3] shows the delta invariant as above. 5186 THEORY: We use the Grauert-Remmert-de Jong algorithm [c.f. G.-M. Greuel, 5187 G. Pfister: A SINGULAR Introduction to Commutative Algebra, 2nd Edition. 5151 5188 Springer Verlag (2007)]. 5189 The procedure computes the algebra structure and the delta invariant of 5190 the normalization of R/id:@* 5191 The normalization is an affine algebra over the ground field K 5192 and nor[1] presents it as such: Ri = K[X(1..p),T(1..q)] and Ri/norid 5193 is the integral closure of R/P_i; if option \"withGens\" is set the 5194 X(j) and T(j) are expressed as quotients in the total ring of 5195 fractions. Note that the X(j) and T(j) generate the integral closure 5196 as K-algebra, but not necessarily as R-module (since relations of the 5197 form X(1)=T(1)*T(2) may have been eliminated). Geometrically the 5198 algebra structure is relevant since the variety of the ideal norid in 5199 Ri is the normalization of the variety of the ideal P_i in R.@* 5200 The delta invariant of a reduced ring A is dim_K(normalization(A)/A). 5201 For A=K[x1,...,xn]/id we call this number also the delta invariant of 5202 id. nor[3] returns the delta invariants of the components P_i and of 5203 id. 5152 5204 NOTE: To use the i-th ring type: @code{def R=nor[1][i]; setring R;}. 5153 5205 @* Increasing/decreasing printlevel displays more/less comments 5154 5206 (default: printlevel=0). 5155 @* Not implemented for local or mixed orderings and for quotient rings. 5207 @* Not implemented for local or mixed orderings or quotient rings. 5208 For local or mixed orderings use proc 'normal'. 5156 5209 @* If the input ideal id is weighted homogeneous a weighted ordering may 5157 5210 be used (qhweight(id); computes weights). 5158 5211 KEYWORDS: normalization; integral closure; delta invariant. 5212 SEE ALSO: normal, normalP. 5159 5213 EXAMPLE: example normalC; shows an example 5160 5214 " 5161 5215 { 5162 int i,j, wgens, withEqui, withPrim, isPrim, nfac; 5163 int y = printlevel-voice+2; 5216 int i,j; 5217 int withGens, withEqui, withPrim, isPrim, noFac; 5218 int dbg = printlevel-voice+2; 5164 5219 int nvar = nvars(basering); 5165 5220 int chara = char(basering); 5166 list result,prim,keepresult; 5221 list result, prim, keepresult; 5222 5223 int decomp; // Preliminar decomposition: 5224 // 0 -> no decomposition (id is assumed to be prime) 5225 // 1 -> no decomposition 5226 // (id is assumed to be equidimensional radical) 5227 // 2 -> equidimensional decomposition 5228 // 3 -> minimal associated primes 5229 5230 // Default methods: 5231 noFac = 0; // Use facstd when computing minimal associated primes 5232 decomp = 2; // Equidimensional decomposition for nvar > 2 5233 if (nvar <= 2) 5234 { decomp = 3; } // Compute minimal associated primes if nvar <= 2 5167 5235 5168 5236 if ( ord_test(basering) != 1 ) … … 5170 5238 ""; 5171 5239 "// Not implemented for this ordering,"; 5172 "// please change to global ordering !";5240 "// please change to global ordering or use proc normal"; 5173 5241 return(result); 5174 5242 } … … 5186 5254 5187 5255 //--------------------------- choosen methods ----------------------- 5188 //we have the methods5189 5256 // "withGens": computes algebra generators for each irreducible component 5190 // the general case: either "equidim" or not (then applying minAssGTZ)5257 // ### the extra code for withGens should be incorporated in the general case 5191 5258 5192 5259 if ( find(method,"withgens") or find(method,"withGens")) 5193 5260 { 5194 wgens=1; 5195 } 5261 withGens = 1; 5262 } 5263 5264 // the general case: either equidim or minAssGTZ or no decomposition 5265 5266 if ( find(method,"isprim") or find(method,"isPrim") ) 5267 {decomp = 0; isPrim=1;} 5268 5269 if ( find(method,"nodeco") or find(method,"noDeco") ) 5270 {decomp = 1;} 5271 5196 5272 if ( find(method,"equidim") ) 5197 { 5198 withEqui=1; 5199 } 5273 { decomp = 2; } 5274 5200 5275 if ( find(method,"prim") ) 5201 { 5202 withPrim=1; 5203 } 5204 if ( find(method,"isprim") or find(method,"isPrim") ) 5205 { 5206 isPrim=1; 5207 } 5208 if ( find(method,"noFac") ) 5209 { 5210 nfac=1; 5211 } 5212 5213 //------------------ default method, may be changed -------------------- 5214 //Use a prime decomposition only for small no of variables otherwise equidim 5215 //Compute delta whenever possible. 5216 5217 if ( ((chara==0 || chara>30) && nvar>2 && !withPrim && !isPrim) || 5218 ((chara==0 || chara>30) && size(#) == 0) ) 5219 { 5220 withEqui=1; 5221 } 5276 { decomp = 3; } 5277 5278 if ( find(method,"nofac") or find(method,"noFac") ) 5279 { noFac = 1; } 5280 5222 5281 kill #; 5223 5282 list #; … … 5226 5285 //--------------------- method "withGens" ---------------------------------- 5227 5286 //the integral closure is computed in proc primeClosure. In the general case 5228 //it is computed in normalizationPrimes. The main difference is that 5229 //primeClosure the singular locus is only computed in the first iteration 5230 //that no attributes are used and that the generators are computed.5287 //it is computed in normalizationPrimes. The main difference is that in 5288 //primeClosure the singular locus is only computed in the first iteration, 5289 //that no attributes are used, and that the generators are computed. 5231 5290 //In primeClosure the (algebra) generators for each irreducible component 5232 //are computed in static proc closureGenerators5233 5234 if( w gens )5235 { 5236 if( y>= 1 )5291 //are computed in the static proc closureGenerators 5292 5293 if( withGens ) 5294 { 5295 if( dbg >= 1 ) 5237 5296 { ""; 5238 5297 "// We use method 'withGens'"; 5239 5298 } 5240 if ( isPrim)5299 if ( decomp == 0 or decomp == 1 ) 5241 5300 { 5242 5301 prim[1] = id; 5243 if( y>= 0 )5302 if( dbg >= 0 ) 5244 5303 { 5245 5304 ""; … … 5250 5309 else 5251 5310 { 5252 if( y>=1)5253 { "// compute minimal associated primes"; }5254 5255 if( n fac )5311 if(dbg >= 1) 5312 { "// Computing minimal associated primes..."; } 5313 5314 if( noFac ) 5256 5315 { prim = minAssGTZ(id,1); } 5257 5316 else 5258 5317 { prim = minAssGTZ(id); } 5259 5318 5260 if(y>=1) 5319 if(dbg >= 2) 5320 { prim;""; } 5321 if(dbg >= 1) 5261 5322 { 5262 prim;"";5263 5323 "// number of irreducible components is", size(prim); 5264 5324 } … … 5274 5334 for(i=1; i<=size(prim); i++) 5275 5335 { 5276 if( y>=1)5336 if(dbg>=1) 5277 5337 { 5278 5338 ""; pause(); ""; 5279 "// start computation of component",i;5280 " -------------------------------- ";5339 "// Computing normalization of component",i; 5340 " ---------------------------------------"; 5281 5341 } 5282 5342 … … 5285 5345 export(ker); 5286 5346 l = R; 5287 l = primeClosure(l,1); //here the work is done 5347 l = primeClosure(l,1); //here the work is done 5348 // primeClosure is called with list l consisting of the basering 5288 5349 //### ausprobieren ob primeClosure(l,1) schneller als primeClosure(l) 5289 5350 // 1 bedeutet: krzester nzd 5351 // l[size(l)] is the delta invariant 5290 5352 5291 5353 if ( l[size(l)] >= 0 && del >= 0 ) … … 5344 5406 int sr = size(resu); 5345 5407 5346 if ( y>= 0 )5408 if ( dbg >= 0 ) 5347 5409 {""; 5348 5410 "// 'normalC' created a list, say nor, of three lists: 5349 // nor[1] resp. nor[2] are lists of",sr,"ring(s) resp. ideal(s)5350 // and nor[3] is a list of an intvec and an integer. 5351 // To see the result, type 5352 nor; 5411 // To see the list type 5412 nor; 5413 5414 // * nor[1] is a list of",sr,"ring(s) 5353 5415 // To access the i-th ring nor[1][i] give it a name, say Ri, and type e.g. 5354 5416 def R1 = nor[1][1]; setring R1; norid; normap; 5355 // for the other rings type first setring r; (if r is the name of your 5356 // original basering) and then continue as for the first ring; 5417 // For the other rings type first (if R is the name of your original basering) 5418 setring R; 5419 // and then continue as for R1. 5357 5420 // Ri/norid is the affine algebra of the normalization of the i-th 5358 // component r/P_i (where P_i is an associated prime of the input ideal) 5359 // and normap the normalization map from r to Ri/norid; 5360 // nor[2] is a list of",sr,"ideal(s), each ideal nor[2][i] consists of 5361 // elements g1..gk of r such that the gj/gk generate the integral 5362 // closure of r/P_i as sub-algebra in the quotient field of r/P_i, with 5421 // component R/P_i (where P_i is an associated prime of the input ideal id) 5422 // and normap the normalization map from R to Ri/norid. 5423 5424 // * nor[2] is a list of",sr,"ideal(s), each ideal nor[2][i] consists of 5425 // elements g1..gk of R such that the gj/gk generate the integral 5426 // closure of R/P_i as sub-algebra in the quotient field of R/P_i, with 5363 5427 // gj/gk being mapped by normap to the j-th variable of Ri; 5364 // nor[3] shows the delta-invariant of each component and of the input 5365 // ideal (-1 means infinite, and 0 that r/P_i resp. r/input is normal)."; 5428 5429 // * nor[3] shows the delta-invariant of each component and of id 5430 // (-1 means infinite, and 0 that R/P_i resp. R/id is normal)."; 5366 5431 } 5367 5432 return(Resu); 5368 5433 } 5434 //----------------- end method "withGens" -------------------------------- 5369 5435 5370 5436 //-------- The general case without computation of the generators ----------- … … 5465 5531 //Komponenten als niederdim Komponenten, waehrend diese bei primdecGTZ 5466 5532 //nicht auftauchen: ideal(x,y)*xy 5467 //this is default for nvars > 2 and char = 0 or car > 305468 5469 if( withEqui)5533 //this is default for nvars > 2 5534 5535 if( decomp == 2 ) 5470 5536 { 5471 5537 withPrim = 0; //this is used to check later that prim 5472 5538 //contains equidim but not prime components 5473 if( y>= 1 )5539 if( dbg >= 1 ) 5474 5540 { 5475 5541 "// We use method 'equidim'"; … … 5490 5556 prim = equidim(id); 5491 5557 } 5492 if( y>=1)5558 if(dbg>=1) 5493 5559 { ""; 5494 5560 "// number of equidimensional components:", size(prim); 5495 5561 } 5496 if ( !n fac )5562 if ( !noFac ) 5497 5563 { 5498 5564 intvec opt = option(get); … … 5508 5574 } 5509 5575 5510 if( y>=1)5576 if(dbg>=1) 5511 5577 { ""; 5512 5578 "// number of components after application of facstd:", size(prim); … … 5524 5590 if( isPrim ) 5525 5591 { 5526 if( y>= 0 )5592 if( dbg >= 0 ) 5527 5593 { 5528 5594 "// ** WARNING: result is correct if ideal is prime"; … … 5531 5597 "// or equidimensional components";""; 5532 5598 } 5533 if( y>= 1 )5599 if( dbg >= 1 ) 5534 5600 { 5535 5601 "// We use method 'isPrim'";""; … … 5541 5607 withPrim = 1; //this is used to check later that prim 5542 5608 //contains prime but not equidim components 5543 if( y>= 1 )5609 if( dbg >= 1 ) 5544 5610 { 5545 5611 "// We use method 'prim'"; … … 5554 5620 else 5555 5621 { 5556 if( n fac )5622 if( noFac ) 5557 5623 { prim=minAssGTZ(id,1); } //does not use factorizing groebner 5558 5624 else … … 5562 5628 else 5563 5629 { 5564 if( n fac )5630 if( noFac ) 5565 5631 { prim=minAssGTZ(id,1); } 5566 5632 else 5567 5633 { prim=minAssGTZ(id); } 5568 5634 } 5569 if( y>=1)5635 if(dbg>=1) 5570 5636 { ""; 5571 5637 "// number of irreducible components:", size(prim); … … 5581 5647 for(i=1; i<=sp; i++) 5582 5648 { 5583 if( y>=1)5649 if(dbg>=1) 5584 5650 { ""; 5585 5651 "// computing the normalization of component",i; … … 5666 5732 deli = keepresult[skr][2],deli; 5667 5733 5668 if ( y>=1 )5734 if ( dbg>=1 ) 5669 5735 { 5670 5736 "// delta of component",i; keepresult[skr][1]; … … 5675 5741 // -------------- Now compute intersection multiplicities ------------- 5676 5742 //intersection multiplicities of list prim, sp=size(prim). 5677 if ( y>=1 )5743 if ( dbg>=1 ) 5678 5744 { 5679 5745 "// Sum of delta for all components"; del; … … 5700 5766 5701 5767 //--------------- Finally print comments and return ------------------ 5702 if ( y>= 0)5768 if ( dbg >= 0) 5703 5769 {""; 5704 5770 "// 'normalC' created a list, say nor, of two lists: 5705 // nor[1] is a list of",sr,"ring(s), nor[2] a list of an intvec and an int.5706 5771 // To see the result, type 5707 5772 nor; 5773 5774 // * nor[1] is a list of",sr,"ring(s). 5708 5775 // To access the i-th ring nor[1][i] give it a name, say Ri, and type e.g. 5709 5776 def R1 = nor[1][1]; setring R1; norid; normap; 5710 5777 // and similair for the other rings nor[1][i]; 5711 // Ri/norid is the affine algebra of the normalization of the i-th component5712 // r/P_i (where P_i is a prime or an equidimensional ideal of the input ideal)5778 // Ri/norid is the affine algebra of the normalization of r/P_i (where P_i 5779 // is an associated prime or an equidimensional part of the input ideal id) 5713 5780 // and normap the normalization map from the basering to Ri/norid; 5714 // nor[2] shows the delta-invariant of each component and of the input 5715 // ideal (-1 means infinite, -2 that delta of a component was not computed)."; 5781 5782 // * nor[2] shows the delta-invariant of each component and of id 5783 // (-1 means infinite, 0 that r/P_i resp. r/id is normal, and -2 that delta 5784 // of a component was not computed)."; 5716 5785 } 5717 5786 return(result); … … 6263 6332 // char 13 : normal = 1 sec (7 steps) - normalP doesn't finish - normalC = 13 secs 6264 6333 // char 32003 : normal = 1 secs (7 steps) - normalP doesn't finish - normalC = 10 sec 6334 //Example is reducible in char 5 and 7 6265 6335 LIB"normal.lib"; 6266 ring r = 13, (x, y), dp;6336 ring r = 3, (x, y), dp; 6267 6337 ideal i = 55*x^8+66*y^2*x^9+837*x^2*y^6-75*y^4*x^2-70*y^6-97*y^7*x^2; 6268 6338 timeNormal(i, "normal", "normalC", "normalP", "p", "isPrim"); … … 6283 6353 // char 32003 : normal = 0 secs (1 step) - normalP doesn't finish - normalC = 0 secs 6284 6354 LIB"normal.lib"; 6285 ring r= 11,(x,y),dp; // genus 0 4 nodes and 6 cusps im P26355 ring r=5,(x,y),dp; // genus 0 4 nodes and 6 cusps im P2 6286 6356 ideal i=(x2+y^2-1)^3 +27x2y2; 6287 6357 timeNormal(i, "normal", "normalC", "normalP", "isPrim"); … … 6379 6449 //icFracP 0.06 0.07 0.09 0.27 1.81 4.89 26 56 225 6380 6450 //normalP 0 0 0 0 1 2 6 10 27 6381 //icFractions 0.16 1.49 75.00 4009 * * * * * 6382 //normal 0 0 2 836 6451 //icFractions 0.16 1.49 75.00 4009 * * * * * 6452 //normal 0 0 2 836 6453 //normal(neu) 0 0 1 2 10 155 6383 6454 //### p=7 normal braucht 807 sec in: 6384 6455 // ideal endid = phi1(endid); //### bottelneck' … … 6389 6460 int p = 7; ring r=p,(u,v,w,x,y,z),dp; ideal i=u2x4+uvy4+v2z4; 6390 6461 //3. 6391 int p= 23; ring r=p,(u,v,w,x,y,z),dp; ideal i=u2*x^p+uv*y^p+v2*z^p;6462 int p=11; ring r=p,(u,v,w,x,y,z),dp; ideal i=u2*x^p+uv*y^p+v2*z^p; 6392 6463 6393 6464 //IRREDUCIBLE EXAMPLES: … … 6493 6564 //ideal in der Mitte zu gross 6494 6565 //i = Ideal (size 118, 13 var) fuer die neue Normalisierung 6566 //normal(neu) haengt bei return(std(i)) (offensichtlich in eineranderen lib) 6495 6567 6496 6568 REDUCIBLE EXAMPLES:
Note: See TracChangeset
for help on using the changeset viewer.