Changeset 858cae in git for Singular/LIB/sagbi.lib
- Timestamp:
- Apr 8, 2011, 8:51:59 PM (13 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 2272157187c82cb5bd15a8c9b7faff7e3b064132
- Parents:
- 1c4a19588a624228427528fb3b86f2eb66646188
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/sagbi.lib
r1c4a19 r858cae 15 15 16 16 REFERENCES: 17 Ana Bravo: Some Facts About Canonical Subalgebra Bases, 17 Ana Bravo: Some Facts About Canonical Subalgebra Bases, 18 18 MSRI Publications 51, p. 247-254 19 19 … … 137 137 */ 138 138 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 139 dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 139 dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 140 140 def br=basering; 141 141 ideal varsBasering=maxideal(1); … … 169 169 } 170 170 //--------------- calculate kernel of Phi depending on method choosen --------------- 171 dbprint(ppl,"//Spoly-2- Groebner basis computation"); 171 dbprint(ppl,"//Spoly-2- Groebner basis computation"); 172 172 attrib(kernOld,"isSB",1); 173 173 ideal kern=stdKernPhi(kernNew,kernOld,leadTermsAlgebra,method); 174 dbprint(ppl-2,"//Spoly-2-1- ideal kern",kern); 174 dbprint(ppl-2,"//Spoly-2-1- ideal kern",kern); 175 175 //-------------------------- calulate algebraic relations ----------------------- 176 dbprint(ppl,"//Spoly-3- computing new algebraic relations"); 176 dbprint(ppl,"//Spoly-3- computing new algebraic relations"); 177 177 ideal algebraicRelations=nselect(kern,1..nvars(br)); 178 178 attrib(algebraicRelationsOld,"isSB",1); … … 201 201 */ 202 202 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 203 dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 203 dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 204 204 def br=basering; 205 205 int m=ncols(algebra); … … 241 241 ideal algebraicRelations=toric_ideal(A,"ect"); 242 242 //Suitable substitution 243 dbprint(ppl,"//Spoly-3- substitutions"); 243 dbprint(ppl,"//Spoly-3- substitutions"); 244 244 ideal leadCoefficients=fetch(br,leadCoefficients); 245 245 for (i=1; i<=m; i++) … … 250 250 } 251 251 } 252 dbprint(ppl-2,"//Spoly-3-1- algebraic relations",algebraicRelations); 252 dbprint(ppl-2,"//Spoly-3-1- algebraic relations",algebraicRelations); 253 253 export algebraicRelations; 254 254 return(rNew); … … 268 268 * algebraicDependence causes this procedure to be called with parRed<>0. The only difference when parRed<>0 269 269 * is that the reduction algorithms returns the non-zero constants it attains (instead of just returning zero as the 270 270 * correct remainder), as they will be expressions in parameters for an algebraic dependence. 271 271 */ 272 272 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 273 dbprint(ppl,"//Red-1- initialisation and precomputation"); 273 dbprint(ppl,"//Red-1- initialisation and precomputation"); 274 274 def br=basering; 275 275 int numVarsBasering=nvars(br); … … 279 279 if (numVarsBasering==nvars(r)) 280 280 { 281 281 dbprint(ppl-1,"//Red-1-1- Groebner basis computation"); 282 282 /* Case that ring r is the same ring as the basering. Using proc extendRing, 283 283 * stdKernPhi … … 315 315 for (i=1; i<=ncols(F);i++) 316 316 { 317 318 317 dbprint(ppl-1,"//Red-2-"+string(i)+"- starting with new polynomial"); 318 dbprint(ppl-2,"//Red-2-"+string(i)+"-1- Polynomial before reduction",F[i]); 319 319 normalform=0; 320 320 while (F[i]!=0) … … 325 325 //K is always contained in the subalgebra, 326 326 //thus the remainder is zero in this case 327 if (parRed) 328 { 329 330 break; 331 332 else 333 { 334 F[i]=0; 335 break; 336 327 if (parRed) 328 { 329 //If parRed<>0 save non-zero constants the reduction algorithms attains. 330 break; 331 } 332 else 333 { 334 F[i]=0; 335 break; 336 } 337 337 } 338 338 //note: as the ordering in br and r might not be compatible … … 423 423 * and iterations specifies the 424 424 * number of iterations. A degree boundary is not used here. 425 * When this method is called via the procedures sagbi and sagbiPart the integer parRed 426 * will always be zero. Only the procedure algebraicDependence calls this procedure with 427 * parRed<>0. The only difference when parRed<>0 is that the reduction algorithms returns 428 * the non-zero constants it attains (instead of just returning zero as the correct 429 * remainder), as they will be expressions in parameters for an algebraic dependence. 425 * When this method is called via the procedures sagbi and sagbiPart the integer parRed 426 * will always be zero. Only the procedure algebraicDependence calls this procedure with 427 * parRed<>0. The only difference when parRed<>0 is that the reduction algorithms returns 428 * the non-zero constants it attains (instead of just returning zero as the correct 429 * remainder), as they will be expressions in parameters for an algebraic dependence. 430 430 * These constants are saved in the ideal reducedParameters. 431 431 */ 432 432 { 433 433 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 434 dbprint(ppl,"// -0- initialisation and precomputation"); 434 dbprint(ppl,"// -0- initialisation and precomputation"); 435 435 def br=basering; 436 436 int i=1; … … 874 874 RETURN: ring 875 875 ASSUME: basering is not a qring 876 PURPOSE: Returns a ring containing the ideal @code{algDep}, which contains possibly 877 @* 878 @* iterations of the SAGBI construction algorithms. See the example on how879 @* to access these objects.876 PURPOSE: Returns a ring containing the ideal @code{algDep}, which contains possibly 877 @* some algebraic dependencies of the elements of I obtained through @code{it} 878 @* iterations of the SAGBI construction algorithms. See the example on how 879 @* to access these objects. 880 880 EXAMPLE: example algebraicDependence; shows an example" 881 881 { 882 883 884 dbprint(ppl,"//AlgDep-1- initialisation and precomputation"); 882 assumeQring(); 883 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 884 dbprint(ppl,"//AlgDep-1- initialisation and precomputation"); 885 885 def br=basering; 886 886 int i; 887 887 I=simplify(I,2); //avoid that I contains zeros 888 888 889 889 //Create two polynomial rings, which both are extensions of the current basering. 890 890 //The first ring will contain the additional paramteres @c(1),...,@c(m), the second one 891 891 //will contain the additional variables @c(1),...,@c(m), where m=ncols(I). … … 953 953 // } 954 954 955 955 //Compute a partial SAGBI basis of the algebra generated by I[1]-@c(1),...,I[m]-@c(m), 956 956 //where the @c(n) are parameters 957 957 ideal I=fetch(br,I); … … 961 961 algebra[i]=I[i]-par(i); 962 962 } 963 dbprint(ppl,"//AlgDep-2- call of SAGBI construction algorithm"); 963 dbprint(ppl,"//AlgDep-2- call of SAGBI construction algorithm"); 964 964 algebra=sagbiConstruction(algebra, iterations,0,0,1); 965 dbprint(ppl,"//AlgDep-3- postprocessing of results"); 965 dbprint(ppl,"//AlgDep-3- postprocessing of results"); 966 966 int j=1; 967 967 //If K[x_1,...,x_n] was the basering, then algebra is in K(@c(1),...,@c(m))[x_1,...x_n]. We intersect … … 985 985 for (i=1; i<=ncols(algDep); i++) 986 986 { 987 if(leadmonom(algDep[i])==1) 988 989 990 991 992 987 if(leadmonom(algDep[i])==1) 988 { 989 algDep[i]=0; 990 } 991 } 992 algDep=simplify(algDep,2); 993 993 export algDep,algebra; 994 994 setring br; … … 1018 1018 /* performs subalgebra interreduction of a set of subalgebra generators */ 1019 1019 int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information 1020 dbprint(ppl,"//Interred-1- starting interreduction"); 1020 dbprint(ppl,"//Interred-1- starting interreduction"); 1021 1021 ideal J,B; 1022 1022 int i,j,k; … … 1031 1031 } 1032 1032 I=simplify(I,2); 1033 dbprint(ppl,"//Interred-2- interreduction completed"); 1033 dbprint(ppl,"//Interred-2- interreduction completed"); 1034 1034 return(I); 1035 1035 }
Note: See TracChangeset
for help on using the changeset viewer.