Changeset a6d6356 in git
- Timestamp:
- Jan 21, 2015, 6:25:42 PM (9 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 584649e7d56725619ab0a2ed50ec5fd4f180e711
- Parents:
- 0cf4e11fc56e44e8ce67684afe4a45479455ea583176e6e1402d3ad808ee0b00f1589716317afe8f
- Files:
-
- 8 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gradedModules.lib
r3176e6 ra6d6356 5 5 LIBRARY: gradedModules.lib Operations with graded modules/matrices/resolutions 6 6 AUTHOR: Oleksandr Motsak <U@D>, where U={motsak}, D={mathematik.uni-kl.de} 7 Hanieh Keneshlou <hkeneshlou@yahoo.com> 7 8 KEYWORDS: graded modules, graded homomorphisms, syzygies 8 9 OVERVIEW: 9 10 @* The library contains several procedures for operations with graded modules/matrices/resolutions 10 11 @* TODO! 11 12 NOTE: 12 @* try @code{example TestGRRes; } from examples13 @* try @code{example TestGRRes; example grsum; } from examples 13 14 PROCEDURES: 14 15 16 grzero() presentation of basering(0)^1 17 grobj(M,w) construct a graded module object 18 grshift(M,d) shift graded module M by d 19 grtwist(r,d) presentation of basering(d)^r 20 grsum(M,N) direct sum of two graded modules M \oplus N 21 grpower(M,p) direct p-th power of graded module M 15 22 grview(M) view the graded structure of M 16 23 grdeg(M) compute graded degrees of M … … 22 29 @* 23 30 [MO] Motsak, O.: Non-commutative Computer Algebra with applications: Graded commutative algebra and related 24 structures in Singular with applications, Ph.D. thesis, TU Kaiserslautern, 2010 ?31 structures in Singular with applications, Ph.D. thesis, TU Kaiserslautern, 2010 TODO!? 25 32 "; 26 27 33 28 34 ////////////////////////////////////////////////////////////////////////////////////////////////////////// … … 35 41 static proc pad(int m, string s, string c){ string r = s; while( size(r) < m ){ r = c + r; } return(r); } 36 42 static proc mstring( int m, string c){ if( m < 0 ) { return (c); }; return (string(m)); } 43 static proc zstring( int m, int b, string c){ if(b) { return (c); }; return (string(m)); } 37 44 // view helper 38 static proc draw ( intmat D, int d )45 static proc draw ( intmat D, intvec zc, int d ) 39 46 { 40 47 // print(D); return (); … … 48 55 { 49 56 head = head + pad(max, string(D[1 , c]), " ") + " "; 50 foot = foot + pad(max, string(D[nr, c]), " ") + " ";57 foot = foot + pad(max, zstring(D[nr, c], zc[c - d], "?"), " ") + " "; 51 58 } 52 59 // last head/foot enties: 53 head = head + pad(max, string(D[1 , nc-d]), " ");54 foot = foot + pad(max, string(D[nr, nc-d]), " ");60 head = head + pad(max, string(D[1 , c]), " "); 61 foot = foot + pad(max, zstring(D[nr, c], zc[c-d], "?"), " "); 55 62 // head/foot dash lines: 56 63 string dash = repeat( (max + 1) * (nc - 2*d) , "-"); … … 77 84 " 78 85 { 79 if( size(N) == 0 ) { return (); }86 // if( size(N) == 0 ) { return (); } 80 87 81 88 if( typeof( N ) == "list" ) … … 102 109 103 110 module L = module(N); L = lead(L); vector v; 104 int m = 1 + nvars(basering); 111 int m = 1 + nvars(basering); 112 intvec zc = 0:nc; 105 113 for( c = nc; c > 0; c-- ) 106 114 { 107 115 D[1, c+d] = c; // top row indeces 108 116 v = L[c]; 109 D[nr+2*d, c+d] = deg(v) + gr[ leadexp(v)[m] ]; // bottom row with computed column induced degrees 117 if( v != 0 ) 118 { 119 D[nr+2*d, c+d] = deg(v) + gr[ leadexp(v)[m] ]; // bottom row with computed column induced degrees 120 } else 121 { 122 // D[nr+2*d, c+d] = 0; // TODO: 0/-1 is valid :( 123 zc[c] = 1; 124 } 110 125 } 111 126 … … 115 130 for( c = nc; c > 0; c-- ) 116 131 { 117 D[r+d, c+d] = deg(M[r, c]); // central block with degrees 118 // if( D[r+d, c+d] < 0 ) { D[r+d, c+d] = 0; } 132 D[r+d, c+d] = deg(M[r, c]); // central block with degrees (-1 means zero entry) 119 133 } 120 134 D[r+d, nc+2*d] = r; // right-most block with indeces 121 135 } 122 draw(D, d); // print it nicely!136 draw(D, zc, d); // print it nicely! 123 137 } 124 138 … … 126 140 static proc issorted( intvec g, int s ) 127 141 { 142 g = s * g; // "g: ", g; 128 143 int i = size(g); 129 144 130 145 for(; i > 1; i--) 131 146 { 132 if( s*(g[i] - g[i-1]) < 0 )147 if( (g[i] - g[i-1]) < 0 ) 133 148 { 134 149 return (0); … … 144 159 " 145 160 { 161 gr = s * gr; 146 162 int m = size(gr); 147 148 163 intvec pivot; 149 164 … … 162 177 for(Bn=1; Bn <= (m-Bi); Bn++) 163 178 { 164 D = s*(gr[pivot[Bn]] - gr[pivot[Bn+1]]); // sort gr179 D = (gr[pivot[Bn]] - gr[pivot[Bn+1]]); // sort gr 165 180 P = (D > 0) or ( (D == 0) && ((pivot[Bn]-pivot[Bn+1]) > 0) ); // stability!? 166 181 if(P) … … 175 190 } 176 191 177 ASSUME(1, issorted(gr, s));178 192 179 193 if( flag && 0 ) // output details in case of non-identical permutation? 180 194 { 181 195 // grades & ordering permutation : gr[pivot] should be sorted: 182 ""; 196 "s: ", s; 197 "gr: ", gr; 183 198 "pivot: ", pivot; 184 ""; 185 } 199 } 200 201 ASSUME(1, issorted(intvec(gr[pivot]), 1)); 186 202 187 203 return (pivot); … … 217 233 def w = attrib(M, "isHomog"); // grading weights? 218 234 ASSUME(0, /* input must be correctly graded! */ nrows(M) == size(w) ); 219 235 236 if( size(M) == 0 ) { return (w); } // TODO??? 237 220 238 int m = ncols(M); // m > 0 in Singular! 221 int n = nvars(basering) + 1; // index of mod. column in the leadexp 239 int n = nvars(basering) + 1; // index of mod. column in the leadexp 222 240 223 241 module L = lead(M[1..m]); // leading module-terms for input column vectors 224 intvec d = deg(L[1..m]); // their degrees 242 intvec d = deg(L[1..m]); // their degrees 225 243 intvec c = leadexp(L[1..m])[n]; // their module-components 226 intvec gr = w[c]; // weights 244 245 w = intvec(-6665, w); // 0????? 246 intvec gr = w[1+c]; // weights 227 247 228 248 gr = gr + d; // finally we compute their graded degrees … … 286 306 287 307 // grades & ordering permutation for N. d[p] should be sorted! 288 289 def N = module(M[p]); // reorder the starting ideal/module 290 291 attrib( N, "isHomog", w ); // set the grading 308 309 def N = grobj(module(M[p]), w); // reorder the starting ideal/module 292 310 293 311 d = d[p]; … … 401 419 // grview(M[i]); 402 420 L[j] = grtranspose(M[i]); 403 if( i > 1 ) 421 // grview(L[j]); 422 423 if( (i > 1) && (j > 0) ) 404 424 { 405 ASSUME(2, size( module( matrix(L[j+1])*matrix(L[j]) ) ) == 0 ); 425 // grview(L[j+1]); 426 ASSUME(2, size( module( matrix(L[j])*matrix(L[j+1]) ) ) == 0 ); 406 427 }; 407 428 // grview(L[j]); … … 421 442 else { (N,d) = reorder(M, -1); } 422 443 423 kill M; module M = transpose(N); 424 attrib( M, "isHomog", -d ); // set the grading 444 kill M; module M = grobj(transpose(N), -d); 425 445 426 446 // "b"; grview(M); … … 429 449 // reverse order: 430 450 (N,d) = reorder(M, 1); kill M; 431 432 /*433 module M = transpose(N);434 attrib( M, "isHomog", -d ); // set the grading435 436 // "c"; grview(M);437 438 kill N,d; module N; intvec d;439 // reverse order:440 (N,d) = reorder(M, -1); kill M;441 module M = transpose(N);442 attrib( M, "isHomog", -d ); // set the grading443 444 // "d"; grview(M);445 446 kill N,d; module N; intvec d;447 // reverse order:448 (N,d) = reorder(M, 1);449 450 kill M;451 */452 451 453 452 // "e"; grview( N ); … … 506 505 if( size(#) > 0 ) { (N,d) = reorder(M, 1, #[1]); } 507 506 else { (N,d) = reorder(M, 1); } 508 kill M; module M = transpose(N); 509 attrib( M, "isHomog", -d ); // set the grading 507 kill M; module M = grobj(transpose(N), -d); 510 508 511 509 // "b"; grview(M); … … 515 513 (N,d) = reorder(M, -1); kill M; 516 514 517 module M = transpose(N); 518 attrib( M, "isHomog", -d ); // set the grading 515 module M = grobj(transpose(N), -d); 519 516 520 517 // "c"; grview(M); … … 561 558 } 562 559 example 563 { "EXAMPLE:"; echo = 2; int assumeLevel = 5; 560 { "EXAMPLE:"; echo = 2; 561 if( defined(assumeLevel) ){ int assumeLevel0 = assumeLevel; } else { int assumeLevel; export(assumeLevel); } // store the state of aL 562 assumeLevel = 5; 564 563 565 564 string Name = "castelnuovo"; int @p=31991; ring R = (@p),(x,y,z,u,v), dp;ideal I = 5153xy2-98/23y3-101/51xyz+33/41y2z+99/79xz2+7136yz2-106/111z3+119/53xyu+34/57y2u-77/92xzu+84/73yzu-109/78z2u-27/56xu2+10023yu2+82/103zu2-34/25u3+3/2xyv-68/25y2v+12721xzv+4/63yzv-73/21z2v-7291xuv-91/53yuv-4/79zuv-34/91u2v-122/53xv2+123/70yv2-64/73zv2+44/65uv2+14/31v3,xy2-15202y3+10613xyz+13640y2z-107/103xz2+5292yz2+19/119z3-10042xyu+2770y2u+7957xzu+14008yzu+92/121z2u-92/51xu2+1178yu2+1/117zu2-12726u3+82/101xyv-92/17y2v-107/56xzv+14233yzv+79/28z2v+51/50xuv-31/5yuv+95/91zuv+19/108u2v+12151xv2-69/110yv2+37/89zv2-63/116uv2-88/23v3,-5153x2+37/23xy+8706y2-13160xz+68/115yz+5548z2-22/61xu-113/98yu+11818zu+2114u2-101/97xv+89/22yv-3355zv-113/5uv-5521v2;TestGRRes(Name, 2, I); kill R, Name, @p; ""; … … 582 581 583 582 string Name = "rat.d10.g9.quart2"; int @p=31991; ring R = (@p),(x,y,z,u,v), dp;ideal I = x3yu2-48/11x2y2u2-8356xy3u2+35/121y4u2+31/66x3zu2-54/83x2yzu2-61/18xy2zu2+11526y3zu2+7372x2z2u2-91/60xyz2u2-95/97y2z2u2-45/71xz3u2+71/115yz3u2+25/54z4u2-61/102x3u3-12668x2yu3+6653xy2u3+41/54y3u3+87/50x2zu3-5004xyzu3+13924y2zu3+2310xz2u3-93/14yz2u3-2/93z3u3-97/125x2u4-58/11xyu4+46/73y2u4-4417xzu4+60/101yzu4+56/75z2u4-113/118xu5+115/4yu5-40zu5-8554u6-54/83x3yuv-9770x2y2uv-590xy3uv+15/49y4uv+94/69x3zuv+121/105x2yzuv+95/88xy2zuv+3186y3zuv+11/6x2z2uv-44/81xyz2uv+637y2z2uv+109/121xz3uv-33yz3uv-94/115z4uv-49/95x3u2v-11/109x2yu2v+45/113xy2u2v+97/84y3u2v+5257x2zu2v+99/49xyzu2v+12584y2zu2v-4294xz2u2v+1137yz2u2v-58/69z3u2v-4749x2u3v+120/97xyu3v-31/103y2u3v+62/97xzu3v-107/74yzu3v+53/59z2u3v+91/33xu4v+1291yu4v+23/34zu4v+58/77u5v+16/17x3yv2-750x2y2v2+86/89xy3v2+123/46y4v2+53/123x3zv2-61/99x2yzv2+12389xy2zv2+10419y3zv2+43/11x2z2v2-146xyz2v2-116/51y2z2v2+13/62xz3v2-5524yz3v2-111/118z4v2-56/55x3uv2-3038x2yuv2+14/27xy2uv2-43/64y3uv2+3385x2zuv2+25/11xyzuv2+92/41y2zuv2+28/113xz2uv2-2049yz2uv2+89/37z3uv2-13094x2u2v2-2774xyu2v2+15474y2u2v2-15791xzu2v2-71/116yzu2v2+77/41z2u2v2-83/68xu3v2-33/106yu3v2+71/37zu3v2-41/17u4v2+12052x3v3+1906x2yv3+13825xy2v3+80/7y3v3-125/96x2zv3-9661xyzv3+85/116y2zv3-72/91xz2v3+13/112yz2v3-126/97z3v3-1637x2uv3+34/103xyuv3+3844y2uv3+77/10xzuv3+6359yzuv3-11185z2uv3-124/121xu2v3+66/91yu2v3-14636zu2v3-1051u3v3+9/64x2v4-12924xyv4-119/41y2v4+74/23xzv4+1622yzv4+73/37z2v4-60/101xuv4+111/22yuv4-45/124zuv4+59/37u2v4-66/37xv5-71/99yv5+12409zv5-113/64uv5-5267v6,-x4y-22/79x3y2-125/42x2y3-116/7xy4+98/111y5-31/66x4z-118/75x3yz+110/93x2y2z-43/92xy3z-788y4z-7372x3z2-2701x2yz2-67/124xy2z2-117/62y3z2+45/71x2z3-8396xyz3-10343y2z3-25/54xz4+30/59yz4+61/102x4u+11736x3yu+12726x2y2u+41/118xy3u-15832y4u-87/50x3zu-130x2yzu+41/8xy2zu-10300y3zu-2310x2z2u-101/5xyz2u+6205y2z2u+2/93xz3u+8679yz3u+97/125x3u2-43/37x2yu2-39/80xy2u2+12139y3u2+4417x2zu2+4294xyzu2+11/58y2zu2-56/75xz2u2+8338yz2u2+113/118x2u3-10190xyu3-37/16y2u3+40xzu3+74/23yzu3+8554xu4+115/22yu4-39/79x4v+61/72x3yv+8048x2y2v-9201xy3v+16/121y4v+113/93x3zv+109/75x2yzv+12700xy2zv-10607y3zv+50/11x2z2v+1223xyz2v-103/79y2z2v-123/58xz3v+31/26yz3v-15/122z4v+122/25x3uv-99/17x2yuv+1723xy2uv-38/121y3uv+11016x2zuv-25/102xyzuv-14970y2zuv-61/6xz2uv-14981yz2uv+15900z3uv+3268x2u2v-75/19xyu2v-1436y2u2v-1764xzu2v-57/41yzu2v+12741z2u2v-14615xu3v+119/61yu3v-115/119zu3v+10501u4v-8502x3v2-51/76x2yv2-6281xy2v2+17/49y3v2-106/7x2zv2+63/101xyzv2-27/95y2zv2-1606xz2v2+9245yz2v2+1912z3v2+11155x2uv2+223xyuv2-13/18y2uv2+110/43xzuv2+76/81yzuv2-6291z2uv2+1400xu2v2-95/23yu2v2-9701zu2v2+106/105u3v2+72/47x2v3-13118xyv3+14409y2v3+37/86xzv3+44/69yzv3-325z2v3+113/71xuv3+16/81yuv3+6/19zuv3-119/39u2v3-89/9xv4+72/53yv4+112/55zv4-8587uv4-6604v5,-x3y2+48/11x2y3+8356xy4-35/121y5-12750x3yz+100/111x2y2z+45/74xy3z+99/74y4z-6/7x3z2-47/67x2yz2+11465xy2z2-11865y3z2+7776x2z3+124/45xyz3-98/115y2z3+117/85xz4-59/120yz4-8748z5+61/102x3yu+12668x2y2u-6653xy3u-41/54y4u+13408x3zu-2185x2yzu-1240xy2zu+1161y3zu+44/27x2z2u-11164xyz2u-13388y2z2u-107/13xz3u+90/71yz3u+4204z4u+97/125x2yu2+58/11xy2u2-46/73y3u2+55/48x2zu2+121/31xyzu2+126/61y2zu2-55/69xz2u2+5988yz2u2+3755z3u2+113/118xyu3-115/4y2u3+3390xzu3-5762yzu3+30/61z2u3+8554yu4-14317zu4+99/116x3yv-113/119x2y2v+50/23xy3v-37/79y4v-8668x3zv+14049x2yzv+111/35xy2zv+61/28y3zv-10171x2z2v+68/21xyz2v+2023y2z2v-9/109xz3v+8520yz3v-2683z4v-13547x3uv+28/65x2yuv-5988xy2uv+61/111y3uv+12314x2zuv+29/44xyzuv+6141y2zuv+11280xz2uv+79/22yz2uv-38/111z3uv+19/51x2u2v+5093xyu2v-10291y2u2v-5009xzu2v-111/49yzu2v+3813z2u2v-61/37xu3v+15914yu3v-3218zu3v-12915u4v-118/101x3v2-7/57x2yv2+13128xy2v2+11606y3v2+42/101x2zv2-54/17xyzv2-43/49y2zv2-119/110xz2v2+9742yz2v2-43/4z3v2-55/8x2uv2-29/88xyuv2+12042y2uv2+101/37xzuv2-57/62yzuv2+106/97z2uv2+38/83xu2v2+8152yu2v2-5492zu2v2-47/79u3v2+15112x2v3+69/44xyv3-6/71y2v3+113/54xzv3-13210yzv3-707z2v3-119/8xuv3+3845yuv3-19/20zuv3+4852u2v3+15761xv4-12372yv4+74/69zv4-2100uv4-12833v5,-x3yz+48/11x2y2z+8356xy3z-35/121y4z-31/66x3z2+54/83x2yz2+61/18xy2z2-11526y3z2-7372x2z3+91/60xyz3+95/97y2z3+45/71xz4-71/115yz4-25/54z5+15/52x3yu+6039x2y2u+74/99xy3u-17/40y4u+29/50x3zu-7775x2yzu+6368xy2zu+14170y3zu+52/41x2z2u+7003xyz2u-5787y2z2u-101/37xz3u-23/28yz3u-20/63z4u+41/77x3u2+8650x2yu2-15922xy2u2-16/83y3u2+7278x2zu2+31/30xyzu2-2/107y2zu2+35/122xz2u2+85/58yz2u2-757z3u2+2/101x2u3+86/17xyu3+95/59y2u3+123/22xzu3-6869yzu3-9311z2u3-105/97xu4+5699yu4+15925zu4+13528u5-154x3yv+4187x2y2v+56/107xy3v-15932y4v-5137x3zv-37/56x2yzv+9401xy2zv+92/123y3zv-79/97x2z2v+9201xyz2v+19/53y2z2v+107/20xz3v+17/77yz3v-15306z4v+3215x3uv-79/117x2yuv-9/76xy2uv-6352y3uv+93/13x2zuv-65/89xyzuv-115/4y2zuv-34/57xz2uv+39/107yz2uv+31/9z3uv+107/48x2u2v+2632xyu2v+29/96y2u2v-125/89xzu2v+29/113yzu2v+3940z2u2v-116/111xu3v+6145yu3v-105/62zu3v+101/17u4v-9281x3v2-49/107x2yv2-12154xy2v2+4/19y3v2-114/71x2zv2-15/118xyzv2+4372y2zv2+45/121xz2v2+46/111yz2v2+6614z3v2+17x2uv2+10806xyuv2-10617y2uv2-25/111xzuv2-116/27yzuv2-7/58z2uv2-686xu2v2+3/13yu2v2-17/49zu2v2-40/107u3v2+47/90x2v3-83/43xyv3-6326y2v3+49/64xzv3+113/76yzv3-122/73z2v3+10232xuv3-116/109yuv3-1990zuv3+70/51u2v3-118/19xv4-27/55yv4+21/19zv4-23/57uv4-11721v5,-3399x4y+1849x3y2-3/29x2y3+28/87xy4+10/29y5-9788x4z-49/73x3yz+13829x2y2z+118/73xy3z+13129y4z-618x3z2+92/13x2yz2+101/117xy2z2-162y3z2+24/5x2z3-29/74xyz3+2687y2z3-74/39xz4+2/57yz4+68/73x4u-13787x3yu-11659x2y2u+14729xy3u+92/53y4u+15/71x3zu-62/15x2yzu+21/85xy2zu+4938y3zu-120/37x2z2u-77/102xyz2u-4785y2z2u-83/70xz3u-12128yz3u-13592z4u-123/20x3u2+2607x2yu2+40/19xy2u2+6361y3u2-3091x2zu2+89/113xyzu2+149y2zu2-2890xz2u2-8374yz2u2+11886z3u2-49/43x2u3-9854xyu3-6943y2u3+10743xzu3-122/45yzu3-13902z2u3-103/19xu4-48/59yu4+27/86zu4+46/35u5-117/17x4v-15/7x3yv+8409x2y2v-83/28xy3v+86/35y4v+37/45x3zv+4/3x2yzv+35/38xy2zv+4015y3zv-49/111x2z2v-1260xyz2v-25/33y2z2v+116/19xz3v+93/8yz3v+5755z4v-25/89x3uv-11669x2yuv-64/107xy2uv+2993y3uv+7767x2zuv-17/95xyzuv-103/80y2zuv-14576xz2uv+80/47yz2uv+25/107z3uv+103/2x2u2v+125/117xyu2v-2/89y2u2v-5298xzu2v-50/27yzu2v-71/53z2u2v+2652xu3v+15761yu3v+2124zu3v+11/82u4v+100/63x3v2+4180x2yv2+11/39xy2v2-1221y3v2+108/125x2zv2+97/126xyzv2-7698y2zv2+13984xz2v2+1342yz2v2-84/121z3v2-26/73x2uv2-14/15xyuv2-22/37y2uv2-71/82xzuv2+12430yzuv2+103/52z2uv2-13095xu2v2+10114yu2v2-8/73zu2v2-33/97u3v2+83/105x2v3+22/45xyv3-7961y2v3-9654xzv3-54/55yzv3-3/71z2v3-10148xuv3-117/98yuv3+101/102zuv3-606u2v3+97/43xv4-68/21yv4+63/16zv4+42/17uv4+5834v5,-3399x3y2-32/113x2y3+14/99xy4+15001y5-121/115x3yz+4604x2y2z+7/2xy3z+9532y4z-3267x3z2+97/118x2yz2-14238xy2z2-80/21y3z2-12332x2z3-19/69xyz3+116/15y2z3-103/32xz4+15340yz4+10509z5+112/109x3yu-97x2y2u-40/11xy3u+90/29y4u-95/106x3zu-114/67x2yzu+113/48xy2zu+12080y3zu-44x2z2u+18/17xyz2u-4814y2z2u-103/100xz3u-96/61yz3u-205z4u-87/82x3u2-97/108x2yu2+3230xy2u2+104/83y3u2+41/86x2zu2+116/49xyzu2-59/110y2zu2+14/59xz2u2-6962yz2u2-2185z3u2+59/91x2u3+2497xyu3+3/37y2u3-13010xzu3+6/83yzu3-11448z2u3+13/72xu4-69/62yu4-2869zu4+23/73u5-20/43x3yv+5074x2y2v+28/125xy3v-2706y4v+13010x3zv-17/109x2yzv+21/4xy2zv+59/93y3zv-2406x2z2v+117/11xyz2v-14978y2z2v+70/89xz3v-33/7yz3v-13676z4v-13690x3uv+9825x2yuv-117/107xy2uv+12760y3uv-93/98x2zuv-113/64xyzuv+113/103y2zuv-9748xz2uv+11016yz2uv-10729z3uv+90/13x2u2v-13/47xyu2v-11/39y2u2v+20/69xzu2v+5531yzu2v+125/49z2u2v-11025xu3v-9621yu3v+113/109zu3v+4710u4v-107/7x3v2+110/119x2yv2-10025xy2v2-6644y3v2-5041x2zv2+5/96xyzv2+11472y2zv2-5128xz2v2+2927yz2v2+121/18z3v2-125/89x2uv2+12936xyuv2-71/47y2uv2+34/47xzuv2-75/103yzuv2-2654z2uv2-2350xu2v2-7707yu2v2+47/72zu2v2-952u3v2-21/67x2v3+58/37xyv3-8757y2v3+3615xzv3+44/123yzv3-13027z2v3-9/10xuv3+75/43yuv3+115/18zuv3+8071u2v3-26/3xv4-67/65yv4+14186zv4-41/122uv4+33/28v5,-3399x3yz-32/113x2y2z+14/99xy3z+15001y4z-9788x3z2+37/96x2yz2+7743xy2z2+31/55y3z2-618x2z3-8171xyz3+82/109y2z3+24/5xz4+88/85yz4-74/39z5-13165x3yu+3407x2y2u-12509xy3u-23/45y4u-11774x3zu-10/67x2yzu+69/79xy2zu-10/123y3zu-7636x2z2u+83/32xyz2u+51/112y2z2u+19/8xz3u+9309yz3u-44/49z4u+4089x3u2-374x2yu2-919xy2u2+98/107y3u2+2776x2zu2+85/26xyzu2+31/13y2zu2-103/82xz2u2+35/76yz2u2+59/45z3u2+2950x2u3+27/44xyu3+88/71y2u3+7/114xzu3-72/77yzu3+12917z2u3-34/67xu4-85/82yu4-55/84zu4+4690u5+11/42x3yv-19/125x2y2v-8288xy3v+9199y4v-12929x3zv+13357x2yzv-4903xy2zv-584y3zv-10/33x2z2v+59/113xyz2v+103/92y2z2v+101/69xz3v+8708yz3v-8/7z4v+13560x3uv-43/49x2yuv-121/98xy2uv+75/79y3uv-39x2zuv-88/69xyzuv-89/78y2zuv+110/67xz2uv+61/4yz2uv-98/45z3uv+82/7x2u2v-85/41xyu2v+6548y2u2v+9367xzu2v-59/81yzu2v-14408z2u2v+2363xu3v-80/11yu3v-50/17zu3v-14799u4v-53/21x3v2+9437x2yv2-117/80xy2v2+81/85y3v2-8/45x2zv2-6428xyzv2+15126y2zv2+68/89xz2v2+7/122yz2v2+9639z3v2+113/4x2uv2-8678xyuv2-104/45y2uv2-79/90xzuv2+39/101yzuv2-7234z2uv2-28/43xu2v2+1251yu2v2-97/56zu2v2+17/41u3v2+107/24x2v3+2747xyv3+9933y2v3-4199xzv3+53/83yzv3+6364z2v3-5456xuv3+618yuv3-123/55zuv3+2375u2v3+63/76xv4-115/106yv4-8811zv4-31/75uv4+10/109v5,13/89x4y+77/31x3y2+36/83x2y3-11411xy4+6936y5-12223x4z+7400x3yz+33/118x2y2z-12146xy3z+108/79y4z+82/99x3z2-9877x2yz2-79/70xy2z2-19/123y3z2-1491x2z3+7953xyz3-43/126y2z3+60/17xz4+98/57yz4-13317x4u-77/27x3yu-6811x2y2u-69/61xy3u+6144y4u+5404x3zu+121/120x2yzu-91/23xy2zu-71/106y3zu+1435x2z2u-120/13xyz2u-12019y2z2u-68/7xz3u-113/82yz3u+11526z4u-8706x3u2-89/53x2yu2-14804xy2u2+120/107y3u2+71/94x2zu2-1/70xyzu2+1532y2zu2+4470xz2u2+13/60yz2u2-115/102z3u2-82/21x2u3+27/121xyu3-4439y2u3-101/47xzu3-3186yzu3-106/101z2u3-10169xu4+19/58yu4-96/73zu4-7959u5-10526x4v-107/92x3yv+47/6x2y2v-23/43xy3v-69/62y4v+59/65x3zv-28/95x2yzv+5479xy2zv-39/77y3zv+11/69x2z2v-11713xyz2v+43/79y2z2v-15602xz3v+16/73yz3v-13952z4v+61/82x3uv-2219x2yuv-91/106xy2uv+5/37y3uv-148x2zuv+31/51xyzuv+18/101y2zuv+97/68xz2uv-73/32yz2uv+47/2z3uv+2/41x2u2v-13009xyu2v-7/60y2u2v+15779xzu2v+72/7yzu2v-11/73z2u2v-119/44xu3v-9067yu3v+3249zu3v+61/51u4v+12525x3v2-118/9x2yv2-3270xy2v2-4/25y3v2-5075x2zv2+77/40xyzv2-89/65y2zv2+17/58xz2v2-15609yz2v2+95/54z3v2-75/79x2uv2-4907xyuv2+12418y2uv2-57/17xzuv2-8746yzuv2+13/95z2uv2-124/67xu2v2+16/13yu2v2+28/23zu2v2-10847u3v2-645x2v3+106/75xyv3+6/115y2v3-8495xzv3+58/35yzv3-9398z2v3-101/72xuv3-71/20yuv3-124/65zuv3-8971u2v3+27/28xv4+12/29yv4-4276zv4+10858uv4+29/12v5,13/89x3y2+12068x2y3-15543xy4-77/79y5+6626x3yz+64/53x2y2z-6/23xy3z-47/125y4z+14403x3z2-43/78x2yz2-31/115xy2z2+94/59y3z2-118/117x2z3-11229xyz3+2268y2z3-116/85xz4+25/58yz4+3085z5+59/27x3yu+67/82x2y2u+11/6xy3u+103/47y4u-63/80x3zu-81/47x2yzu+7760xy2zu-115/56y3zu-10/17x2z2u+101/5xyz2u+15634y2z2u+1/107xz3u-9282yz3u+43/62z4u+62/55x3u2+100/113x2yu2-9205xy2u2-46/13y3u2+43/96x2zu2+10159xyzu2+692y2zu2+859xz2u2-19/74yz2u2+123/47z3u2-9/20x2u3-11391xyu3-2375y2u3+109/24xzu3-57/53yzu3-925z2u3-82/45xu4+97/34yu4+13/82zu4-108/29u5+63/10x3yv+38/17x2y2v-19/115xy3v+3150y4v+22/69x3zv+26/57x2yzv+110/27xy2zv+87/77y3zv+85/18x2z2v+39/47xyz2v-48/17y2z2v-7/27xz3v-13/100yz3v-11662z4v-17/8x3uv+37/11x2yuv+29/11xy2uv-109/88y3uv-2817x2zuv-61/44xyzuv+10/31y2zuv+10010xz2uv+51/86yz2uv-97/83z3uv-89/96x2u2v+4030xyu2v-58/77y2u2v-114/43xzu2v-37/10yzu2v-2011z2u2v+14483xu3v-109/101yu3v+121/102zu3v-79/92u4v+15113x3v2+10781x2yv2-14259xy2v2-113/48y3v2-7/94x2zv2-17/74xyzv2-5/117y2zv2-59/75xz2v2+13188yz2v2+103/43z3v2+4/125x2uv2-52/59xyuv2+85/92y2uv2-1/46xzuv2-9106yzuv2-83/11z2uv2-23/94xu2v2+6742yu2v2-35/107zu2v2-14596u3v2-117/43x2v3+1026xyv3+90/19y2v3+14671xzv3-101/100yzv3+6962z2v3+61/68xuv3+108/37yuv3-4157zuv3-3974u2v3+15677xv4+8661yv4+8459zv4-16/23uv4-37/119v5,13/89x3yz+12068x2y2z-15543xy3z-77/79y4z-12223x3z2-13941x2yz2+115/84xy2z2+13/98y3z2+82/99x2z3+7751xyz3+122/17y2z3-1491xz4+1327yz4+60/17z5+15363x3yu+9780x2y2u+19/117xy3u-1924y4u-14600x3zu+46/41x2yzu-5466xy2zu-73/12y3zu+10838x2z2u-8302xyz2u-89/113y2z2u+53/69xz3u-9224yz3u+47/33z4u-7399x3u2+89/77x2yu2+9312xy2u2-41/80y3u2-732x2zu2-6781xyzu2-8608y2zu2-9270xz2u2-117/58yz2u2-115/68z3u2-48/31x2u3-9067xyu3+97/107y2u3+73/57xzu3-2719yzu3-110/59z2u3-37/86xu4-15796yu4-61/4zu4-115/72u5+6161x3yv+4134x2y2v+677xy3v-8375y4v+1150x3zv+1551x2yzv+4157xy2zv+112/87y3zv+8171x2z2v+6040xyz2v+15651y2z2v-7/66xz3v-47/61yz3v+77/64z4v+14848x3uv+48/119x2yuv-9534xy2uv-117/95y3uv+5/4x2zuv+122xyzuv+90/31y2zuv-41/26xz2uv+31/30yz2uv-10428z3uv-9896x2u2v-71/21xyu2v-55/38y2u2v-29/22xzu2v-11092yzu2v+39/122z2u2v+93/73xu3v+22/49yu3v-21/106zu3v+56u4v+8565x3v2-1695x2yv2+2/17xy2v2+1/78y3v2-113/71x2zv2-41/100xyzv2+55/14y2zv2+15286xz2v2+17/53yz2v2+126/71z3v2-79/87x2uv2+109/97xyuv2-28/31y2uv2-6533xzuv2+22/5yzuv2-10449z2uv2+10830xu2v2-15516yu2v2+28/57zu2v2-81/22u3v2+4198x2v3+5667xyv3-7133y2v3-8408xzv3+11066yzv3-26/125z2v3-808xuv3+95/54yuv3-64/17zuv3-5267u2v3-15333xv4+42/89yv4+63/85zv4+119/113uv4-2011v5,5583x4y+1725x3y2-8652x2y3-91/25xy4-8495x4z-13731x3yz+9298x2y2z-41/111xy3z-15503y4z-13805x3z2+3962x2yz2-2/63xy2z2+3314y3z2+2522x2z3-10/87xyz3-408y2z3+7/16xz4+69/22yz4-7254z5-59/21x4u+115/7x3yu-1718x2y2u+7851xy3u+2632y4u-82/3x3zu+37/86x2yzu+101/113xy2zu+6747y3zu-109/113x2z2u+7399xyz2u+24/103y2z2u+89/9xz3u-14630yz3u+15066z4u-12561x3u2+113/115x2yu2+87/97xy2u2-126/67y3u2-48/7x2zu2+123/103xyzu2-11/107y2zu2-2747xz2u2+8158yz2u2-3/107z3u2+41/6x2u3+12767xyu3+3873y2u3+74/83xzu3-55/119yzu3-24/83z2u3+55xu4-7/95yu4+57/44zu4+2/101u5-6928x4v-121/57x3yv+111/104x2y2v+946xy3v-29y4v+3057x3zv-14/25x2yzv+43/31xy2zv-105/2y3zv+2336x2z2v+61/77xyz2v-7880y2z2v+5/58xz3v+10593yz3v+7094z4v+63/59x3uv-5/69x2yuv-11/81xy2uv-4157y3uv+73/65x2zuv-1676xyzuv-2376y2zuv-85/63xz2uv-95/2yz2uv-14903z3uv-119/110x2u2v-115/24xyu2v+125/9y2u2v+106/87xzu2v-13/12yzu2v-4/19z2u2v+7838xu3v-43/111yu3v+7/113zu3v-12500u4v+7743x3v2-2023x2yv2-85/83xy2v2+49/41y3v2+20/87x2zv2+3932xyzv2-77/6y2zv2+47/90xz2v2-15580yz2v2+39/4z3v2-61/8x2uv2+2518xyuv2+29/98y2uv2+11057xzuv2-18/107yzuv2+708z2uv2+14720xu2v2-3175yu2v2-113/59zu2v2-14735u3v2+7/69x2v3-4029xyv3+54/91y2v3+12372xzv3+67/2yzv3+8856z2v3-2178xuv3+995yuv3+64/95zuv3+4039u2v3-37/44xv4+23/17yv4-3035zv4-103/124uv4+69/64v5,-5583x3y2-1725x2y3+8652xy4+91/25y5+6201x3yz-73/49x2y2z-3844xy3z+10548y4z-11057x3z2-105/122x2yz2+31/53xy2z2+79/89y3z2-24/101x2z3+107/119xyz3-126y2z3+8164xz4+2/77yz4-51/8z5-14941x3yu-106x2y2u+8695xy3u+125/62y4u+4328x3zu+29/117x2yzu-6249xy2zu-2791y3zu+67/49x2z2u-38/29xyz2u+122/41y2z2u+10603xz3u-3029yz3u+5578z4u+14754x3u2-108/79x2yu2+4408xy2u2-12401y3u2-1426x2zu2-1741xyzu2-83/86y2zu2+79/95xz2u2+122/121yz2u2+81/2z3u2-1172x2u3-41/68xyu3-70/3y2u3+24/107xzu3+120/79yzu3+18/119z2u3-65/122xu4+1018yu4+22/107zu4+15189u5+5/8x3yv-12060x2y2v+3/62xy3v-227y4v+60/41x3zv-123/115x2yzv+110/123xy2zv+12864y3zv-86/121x2z2v-69/94xyz2v+14/79y2z2v+118/45xz3v+10842yz3v-37/58z4v+100/69x3uv-47/65x2yuv-7/67xy2uv-93/100y3uv-6262x2zuv-4/75xyzuv+2082y2zuv-9117xz2uv+12450yz2uv-84/67z3uv+123/26x2u2v-51/89xyu2v+19/74y2u2v-104/77xzu2v+318yzu2v+12402z2u2v+95/8xu3v-81/26yu3v-4486zu3v+3872u4v+72/91x3v2-83/63x2yv2+93/92xy2v2-15924y3v2-53/62x2zv2+6046xyzv2+1408y2zv2+60/107xz2v2-1150yz2v2-126/19z3v2-7429x2uv2+2554xyuv2+3602y2uv2+10738xzuv2-57/64yzuv2+86/69z2uv2+8172xu2v2+91/113yu2v2+92/65zu2v2+118/37u3v2+47/83x2v3+12750xyv3+10851y2v3+4216xzv3+6/101yzv3-108z2v3+2920xuv3-101/102yuv3-157zuv3+7742u2v3-7234xv4-2/111yv4+59/33zv4-93/91uv4+24/19v5,1592x4y+75/121x3y2+40/19x2y3-2651xy4+9934x4z+245x3yz+11665x2y2z+30/41xy3z+1823y4z+89/88x3z2-105/46x2yz2+79/58xy2z2-4191y3z2-76/61x2z3-21/32xyz3-9516y2z3-14896xz4-85/77yz4+51/109z5+61/30x4u-10/101x3yu+11796x2y2u+76/101xy3u+123/88y4u-5932x3zu-11857x2yzu+7128xy2zu-45/79y3zu+119/18x2z2u+9/74xyz2u+7042y2z2u-1114xz3u-11/82yz3u-1466z4u-6/85x3u2+27/106x2yu2+14246xy2u2-6216y3u2+47/6x2zu2-45/59xyzu2+89/41y2zu2+41/80xz2u2-7583yz2u2-75/113z3u2-14808x2u3-10873xyu3-90/67y2u3-11081xzu3-7369yzu3-7131z2u3-1402xu4-15386yu4-108/73zu4-5039u5+120/113x4v+10617x3yv-50/87x2y2v-2395xy3v-20/69y4v-8587x3zv+12960x2yzv-41/50xy2zv-13844y3zv-65/32x2z2v-77/122xyz2v-85/66y2z2v+13/100xz3v-20/51yz3v-13676z4v+76/97x3uv+1046x2yuv-8059xy2uv-117/59y3uv-29/105x2zuv+7287xyzuv-107/119y2zuv-35/118xz2uv+79/86yz2uv-2211z3uv+5448x2u2v+62/35xyu2v-2275y2u2v+29/121xzu2v-1674yzu2v-56/43z2u2v-3377xu3v-43/110yu3v+23/10zu3v-24/61u4v+121/53x3v2-4745x2yv2-57/64xy2v2+9554y3v2-12741x2zv2+10449xyzv2+37/108y2zv2+8621xz2v2-11/57yz2v2+1566z3v2+125/49x2uv2-121/118xyuv2+109/84y2uv2-335xzuv2+10167yzuv2-59/109z2uv2-103/119xu2v2+43/13yu2v2-73/87zu2v2+2037u3v2+13002x2v3+83/48xyv3-10713y2v3+1026xzv3-105/64yzv3-37/6z2v3+14779xuv3-6448yuv3+19/69zuv3-1/110u2v3+10010xv4+79/12yv4+12/19zv4-35/61uv4-11/57v5,-1592x3y2-75/121x2y3-40/19xy4+2651y5+39/121x3yz+122/77x2y2z-114/31xy3z+1544y4z+2/3x3z2-10271x2yz2-8373xy2z2+56/61y3z2+55/48x2z3-116xyz3-25/7y2z3-108/113xz4-34/53yz4+5548z5-122x3yu-9690x2y2u+43/87xy3u-5/19y4u+97/54x3zu-17/19x2yzu+4355xy2zu+12/5y3zu-1/100x2z2u+12754xyz2u+13600y2z2u+17/45xz3u-12091yz3u+5145z4u-63/64x3u2-84/31x2yu2-97/41xy2u2+7/13y3u2-79/62x2zu2-80/103xyzu2-69/14y2zu2+119/4xz2u2-35/87yz2u2-13840z3u2+14101x2u3+7952xyu3-1857y2u3-9861xzu3+3180yzu3+75/107z2u3-250xu4-15134yu4+4717zu4-2/41u5+22/27x3yv-8983x2y2v+10520xy3v-113/2y4v+10/73x3zv-1986x2yzv-110/13xy2zv+1550y3zv+32/111x2z2v-111/35xyz2v+101/98y2z2v+8045xz3v-2/89yz3v+2924z4v-79/11x3uv-15178x2yuv+10874xy2uv+54/11y3uv-8950x2zuv+70/53xyzuv-2403y2zuv-8249xz2uv+6935yz2uv+20/89z3uv+885x2u2v-76/71xyu2v-4/17y2u2v-31/52xzu2v-4/99yzu2v+10333z2u2v-93/104xu3v+82/101yu3v-71/37zu3v+9397u4v-15/112x3v2-6614x2yv2+119/2xy2v2+88/119y3v2+306x2zv2+2790xyzv2+10992y2zv2-115/74xz2v2-14711yz2v2+11612z3v2-1788x2uv2-75/97xyuv2+79/30y2uv2+99/59xzuv2-11439yzuv2-121/113z2uv2+108/37xu2v2+37/36yu2v2-3/65zu2v2-55/42u3v2+13/100x2v3-209xyv3-1272y2v3-117/68xzv3+63/94yzv3+32/59z2v3+1013xuv3-3463yuv3+6946zuv3-37/86u2v3+67/117xv4+85/28yv4-3024zv4-82/9uv4-32/65v5,-35/52x4y-12140x3y2+23/83x2y3+69/5xy4-80/79y5+120/43x4z-11865x3yz-3487x2y2z+53/59xy3z+53/102y4z-14083x3z2-14430x2yz2-2442xy2z2-33/104y3z2-91/38x2z3+4/87xyz3-26/57y2z3+4097xz4-9/122yz4+6364z5+9634x4u-97/95x3yu-46/99x2y2u+3847xy3u+121/106y4u+12765x3zu-5292x2yzu+1607xy2zu-67/121y3zu-12/35x2z2u+4/55xyz2u-17/27y2z2u+91/122xz3u-23/31yz3u+65/49z4u+73/46x3u2-124/27x2yu2-9933xy2u2+46/75y3u2+53/114x2zu2+3503xyzu2-14147y2zu2-11283xz2u2+11889yz2u2+99/104z3u2+3117x2u3+12624xyu3-10060y2u3+2193xzu3-80/47yzu3-77/13z2u3+11/31xu4-47/90yu4+49/48zu4-2/105u5-92/61x4v+7443x3yv+35/76x2y2v+114/67xy3v-73/126y4v+97/107x3zv+9464x2yzv+10869xy2zv+15718y3zv-37/33x2z2v+124/13xyz2v-11/26y2z2v-61/40xz3v+91/100yz3v-18/103z4v+60/29x3uv+21/125x2yuv-11117xy2uv+11748y3uv-16/117x2zuv+18/103xyzuv-1711y2zuv+1872xz2uv-109/123yz2uv-18/113z3uv-26/103x2u2v+14140xyu2v+11065y2u2v+8686xzu2v-5/111yzu2v+30/101z2u2v-10501xu3v-36/113yu3v-73/74zu3v+12753u4v-43/52x3v2-76/15x2yv2-5793xy2v2+18/13y3v2+1/79x2zv2+84/23xyzv2-172y2zv2+86/77xz2v2+15/37yz2v2+11835z3v2-6482x2uv2+94/113xyuv2+10727y2uv2-102/41xzuv2+15914yzuv2-12973z2uv2-9038xu2v2-13107yu2v2+1533zu2v2+12549u3v2-13528x2v3+903xyv3+23/114y2v3-123/64xzv3-81/5yzv3+111/103z2v3+4734xuv3-33/20yuv3-7954zuv3-2478u2v3+15518xv4-6723yv4-14/31zv4-3482uv4+10919v5,-3/94x4y-12936x3y2+2/11x2y3+32/23xy4-15921y5+61/93x4z+82/111x3yz-93/2x2y2z-6659xy3z-97/90y4z+402x3z2-14586x2yz2-121/39xy2z2+68/7y3z2+1212x2z3-2980xyz3+49/52y2z3-72/89xz4+92/47yz4+8478z5+2733x4u-103/89x3yu+1166x2y2u-7/53xy3u-106/23y4u+677x3zu+907x2yzu+7891xy2zu-9014y3zu+76/47x2z2u+49/116xyz2u-49/78y2z2u+12261xz3u+118/105yz3u-126/13z4u-8812x3u2-97/120x2yu2-9534xy2u2+92/5y3u2-54/71x2zu2+94/103xyzu2+2256y2zu2+4182xz2u2-5798yz2u2-31/115z3u2-73/98x2u3+15822xyu3+1004y2u3-578xzu3+9494yzu3-6779z2u3+14506xu4+10/121yu4+58/27zu4-2817u5-19/119x4v+7128x3yv+75/64x2y2v-65/109xy3v+5129y4v-53/55x3zv+54/125x2yzv-3009xy2zv+6144y3zv+15601x2z2v+123/55xyz2v-58/77y2z2v-56/61xz3v+121/10yz3v-103/86z4v-93/25x3uv+94/123x2yuv-25/107xy2uv+14807y3uv+65/7x2zuv+87/44xyzuv+6605y2zuv+23/99xz2uv-413yz2uv-17/15z3uv-79/46x2u2v+15240xyu2v-42/67y2u2v+8932xzu2v-5888yzu2v-4204z2u2v+7002xu3v-36/97yu3v-1634zu3v+61/102u4v-14/33x3v2-6520x2yv2+9004xy2v2-67/36y3v2-7/8x2zv2-24/11xyzv2-9373y2zv2+1556xz2v2-79/74yz2v2-6691z3v2+108x2uv2-76/61xyuv2+220y2uv2-1191xzuv2-4/9yzuv2+4546z2uv2+12205xu2v2+9/22yu2v2+64/93zu2v2-44/125u3v2+292x2v3+41/74xyv3+16/79y2v3-15892xzv3+5733yzv3+6796z2v3-42/55xuv3+71/79yuv3-19/104zuv3-38/15u2v3+6436xv4+28/15yv4+87/55zv4+2270uv4-30/41v5,-117/4x3y+97/122x2y2-3618xy3+6566y4+97/113x3z-12634x2yz+9865xy2z-1764y3z+114/31x2z2+5006xyz2+7/44y2z2-15040xz3+8/125yz3+11134z4-12980x3u-79/41x2yu-79/98xy2u+89/65y3u-1217x2zu+89/87xyzu+83/66y2zu+115/11xz2u+123/107yz2u+10920z3u-86/73x2u2-11/94xyu2-14054y2u2+6752xzu2-123/124yzu2+12129z2u2-13310xu3-52/63yu3+12847zu3-1545u4-11064x3v+11499x2yv-37/64xy2v+50/103y3v+123/94x2zv-126xyzv-111/44y2zv+95/14xz2v+113/83yz2v-77/103z3v+41/64x2uv+91/90xyuv-4932y2uv+103/31xzuv+62/63yzuv+1161z2uv-99/106xu2v-3181yu2v-11741zu2v-33/8u3v-3/118x2v2-9369xyv2+527y2v2-113/39xzv2-88/49yzv2-113/101z2v2+95/68xuv2-5930yuv2-20/43zuv2+7/41u2v2+109/93xv3-107/61yv3-8352zv3-5255uv3+12021v4,-2159x4-94/3x3y-4602x2y2+1609xy3+10721y4+28/9x3z-99/35x2yz+1/110xy2z+113/114y3z-118/75x2z2-103/93xyz2-68/67y2z2+13687xz3-1531yz3+61/107z4+6076x3u+9004x2yu+2211xy2u+110/53y3u+47/102x2zu+8495xyzu-9238y2zu+57/121xz2u-8543yz2u+8/19z3u-13527x2u2-13293xyu2+1138y2u2+26/115xzu2+78/53yzu2-12556z2u2+7299xu3+70/19yu3-14687zu3+13559u4+113/9x3v-85/126x2yv-83/3xy2v-3/46y3v+1814x2zv+28/79xyzv+103/51y2zv+78/31xz2v-14387yz2v+1/88z3v+116/75x2uv-101/59xyuv-70/3y2uv+109/71xzuv+13/88yzuv-147z2uv-113/76xu2v-9661yu2v+13855zu2v-6162u3v-1857x2v2-8208xyv2-4634y2v2-6178xzv2-7352yzv2-8247z2v2-113/15xuv2+99/40yuv2+21/97zuv2+11/37u2v2-6605xv3+8964yv3+35/121zv3+8543uv3-6008v4;TestGRRes(Name, 2, I); kill R, Name, @p; ""; 584 } 585 583 584 if( defined(assumeLevel0) ){ assumeLevel = assumeLevel0; } else { kill assumeLevel; } // restore the state of aL 585 } 586 587 ///////////////////////////////////////////////////////// 588 589 // ???? 590 proc grzero() 591 "presentation of S(0)^1 592 TODO: can we return this as an undefined value????? 593 " 594 { 595 module Z = 0; 596 return ( grobj(Z,intvec(0)) ); 597 } 598 599 proc grpower(def A, int p) 600 " 601 compute A \oplus ... \opuls A (p-times) 602 " 603 { 604 if(p==0){ return ( grzero() ); } // just ERROR ??? 605 606 ASSUME(0, p > 0); 607 608 if(p==1){ return(A); } 609 610 def N = grsum(A,A); 611 612 if(p==2){ return(N); } 613 614 // TODO: replace recursion with a loop! 615 // see http://en.wikipedia.org/wiki/Exponentiation_by_squaring 616 if((p%2)==0) 617 { return ( grpower(N, p div 2) ); } 618 else 619 { return ( grsum( A, grpower(N, (p-1) div 2) )); } 620 } 621 622 623 proc grsum(def A,def B) 624 " 625 direct sum of graded modules 626 " 627 { 628 intvec a = attrib(A, "isHomog"); 629 intvec b = attrib(B, "isHomog"); 630 intvec c = a,b; 631 int r = nrows(A); 632 633 ASSUME( 0, r == size(a) ); 634 635 module T; T[r] = 0; T = T, module(transpose(B)); 636 module AB = module(A), transpose(T); 637 638 return(grobj(AB, c)); 639 } 640 example 641 { "EXAMPLE:"; echo = 2; 642 643 if( defined(assumeLevel) ){ int assumeLevel0 = assumeLevel; } else { int assumeLevel; export(assumeLevel); } // store the state of aL 644 assumeLevel = 5; 645 646 ring r=32003,(x,y,z),dp; 647 648 grview(grpower( grshift(grzero(), 10), 5 ) ); 649 650 module A = grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0,0,1) ); 651 grview(A); 652 653 module B = grobj( module([0,x,y]), intvec(15,1,1) ); 654 grview(B); 655 656 module C = grsum(A,B); 657 658 print(C); 659 homog(C); 660 grview(C); 661 662 module D = grsum( 663 grsum(grpower(A,2), grtwist(1,1)), 664 grsum(grtwist(1,2), grpower(B,2)) 665 ); 666 667 print(D); 668 homog(D); 669 grview(D); 670 671 module D10 = grshift(D, 10); 672 673 print(D10); 674 homog(D10); 675 grview(D10); 676 677 module DD = grorder(D10); 678 679 print(DD); 680 homog(DD); 681 grview(DD); 682 683 module TTT = grtranspose(DD); 684 685 print(TTT); 686 homog(TTT); 687 grview(TTT); 688 689 module F = grobj( module([x,y,0]), intvec(1,1,5) ); 690 grview(B); 691 692 module T = grsum( F, grsum( grtwist(1, 10), B ) ); 693 grview(T); 694 695 if( defined(assumeLevel0) ){ assumeLevel = assumeLevel0; } else { kill assumeLevel; } // restore the state of aL 696 } 697 698 proc grshift( def M, int d) 699 " 700 shift graded module M by delta so that 1 is in M_d 701 " 702 { 703 intvec a = attrib(M, "isHomog"); 704 return (grobj(M, intvec( a - intvec(d:size(a))) )); 705 } 706 707 proc grisequal (def A, def B) 708 "TODO" 709 { 710 return (1==1); // TODO! 711 } 712 713 proc grtwist(int a, int d) 714 " 715 matrix presentation for twisted polynomial ring S(d)^a 716 " 717 { 718 module Z; Z[a] = 0; 719 Z = grobj(Z, -intvec(d:a)); 720 721 ASSUME(2, grisequal(Z, grpower( grshift(grzero(), -d), a ) )); // optional check 722 return(Z); 723 } 724 725 proc grobj(module M, intvec w) 726 "" 727 { 728 attrib(M, "isHomog", w); 729 attrib(M, "rank", size(w)); 730 return (M); 731 } -
Singular/LIB/primdec.lib
r0cf4e1 ra6d6356 26 26 27 27 PROCEDURES: 28 Ann(M); annihilator of R^n/M, R=basering, M in R^n 29 primdecGTZ(I); complete primary decomposition via Gianni,Trager,Zacharias 30 primdecSY(I...); complete primary decomposition via Shimoyama-Yokoyama 31 minAssGTZ(I); the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne) 32 minAssChar(I...); the minimal associated primes using characteristic sets 33 testPrimary(L,k); tests the result of the primary decomposition 34 radical(I); computes the radical of I via Krick/Logar (with modifications by Laplagne) and Kemper 35 radicalEHV(I); computes the radical of I via Eisenbud,Huneke,Vasconcelos 36 equiRadical(I); the radical of the equidimensional part of the ideal I 37 prepareAss(I); list of radicals of the equidimensional components of I 38 equidim(I); weak equidimensional decomposition of I 39 equidimMax(I); equidimensional locus of I 40 equidimMaxEHV(I); equidimensional locus of I via Eisenbud,Huneke,Vasconcelos 41 zerodec(I); zerodimensional decomposition via Monico 42 absPrimdecGTZ(I); the absolute prime components of I 43 sep(f,k); the separabel part of f as polynomial in Fp(t1,...,tm) 28 Ann(M); annihilator of R^n/M, R=basering, M in R^n 29 primdecGTZ(I); (deprecated) complete primary decomposition via Gianni,Trager,Zacharias 30 primdecGTZE(I); complete primary decomposition via Gianni,Trager,Zacharias. Returns empty list for the unit ideal 31 primdecSY(I...); (deprecated) complete primary decomposition via Shimoyama-Yokoyama 32 primdecSYE(I,..); complete primary decomposition via Shimoyama-Yokoyama. Returns empty list for the unit ideal 33 minAssGTZ(I); (deprecated) the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne) 34 minAssGTZE(I); the minimal associated primes via Gianni,Trager,Zacharias. Returns empty list for unit ideal 35 minAssChar(I...); (deprecated) the minimal associated primes using characteristic sets 36 minAssCharE(I..); the minimal associated primes using characteristic sets. Returns empty list for unit ideal 37 testPrimary(L,k); (deprecated) tests the result of the primary decomposition 38 testPrimaryE(L,k); tests the result of the primary decomposition. Handles also empty list L. 39 radical(I); computes the radical of I via Krick/Logar (with modifications by Laplagne) and Kemper 40 radicalEHV(I); computes the radical of I via Eisenbud,Huneke,Vasconcelos 41 equiRadical(I); the radical of the equidimensional part of the ideal I 42 prepareAss(I); list of radicals of the equidimensional components of I 43 equidim(I); weak equidimensional decomposition of I 44 equidimE(I); equidimE returns empty list for unit ideal 45 equidimMax(I); equidimensional locus of I 46 equidimMaxEHV(I); equidimensional locus of I via Eisenbud,Huneke,Vasconcelos 47 zerodec(I); zerodimensional decomposition via Monico 48 absPrimdecGTZ(I); (deprecated) the absolute prime components of I 49 absPrimdecGTZE(I); the absolute prime components of I. Assumes I is not unit ideal. 50 sep(f,k); the separabel part of f as polynomial in Fp(t1,...,tm) 44 51 "; 52 53 45 54 46 55 LIB "general.lib"; … … 58 67 // 59 68 /////////////////////////////////////////////////////////////////////////////// 69 60 70 61 71 static proc sat1 (ideal id, poly p) … … 463 473 if(e mod char(basering)==0) 464 474 { 465 if ( voice >=1 5)475 if ( voice >=16 ) 466 476 { 467 477 "// WARNING: The characteristic is perhaps too small to use"; … … 1014 1024 } 1015 1025 1016 if((voice>= 6)&&(char(basering)<=181))1026 if((voice>=7)&&(char(basering)<=181)) 1017 1027 { 1018 1028 primary=splitCharp(primary); 1019 1029 } 1020 1030 1021 if((@wr==2)&&(npars(basering)>0)&&(voice>= 6)&&(char(basering)>0))1031 if((@wr==2)&&(npars(basering)>0)&&(voice>=7)&&(char(basering)>0)) 1022 1032 { 1023 1033 //the prime decomposition of Yokoyama in characteristic p … … 1029 1039 if(size(primary[2*@k])==0) 1030 1040 { 1031 ek=insepDecomp (primary[2*@k-1]);1041 ek=insepDecomp_i( int(1), primary[2*@k-1] ); 1032 1042 primary=delete(primary,2*@k); 1033 1043 primary=delete(primary,2*@k-1); … … 1043 1053 } 1044 1054 1045 if(voice>= 8){primary=extF(primary);};1055 if(voice>=9){primary=extF(primary);}; 1046 1056 1047 1057 //test whether all ideals in the decomposition are primary and … … 1049 1059 //if not after a random coordinate transformation of the last 1050 1060 //variable the corresponding ideal is decomposed again. 1051 if((npars(basering)>0)&&(voice>= 8))1061 if((npars(basering)>0)&&(voice>=9)) 1052 1062 { 1053 1063 poly randp; … … 1087 1097 jmap2=maxideal(1); 1088 1098 @qht=primary[2*@k-1]; 1089 if((npars(basering)>0)&&(voice>=1 0))1099 if((npars(basering)>0)&&(voice>=11)) 1090 1100 { 1091 1101 jmap[size(jmap)]=randp; … … 1542 1552 /////////////////////////////////////////////////////////////////////////////// 1543 1553 1544 proc insepDecomp(ideal i) 1554 1555 proc insepDecomp_i(int patchPrimaryDecomposition, ideal i) 1545 1556 { 1546 1557 //decomposes i into special ideals 1547 1558 //computes the prime decomposition of the special ideals 1548 1559 //and transforms it back to a decomposition of i 1560 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 1561 // since the unit ideal it is not prime! 1549 1562 1550 1563 ASSUME(0, hasFieldCoefficient(basering) ); … … 1569 1582 } 1570 1583 phi=R,m; 1571 qr =decomp(wo[1],2);1584 qr = decomp_i(patchPrimaryDecomposition,wo[1],2); 1572 1585 1573 1586 option(redSB); … … 1579 1592 re[size(re)+1]=zeroRad(K); 1580 1593 } 1581 option( noredSB);1594 option(set,op); 1582 1595 } 1583 1596 option(set,op); … … 1714 1727 } 1715 1728 1716 static proc teilt(intvec a , intvecb)1729 static proc teilt(intvec aba, intvec bab) 1717 1730 { 1718 1731 int i; 1719 for(i=1;i<=size(a );i++)1720 { 1721 if(a [i]>b[i]){return(0);}1732 for(i=1;i<=size(aba);i++) 1733 { 1734 if(aba[i]>bab[i]){return(0);} 1722 1735 } 1723 1736 return(1); … … 1935 1948 1936 1949 1937 proc minAssPrimesold(ideal i, list #)1938 "USAGE: minAssPrimes (i); iideal1939 minAssPrimes (i,1); iideal (to use also the factorizing Groebner)1940 RETURN: list = the minimal associated prime ideals of i1941 EXAMPLE: example minAssPrimes ; shows an example1950 proc minAssPrimesoldE(ideal I, list #) 1951 "USAGE: minAssPrimesoldE(I); I ideal 1952 minAssPrimesold(I,1); I ideal (to use also the factorizing Groebner) 1953 RETURN: list = the minimal associated prime ideals of I 1954 EXAMPLE: example minAssPrimesoldE; shows an example 1942 1955 " 1943 1956 { 1957 return(minAssPrimesold_i(int(1),I,#)); 1958 } 1959 example 1960 { "EXAMPLE:"; echo = 2; 1961 ring r = 32003,(x,y,z),lp; 1962 poly p = z2+1; 1963 poly q = z4+2; 1964 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 1965 list pr= minAssPrimesoldE(i); pr; 1966 1967 minAssPrimesoldE(i,1); 1968 } 1969 1970 proc minAssPrimesold(ideal I, list #) 1971 "USAGE: minAssPrimesold(I); I ideal 1972 minAssPrimesold(i,1); I ideal (to use also the factorizing Groebner) 1973 RETURN: list = the minimal associated prime ideals of I. In case I is unit ideal, returns list(ideal(1)); 1974 NOTE: deprecated. Use 'minAssPrimesoldE()' 1975 EXAMPLE: example minAssPrimesold; shows an example 1976 " 1977 { 1978 return(minAssPrimesold_i(int(0),I,#)); 1979 } 1980 example 1981 { "EXAMPLE:"; echo = 2; 1982 ring r = 32003,(x,y,z),lp; 1983 poly p = z2+1; 1984 poly q = z4+2; 1985 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 1986 list pr= minAssPrimesold(i); pr; 1987 1988 minAssPrimesold(i,1); 1989 } 1990 1991 static proc minAssPrimesold_i(int patchPrimaryDecomposition, ideal i, list #) 1992 { 1993 // 1994 // parameter patchPrimaryDecomposition : if = 1, patch the decomposition( drop unit ideal in the decomposition), 1995 // : if = 0, taken no special action in case the unit ideal is in the decomposition 1996 // for other parameters see minAssPrimesold, minAssPrimesoldE 1997 1944 1998 ASSUME(1, hasFieldCoefficient(basering) ); 1945 1999 ASSUME(0, not isQuotientRing(basering) ) ; 1946 2000 ASSUME(0, hasGlobalOrdering(basering) ) ; 1947 2001 def @P=basering; 1948 if(size(i)==0) {return(list(ideal(0)));}2002 if(size(i)==0) { return(list(ideal(0))); } 1949 2003 list qr=simplifyIdeal(i); 1950 2004 map phi=@P,qr[2]; … … 1959 2013 int @wr; 1960 2014 list tluser,@res; 1961 list primary=decomp (i,2);2015 list primary=decomp_i(patchPrimaryDecomposition,i,2); 1962 2016 1963 2017 @res[1]=primary; 1964 2018 1965 2019 tluser=union(@res); 1966 setring @P; 1967 list @res=imap(gnir,tluser); 1968 return(phi(@res)); 2020 2021 if (size(tluser)>0) 2022 { 2023 setring @P; 2024 list @res=imap(gnir,tluser); 2025 return(phi(@res)); 2026 } 2027 else 2028 { 2029 setring @P; 2030 return(tluser); 2031 } 1969 2032 } 1970 2033 list @res,empty; … … 2028 2091 if(pos[j]!=1) 2029 2092 { 2030 @res[j]=decomp (@pr[j],2);2093 @res[j]=decomp_i(patchPrimaryDecomposition,@pr[j],2); 2031 2094 } 2032 2095 else … … 2043 2106 //@pr[j]; 2044 2107 //pause(); 2045 @res[j]=decomp (@pr[j],2);2046 // @res[j]=decomp (@pr[j],2,@pr[j],ser);2108 @res[j]=decomp_i(patchPrimaryDecomposition,@pr[j],2); 2109 // @res[j]=decomp_i(patchPrimaryDecomposition,@pr[j],2,@pr[j],ser); 2047 2110 // for(k=1;k<=size(@res[j]);k++) 2048 2111 // { … … 2057 2120 return(phi(@res)); 2058 2121 } 2059 example 2060 { "EXAMPLE:"; echo = 2; 2061 ring r = 32003,(x,y,z),lp; 2062 poly p = z2+1; 2063 poly q = z4+2; 2064 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 2065 list pr= minAssPrimes(i); pr; 2066 2067 minAssPrimes(i,1); 2068 } 2122 2069 2123 2070 2124 static proc primT(ideal i) … … 2090 2144 } 2091 2145 2092 static proc minAssPrimes(ideal i, list #) 2093 "USAGE: minAssPrimes(i); i ideal 2146 2147 static proc minAssPrimesE(ideal I, list #) 2148 "USAGE: minAssPrimesE(I); I ideal 2094 2149 Optional parameters in list #: (can be entered in any order) 2095 2150 0, "facstd" -> uses facstd to first decompose the ideal … … 2097 2152 "SL" -> the new algorithm is used (default) 2098 2153 "GTZ" -> the old algorithm is used 2099 RETURN: list = the minimal associated prime ideals of i 2154 RETURN: list = the minimal associated prime ideals of I 2155 EXAMPLE: example minAssPrimesE; shows an example 2156 " 2157 { 2158 return(minAssPrimes_i(int(1),I,#)); 2159 } 2160 example 2161 { "EXAMPLE:"; echo = 2; 2162 ring r = 32003,(x,y,z),lp; 2163 poly p = z2+1; 2164 poly q = z4+2; 2165 ideal I = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 2166 list pr= minAssPrimesE(I); pr; 2167 2168 minAssPrimesE(I,1); 2169 } 2170 2171 static proc minAssPrimes(ideal I, list #) 2172 "USAGE: minAssPrimes(I); I ideal 2173 Optional parameters in list #: (can be entered in any order) 2174 0, "facstd" -> uses facstd to first decompose the ideal 2175 1, "noFacstd" -> does not use facstd (default) 2176 "SL" -> the new algorithm is used (default) 2177 "GTZ" -> the old algorithm is used 2178 RETURN: list = the minimal associated prime ideals of I. If I is the unit ideal returns list(ideal(1)) ; 2179 NOTE: deprecated. Use 'minAssPrimesE()' 2100 2180 EXAMPLE: example minAssPrimes; shows an example 2101 2181 " 2102 2182 { 2183 return(minAssPrimes_i(int(0),I,#)); 2184 } 2185 example 2186 { "EXAMPLE:"; echo = 2; 2187 ring r = 32003,(x,y,z),lp; 2188 poly p = z2+1; 2189 poly q = z4+2; 2190 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 2191 list pr= minAssPrimes(i); pr; 2192 2193 minAssPrimes(i,1); 2194 } 2195 2196 2197 static proc minAssPrimes_i(int patchPrimaryDecomposition, ideal i, list #) 2198 { 2199 // parameter patchPrimaryDecomposition: 1 to patch( remove unit ideal from the decomposition) , 2200 // 0 for no special action on unit ideal. 2201 // for other parameters see 'minAssPrimes', 'minAssPrimesE' 2103 2202 ASSUME(1, hasFieldCoefficient(basering) ); 2104 2203 ASSUME(1, not isQuotientRing(basering) ) ; 2105 2204 ASSUME(1, hasGlobalOrdering(basering) ) ; 2106 2107 if(size(i) == 0){return(list(ideal(0)));} 2205 if (size(i) == 0) { return(list(ideal(0))); } 2206 2207 intvec origOp = option(get); 2208 2108 2209 string algorithm; // Algorithm to be used 2109 2210 string facstdOption; // To uses proc facstd … … 2160 2261 list result; 2161 2262 2162 if(npars(P) == 0) {option(redSB);}2163 2164 if (attrib(i,"isSB")!=1)2263 if(npars(P) == 0) { option(redSB); } 2264 2265 if (attrib(i,"isSB")!=1) 2165 2266 { 2166 2267 i=groebner(q[1]); … … 2170 2271 for(j=1;j<=nvars(basering);j++) 2171 2272 { 2172 if (q[2][j]!=var(j)){k=1;break;}2273 if (q[2][j]!=var(j)) {k=1;break;} 2173 2274 } 2174 2275 if(k) … … 2176 2277 i=groebner(q[1]); 2177 2278 } 2279 } 2280 if(size(i)==1) 2281 { 2282 if ( deg(lead(i[1]))==0 ) // we have the unit ideal. 2283 { 2284 setring P0; 2285 option( set,origOp ); 2286 if (patchPrimaryDecomposition==1) 2287 { 2288 2289 return( list() ); 2290 } 2291 else 2292 { 2293 return( list(ideal(1)) ); 2294 } 2295 } 2178 2296 } 2179 2297 … … 2182 2300 option( set,op ); 2183 2301 setring P0; 2302 option( set,origOp ); 2184 2303 return( ideal(1) ); 2185 2304 } … … 2212 2331 if (algorithm == "GTZ") 2213 2332 { 2214 qr = decomp (pr[k], 2);2333 qr = decomp_i(patchPrimaryDecomposition,pr[k], 2); 2215 2334 } 2216 2335 else … … 2230 2349 setring(P0); 2231 2350 list re=imap(P,re); 2351 option( set,origOp ); 2232 2352 return(re); 2233 2353 } … … 2238 2358 if (algorithm == "GTZ") 2239 2359 { 2240 re[1] = decomp (i, 2);2360 re[1] = decomp_i(patchPrimaryDecomposition,i, 2); 2241 2361 } 2242 2362 else … … 2248 2368 re=phi(re); 2249 2369 setring(P0); 2370 option( set,origOp ); 2250 2371 list re=imap(P,re); 2251 2372 return(re); … … 2282 2403 if (algorithm == "GTZ") 2283 2404 { 2284 re[j] = decomp (q[j], 2);2405 re[j] = decomp_i(patchPrimaryDecomposition,q[j], 2); 2285 2406 } 2286 2407 else … … 2296 2417 setring(P0); 2297 2418 list re=imap(P,re); 2419 option( set,origOp ); 2298 2420 return(re); 2299 2421 } 2300 example 2301 { "EXAMPLE:"; echo = 2; 2302 ring r = 32003,(x,y,z),lp; 2303 poly p = z2+1; 2304 poly q = z4+2; 2305 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 2306 list pr= minAssPrimes(i); pr; 2307 2308 minAssPrimes(i,1); 2309 } 2422 2310 2423 2311 2424 static proc union(list li) … … 2315 2428 def P=basering; 2316 2429 2430 int liSize=size(li); 2431 int li1Size=0; 2432 if (size(li)>0) 2433 { 2434 li1Size=size(li[1]); 2435 } 2317 2436 def ir=changeordTo(basering,"lp"); 2318 2437 setring ir; 2319 list l=fetch(P,li); 2438 list l; 2439 if ( liSize > 0) 2440 { 2441 if (li1Size > 0) 2442 { 2443 l = fetch(P,li); 2444 } 2445 else 2446 { 2447 ASSUME(1, size(li)==1); 2448 l[1] = list(); 2449 } 2450 } 2320 2451 list @erg; 2321 2452 … … 2375 2506 } 2376 2507 } 2377 if(deg(@erg[size(@erg)][1])!=0) 2378 { 2379 @wos[size(@wos)+1]=@erg[size(@erg)]; 2380 } 2508 if (size(@erg)>0) 2509 { 2510 if(deg(@erg[size(@erg)][1])!=0) 2511 { 2512 @wos[size(@wos)+1]=@erg[size(@erg)]; 2513 } 2514 } 2515 int @wosSize = size(@wos); 2381 2516 setring P; 2382 list @ser=fetch(ir,@wos); 2517 list @ser; 2518 if (@wosSize>0) 2519 { 2520 @ser=fetch(ir,@wos); 2521 } 2383 2522 return(@ser); 2384 2523 } 2385 /////////////////////////////////////////////////////////////////////////////// 2524 2525 2526 2527 2386 2528 proc equidim(ideal i,list #) 2387 "USAGE: equidim( i) or equidim(i,1) ; iideal2529 "USAGE: equidim(I) or equidim(I,1) ; I ideal 2388 2530 RETURN: list of equidimensional ideals a[1],...,a[s] with: 2389 - a[s] the equidimensional locus of i, i.e. the intersection2390 of the primary ideals of dimension of i2531 - a[s] the equidimensional locus of I, i.e. the intersection 2532 of the primary ideals of dimension of I, except I is unit ideal. 2391 2533 - a[1],...,a[s-1] the lower dimensional equidimensional loci. 2392 NOTE: An embedded component q (primary ideal) of i can be replaced in the 2534 If I is the unit ideal, a list containing the unit ideal as a[1] is returned. 2535 NOTE: An embedded component q (primary ideal) of I can be replaced in the 2393 2536 decomposition by a primary ideal q1 with the same radical as q. @* 2394 @code{equidim( i,1)} uses the algorithm of Eisenbud/Huneke/Vasconcelos.2537 @code{equidim(I,1)} uses the algorithm of Eisenbud/Huneke/Vasconcelos. 2395 2538 2396 2539 EXAMPLE:example equidim; shows an example … … 2405 2548 ); 2406 2549 } 2407 2408 2550 intvec op ; 2409 2551 def P = basering; … … 2635 2777 } 2636 2778 /////////////////////////////////////////////////////////////////////////////// 2637 2638 proc algeDeco(ideal i, int w) 2639 { 2779 //w=0: GTZ 2780 //w=1: SY 2781 //w=2: minAss 2782 proc algeDecoE(ideal I, int w) 2783 {//reduces primery decomposition over algebraic extensions to 2784 //the other cases 2785 return( algeDeco_i( int(1), I, int w) ); 2786 } 2787 2788 //w=0: GTZ 2789 //w=1: SY 2790 //w=2: minAss 2791 // deprecated. use 'algeDecoE()' 2792 proc algeDeco(ideal I, int w) 2793 {//reduces primery decomposition over algebraic extensions to 2794 //the other cases 2795 return( algeDeco_i(int(0), I, int w)); 2796 } 2797 2798 2799 //w=0: GTZ 2800 //w=1: SY 2801 //w=2: minAss 2802 static proc algeDeco_i(int patchPrimaryDecomposition, ideal i, int w) 2803 {//reduces primery decomposition over algebraic extensions to 2804 //the other cases 2805 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 2806 // since the unit ideal it is not prime, otherwise take no special action. 2807 2640 2808 ASSUME(0, hasFieldCoefficient(basering) ); 2641 2809 ASSUME(0, not isQuotientRing(basering) ) ; … … 2655 2823 if((size(i)==2) && (w==2)) 2656 2824 { 2825 //treats a special case separately which would otherwise take a lot longer in factorization 2657 2826 option( redSB ); 2658 2827 ideal J = std(i); 2659 option( noredSB ); 2828 option( set, op ); 2829 if(size(J)==1) 2830 { 2831 if ( deg(lead(J[1]))==0 ) // we have the unit ideal 2832 { 2833 if (patchPrimaryDecomposition==1) 2834 { 2835 return( list() ); 2836 } 2837 else 2838 { 2839 return( list( ideal(1) ) ); 2840 } 2841 } 2842 } 2660 2843 if ((size(J)==2)&&(deg(J[1])==1)) 2661 2844 { 2845 // minAssPrimes correspond to factorization of J[2] 2662 2846 ideal keep; 2663 2847 poly f; … … 2722 2906 if(w==0) 2723 2907 { 2724 pr=decomp (i);2908 pr=decomp_i(patchPrimaryDecomposition,i); 2725 2909 } 2726 2910 if(w==1) 2727 2911 { 2728 pr=prim_dec (i,1);2912 pr=prim_dec_i(patchPrimaryDecomposition,i,1); 2729 2913 pr=reconvList(pr); 2730 2914 } 2731 2915 if(w==2) 2732 2916 { 2733 pr=minAssPrimes (i);2917 pr=minAssPrimes_i(patchPrimaryDecomposition,i); 2734 2918 } 2919 2920 int sizepr = size(pr); 2735 2921 2736 2922 if(n<nvars(basering)) … … 2741 2927 R_l[3]=list(list("dp",1:n),list("lp",1:(nvars(basering)-n)),list("C",0)); 2742 2928 def RS=ring(R_l); kill R_l; setring RS; 2743 list pr=imap(RH,pr);2929 if (sizepr>0) { list pr=imap(RH,pr); ASSUME(1, sizepr == size(pr)); } 2744 2930 ideal K; 2745 for(j=1;j<=size (pr);j++)2931 for(j=1;j<=sizepr;j++) 2746 2932 { 2747 2933 K=groebner(pr[j]); 2748 K=K[2..size(K)]; 2934 if (size(K)>1) 2935 { 2936 K = K[2..size(K)]; 2937 } 2749 2938 pr[j]=K; 2750 2939 } 2751 2940 setring R; 2752 list pr=imap(RS,pr);2941 if (sizepr>0) { list pr=imap(RS,pr); } 2753 2942 } 2754 2943 else 2755 2944 { 2756 2945 setring R; 2757 list pr=imap(RH,pr);2946 if (sizepr>0) { list pr=imap(RH,pr); } 2758 2947 } 2759 2948 … … 2788 2977 } 2789 2978 /////////////////////////////////////////////////////////////////////////////// 2790 static proc decomp(ideal i,list #) 2791 "USAGE: decomp(i); i ideal (for primary decomposition) (resp. 2792 decomp(i,1); (for the associated primes of dimension of i) ) 2793 decomp(i,2); (for the minimal associated primes) ) 2794 decomp(i,3); (for the absolute primary decomposition) ) 2979 2980 static proc decompE(ideal I,list #) 2981 "USAGE: decompE(I); I ideal (for primary decomposition) (resp. 2982 decompE(I,1); (for the associated primes of dimension of I) ) 2983 decompE(I,2); (for the minimal associated primes) ) 2984 decompE(I,3); (for the absolute primary decomposition) ) 2795 2985 RETURN: list = list of primary ideals and their associated primes 2796 2986 (at even positions in the list) 2797 2987 (resp. a list of the minimal associated primes) 2988 if I is unit ideal, returns emtpy list 2798 2989 NOTE: Algorithm of Gianni/Trager/Zacharias 2990 EXAMPLE: example decompE; shows an example 2991 " 2992 { 2993 return(decomp_i(int(1),I,#)); 2994 } 2995 example 2996 { "EXAMPLE:"; echo = 2; 2997 ring r = 32003,(x,y,z),lp; 2998 poly p = z2+1; 2999 poly q = z4+2; 3000 ideal I = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 3001 list pr= decompE(I); 3002 pr; 3003 testPrimary( pr, I); 3004 } 3005 3006 static proc decomp(ideal I,list #) 3007 "USAGE: decomp(I); I ideal (for primary decomposition) (resp. 3008 decomp(I,1); (for the associated primes of dimension of I) ) 3009 decomp(I,2); (for the minimal associated primes) ) 3010 decomp(I,3); (for the absolute primary decomposition) ) 3011 RETURN: list = list of primary ideals and their associated primes 3012 (at even positions in the list) 3013 (resp. a list of the minimal associated primes) 3014 if I is unit ideal, returns list(ideal(1),ideal(1)) ( resp. list(ideal(1))) 3015 NOTE: deprecated. Use 'decompE()' 2799 3016 EXAMPLE: example decomp; shows an example 2800 3017 " 2801 3018 { 3019 return(decomp_i(int(0),I,#)); 3020 } 3021 example 3022 { "EXAMPLE:"; echo = 2; 3023 ring r = 32003,(x,y,z),lp; 3024 poly p = z2+1; 3025 poly q = z4+2; 3026 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 3027 list pr= decomp(i); 3028 pr; 3029 testPrimary( pr, i); 3030 } 3031 3032 static proc decomp_i(int patchPrimaryDecomposition, ideal i,list #) 3033 { 3034 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 3035 // since the unit ideal it is not prime, otherwise take no special action. 3036 // for other parameters see 'decomp' or 'decompE' 2802 3037 ASSUME(1, hasFieldCoefficient(basering) ); 2803 3038 ASSUME(1, not isQuotientRing(basering) ) ; 2804 3039 ASSUME(1, hasGlobalOrdering(basering) ) ; 2805 2806 in tvec op,@vv;3040 intvec initialOp,op,@vv; 3041 initialOp = option(get); 2807 3042 def @P = basering; 2808 3043 list primary,indep,ltras; … … 2813 3048 int isS=(attrib(i,"isSB")==1); 2814 3049 2815 2816 3050 if(size(#)>0) 2817 3051 { … … 2845 3079 //ltras=mstd(i); 2846 3080 tras=groebner(i); 2847 ltras=tras,tras;2848 attrib(ltras[1],"isSB",1);2849 3081 } 2850 3082 else 2851 { 2852 ltras=i,i; 2853 attrib(ltras[1],"isSB",1); 2854 } 3083 { 3084 tras=i; 3085 } 3086 ltras = tras,tras; 3087 attrib( ltras[1], "isSB", 1); 3088 3089 if (size(ltras[1])>0) 3090 { 3091 if ( deg(lead(ltras[1]))==0 ) // we have the unit ideal. 3092 { 3093 option(set,initialOp); 3094 if (patchPrimaryDecomposition==1) 3095 { 3096 if (abspri) { return(prepare_absprimdec(list())); } 3097 return( list() ); 3098 } 3099 else 3100 { 3101 primary[1]=ideal(1); 3102 primary[2]=ideal(1); 3103 if (abspri) { return(prepare_absprimdec(primary));} 3104 return( primary ); 3105 } 3106 } 3107 } 3108 2855 3109 tras=ltras[1]; 2856 3110 attrib(tras,"isSB",1); … … 2859 3113 primary[1]=ltras[2]; 2860 3114 primary[2]=maxideal(1); 3115 option(set,initialOp); 2861 3116 if(@wr>0) 2862 3117 { … … 2882 3137 if(size(i)==0) 2883 3138 { 3139 option(set,initialOp); 2884 3140 primary=ideal(0),ideal(0); 2885 3141 if (abspri) { return(prepare_absprimdec(primary));} … … 2923 3179 ideal @j=groebner(fetch(@P,i)); 2924 3180 } 3181 if(size(@j)==1) 3182 { 3183 if ( deg( lead(@j[1]) )==0 ) // we have the unit ideal. 3184 { 3185 setring @P; 3186 option(set,initialOp); 3187 if (patchPrimaryDecomposition==1) 3188 { 3189 return( list() ); 3190 } 3191 else 3192 { 3193 return( list(ideal(1),ideal(1)) ); 3194 } 3195 } 3196 } 2925 3197 } 2926 3198 option(set,op); … … 2949 3221 { 2950 3222 setring @P; 3223 option(set,initialOp); 2951 3224 primary[1]=i; 2952 3225 primary[2]=i; … … 2990 3263 @j=std(@j); 2991 3264 2992 list pr=decomp(@j); 3265 list pr=decomp_i(patchPrimaryDecomposition,@j); 3266 if (size(pr)==0) 3267 { 3268 setring @P; 3269 option(set,initialOp); 3270 if (abspri) { return(prepare_absprimdec(list()));} 3271 return(list()); 3272 } 3273 2993 3274 setring gnir; 2994 3275 list pr=imap(@deirf,pr); … … 2999 3280 } 3000 3281 setring @P; 3282 option(set,initialOp); 3001 3283 primary=imap(gnir,pr); 3002 3284 if (abspri) { return(prepare_absprimdec(primary));} … … 3011 3293 { 3012 3294 setring @P; 3295 option(set,initialOp); 3013 3296 primary=ideal(1),ideal(1); 3014 3297 if (abspri) { return(prepare_absprimdec(primary));} … … 3038 3321 } 3039 3322 setring @P; 3323 option(set,initialOp); 3040 3324 primary=fetch(gnir,gprimary); 3041 3042 3325 //HIER 3326 3043 3327 if (abspri) { return(prepare_absprimdec(primary));} 3044 3328 return(primary); … … 3099 3383 primary=imap(gnir,primary); 3100 3384 } 3101 option(set, op);3385 option(set,initialOp); 3102 3386 return(primary); 3103 3387 } … … 3725 4009 if(@wr>0) 3726 4010 { 3727 htprimary=decomp (@j,@wr,peek,ser);4011 htprimary=decomp_i(patchPrimaryDecomposition, @j,@wr,peek,ser); 3728 4012 } 3729 4013 else 3730 4014 { 3731 htprimary=decomp (@j,peek,ser);4015 htprimary=decomp_i(patchPrimaryDecomposition,@j,peek,ser); 3732 4016 } 3733 4017 // here we collect now both results primary(sat(j,gh)) … … 3760 4044 //--------------------------------------------------------------------------- 3761 4045 setring @P; 4046 option(set,initialOp); 3762 4047 primary=imap(gnir,quprimary); 3763 4048 if(!abspri) … … 3774 4059 3775 4060 3776 example 3777 { "EXAMPLE:"; echo = 2; 3778 ring r = 32003,(x,y,z),lp; 3779 poly p = z2+1; 3780 poly q = z4+2; 3781 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 3782 list pr= decomp(i); 3783 pr; 3784 testPrimary( pr, i); 3785 } 4061 3786 4062 3787 4063 /////////////////////////////////////////////////////////////////////////////// … … 4291 4567 ////////////////////////////////////////////////////// 4292 4568 4293 4294 static proc min_ass_prim_charsets (ideal PS, int cho) 4295 { 4296 if((cho<0) and (cho>1)) 4569 static proc min_ass_prim_charsets_i (int patchPrimaryDecomposition, ideal PS, int cho) 4570 { 4571 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4572 // since the unit ideal it is not prime, otherwise take no special action. 4573 ASSUME(1, hasFieldCoefficient(basering) ); 4574 ASSUME(1, hasGlobalOrdering(basering) ) ; 4575 ASSUME(1, not isQuotientRing(basering) ) ; 4576 4577 if((cho<0) or (cho>1)) 4297 4578 { 4298 4579 ERROR("<int> must be 0 or 1"); … … 4303 4584 if(cho==0) 4304 4585 { 4305 L=min_ass_prim_charsets0 (PS);4586 L=min_ass_prim_charsets0_i(patchPrimaryDecomposition,PS); 4306 4587 } 4307 4588 else 4308 4589 { 4309 L=min_ass_prim_charsets1 (PS);4590 L=min_ass_prim_charsets1_i(patchPrimaryDecomposition,PS); 4310 4591 } 4311 4592 option(set,saveopt); … … 4321 4602 4322 4603 4323 static proc min_ass_prim_charsets0 (ideal PS) 4324 { 4604 static proc min_ass_prim_charsets0_i (int patchPrimaryDecomposition, ideal PS) 4605 { 4606 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4607 // since the unit ideal it is not prime, otherwise take no special action. 4325 4608 ASSUME(1, hasFieldCoefficient(basering) ); 4326 4609 ASSUME(1, not isQuotientRing(basering) ) ; … … 4328 4611 4329 4612 intvec op; 4613 if (size(PS)==0) { return( list(ideal(0))); } 4330 4614 matrix m=char_series(PS); // We compute an irreducible 4331 4615 // characteristic series … … 4334 4618 && (m[1,1]==1)) // in case of an empty series: min_ass_prim_charsets1 4335 4619 { 4336 return min_ass_prim_charsets1(PS);4620 return (min_ass_prim_charsets1_i(patchPrimaryDecomposition,PS)); 4337 4621 } 4338 4622 int i,j,k; … … 4412 4696 } 4413 4697 } 4698 if(size(PSI)==1) 4699 { 4700 if (idealsEqual( PSI[1], ideal(1) )) 4701 { 4702 if (patchPrimaryDecomposition==1) 4703 { 4704 return( list() ); 4705 } 4706 else 4707 { 4708 return( list(ideal(1)) ); 4709 } 4710 } 4711 } 4414 4712 return (PSI); 4415 4713 } … … 4426 4724 4427 4725 4428 static proc min_ass_prim_charsets1 (ideal PS) 4429 { 4726 static proc min_ass_prim_charsets1_i (int patchPrimaryDecomposition, ideal PS) 4727 { 4728 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4729 // since the unit ideal it is not prime, otherwise take no special action. 4430 4730 ASSUME(1, hasFieldCoefficient(basering) ); 4431 4731 ASSUME(1, not isQuotientRing(basering) ) ; … … 4434 4734 intvec op; 4435 4735 def oldring=basering; 4736 if (size(PS)==0) { return( list(ideal(0))); } 4436 4737 string n=system("neworder",PS); 4437 4738 execute("ring r=("+charstr(oldring)+"),("+n+"),dp;"); … … 4466 4767 I=I,ini_mod(PHI[i][j]); 4467 4768 } 4468 I=I[2..ncols(I)]; 4769 if (ncols(I)>1) 4770 { 4771 I=I[2..ncols(I)]; 4772 } 4469 4773 ITPHI[i]=I; 4470 4774 } … … 4544 4848 } 4545 4849 } 4850 if(size(PSI)==1) 4851 { 4852 if (idealsEqual( PSI[1], ideal(1) )) 4853 { 4854 if (patchPrimaryDecomposition==1) 4855 { 4856 return( list() ); 4857 } 4858 else 4859 { 4860 return( list(ideal(1)) ); 4861 } 4862 } 4863 } 4864 4546 4865 return (PSI); 4547 4866 } … … 4568 4887 ////////////////////////////////////////////////////////// 4569 4888 4570 4571 static proc prim_dec(ideal I, int choose) 4572 { 4889 static proc prim_dec_i(int patchPrimaryDecomposition, ideal I, int choose) 4890 { 4891 // if patchPrimaryDecomposition=1, drop unit ideal in the decomposition, 4892 // since the unit ideal it is not prime, otherwise take no special action. 4573 4893 ASSUME(1, hasFieldCoefficient(basering) ); 4574 4894 ASSUME(1, not isQuotientRing(basering) ) ; 4575 4895 ASSUME(1, hasGlobalOrdering(basering) ) ; 4576 4577 4896 if((choose<0) or (choose>3)) 4578 4897 { … … 4608 4927 if(SI[1]==1) // primdecSY(ideal(1)) 4609 4928 { 4610 return(list()); 4929 ASSUME(1, ncols(SI)==1); 4930 if (patchPrimaryDecomposition==1) 4931 { 4932 return( list() ); 4933 } 4934 else 4935 { 4936 return( list(list(ideal(1),ideal(1))) ); 4937 } 4611 4938 } 4612 4939 intvec save=option(get); … … 4712 5039 if (V[2]==3) // pseudo_prim_dec_special is needed 4713 5040 { 4714 QQ,SRest=pseudo_prim_dec_special_charsets (V[1],V[6],choose);5041 QQ,SRest=pseudo_prim_dec_special_charsets_i(patchPrimaryDecomposition,V[1],V[6],choose); 4715 5042 // QQ = quadruples: 4716 5043 // standard basis of pseudo-primary component, … … 4723 5050 else // V is the root, pseudo_prim_dec is needed 4724 5051 { 4725 QQ,SRest=pseudo_prim_dec_charsets (I,SI,choose);5052 QQ,SRest=pseudo_prim_dec_charsets_i(patchPrimaryDecomposition,I,SI,choose); 4726 5053 // QQ = quadruples: 4727 5054 // standard basis of pseudo-primary component, … … 4796 5123 4797 5124 4798 static proc pseudo_prim_dec_charsets (ideal I, ideal SI, int choo) 4799 { 5125 static proc pseudo_prim_dec_charsets_i(int patchPrimaryDecomposition, ideal I, ideal SI, int choo) 5126 { 5127 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5128 // since the unit ideal it is not prime, otherwise take no special action. 4800 5129 ASSUME(1, hasFieldCoefficient(basering) ); 4801 5130 ASSUME(1, not isQuotientRing(basering) ) ; … … 4806 5135 if((choo==0) or (choo==1)) 4807 5136 { 4808 L=min_ass_prim_charsets (I,choo);5137 L=min_ass_prim_charsets_i(patchPrimaryDecomposition,I,choo); 4809 5138 } 4810 5139 else … … 4812 5141 if(choo==2) 4813 5142 { 4814 L=minAssPrimes (I);5143 L=minAssPrimes_i(patchPrimaryDecomposition,I); 4815 5144 } 4816 5145 else 4817 5146 { 4818 L=minAssPrimes (I,1);5147 L=minAssPrimes_i(patchPrimaryDecomposition,I,1); 4819 5148 } 4820 5149 for(int i=size(L);i>=1;i--) … … 4823 5152 } 4824 5153 } 4825 return (pseudo_prim_dec_i (SI,L));5154 return (pseudo_prim_dec_i_i(patchPrimaryDecomposition,SI,L)); 4826 5155 } 4827 5156 … … 4849 5178 //////////////////////////////////////////////////////////////// 4850 5179 4851 4852 static proc pseudo_prim_dec_special_charsets (ideal SI,list V6, int choo) 4853 { 5180 static proc pseudo_prim_dec_special_charsets_i (int patchPrimaryDecomposition, ideal SI,list V6, int choo) 5181 { 5182 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5183 // since the unit ideal it is not prime, otherwise take no special action. 4854 5184 ASSUME(1, hasFieldCoefficient(basering) ); 4855 5185 ASSUME(1, not isQuotientRing(basering) ) ; 4856 5186 ASSUME(1, hasGlobalOrdering(basering) ) ; 4857 4858 5187 int i,j,l; 4859 5188 list m; … … 4875 5204 if((choo==0) or (choo==1)) 4876 5205 { 4877 m=min_ass_prim_charsets (SP,choo); // a list of SB5206 m=min_ass_prim_charsets_i(patchPrimaryDecomposition,SP,choo); // a list of SB 4878 5207 } 4879 5208 else … … 4881 5210 if(choo==2) 4882 5211 { 4883 m=minAssPrimes (SP);5212 m=minAssPrimes_i(patchPrimaryDecomposition,SP); 4884 5213 } 4885 5214 else 4886 5215 { 4887 m=minAssPrimes (SP,1);5216 m=minAssPrimes_i(patchPrimaryDecomposition,SP,1); 4888 5217 } 4889 5218 for(j=size(m);j>=1;j--) … … 4934 5263 } 4935 5264 } 4936 return (pseudo_prim_dec_i (SI,L));5265 return (pseudo_prim_dec_i_i(patchPrimaryDecomposition,SI,L)); 4937 5266 } 4938 5267 4939 5268 4940 5269 //////////////////////////////////////////////////////////////// 4941 // proc pseudo_prim_dec_i 5270 // proc pseudo_prim_dec_i_i 4942 5271 // input: A standard basis of an arbitrary ideal I, and standard bases 4943 5272 // of the minimal associated primes of I … … 4951 5280 //////////////////////////////////////////////////////////////// 4952 5281 4953 4954 static proc pseudo_prim_dec_i (ideal SI, list L) 4955 { 5282 static proc pseudo_prim_dec_i_i (int patchPrimaryDecomposition, ideal SI, list L) 5283 { 5284 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5285 // since the unit ideal it is not prime, otherwise take no special action. 4956 5286 ASSUME(1, hasFieldCoefficient(basering) ); 4957 5287 ASSUME(1, not isQuotientRing(basering) ) ; 4958 5288 ASSUME(1, hasGlobalOrdering(basering) ) ; 4959 4960 5289 list Q; 4961 5290 if (size(L)==1) // one minimal associated prime only … … 5356 5685 // 5357 5686 /////////////////////////////////////////////////////////////////////////////// 5358 5359 proc primdecGTZ(ideal i, list #) 5360 "USAGE: primdecGTZ(i); i ideal 5361 RETURN: a list pr of primary ideals and their associated primes: 5687 proc primdecGTZE(ideal I, list #) 5688 "USAGE: primdecGTZE(I); i ideal 5689 RETURN: a list pr of primary ideals and their associated primes for a proper ideal, and an empty list for the unit ideal. 5362 5690 @format 5363 5691 pr[i][1] the i-th primary component, … … 5372 5700 corresponding global ring is returned if the string 'global' 5373 5701 is specified as second argument 5702 EXAMPLE: example primdecGTZE; shows an example 5703 " 5704 { 5705 return (primdecGTZ_i(int(1),I, #)); 5706 } 5707 example 5708 { "EXAMPLE:"; echo = 2; 5709 ring r = 0,(x,y,z),lp; 5710 poly p = z2+1; 5711 poly q = z3+2; 5712 ideal I = p*q^2,y-z2; 5713 list pr = primdecGTZE(I); 5714 pr; 5715 ideal J = 1; 5716 list prempty = primdecGTZE(J); 5717 prempty; 5718 } 5719 5720 proc primdecGTZ(ideal I, list #) 5721 "USAGE: primdecGTZ(I); I ideal 5722 RETURN: a list pr of primary ideals and their associated primes for a proper ideal I, otherwise pr = list( list( ideal(1), ideal(1) ) 5723 @format 5724 pr[i][1] the i-th primary component, 5725 pr[i][2] the i-th prime component. 5726 @end format 5727 NOTE: deprecated. use 'primdecGTZE()' 5728 - Algorithm of Gianni/Trager/Zacharias. 5729 - Designed for characteristic 0, works also in char k > 0, if it 5730 terminates (may result in an infinite loop in small characteristic!) 5731 - For local orderings, the result is considered in the localization 5732 of the polynomial ring, not in the power series ring 5733 - For local and mixed orderings, the decomposition in the 5734 corresponding global ring is returned if the string 'global' 5735 is specified as second argument 5374 5736 EXAMPLE: example primdecGTZ; shows an example 5375 5737 " 5376 5738 { 5739 return (primdecGTZ_i(int(0), I , #)); 5740 } 5741 example 5742 { "EXAMPLE:"; echo = 2; 5743 ring r = 0,(x,y,z),lp; 5744 poly p = z2+1; 5745 poly q = z3+2; 5746 ideal i = p*q^2,y-z2; 5747 list pr = primdecGTZ(i); 5748 pr; 5749 } 5750 5751 static proc primdecGTZ_i(int patchPrimaryDecomposition,ideal i, list #) 5752 { 5753 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5754 // since the unit ideal it is not prime, otherwise take no special action. 5755 // For other parameters see 'primdecGTZ' or 'primdecGTZE'. 5377 5756 ASSUME(0, hasFieldCoefficient(basering) ); 5378 5757 ASSUME(0, not isQuotientRing(basering) ) ; … … 5390 5769 ideal i=imap(r,i); 5391 5770 // decompose and go back 5392 list li=primdecGTZ(i); 5771 list li=primdecGTZ_i(patchPrimaryDecomposition,i); 5772 int sizeli = size(li); 5393 5773 setring r; 5774 if (sizeli==0) 5775 { 5776 return ( list() ); 5777 } 5394 5778 def li=imap(s,li); 5395 5779 // clean up … … 5410 5794 if(minpoly!=0) 5411 5795 { 5412 return(algeDeco (i,0));5796 return(algeDeco_i(patchPrimaryDecomposition,i,0)); 5413 5797 ERROR( 5414 5798 "// Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal" 5415 5799 ); 5416 5800 } 5417 return(convList(decomp(i))); 5801 return(convList(decomp_i(patchPrimaryDecomposition,i))); 5802 } 5803 5804 /////////////////////////////////////////////////////////////////////////////// 5805 proc absPrimdecGTZE(ideal I, list #) 5806 "USAGE: absPrimdecGTZE(I); I ideal 5807 ASSUME: Ground field has characteristic 0. 5808 RETURN: a ring containing two lists: @code{absolute_primes}, the absolute 5809 prime components of I, and @code{primary_decomp}, the output of 5810 @code{primdecGTZ(I)}. Will fail for unit ideal. 5811 The list absolute_primes has to be interpreted as follows: 5812 each entry describes a class of conjugated absolute primes, 5813 @format 5814 absolute_primes[i][1] the absolute prime component, 5815 absolute_primes[i][2] the number of conjugates. 5816 @end format 5817 The first entry of @code{absolute_primes[i][1]} is the minimal 5818 polynomial of a minimal finite field extension over which the 5819 absolute prime component is defined. 5820 For local orderings, the result is considered in the localization 5821 of the polynomial ring, not in the power series ring. 5822 For local and mixed orderings, the decomposition in the 5823 corresponding global ring is returned if the string 'global' 5824 is specified as second argument 5825 NOTE: Algorithm of Gianni/Trager/Zacharias combined with the 5826 @code{absFactorize} command. 5827 SEE ALSO: primdecGTZ; absFactorize 5828 EXAMPLE: example absPrimdecGTZE; shows an example 5829 " 5830 { 5831 return(absPrimdecGTZ_i(int(1),I,#)); 5418 5832 } 5419 5833 example … … 5422 5836 poly p = z2+1; 5423 5837 poly q = z3+2; 5424 ideal i = p*q^2,y-z2; 5425 list pr = primdecGTZ(i); 5426 pr; 5427 } 5428 /////////////////////////////////////////////////////////////////////////////// 5838 ideal I = p*q^2,y-z2; 5839 def S = absPrimdecGTZE(I); 5840 setring S; 5841 absolute_primes; 5842 } 5843 5429 5844 proc absPrimdecGTZ(ideal I, list #) 5430 5845 "USAGE: absPrimdecGTZ(I); I ideal … … 5447 5862 corresponding global ring is returned if the string 'global' 5448 5863 is specified as second argument 5449 NOTE: Algorithm of Gianni/Trager/Zacharias combined with the 5864 NOTE: deprecated. Use 'absPrimdecGTZE()'. 5865 Algorithm of Gianni/Trager/Zacharias combined with the 5450 5866 @code{absFactorize} command. 5451 5867 SEE ALSO: primdecGTZ; absFactorize … … 5453 5869 " 5454 5870 { 5871 5872 return(absPrimdecGTZ_i(int(0),I,#)); 5873 } 5874 example 5875 { "EXAMPLE:"; echo = 2; 5876 ring r = 0,(x,y,z),lp; 5877 poly p = z2+1; 5878 poly q = z3+2; 5879 ideal i = p*q^2,y-z2; 5880 def S = absPrimdecGTZ(i); 5881 setring S; 5882 absolute_primes; 5883 } 5884 5885 5886 5887 static proc absPrimdecGTZ_i(int patchPrimaryDecomposition, ideal I, list #) 5888 { 5889 // if parameter patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 5890 // since the unit ideal it is not prime, otherwise take no special action. 5891 // For other parameters see 'absPrimdecGTZ' or 'absPrimdecGTZE'. 5455 5892 ASSUME(0, hasFieldCoefficient(basering) ); 5456 5893 ASSUME(0, not isQuotientRing(basering) ) ; … … 5475 5912 setring s; 5476 5913 def I=imap(r,I); 5477 def S=absPrimdecGTZ (I);5914 def S=absPrimdecGTZ_i(patchPrimaryDecomposition,I); 5478 5915 setring S; 5479 5916 ring r1=char(basering),var(nvars(r)+1),dp; … … 5514 5951 if(minpoly!=0) 5515 5952 { 5516 //return(algeDeco (i,0));5953 //return(algeDeco_i(patchPrimaryDecomposition,I,0)); 5517 5954 ERROR( 5518 5955 "// Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal" … … 5521 5958 def R=basering; 5522 5959 int n=nvars(R); 5523 list L=decomp(I,3); 5960 list L=decomp_i(patchPrimaryDecomposition,I,3); 5961 if (patchPrimaryDecomposition && size(L)==0 ) 5962 { 5963 ERROR("will not handle case with unit ideal"); 5964 } 5524 5965 string newvar=L[1][3]; 5525 5966 int k=find(newvar,",",find(newvar,",")+1); … … 5578 6019 export(absolute_primes); 5579 6020 setring R; 5580 dbprint( printlevel-voice+ 3,"6021 dbprint( printlevel-voice+4," 5581 6022 // 'absPrimdecGTZ' created a ring, in which two lists absolute_primes (the 5582 6023 // absolute prime components) and primary_decomp (the primary and prime … … 5588 6029 return(Rz); 5589 6030 } 5590 example 5591 { "EXAMPLE:"; echo = 2; 5592 ring r = 0,(x,y,z),lp; 5593 poly p = z2+1; 5594 poly q = z3+2; 5595 ideal i = p*q^2,y-z2; 5596 def S = absPrimdecGTZ(i); 5597 setring S; 5598 absolute_primes; 5599 } 6031 5600 6032 5601 6033 /////////////////////////////////////////////////////////////////////////////// 5602 5603 proc primdecSY(ideal i, list #) 5604 "USAGE: primdecSY(I, c); I ideal, c int (optional) 6034 proc primdecSYE(ideal I, list #) 6035 "USAGE: primdecSYE(I, c); I ideal, c int (optional) 5605 6036 RETURN: a list pr of primary ideals and their associated primes: 5606 6037 @format … … 5608 6039 pr[i][2] the i-th prime component. 5609 6040 @end format 6041 If I is the unit ideal returns an empty list. 5610 6042 NOTE: Algorithm of Shimoyama/Yokoyama. 5611 6043 @format … … 5623 6055 " 5624 6056 { 6057 return (primdecSY_i(int(1),I,#)); 6058 } 6059 example 6060 { "EXAMPLE:"; echo = 2; 6061 ring r = 0,(x,y,z),lp; 6062 poly p = z2+1; 6063 poly q = z3+2; 6064 ideal I = p*q^2,y-z2; 6065 list pr = primdecSYE(I); 6066 pr; 6067 ideal J = x; 6068 list prUnit = primdecSYE(J); 6069 prUnit; 6070 } 6071 6072 proc primdecSY( ideal I, list #) 6073 "USAGE: primdecSY(I, c); I ideal, c int (optional) 6074 RETURN: a list pr of primary ideals and their associated primes for proper ideal I, otherwise pr[1] is list( ideal(1),ideal(1) )' 6075 @format 6076 pr[i][1] the i-th primary component, 6077 pr[i][2] the i-th prime component. 6078 @end format 6079 NOTE: deprecated. Use 'primdecSYE()'. 6080 Algorithm of Shimoyama/Yokoyama. 6081 @format 6082 if c=0, the given ordering of the variables is used, 6083 if c=1, minAssChar tries to use an optimal ordering (default), 6084 if c=2, minAssGTZ is used, 6085 if c=3, minAssGTZ and facstd are used. 6086 @end format 6087 For local orderings, the result is considered in the localization 6088 of the polynomial ring, not in the power series ring. 6089 For local and mixed orderings, the decomposition in the 6090 corresponding global ring is returned if the string 'global' 6091 is specified as third argument 6092 EXAMPLE: example primdecSY; shows an example 6093 " 6094 { 6095 return (primdecSY_i(int(0),I,#)); 6096 } 6097 example 6098 { "EXAMPLE:"; echo = 2; 6099 ring r = 0,(x,y,z),lp; 6100 poly p = z2+1; 6101 poly q = z3+2; 6102 ideal i = p*q^2,y-z2; 6103 list pr = primdecSY(i); 6104 pr; 6105 } 6106 6107 6108 static proc primdecSY_i(int patchPrimaryDecomposition, ideal i, list #) 6109 { 6110 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6111 // since the unit ideal it is not prime, otherwise take no special action. 6112 // For other paremetes see 'primdecSY' or 'primdecSYE' 5625 6113 ASSUME(0, hasFieldCoefficient(basering) ); 5626 6114 ASSUME(0, not isQuotientRing(basering) ) ; … … 5638 6126 ideal i=imap(r,i); 5639 6127 // decompose and go back 5640 list li=primdecSY(i); 6128 list li=primdecSY_i(patchPrimaryDecomposition,i); 6129 int sizeli = size(li); 5641 6130 setring r; 6131 if (sizeli==0) { return ( list() ); } 5642 6132 def li=imap(s,li); 5643 6133 // clean up … … 5656 6146 } 5657 6147 i=simplify(i,2); 5658 if ((i[1]==0)||(i[1]==1)) 6148 6149 //if ((i[1]==0)||(i[1]==1)) // would not work anyway, since i cannot be assumed to be in standard basis form; 6150 // // but why return list(1,1) in case i=1 ?? 6151 if ( (i[1]==0) ) 6152 5659 6153 { 5660 list L =list(ideal(i[1]),ideal(i[1]));6154 list L = list(ideal(i[1]), ideal(i[1]) ); 5661 6155 return(list(L)); 5662 6156 } … … 5664 6158 if(minpoly!=0) 5665 6159 { 5666 return(algeDeco (i,1));6160 return(algeDeco_i(patchPrimaryDecomposition,i,1)); 5667 6161 } 5668 6162 if (size(#)!=0) 5669 { return(prim_dec (i,#[1])); }6163 { return(prim_dec_i(patchPrimaryDecomposition,i,#[1])); } 5670 6164 else 5671 { return(prim_dec(i,1)); } 5672 } 5673 example 5674 { "EXAMPLE:"; echo = 2; 5675 ring r = 0,(x,y,z),lp; 5676 poly p = z2+1; 5677 poly q = z3+2; 5678 ideal i = p*q^2,y-z2; 5679 list pr = primdecSY(i); 5680 pr; 5681 } 5682 /////////////////////////////////////////////////////////////////////////////// 5683 proc minAssGTZ(ideal i,list #) 5684 "USAGE: minAssGTZ(I[, l]); I ideal, l list (optional) 6165 { return(prim_dec_i(patchPrimaryDecomposition,i,1)); } 6166 } 6167 6168 6169 6170 proc minAssGTZE(ideal I,list #) 6171 "USAGE: minAssGTZE(I[, l]); I ideal, l list (optional) 5685 6172 @* Optional parameters in list l (can be entered in any order): 5686 6173 @* 0, \"facstd\" -> uses facstd to first decompose the ideal (default) … … 5697 6184 corresponding global ring is returned if the string 'global' 5698 6185 is specified as second argument 6186 EXAMPLE: example minAssGTZE; shows an example 6187 " 6188 { 6189 list result = minAssGTZ_i(int(1),I,#); 6190 return(result); 6191 6192 } 6193 example 6194 { "EXAMPLE:"; echo = 2; 6195 ring r = 0,(x,y,z),dp; 6196 poly p = z2+1; 6197 poly q = z3+2; 6198 ideal I = p*q^2,y-z2; 6199 list pr = minAssGTZE(I); 6200 pr; 6201 ideal J = 1; 6202 list prempty = minAssGTZE(J); 6203 prempty; 6204 6205 } 6206 6207 6208 proc minAssGTZ(ideal I,list #) 6209 "USAGE: minAssGTZ(I[, l]); I ideal, l list (optional) 6210 @* Optional parameters in list l (can be entered in any order): 6211 @* 0, \"facstd\" -> uses facstd to first decompose the ideal (default) 6212 @* 1, \"noFacstd\" -> does not use facstd 6213 @* \"GTZ\" -> the original algorithm by Gianni, Trager and Zacharias is used 6214 @* \"SL\" -> GTZ algorithm with modificiations by Laplagne is used (default) 6215 6216 RETURN: a list, the minimal associated prime ideals of proper ideal I, otherwise ideal(1) 6217 NOTE: deprecated. Use 'minAssGTZE()'. 6218 - Designed for characteristic 0, works also in char k > 0 based 6219 on an algorithm of Yokoyama 6220 - For local orderings, the result is considered in the localization 6221 of the polynomial ring, not in the power series ring 6222 - For local and mixed orderings, the decomposition in the 6223 corresponding global ring is returned if the string 'global' 6224 is specified as second argument 5699 6225 EXAMPLE: example minAssGTZ; shows an example 5700 6226 " 5701 6227 { 6228 list result = minAssGTZ_i(int(0),I,#); 6229 return(result); 6230 } 6231 example 6232 { "EXAMPLE:"; echo = 2; 6233 ring r = 0,(x,y,z),dp; 6234 poly p = z2+1; 6235 poly q = z3+2; 6236 ideal i = p*q^2,y-z2; 6237 list pr = minAssGTZ(i); 6238 pr; 6239 } 6240 6241 6242 /////////////////////////////////////////////////////////////////////////////// 6243 static proc minAssGTZ_i(int patchPrimaryDecomposition, ideal i,list #) 6244 { 6245 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6246 // since the unit ideal it is not prime, otherwise take no special action. 6247 // For other parameters see 'minAssGTZ' or 'minAssGTZE' 5702 6248 ASSUME(0, hasFieldCoefficient(basering) ); 5703 6249 ASSUME(0, not isQuotientRing(basering) ) ; … … 5716 6262 ideal i=imap(r,i); 5717 6263 // decompose and go back 5718 list li=minAssGTZ(i); 6264 list li=minAssGTZ_i(patchPrimaryDecomposition,i); 6265 int sizeli = size(li); 5719 6266 setring r; 6267 if (sizeli==0) { return(list()); } 5720 6268 def li=imap(s,li); 5721 6269 // clean up … … 5775 6323 if(minpoly!=0) 5776 6324 { 5777 return(algeDeco (i,2));5778 } 5779 5780 list result = minAssPrimes (i, facstdOption, algorithm);6325 return(algeDeco_i(patchPrimaryDecomposition,i,2)); 6326 } 6327 6328 list result = minAssPrimes_i(patchPrimaryDecomposition,i, facstdOption, algorithm); 5781 6329 return(result); 6330 } 6331 6332 6333 /////////////////////////////////////////////////////////////////////////////// 6334 proc minAssCharE(ideal I, list #) 6335 "USAGE: minAssCharE(I[,c]); i ideal, c int (optional). 6336 RETURN: list, the minimal associated prime ideals of I. If I is the unit ideal returns an empty list. 6337 NOTE: If c=0, the given ordering of the variables is used. @* 6338 Otherwise, the system tries to find an optimal ordering, 6339 which in some cases may considerably speed up the algorithm. @* 6340 For local orderings, the result is considered in the localization 6341 of the polynomial ring, not in the power series ring 6342 For local and mixed orderings, the decomposition in the 6343 corresponding global ring is returned if the string 'global' 6344 is specified as third argument 6345 EXAMPLE: example minAssCharE; shows an example 6346 " 6347 { 6348 return(minAssChar_i(int(1),I,#)); 5782 6349 } 5783 6350 example … … 5786 6353 poly p = z2+1; 5787 6354 poly q = z3+2; 5788 ideal i= p*q^2,y-z2;5789 list pr = minAss GTZ(i);6355 ideal I = p*q^2,y-z2; 6356 list pr = minAssCharE(I); 5790 6357 pr; 5791 } 5792 5793 /////////////////////////////////////////////////////////////////////////////// 5794 proc minAssChar(ideal i, list #) 6358 ideal J = 5; 6359 list prempty = minAssCharE(J); 6360 prempty; 6361 } 6362 6363 proc minAssChar(ideal I, list #) 5795 6364 "USAGE: minAssChar(I[,c]); i ideal, c int (optional). 5796 RETURN: list, the minimal associated prime ideals of i. 5797 NOTE: If c=0, the given ordering of the variables is used. @* 6365 RETURN: list, the minimal associated prime ideals of I. If I is the unit ideal returns list( ideal(1) ) 6366 NOTE: deprecated. Use 'minAssCharE'. 6367 If c=0, the given ordering of the variables is used. @* 5798 6368 Otherwise, the system tries to find an optimal ordering, 5799 6369 which in some cases may considerably speed up the algorithm. @* … … 5805 6375 EXAMPLE: example minAssChar; shows an example 5806 6376 " 5807 { 6377 { 6378 return(minAssChar_i(int(0),I,#)); 6379 } 6380 example 6381 { "EXAMPLE:"; echo = 2; 6382 ring r = 0,(x,y,z),dp; 6383 poly p = z2+1; 6384 poly q = z3+2; 6385 ideal i = p*q^2,y-z2; 6386 list pr = minAssChar(i); 6387 pr; 6388 } 6389 6390 proc minAssChar_i(int patchPrimaryDecomposition, ideal i, list #) 6391 { 6392 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 6393 // since the unit ideal it is not prime, otherwise take no special action. 6394 // For other parameters see 'minAssChar' or 'minAssCharE' 5808 6395 ASSUME(0, hasFieldCoefficient(basering) ); 5809 6396 ASSUME(0, not isQuotientRing(basering) ) ; 6397 ASSUME(0,size(#)<3); 5810 6398 if(size(#)>1) 5811 6399 { … … 5821 6409 ideal i=imap(r,i); 5822 6410 // decompose and go back 5823 list li=minAssChar(i); 6411 list li=minAssChar_i(patchPrimaryDecomposition,i); 6412 int sizeli = size(li); 5824 6413 setring r; 6414 if (sizeli==0) { return(list()); } 5825 6415 def li=imap(s,li); 5826 6416 // clean up … … 5839 6429 } 5840 6430 if (size(#)>0) 5841 { return(min_ass_prim_charsets (i,#[1])); }6431 { return(min_ass_prim_charsets_i(patchPrimaryDecomposition,i,#[1])); } 5842 6432 else 5843 { return(min_ass_prim_charsets(i,1)); } 5844 } 5845 example 5846 { "EXAMPLE:"; echo = 2; 5847 ring r = 0,(x,y,z),dp; 5848 poly p = z2+1; 5849 poly q = z3+2; 5850 ideal i = p*q^2,y-z2; 5851 list pr = minAssChar(i); 5852 pr; 5853 } 6433 { return(min_ass_prim_charsets_i(patchPrimaryDecomposition,i,1)); } 6434 } 6435 5854 6436 /////////////////////////////////////////////////////////////////////////////// 5855 6437 proc equiRadical(ideal i) … … 6479 7061 // Given an ideal I and an ideal P (intersection of some minimal prime ideals 6480 7062 // associated to I), it calculates the intersection of new minimal prime ideals 6481 // associated to I which where not used to calculate P. 7063 // associated to I which where not used to calculate P. P = 1 represents empty intersection. 6482 7064 // This version uses ZD Radical in the zerodimensional case. 6483 7065 static proc radicalSLIteration (ideal I, ideal P); … … 6746 7328 } 6747 7329 7330 7331 proc testPrimaryE(list pr, ideal k) 7332 "USAGE: testPrimaryE(pr,k); pr a list, k an ideal. 7333 ASSUME: pr is the result of a primary decomposition and may be empty ( for the unit ideal) 7334 RETURN: int, 1 if the intersection of the ideals in pr is k, 0 if not 7335 EXAMPLE: example testPrimaryE; shows an example 7336 " 7337 { 7338 return(testPrimary_i(int(1),pr,k)); 7339 } 7340 example 7341 { "EXAMPLE:"; echo = 2; 7342 ring r = 32003,(x,y,z),dp; 7343 poly p = z2+1; 7344 poly q = z4+2; 7345 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 7346 list pr = primdecGTZ(i); 7347 testPrimaryE(pr,i); 7348 } 7349 6748 7350 proc testPrimary(list pr, ideal k) 6749 7351 "USAGE: testPrimary(pr,k); pr a list, k an ideal. 6750 7352 ASSUME: pr is the result of primdecGTZ(k) or primdecSY(k). 6751 7353 RETURN: int, 1 if the intersection of the ideals in pr is k, 0 if not 7354 NOTE: deprecated. Use 'testPrimaryE()' 6752 7355 EXAMPLE: example testPrimary; shows an example 6753 7356 " 6754 7357 { 6755 ASSUME(0, hasFieldCoefficient(basering) ); 6756 ASSUME(0, not isQuotientRing(basering) ) ; 6757 6758 int i; 6759 pr=reconvList(pr); 6760 ideal j=pr[1]; 6761 for (i=2;i<=size(pr) div 2;i++) 6762 { 6763 j=intersect(j,pr[2*i-1]); 6764 } 6765 return(idealsEqual(j,k)); 7358 return(testPrimary_i(int(0),pr,k)); 6766 7359 } 6767 7360 example … … 6774 7367 testPrimary(pr,i); 6775 7368 } 7369 7370 7371 static proc testPrimary_i(int patchPrimaryDecomposition,list pr, ideal k) 7372 { 7373 // if patchPrimaryDecomposition=1, handle the case of an empty decomposition list. 7374 // For other parameters see 'testPrimary' 7375 ASSUME(0, hasFieldCoefficient(basering) ); 7376 ASSUME(0, not isQuotientRing(basering) ) ; 7377 7378 int i; 7379 pr=reconvList(pr); 7380 if (patchPrimaryDecomposition==1) 7381 { 7382 if (idealsEqual( k, ideal(1)) ) 7383 { 7384 return( size(pr)==0 ); //list expected to be empty. 7385 } 7386 } 7387 ideal j=pr[1]; 7388 7389 7390 for (i=2;i<=size(pr) div 2;i++) 7391 { 7392 j=intersect(j,pr[2*i-1]); 7393 } 7394 return(idealsEqual(j,k)); 7395 } 7396 6776 7397 6777 7398 /////////////////////////////////////////////////////////////////////////////// … … 6790 7411 ASSUME(0, hasFieldCoefficient(basering) ); 6791 7412 ASSUME(0, not isQuotientRing(basering) ) ; 7413 ASSUME(2, dim(groebner(I))==1 ); 6792 7414 if(attrib(basering,"global")!=1) 6793 7415 { … … 6892 7514 pr; 6893 7515 } 7516 7517 7518 static proc newDecompStepE(ideal I, list #) 7519 { 7520 return(newDecompStep_i(int(1),I,#)); 7521 } 7522 7523 static proc newDecompStep(ideal I, list #) 7524 { 7525 return(newDecompStep_i(int(0),I,#)); 7526 } 7527 6894 7528 /////////////////////////////////////////////////////////////////////////////// 6895 static proc newDecompStep (ideal i, list #)6896 "USAGE: newDecompStep (i); iideal (for primary decomposition)6897 newDecompStep (i,1); (for the associated primes of dimension of i)6898 newDecompStep (i,2); (for the minimal associated primes)6899 newDecompStep (i,3); (for the absolute primary decomposition (not tested!))7529 static proc newDecompStep_i(int patchPrimaryDecomposition, ideal i, list #) 7530 "USAGE: newDecompStep_i(patchPrimaryDecomposition, I); I ideal (for primary decomposition) 7531 newDecompStep_i(patchPrimaryDecomposition, I,1); (for the associated primes of dimension of i) 7532 newDecompStep_i(patchPrimaryDecomposition, I,2); (for the minimal associated primes) 7533 newDecompStep_i(patchPrimaryDecomposition, I,3); (for the absolute primary decomposition (not tested!)) 6900 7534 "oneIndep"; (for using only one max indep set) 6901 7535 "intersect"; (returns alse the intersection of the components founded) … … 6905 7539 (resp. a list of the minimal associated primes) 6906 7540 NOTE: Algorithm of Gianni/Trager/Zacharias 7541 if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 7542 since the unit ideal it is not prime, otherwise take no special action. 6907 7543 EXAMPLE: example newDecompStep; shows an example 6908 7544 " … … 7145 7781 @j=simplify(@j, 2); 7146 7782 attrib(@j,"isSB",1); 7147 result = newDecompStep (@j, indepOption, intersectOption, @wr);7783 result = newDecompStep_i(patchPrimaryDecomposition, @j, indepOption, intersectOption, @wr); 7148 7784 if (intersectOption == "intersect") 7149 7785 { … … 7753 8389 { 7754 8390 // The following line was dropped to avoid the recursion step: 7755 //htprimary=newDecompStep (@j,@wr,peek,ser);8391 //htprimary=newDecompStep_i(patchPrimaryDecomposition, @j,@wr,peek,ser); 7756 8392 htprimary = list(); 7757 8393 } … … 7759 8395 { 7760 8396 // The following line was dropped to avoid the recursion step: 7761 //htprimary=newDecompStep (@j,peek,ser);8397 //htprimary=newDecompStep_i(patchPrimaryDecomposition,@j,peek,ser); 7762 8398 htprimary = list(); 7763 8399 } … … 7810 8446 poly p = z2+1; 7811 8447 poly q = z4+2; 7812 ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 7813 list pr= newDecompStep(i); 8448 ideal I = p^2*q^3,(y-z3)^3,(x-yz+z4)^4; 8449 int patchDecomposition = 1; 8450 list pr = newDecompStep_i(patchDecomposition, I); 7814 8451 pr; 7815 testPrimary( pr, i);8452 testPrimary( pr, I); 7816 8453 } 7817 8454 … … 8090 8727 /////////////////////////////////////////////////////////////////////////////// 8091 8728 // Based on minAssGTZ 8092 8093 proc minAss(ideal i,list #) 8094 "USAGE: minAss(I[, l]); i ideal, l list (optional) of parameters, same as minAssGTZ 8729 proc minAssE(ideal I,list #) 8730 "USAGE: minAssE(I[, l]); I ideal, l list (optional) of parameters, same as minAssGTZ 8095 8731 RETURN: a list, the minimal associated prime ideals of I. 8096 8732 NOTE: Designed for characteristic 0, works also in char k > 0 based 8097 8733 on an algorithm of Yokoyama 8734 EXAMPLE: example minAssE; shows an example 8735 " 8736 { 8737 return(minAss_i(int(1),I,#)); 8738 } 8739 example 8740 { "EXAMPLE:"; echo = 2; 8741 ring r = 0, (x, y, z), dp; 8742 poly p = z2 + 1; 8743 poly q = z3 + 2; 8744 ideal i = p * q^2, y - z2; 8745 list pr = minAssE(i); 8746 pr; 8747 ideal j = 1; 8748 list prempty = minAssE(j); 8749 prempty; 8750 } 8751 8752 proc minAss(ideal I,list #) 8753 "USAGE: minAss(I[, l]); I ideal, l list (optional) of parameters, same as minAssGTZ 8754 RETURN: a list, the minimal associated prime ideals of I. If I is the unit ideal, returns list(ideal(1)); 8755 NOTE: deprecated. Use 'minAssE()'. 8756 Designed for characteristic 0, works also in char k > 0 based 8757 on an algorithm of Yokoyama 8098 8758 EXAMPLE: example minAss; shows an example 8099 8759 " 8100 8760 { 8101 return(minAssGTZ(i,#));8761 return(minAss_i(int(0),I,#)); 8102 8762 } 8103 8763 example … … 8111 8771 } 8112 8772 8773 static proc minAss_i(int patchPrimaryDecomposition,ideal I,list #) 8774 { 8775 // if patchPrimaryDecomposition=1, drop the unit ideal in the decomposition, 8776 // since the unit ideal it is not prime, otherwise take no special action. 8777 // For other parameters see 'minAss' or 'minAssE' 8778 return(minAssGTZ_i(patchPrimaryDecomposition,I,#)); 8779 } 8780 8781 8113 8782 8114 8783 /////////////////////////////////////////////////////////////////////////////// … … 8165 8834 // Given an ideal I and an ideal P (intersection of some minimal prime ideals 8166 8835 // associated to I), it calculates new minimal prime ideals associated to I 8167 // which were not used to calculate P. 8836 // which were not used to calculate P. P = 1 represents empty intersetion. 8168 8837 // This version uses Primary Decomposition in the zerodimensional case. 8169 8838 static proc minAssSLIteration(ideal I, ideal P); … … 8199 8868 dbprint(printlevel - voice, "// We do the reduction to the zerodimensional case, via decomp."); 8200 8869 8201 primaryDec = newDecompStep (J, "oneIndep", "intersect", 2);8870 primaryDec = newDecompStep_i( int(1), J, "oneIndep", "intersect", 2); 8202 8871 // Debug 8203 8872 dbprint(printlevel - voice, "// Proc decomp has found", size(primaryDec) div 2, "new primary components."); … … 8349 9018 if (dim(j)>0) 8350 9019 { 9020 ERROR("dim(j)>0 . Please send the failing example to the authors"); 8351 9021 primary[1]=ideal(1); 8352 9022 primary[2]=ideal(1); … … 8404 9074 if((size(ser)>0)&&(size(reduce(ser,j,1))==0)) 8405 9075 { 9076 ERROR("dim(j)==-1 unexpected. Please send the failing example to the authors"); 8406 9077 primary[1]=ideal(1); 8407 9078 primary[2]=ideal(1); … … 8410 9081 if(dim(j)==-1) 8411 9082 { 9083 ERROR("dim(j)==-1 unexpected. Please send the failing example to the authors"); 8412 9084 primary[1]=ideal(1); 8413 9085 primary[2]=ideal(1); … … 8428 9100 else 8429 9101 { 9102 ERROR("failure in newZero_decomp. Please send the failing example to the authors"); 8430 9103 primary[1]=ideal(1); 8431 9104 primary[2]=ideal(1); … … 8439 9112 if(size(#)>1) 8440 9113 { 9114 ERROR("failure in newZero_decomp. Please send the failing example to the authors"); 8441 9115 primary[1]=ideal(1); 8442 9116 primary[2]=ideal(1); … … 8492 9166 } 8493 9167 8494 if((voice>= 6)&&(char(basering)<=181))9168 if((voice>=7)&&(char(basering)<=181)) 8495 9169 { 8496 9170 primary=splitCharp(primary); 8497 9171 } 8498 9172 8499 if((@wr==2)&&(npars(basering)>0)&&(voice>= 6)&&(char(basering)>0))9173 if((@wr==2)&&(npars(basering)>0)&&(voice>=7)&&(char(basering)>0)) 8500 9174 { 8501 9175 //the prime decomposition of Yokoyama in characteristic p … … 8507 9181 if(size(primary[2*@k])==0) 8508 9182 { 8509 ek=insepDecomp (primary[2*@k-1]);9183 ek=insepDecomp_i(int(1), primary[2*@k-1]); 8510 9184 primary=delete(primary,2*@k); 8511 9185 primary=delete(primary,2*@k-1); -
Singular/LIB/ring.lib
r3176e6 ra6d6356 33 33 isQuotientRing(rng) ring is a qotient ring 34 34 isSubModule(I,J) check if I is in J as submodule 35 36 changeordTo(r,o) change the ordering of a ring to a simple one 37 addvarsTo(r,vars,i) add variables to a ring 38 addNvarsTo(r,N,name,i) add N variables to a ring 35 39 "; 36 40 … … 1113 1117 1114 1118 proc changeordTo(def r,string o) 1119 "USAGE: changeordTo(ring, string s); 1120 RETURN: a ring with the oderinging changed to the (simple) ordering s 1121 EXAMPLE: example changeordTo(); shows an example 1122 " 1115 1123 { 1116 1124 list rl=ringlist(r); … … 1121 1129 example 1122 1130 { 1131 "EXAMPLE:"; echo = 2; 1123 1132 ring r=0,(x,y),lp; 1124 def rr=changeordTo Cdp(r,"dp");1133 def rr=changeordTo(r,"dp"); 1125 1134 rr; 1126 1135 } 1127 1136 1137 proc addvarsTo(def r,list vars,int blockorder) 1138 "USAGE: addvarsTo(ring,list_of_strings, int); 1139 int may be: 0:ordering: dp 1140 1:ordering dp,dp 1141 2:oring.ordering,dp 1142 RETURN: a ring with the addtional variables 1143 EXAMPLE: example addvarsTo(); shows an example 1144 " 1145 { 1146 list rl=ringlist(r); 1147 int n=nvars(r); 1148 rl[2]=rl[2]+vars; 1149 if (blockorder==0) 1150 { 1151 rl[3]=list(list("C",0),list("dp",1:(nvars(r)+size(vars)))); 1152 } 1153 else 1154 { 1155 if (blockorder==2) 1156 { 1157 rl[3]=rl[3]+list(list("dp",1:size(vars))); 1158 } 1159 else 1160 { 1161 rl[3]=list(list("C",0),list("dp",1:nvars(r)),list("dp",1:size(vars))); 1162 } 1163 } 1164 def rr=ring(rl); 1165 return(rr); 1166 } 1167 example 1168 { 1169 "EXAMPLE:"; echo = 2; 1170 ring r=0,(x,y),lp; 1171 def rr=addvarsTo(r,list("a","b"),0); 1172 rr; kill rr; 1173 def rr=addvarsTo(r,list("a","b"),1); 1174 rr; kill rr; 1175 def rr=addvarsTo(r,list("a","b"),2); 1176 rr; 1177 } 1178 proc addNvarsTo(def r,int N,string n,int blockorder) 1179 "USAGE: addNvarsTo(ring,int N, string name, int b); 1180 b may be: 0:ordering: dp 1181 1:ordering dp,dp 1182 2:oring.ordering,dp 1183 RETURN: a ring with N addtional variables 1184 EXAMPLE: example addNvarsTo(); shows an example 1185 " 1186 { 1187 list v; 1188 for(int i=N;i>0;i--) { v[i]=n+"("+string(i)+")"; } 1189 return(addvarsTo(r,v,blockorder)); 1190 } 1191 example 1192 { 1193 "EXAMPLE:"; echo = 2; 1194 ring r=0,(x,y),lp; 1195 def rr=addNvarsTo(r,2,"@",0); 1196 rr; kill rr; 1197 def rr=addNvarsTo(r,2,"@",1); 1198 rr; kill rr; 1199 def rr=addNvarsTo(r,2,"@",2); 1200 rr; 1201 } -
Singular/LIB/rinvar.lib
r3176e6 ra6d6356 34 34 LIB "elim.lib"; 35 35 LIB "zeroset.lib"; 36 LIB "ring.lib"; 36 37 37 38 /////////////////////////////////////////////////////////////////////////////// … … 286 287 int i, dbPrt, nrNewVars; 287 288 intvec wt, wth, hs1; 288 string ringSTR1, ringSTR2, order;289 290 289 def RARB = basering; 291 nrNewVars = size(F);290 nrNewVars = ncols(F); 292 291 293 292 dbPrt = printlevel-voice+2; … … 299 298 300 299 string @mPoly = string(minpoly); 301 order = "(dp(" + string(nvars(basering)) + "), dp);"; 302 ringSTR1 = "ring RAR1 = (" + charstr(basering) + "), (" + varstr(basering) + ", Y(1.." + string(nrNewVars) + ")), " + order; 303 ringSTR2 = "ring RAR2 = (" + charstr(basering) + "), Y(1.." + string(nrNewVars) + "), dp;"; 304 execute(ringSTR1); 305 execute("minpoly = number(" + @mPoly + ");"); 300 def RAR1=addNvarsTo(basering,nrNewVars,"Y",1); setring RAR1; 301 string ringSTR2 = "ring RAR2 = (" + charstr(basering) + "), Y(1.." + string(nrNewVars) + "), dp;"; 306 302 307 303 ideal I, J1, J2, Fm; -
Singular/LIB/sagbi.lib
r3176e6 ra6d6356 31 31 LIB "toric.lib"; 32 32 LIB "algebra.lib"; 33 LIB "ring.lib"; 33 34 ////////////////////////////////////////////////////////////////////////////// 34 35 … … 1111 1112 1112 1113 //------------- change the basering bsr to bsr[@(0),...,@(z)] ---------- 1113 execute("ring s=("+charstr(basering)+"),("+varstr(basering)+",@(0..z)),dp;");1114 def s=addNvarsTo(basering,z+1,,"@",0); setring s; 1114 1115 // Ev hier die Reihenfolge der Vars aendern. Dazu muss unten aber entsprechend 1115 1116 // geaendert werden: -
Singular/LIB/solve.lib
r3176e6 ra6d6356 23 23 24 24 LIB "triang.lib"; // needed for triang_solve 25 LIB "ring.lib"; // needed for changeordTo 25 26 26 27 /////////////////////////////////////////////////////////////////////////////// … … 692 693 if (sb==0) 693 694 { 694 execute("ring dphom=("+charstr(rin)+"),("+ 695 varstr(rin)+"),dp;"); 695 def dphom=changeordTo(rin,"dp"); setring dphom; 696 696 ideal G = std(imap(rin,G)); 697 697 if (dim(G)!=0){ERROR("ideal not zero-dimensional");} … … 736 736 if (sb==0) 737 737 { 738 execute("ring dphilb=("+charstr(rin)+"),("+ varstr(rin)+"),dp;");738 def dphilb=changeordTo(rin,"dp"); setring dphilb; 739 739 ideal G = imap(rin,G); 740 740 G = std(G); … … 747 747 attrib(G,"isSB",1); 748 748 } 749 execute("ring lexhilb=("+charstr(rin)+"),("+ varstr(rin)+"),lp;");749 def lexhilb=changeordTo(rin,"lp"); setring lexhilb; 750 750 option(redTail); 751 751 ideal H = fglm(dphilb,G); … … 755 755 else 756 756 { 757 execute("ring lplex=("+charstr(rin)+"),("+varstr(rin)+"),lp;");757 def lplex=changeordTo(rin,"lp"); setring lplex; 758 758 } 759 759 ideal H = imap(lexhilb,H); -
Singular/subexpr.cc
r3176e6 ra6d6356 1807 1807 else 1808 1808 { 1809 sleftv tmp; 1809 sleftv tmp; tmp.Init(); 1810 1810 int toktype=iiTokType(d->op); 1811 1811 if ((toktype==CMD_M) -
Tst/Short.lst
r0cf4e1 ra6d6356 275 275 Short/string.tst 276 276 Short/test_c_dp.tst 277 Short/test_unit_ideal_decomposition.tst 278 Short/test_zero_ideal_decomposition.tst 277 279 Short/triang_s.tst 278 280 ; Short/tropical.tst ;; too long ? -
Tst/Short/bug_529.res.gz.uu
r0cf4e1 ra6d6356 1 begin 640 bug_529.res.gz 2 M'XL("-2^1U0``V)U9U\U,CDN<F5S`'5276O",!1][Z^XZ!X2UU53=7YA<9LO 3 MA3$$!SZ(2&VC9-.T)I&5C?WW7:NV=6R!)">Y'^?<Y$Y?Q_X+`#`/GOU'J!AM 4 MG*U850;6]&QQ/<#+I9#"$#JPCCMX'JP.FV7;[3F2?SC:!";W;WJ0XY8#<6)$ 5 M+,E'H"0MDK8S.E))E-A%/,PH2^;[4HZ.`XF*0]@)^:#U!`.XGI&(K\&GN5/7 6 M@:_\T'-P`<7-04DR.3'T^^5XXE.@D/,QYL!W?G`+<M8\DV.58Q[&NV1J>#(C 7 M(N+!%H0-6Z$-5',=K%72P=I_ZKA*17R[>BVE4Y;2+4G!JI20&U`XAZ1!;9*& 8 M=KJQTSW"*"%-:C\53^@V/#BI]&$(Z1X]"QM^]J^"?(RLUZ%6`R%#Q0/-S]$, 9 M[CQP\18N8ZT$C^9:?'*207K+%L/1VWSTOAA8<[;H6^BT1#!,]R?H(MQ8N/UG 10 MNNC"E[_^Y0X=@)4%L-RIU%]NT5\RONXPMWUJVV-K'C1AF.C&^@%^+>\)[0(` 11 !```` 1 begin 644 bug_529.res.gz 2 M'XL(",S/5U0``V)U9U\U,CDN<F5S`'526VO",!1^[Z\XZ!X2UU53[;QA<9LO 3 MA3$$!SZ(B+91LFE:D\C*QO[[CK=>QA9(\B7G\GTG.9/74?`"`,R'Y^`1*D8; 4 M9RM6E;XUN5A<'_!R(:0PA/:MXPZ^#ZO#9N&Y74?R#T>;I<G\FSYDN.5`G!@1 5 M2_*Q5)+F2;T3':DD2NPB'IXH"^;[0HZV`XF*0]@)^:#U&`.XGI*(KR&@F5/' 6 M@:_LT'5P`<7-04DR/C/T>L5X$E"@D/$QYL!W=G!S<M:\D&.5(Q[&NV1B>#(E 7 M(N+++0@;MD(;J&8Z6*N@@WE_ZBBE(H%=+4MI%Z5T"E*P*B7D!A3.`6E0FZ2A 8 MG6[L=(\P2DB3VD_Y$[H-'\XJ`QA`ND?/W(:?_:N@`"/K=:C50,A0\:7FEV@& 9 M=SZX>`O7L5:"1S,M/CDY07K+YH/AVVSX/N];,S;O6>BT0#!(]V?H(MQ8N/UG 10 MNNK"ER__<IOVH9R39<Z%/G/S/I-QN=-<[]R^QQ8]:,(PX8WU`\[8'TSU`@`` 12 11 ` 13 12 end -
Tst/Short/bug_529.stat
r0cf4e1 ra6d6356 1 1 >> tst_memory_0 :: 140 7244027:4.0.0, 64 bit:4.0.0:x86_64-Linux:nepomuck:2926082 1 >> tst_memory_1 :: 140 7244027:4.0.0, 64 bit:4.0.0:x86_64-Linux:nepomuck:23265283 1 >> tst_memory_2 :: 140 7244027:4.0.0, 64 bit:4.0.0:x86_64-Linux:nepomuck:23797764 1 >> tst_timer_1 :: 140 7244027:4.0.0, 64 bit:4.0.0:x86_64-Linux:nepomuck:21 1 >> tst_memory_0 :: 1408579461:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:259776 2 1 >> tst_memory_1 :: 1408579461:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2338816 3 1 >> tst_memory_2 :: 1408579461:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2387344 4 1 >> tst_timer_1 :: 1408579461:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:4 -
Tst/Short/ok_s.lst
r3176e6 ra6d6356 30 30 bug_tr671 31 31 bug_tr679 32 bug_tr686 32 33 bug_genus_etc 33 34 facstd -
libpolys/coeffs/longrat.cc
r3176e6 ra6d6356 345 345 if ( SR_HDL(n) & SR_INT ) 346 346 { 347 int nn=SR_TO_INT(n); 348 if ((long)nn==SR_TO_INT(n)) 349 term = nn; 350 else 351 { 352 mpz_t dummy; 353 mpz_init_set_si(dummy, SR_TO_INT(n)); 354 term = make_cf(dummy); 355 } 347 long nn=SR_TO_INT(n); 348 term = nn; 356 349 } 357 350 else -
libpolys/coeffs/rintegers.cc
r3176e6 ra6d6356 161 161 number nrzCopy(number a, const coeffs) 162 162 { 163 if (a==NULL) return NULL; 163 164 mpz_ptr erg = (mpz_ptr) omAllocBin(gmp_nrz_bin); 164 165 mpz_init_set(erg, (mpz_ptr) a); -
libpolys/polys/clapsing.cc
r3176e6 ra6d6356 154 154 if (g == NULL) 155 155 { 156 res= p_Copy (f,r); 157 p_Delete (&f, r); 156 res= f; 158 157 f=p_One (r); 159 158 return res; … … 161 160 if (f==NULL) 162 161 { 163 res= p_Copy (g,r); 164 p_Delete (&g, r); 162 res= g; 165 163 g=p_One (r); 166 164 return res; … … 172 170 { 173 171 bool b1=isOn(SW_USE_EZGCD_P); 174 setCharacteristic( rChar(r) );175 172 F=convSingPFactoryP( f,r ); 176 173 G=convSingPFactoryP( g,r );
Note: See TracChangeset
for help on using the changeset viewer.