Changeset 95edd5 in git
 Timestamp:
 Jan 14, 2009, 5:06:46 PM (14 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 7f3ad4194490497ddcc8b5400f0f38119943ffb9
 Parents:
 041cc4437735050394650a0a060d20e2ee0cd5f5
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/standard.lib
r041cc4 r95edd5 1 1 ////////////////////////////////////////////////////////////////////////////// 2 //major revision Jan/Feb. 2007, GMG 3 //groebner mit Optionen versehen 2 //major revision Jan/Feb. 2007, GMG (groebner with several options) 3 //Change of default methods in groebner (June 2008, GMG) 4 //stdhilb can be called with std or slimgb (Jan 2008, GMG) 5 //### Todo: im lokalen Fall die HilbertSamuel Funktion verwenden 4 6 ////////////////////////////////////////////////////////////////////////////// 5 version="$Id: standard.lib,v 1.10 3 20081218 15:45:21Singular Exp $";7 version="$Id: standard.lib,v 1.104 20090114 16:06:46 Singular Exp $"; 6 8 category="Miscellaneous"; 7 9 info=" … … 18 20 weightKB(stc,dd,vl) degree dd part of a kbase wrt. some weigths 19 21 qslimgb(i) computes a standard basis with slimgb in a qring 20 par2varRing([i]) create a ring with pars to vars together with i 22 par2varRing([i]) create a ring making pars to vars, together with i 23 21 24 "; 22 // hilbRing([i]) create a ring containing the homogenized i 23 // quotientList(L,...) a list, say QL, s.t. ring(QL) creates a correct qring 25 //AUXILIARY PROCEDURES: 26 // hilbRing([i]) ring for computing the (weighted) hilbert series 27 // quotientList(L,...) ringlist for creating a correct quotient ring 24 28 25 29 ////////////////////////////////////////////////////////////////////////////// … … 150 154 "SYNTAX: @code{stdhilb (} ideal_expression @code{)} @* 151 155 @code{stdhilb (} module_expression @code{)} @* 152 @code{stdhilb (} ideal_expression@code{,} intvec_expression @code{)} 153 @code{stdhilb (} ideal_expression@code{,} list of string_expressions 154 and intvec_expressin @code{)} @* 156 @code{stdhilb (} ideal_expression, intvec_expression @code{)}@* 157 @code{stdhilb (} module_expression, intvec_expression @code{)}@* 158 @code{stdhilb (} ideal_expression@code{,} list of string_expressions, 159 and intvec_expression @code{)} @* 155 160 TYPE: type of the first argument 156 161 PURPOSE: Compute a Groebner basis of the ideal/module in the basering by … … 158 163 If an argument of type string @code{\"std\"} resp. @code{\"slimgb\"} 159 164 is given, the standard basis computation uses @code{std} or 160 @code{slimgb}, otherwise a heuristically chosen method (default) 165 @code{slimgb}, otherwise a heuristically chosen method (default)@* 166 If an optional second argument w of type intvec is given, w is used 167 as variable weights. If w is not given, it is computed as w[i] = 168 deg(var(i)). If the ideal is homogeneous w.r.t. w then the 169 Hilbert series is computed w.r.t. to these weights. 161 170 THEORY: If the ideal is not homogeneous compute first a Groebner basis 162 of the homogenization of the ideal, then the Hilbert function and, 163 finally, a Groebner basis in the original ring by using the 164 computed Hilbert function.@* 165 If the ideal is homogeneous and a second argument of type intvec 166 is given it will be used as 1st Hilbert function in the Hilbert 167 driven algorithm. 171 of the homogenization [w.r.t. the weights w] of the ideal/module, 172 then the Hilbert function and, finally, a Groebner basis in the 173 original ring by using the computed Hilbert function. If the given 174 w does not coincide with the variable weights of the basering, the 175 result may not be a groebner basis in the original ring. 168 176 NOTE: 'homogeneous' means weighted homogeneous with respect to the weights 169 177 w[i] of the variables var(i) of the basering. Parameters are not 170 178 converted to variables. 171 ASSUME: The argument of type intvec is the 1st Hilbert series, computed172 by @code{hilb} using an intvector w, w[i]=deg(var(i)), as third173 argument174 179 SEE ALSO: stdfglm, std, slimgb, groebner 175 180 KEYWORDS: Hilbert function … … 194 199 string ordstr_P = ordstr(P); //ordering of basering as string 195 200 int nvarP = nvars(P); 196 intvec w; //for ringweights of basering P197 int k;198 for(k=1; k<=nvarP; k++)199 {200 w[k]=deg(var(k));201 }202 int neg=1attrib (P,"global");203 201 204 202 //save options: 203 intvec gopt = option(get); 205 204 int p_opt; 206 205 string s_opt = option(); 207 206 if (find(s_opt, "prot")) { p_opt = 1; } 208 207 209 // check the given method  208 // check the given method and weights  209 //Note: stdhilb is used in elim where it is applied to an elimination ordering 210 //a(1..1,0..0),wp(w). In such a ring deg(var(k)=0 for all vars corresponding to 211 //0 in a(1..1,0..0), hence we cannot identify w via w[k] = deg(var(k)); 212 //Therefore hilbstd has the option to give ringweights. 213 214 int k; 210 215 string method; 211 216 for (k=1; k<=size(#); k++) … … 213 218 if (typeof(#[k]) == "intvec") 214 219 { 215 intvec hi = #[k];220 intvec w = #[k]; //given ringweights of basering P 216 221 } 217 222 if (typeof(#[k]) == "string") … … 220 225 } 221 226 } 227 228 if ( defined(w)!=voice ) 229 { 230 intvec w; 231 for(k=1; k<=nvarP; k++) 232 { 233 w[k] = deg(var(k)); //compute ring weights 234 } 235 } 236 222 237 223 238 if (npars(P) > 0) //clear denominators of parameters … … 232 247 //Note that quotient ideal of qring must be homogeneous too 233 248 234 if( find(ordstr_P,"s")  find(ordstr_P,"M") 235  find(ordstr_P,"a")  (neg > 0) ) 236 { 237 if( defined(hi) && is_homog ) 238 { 239 if (p_opt){"std with given Hilbert function in basering";} 240 return( std(i,hi,w) ); 241 } 242 if (p_opt){"//stdhilb not implemented, use std in basering";} 243 //if ( neg ) 244 //{ 245 // "//*** WARNING: nonpositive ring weights, computation may not finish"; 246 //} 249 int neg; 250 for ( k=1; k<=nvarP; k++) 251 { 252 if( var(k) < 1) 253 { neg = 1; } 254 } 255 256 if( find(ordstr_P,"s")  find(ordstr_P,"M")  (neg > 0) ) 257 { 258 // if( defined(hi) && is_homog ) 259 // { 260 // if (p_opt){"std with given Hilbert function in basering";} 261 // return( std(i,hi,w) ); 262 //### here we would need HibertSamuel function 263 // } 264 265 if (p_opt) 266 {"// stdhilb not implemented, we use std in ring:"; string(P);} 247 267 return( std(i) ); 248 268 } 249 269 250 270 // change to hilbRing  251 252 list hiRi = hilbRing(i); //The ground field of P and Philb coincide 253 intvec W = hiRi[2]; //Philb has an extra variable @ or @(k) 254 def Philb = hiRi[1]; //Philb is no qring and the predefined 255 setring Philb; //ideal/module Id(1) in Philb is homogeneous 256 //Parameters of P are not converted in Philb 257 // compute Hilbert function of homogenized ideal in Philb  258 //Philb has only 1 block. There are three cases 271 //The ground field of P and Philb coincide, Philb has an extra variable 272 //@ or @(k). Philb is no qring and the predefined ideal/module Id(1) in 273 //Philb is homogeneous (it is the homogenized i w.r.t. @ or @(k)) 274 //Parameters of P are not converted in Philb 275 //Philb has only 1 block dp or wp(w) 276 277 list hiRi = hilbRing(i,w); 278 intvec W = hiRi[2]; 279 def Philb = hiRi[1]; 280 setring Philb; 281 282 // compute Hilbert series of homogenized ideal in Philb  283 //There are three cases 259 284 260 285 string algorithm; //possibilities: std, slimgb, stdorslimgb … … 274 299 } 275 300 301 //### geaendert Dez08: es wird std(Id(1)) statt Id(1) aus Philb nach Phelp 302 // weitergegeben fuer hilbertgetriebenen std 303 276 304 if (( algorithm=="std"  ( algorithm=="stdorslimgb" && char(P)>0 ) ) 277 305 && (defined(hi)!=voice)) 278 306 { 279 if (p_opt) {"std in ring " + string(Philb);} 280 intvec hi = hilb( std(Id(1)),1,W ); 307 if (p_opt) {"compute hilbert series with std in ring " + string(Philb); 308 "weights used for hilbert series:",W;} 309 Id(1) = std(Id(1)); 310 intvec hi = hilb( Id(1),1,W ); 281 311 } 282 312 if (( algorithm=="slimgb"  ( algorithm=="stdorslimgb" && char(P)==0 ) ) 283 313 && (defined(hi)!=voice)) 284 314 { 285 intvec hi = hilb(qslimgb(Id(1)),1,W); 315 if (p_opt) {"compute hilbert series with slimgb in ring " + string(Philb); 316 "weights used for hilbert series:",W;} 317 Id(1) = qslimgb(Id(1)); 318 intvec hi = hilb( Id(1),1,W ); 286 319 } 287 320 288 321 // we need another intermediate ring Phelp  289 //In Phelp we change the ordering from Philb, otherwise it coincides with 290 //Philb, that is, it has in addition to P an extra homogenizing variable 291 //with name @, resp. @(i) if @ and @(1), ..., @(i1) are defined. 322 //In Phelp we change only the ordering from Philb (otherwise it coincides 323 //with Philb). Phelp has in addition to P an extra homogenizing variable 324 //with name @ (resp. @(i) if @ and @(1), ..., @(i1) are defined) with 325 //ordering an extra last block dp(1). 292 326 //Phelp has the same ordering as P on common variables. In Phelp 293 327 //a quotient ideal from P is added to the input … … 309 343 w = w,1; 310 344 311 if( defined(moduleord) )345 if( defined(moduleord)==voice ) 312 346 { 313 347 BRlist[3][so+2] = moduleord; 314 348 } 315 349 316 //  change to extended ring and compute std with hilbert series 350 // change to extended ring Phelp and compute std with hilbert series  317 351 def Phelp = ring(quotientList(BRlist)); 318 352 setring Phelp; … … 321 355 322 356 // compute std with Hilbert series 323 if (w ==1) 357 option(redThrough); 358 if (w == 1) 324 359 { 325 360 if (p_opt){ "std with hilb in " + string(Phelp);} … … 346 381 i = imap(Phelp,i); 347 382 kill Phelp; 348 if( was_qring )383 if( was_qring ) 349 384 { 350 385 i = NF(i,std(0)); 351 386 } 352 387 i = simplify(i,34); 353 354 388 // compute reduced SB 355 389 if (find(s_opt, "redSB") > 0) … … 359 393 } 360 394 attrib(i, "isSB", 1); 395 option(set,gopt); 361 396 return (i); 362 397 } … … 373 408 intvec v = hilb(std(i),1); 374 409 ideal j1 = std(i,v,intvec(3,2,1)); j1; 410 375 411 size(NF(j,j1))+size(NF(j1,j)); //j and j1 define the same ideal 376 412 } … … 546 582 ////////////////////////////////////////////////////////////////////////////// 547 583 proc hilbRing ( list # ) 548 "USAGE: hilbRing([ l]); l list of ideals/modules [default:l=empty list]584 "USAGE: hilbRing([w,l]); w = intvec, l = list of ideals/modules 549 585 RETURN: list, say L: L[1] is a ring and L[2] an intvec 550 586 L[1] is a ring whith an extra homogenizing variable with name @, 551 587 resp. @(i) if @ and @(1), ..., @(i1) are defined. 552 The monomial ordering of L[1] is 1 blockdp if the588 The monomial ordering of L[1] is consists of 1 block: dp if the 553 589 weights of the variables of the basering, say R, are all 1, resp. 554 wp(w,1) wehre w is the intvec of weights of the variables of R. 590 wp(w,1) wehre w is either given or the intvec of weights of the 591 variables of R, i.e. w[k]=deg(var(k)). 555 592 If R is a quotient ring P/Q, then L[1] is not a quotient ring but 556 593 contains the ideal @Qidealhilb@, the homogenized ideal Q of P. 557 594 (Parameters of R are not touched). 558 If a list l is given with l[i] an ideal, then l[i] is 559 mapped to the homogenized ideal Id(i) in L[1]. 560 L[2] is the intvec (w,1) 595 If a list l is given with l[i] an ideal/module, then l[i] is mapped 596 to Id(i), the homogenized l[i]+Q*freemodule(nrows(l[i]) in L[1] 597 (Id(i) = l[i] if l[i] is already homogeneous). 598 L[2] is the intvec (w,1). 561 599 PURPOSE: Prepare a ring for computing the (weighted) hilbert series of 562 an ideal with an easy monomial ordering. 600 an ideal/module with an easy monomial ordering. 601 NOTE: For this purpose we need w[k]=deg(var(k)). However, if the ordering 602 contains an extra weight vector a(v,0..0)) deg(var(k)) returns 0 for 603 k being an index which is 0 in a. Therefore we must compute w 604 beforehand and give it to hilbRing. 563 605 EXAMPLE: example hilbRing; shows an example 564 606 " … … 571 613 } 572 614 list BRlist = ringlist(P); 573 BRlist[4] = ideal(0); 615 BRlist[4] = ideal(0); //kill quotient ideal in BRlist 574 616 575 617 int nvarP = nvars(P); 576 618 int s = size(#); 577 intvec w; //for ringweights of basering P578 619 int k; 579 for(k=1; k<=nvarP; k++)580 {581 w[k]=deg(var(k));582 }583 620 584 621 for(k = 1; k <= s; k++) 585 622 { 586 def Id(k) = #[k]; 587 if (typeof(Id(k))=="module") 588 { 589 int nr(k) = nrows(Id(k)); 590 } 591 } 592 593 // a homogenizing variable is added: 623 if ( typeof(#[k]) == "intvec" ) 624 { 625 intvec w = #[k]; //given weights for the variables 626 # = delete (#,k); 627 } 628 } 629 630 s = size(#); 631 for(k = 1; k <= s; k++) 632 { 633 def Id(k) = #[k]; 634 int nr(k) = nrows(Id(k)); 635 } 636 637 if ( defined(w)!=voice ) 638 { 639 intvec w; //for ringweights of basering P 640 for(k=1; k<=nvarP; k++) 641 { 642 w[k]=deg(var(k)); //degree of kth variable 643 } 644 } 645 // a homogenizing variable is added  594 646 // call it @, resp. @(k) if @(1),...,@(k1) are defined 595 647 string homvar; … … 615 667 616 668 BRlist[3] = list(); 617 BRlist[3][2]=list("C",intvec(0)); 669 BRlist[3][2]=list("C",intvec(0)); //put module ordering always last 618 670 if(w==1) 619 671 { … … 625 677 } 626 678 627 // change ring and get ideal from previous ring679 // change ring and get ideal from previous ring  628 680 def Philb = ring(quotientList(BRlist)); 629 681 kill BRlist; 630 682 setring Philb; 631 if( defined(is_qring) ) 632 { 633 ideal @Qidealhilb@ = homog( imap(P,Qideal), `homvar` ); 683 if( defined(is_qring)==voice ) 684 { 685 ideal @Qidealhilb@ = imap(P,Qideal); 686 if ( ! homog(@Qidealhilb@) ) 687 { 688 @Qidealhilb@ = homog( @Qidealhilb@, `homvar` ); 689 } 634 690 export(@Qidealhilb@); 635 691 636 692 if( find(option(),"prot") ){"add quotient ideal to input";} 693 637 694 for(k = 1; k <= s; k++) 638 { //homogenize 639 def Id(k) = homog( imap(P,Id(k)), `homvar` ); 695 { //homogenize if necessary 696 def Id(k) = imap(P,Id(k)); 697 if ( ! homog(Id(k)) ) 698 { 699 Id(k) = homog( imap(P,Id(k)), `homvar` ); 700 } 640 701 if (typeof(Id(k))=="module") 641 702 { … … 652 713 { 653 714 for(k = 1; k <= s; k++) 654 { //homogenize 655 def Id(k) = homog( imap(P,Id(k)), `homvar` ); 715 { //homogenize if necessary 716 def Id(k) = imap(P,Id(k)); 717 if ( ! homog(Id(k)) ) 718 { 719 Id(k) = homog( imap(P,Id(k)), `homvar` ); 720 } 656 721 export(Id(k)); 657 722 } … … 664 729 ring R = 0,(x,y,z,u,v),lp; 665 730 ideal i = x+y2+z3,xy+xv+yz+zu+uv,xyzuv1; 666 def P = hilbRing(i)[1]; P; 731 intvec w = 6,3,2,1,1; 732 hilbRing(i,w); 733 def P = hilbRing(w,i)[1]; 667 734 setring P; 668 735 Id(1); … … 791 858 { 792 859 //Vorgabe einer Teilmenge aus {hilb,fglm,par2var,std,slimgb} 793 //Aktuelle Einstellungen (Jan 2007): 860 //V1: Erste Einstellungen (Jan 2007) 861 //V2: Aktuelle Aenderungen (Juni 2008) 794 862 // 795 863 //0. Immer Aufruf von std unabhaengig von der Vorgabe: 796 864 // gemischte Ordnungen, extra Gewichtsvektor, Matrix Ordnungen 865 // ### Todo: extra Gewichtsvektor sollte nicht immer mit std wirken, 866 // sondern z.B. mit "hilb" arbeiten koennen 867 // ### Todo: es sollte ein Gewichtsvektor mitgegeben werden koennen (oder 868 // berechnet werden), z.B. groebner(I,"hilb",w) oder groebner(I,"withWeights") 869 // wie bei elim in elim.lib 797 870 798 871 //1. Keine Vorgabe: es wirkt die aktuelle Heuristk: 799 //  Char p: std 800 //  Char = 0: slimgb (im qring wird Quotientenideal zum Input addiert) 872 //  Char = p: std 873 //V1  Char = 0: slimgb (im qring wird Quotientenideal zum Input addiert) 874 //V2  Char = 0: std 801 875 //  1BlockOrdnungen/noncommutative: direkt Aufruf von std oder slimgb 802 876 //  Komplizierte Ordnungen (lp oder > 1 Block): hilb 803 // 804 // ? alternativ: more than 1 parameter will be converted to ring variable ?877 //V1  Parameter werden grundsaetzlich nicht in Variable umgewandelt 878 //V2  Mehr als ein Parmeter wird zu Variable konvertiert 805 879 //  fglm is keine Heuristik, da sonst vorher dim==0 peprueft werden muss 806 880 807 //2. Vorgabe aus {std,slimgb}: es wird wo immer moeglich das angegebene881 //2. Vorgabe aus {std,slimgb}: es wird wo immer moeglich das Angegebene 808 882 // gewaehlt (da slimgb keine Hilbertfunktion kennt, wird std verwendet). 809 883 // Bei slimgb im qring, wird das Quotientenideal zum Ideal addiert. … … 812 886 813 887 //3. Nichtleere Vorgabe aus {hilb,fglm,std,slimgb}: 814 // es wird nur das angegebene und moegliche sowie das notwendige verwendet888 // es wird nur das Angegebene und Moegliche sowie das Notwendige verwendet 815 889 // und bei Wahlmoeglickeit je nach Heuristik. 816 890 // Z.B. Vorgabe von {hilb} ist aequivalent zu {hilb,std,slimgb} und es wird 817 // hilb und nach Heuristik std oder slimgb verwendet, aber nicht par2var; 891 // hilb und nach Heuristik std oder slimgb verwendet, 892 // (V1: aber nicht par2var) 818 893 // bei Vorgabe von {hilb,slimgb} wird hilb und wo moeglich slimgb verwendet. 819 894 … … 829 904 830 905 // save the given method  831 string method; 832 list Method; 906 string method; //all given methods as a coma separated string 907 list Method; //all given methods as a list 833 908 int k; 834 909 for (k=1; k<=size(#); k++) … … 890 965 kill PP; 891 966 } 892 if (defined(groebner_error) )967 if (defined(groebner_error)==1) 893 968 { 894 969 kill groebner_error; … … 934 1009 //is_homog = homog(Qideal); //remembers if Qideal was homog (homog(0)=1) 935 1010 } 936 list BRlist = ringlist(P); 1011 list BRlist = ringlist(P); //ringlist of basering 937 1012 938 1013 // save ordering of basering P for later use … … 956 1031 // cases where std is always used  957 1032 //If other methods are not implemented or do not make sense, i.e. for 958 //local or mixed orderings, matrix orderings, extra weight vector and modules 1033 //local or mixed orderings, matrix orderings, extra weight vector 1034 //### Todo: extra weight vector should be allowed for e.g. with "hilb" 959 1035 960 1036 if( //( find(ordstr_P,"s") > 0 )  // covered by neg 961 ( find(ordstr_P,"M") > 0 ) 962  ( find(ordstr_P,"a") > 0 ) 963  ( neg>0 ) ) 1037 ( find(ordstr_P,"M") > 0 )  ( find(ordstr_P,"a") > 0 )  ( neg>0 ) ) 964 1038 { 965 1039 if (p_opt) { "std in basering"; } … … 1012 1086 1013 1087 //define partovar: 1014 if( find(method,"par2var") && npars_P > 0 ) 1088 //if( find(method,"par2var") && npars_P > 0 ) //V1 1089 if( find(method,"par2var")  npars_P > 1 ) //V2 1015 1090 { 1016 1091 partovar = "yes"; … … 1055 1130 //conversion (fglm or hilb) is specified and if the parameters shall 1056 1131 //not be made to variables 1057 1132 //BRlist (=ringlist of basering) > 4 if the basering is noncommutative 1058 1133 // direct methods  1059 1134 if ( direct == "yes" ) 1060 1135 { 1061 if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) 1136 //if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) //V1 1137 if ( algorithm=="std"  (algorithm=="stdorslimgb") ) //V2 1062 1138 { 1063 1139 if (p_opt) { "std in " + string(P); } 1064 1140 return(std(i)); 1065 1141 } 1066 if ( algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0) ) 1142 //if( algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0)) //V1 1143 if ( algorithm=="slimgb" ) //V2 1067 1144 { 1068 1145 return(qslimgb(i)); … … 1075 1152 //direct=="no" (i.e. "hilb" or "fglm" or "par2var" is given) 1076 1153 //or no method is given and we have a complicated monomial ordering 1077 // Note thar"par2var" is not a default strategy, it must be explicitely1154 //V1: "par2var" is not a default strategy, it must be explicitely 1078 1155 //given in order to be performed. 1156 //V2: "par2var" is a default strategy if there are more than 1 parameters 1079 1157 1080 1158 // case where no parameters are made to variables  … … 1087 1165 if ( conversion=="fglm" ) 1088 1166 { 1089 if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) 1167 //if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) //V1 1168 if ( algorithm=="std"  (algorithm=="stdorslimgb") ) //V2 1090 1169 { 1091 1170 return (stdfglm(i,"std")); 1092 1171 } 1093 if ( algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0) ) 1172 //if(algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0))//V1 1173 if( algorithm=="slimgb" ) //V2 1094 1174 { 1095 1175 return (stdfglm(i,"slimgb")); … … 1098 1178 else 1099 1179 { 1100 if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) 1180 //if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) )//V1 1181 if ( algorithm=="std"  (algorithm=="stdorslimgb" ) ) //V2 1101 1182 { 1102 1183 return (stdhilb(i,"std")); 1103 1184 } 1104 if ( algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0) ) 1185 //if(algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0))//V1 1186 if ( algorithm=="slimgb" ) //V2 1105 1187 { 1106 1188 return (stdhilb(i,"slimgb")); … … 1146 1228 else 1147 1229 { 1148 if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) ) 1230 //if ( algorithm=="std"  (algorithm=="stdorslimgb" && char(P)>0) )//V1 1231 if ( algorithm=="std"  (algorithm=="stdorslimgb" )) //V2 1149 1232 { 1150 1233 i = stdhilb(i,"std"); 1151 1234 } 1152 if ( algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0) ) 1235 //if(algorithm=="slimgb"  (algorithm=="stdorslimgb" && char(P)==0))//V1 1236 if ( algorithm=="slimgb" ) //V2 1153 1237 { 1154 1238 i = stdhilb(i,"slimgb"); … … 1159 1243 // go back to original ring  1160 1244 //The main computation is done. However, the SB coming from a ring with 1161 //extra variables is in general too big. We simplify it befor mapping it1245 //extra variables is in general too big. We simplify it before mapping it 1162 1246 //to the basering. 1163 1247 … … 2073 2157 weightKB(i, 12, list(w)); 2074 2158 } 2075 ////////////////////////////////////////////////////////////////////////////// 2076 2159 2160 /////////////////////////////////////////////////////////////////////////////// 2077 2161 /* 2078 Versuche:2162 Versuche: 2079 2163 /////////////////////////////////////////////////////////////////////////////// 2080 2164 proc downsizeSB (I, list #) … … 2226 2310 } 2227 2311 /////////////////////////////////////////////////////////////////////////////// 2228 //die folgende proc war fuer groebner mit fglm vorgesehen 2229 // um die projektive Dimension korrekt zu berechnen, muss man aber2312 //die folgende proc war fuer groebner mit fglm vorgesehen, ist aber zu teuer. 2313 //Um die projektive Dimension korrekt zu berechnen, muss man aber teuer 2230 2314 //voerher ein SB bzgl. einer Gradordnung berechnen und dann homogenisieren. 2231 2315 //Sonst koennen hoeherdimensionale Komponenten in Unendlich entstehen … … 2343 2427 2344 2428 */ 2345 2429 /////////////////////////////////////////////////////////////////////////////// 2430 // EXAMPLES 2431 /////////////////////////////////////////////////////////////////////////////// 2432 /* 2433 example stdfglm; 2434 example stdhilb; 2435 example groebner; 2436 example res; 2437 example sprintf; 2438 example fprintf; 2439 example printf; 2440 example weightKB; 2441 example qslimgb; 2442 example par2varRing; 2443 */
Note: See TracChangeset
for help on using the changeset viewer.