Changeset 95edd5 in git


Ignore:
Timestamp:
Jan 14, 2009, 5:06:46 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7f3ad4194490497ddcc8b5400f0f38119943ffb9
Parents:
041cc4437735050394650a0a060d20e2ee0cd5f5
Message:
*hannes: GMGs changes


git-svn-id: file:///usr/local/Singular/svn/trunk@11305 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/standard.lib

    r041cc4 r95edd5  
    11//////////////////////////////////////////////////////////////////////////////
    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 Hilbert-Samuel Funktion verwenden
    46//////////////////////////////////////////////////////////////////////////////
    5 version="$Id: standard.lib,v 1.103 2008-12-18 15:45:21 Singular Exp $";
     7version="$Id: standard.lib,v 1.104 2009-01-14 16:06:46 Singular Exp $";
    68category="Miscellaneous";
    79info="
     
    1820 weightKB(stc,dd,vl)    degree dd part of a kbase wrt. some weigths
    1921 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
    2124";
    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
    2428
    2529//////////////////////////////////////////////////////////////////////////////
     
    150154"SYNTAX: @code{stdhilb (} ideal_expression @code{)} @*
    151155         @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{)} @*
    155160TYPE:    type of the first argument
    156161PURPOSE: Compute a Groebner basis of the ideal/module in the basering by
     
    158163         If an argument of type string @code{\"std\"} resp. @code{\"slimgb\"}
    159164         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.
    161170THEORY:  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.
    168176NOTE:    'homogeneous' means weighted homogeneous with respect to the weights
    169177         w[i] of the variables var(i) of the basering. Parameters are not
    170178         converted to variables.
    171 ASSUME:  The argument of type intvec is the 1st Hilbert series, computed
    172          by @code{hilb} using an intvector w, w[i]=deg(var(i)), as third
    173          argument
    174179SEE ALSO: stdfglm, std, slimgb, groebner
    175180KEYWORDS: Hilbert function
     
    194199  string ordstr_P = ordstr(P);     //ordering of basering as string
    195200  int nvarP = nvars(P);
    196   intvec w;                        //for ringweights of basering P
    197   int k;
    198   for(k=1;  k<=nvarP; k++)
    199   {
    200     w[k]=deg(var(k));
    201   }
    202   int neg=1-attrib (P,"global");
    203201
    204202  //save options:
     203  intvec gopt = option(get);
    205204  int p_opt;
    206205  string s_opt = option();
    207206  if (find(s_opt, "prot"))  { p_opt = 1; }
    208207
    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;
    210215  string method;
    211216  for (k=1; k<=size(#); k++)
     
    213218    if (typeof(#[k]) == "intvec")
    214219    {
    215       intvec hi = #[k];
     220        intvec w = #[k];         //given ringweights of basering P
    216221    }
    217222    if (typeof(#[k]) == "string")
     
    220225    }
    221226  }
     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
    222237
    223238  if (npars(P) > 0)             //clear denominators of parameters
     
    232247//Note that quotient ideal of qring must be homogeneous too
    233248
    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: non-positive 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 Hibert-Samuel function
     263    // }
     264
     265    if (p_opt)
     266    {"//-- stdhilb not implemented, we use std in ring:"; string(P);}
    247267    return( std(i) );
    248268  }
    249269
    250270//------------------------ 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
    259284
    260285  string algorithm;       //possibilities: std, slimgb, stdorslimgb
     
    274299  }
    275300
     301//### geaendert Dez08: es wird std(Id(1)) statt Id(1) aus Philb nach Phelp
     302// weitergegeben fuer hilbertgetriebenen std
     303
    276304  if (( algorithm=="std" || ( algorithm=="stdorslimgb" && char(P)>0 ) )
    277305  && (defined(hi)!=voice))
    278306  {
    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 );
    281311  }
    282312  if (( algorithm=="slimgb" || ( algorithm=="stdorslimgb" && char(P)==0 ) )
    283313  && (defined(hi)!=voice))
    284314  {
    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 );
    286319  }
    287320
    288321  //-------------- 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), ..., @(i-1) 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), ..., @(i-1) are defined) with
     325  //ordering an extra last block dp(1).
    292326  //Phelp has the same ordering as P on common variables. In Phelp
    293327  //a quotient ideal from P is added to the input
     
    309343  w = w,1;
    310344
    311   if( defined(moduleord) )
     345  if( defined(moduleord)==voice )
    312346  {
    313347    BRlist[3][so+2] = moduleord;
    314348  }
    315349
    316 //------ change to extended ring and compute std with hilbert series ------
     350//--- change to extended ring Phelp and compute std with hilbert series ----
    317351  def Phelp = ring(quotientList(BRlist));
    318352  setring Phelp;
     
    321355
    322356  // compute std with Hilbert series
    323   if (w ==1)
     357  option(redThrough);
     358  if (w == 1)
    324359  {
    325360    if (p_opt){ "std with hilb in " + string(Phelp);}
     
    346381  i = imap(Phelp,i);
    347382  kill Phelp;
    348   if( was_qring)
     383  if( was_qring )
    349384  {
    350385    i = NF(i,std(0));
    351386  }
    352387  i = simplify(i,34);
    353 
    354388  // compute reduced SB
    355389  if (find(s_opt, "redSB") > 0)
     
    359393  }
    360394  attrib(i, "isSB", 1);
     395  option(set,gopt);
    361396  return (i);
    362397}
     
    373408   intvec v = hilb(std(i),1);
    374409   ideal j1 = std(i,v,intvec(3,2,1)); j1;
     410
    375411   size(NF(j,j1))+size(NF(j1,j));            //j and j1 define the same ideal
    376412}
     
    546582//////////////////////////////////////////////////////////////////////////////
    547583proc 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
    549585RETURN:  list, say L: L[1] is a ring and L[2] an intvec
    550586         L[1] is a ring whith an extra homogenizing variable with name @,
    551587         resp. @(i) if @ and @(1), ..., @(i-1) are defined.
    552          The monomial ordering of L[1] is 1 block dp if the
     588         The monomial ordering of L[1] is consists of 1 block: dp if the
    553589         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)).
    555592         If R is a quotient ring P/Q, then L[1] is not a quotient ring but
    556593         contains the ideal @Qidealhilb@, the homogenized ideal Q of P.
    557594         (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).
    561599PURPOSE: 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.
     601NOTE:    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.
    563605EXAMPLE: example hilbRing; shows an example
    564606"
     
    571613  }
    572614  list BRlist = ringlist(P);
    573   BRlist[4] = ideal(0);
     615  BRlist[4] = ideal(0);      //kill quotient ideal in BRlist
    574616
    575617  int nvarP = nvars(P);
    576618  int s = size(#);
    577   intvec w;                   //for ringweights of basering P
    578619  int k;
    579   for(k=1;  k<=nvarP; k++)
    580   {
    581     w[k]=deg(var(k));
    582   }
    583620
    584621  for(k = 1; k <= s; k++)
    585622  {
    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 ------------------
    594646  // call it @, resp. @(k) if @(1),...,@(k-1) are defined
    595647  string homvar;
     
    615667
    616668  BRlist[3] = list();
    617   BRlist[3][2]=list("C",intvec(0));
     669  BRlist[3][2]=list("C",intvec(0));  //put module ordering always last
    618670  if(w==1)
    619671  {
     
    625677  }
    626678
    627   //change ring and get ideal from previous ring
     679  //-------------- change ring and get ideal from previous ring ---------------
    628680  def Philb = ring(quotientList(BRlist));
    629681  kill BRlist;
    630682  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    }
    634690    export(@Qidealhilb@);
    635691
    636692    if( find(option(),"prot") ){"add quotient ideal to input";}
     693
    637694    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      }
    640701      if (typeof(Id(k))=="module")
    641702      {
     
    652713  {
    653714    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      }
    656721      export(Id(k));
    657722    }
     
    664729   ring R = 0,(x,y,z,u,v),lp;
    665730   ideal i = x+y2+z3,xy+xv+yz+zu+uv,xyzuv-1;
    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];
    667734   setring P;
    668735   Id(1);
     
    791858{
    792859//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)
    794862//---------------------------------
    795863//0. Immer Aufruf von std unabhaengig von der Vorgabe:
    796864//   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
    797870
    798871//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
    801875//   - 1-Block-Ordnungen/non-commutative: direkt Aufruf von std oder slimgb
    802876//   - Komplizierte Ordnungen (lp oder > 1 Block): hilb
    803 //  - Parameter werden grundsaetzlich nicht in Variable umgewandelt
    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
    805879//   - fglm is keine Heuristik, da sonst vorher dim==0 peprueft werden muss
    806880
    807 //2. Vorgabe aus {std,slimgb}: es wird wo immer moeglich das angegebene
     881//2. Vorgabe aus {std,slimgb}: es wird wo immer moeglich das Angegebene
    808882//   gewaehlt (da slimgb keine Hilbertfunktion kennt, wird std verwendet).
    809883//   Bei slimgb im qring, wird das Quotientenideal zum Ideal addiert.
     
    812886
    813887//3. Nichtleere Vorgabe aus {hilb,fglm,std,slimgb}:
    814 //   es wird nur das angegebene und moegliche sowie das notwendige verwendet
     888//   es wird nur das Angegebene und Moegliche sowie das Notwendige verwendet
    815889//   und bei Wahlmoeglickeit je nach Heuristik.
    816890//   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)
    818893//   bei Vorgabe von {hilb,slimgb} wird hilb und wo moeglich slimgb verwendet.
    819894
     
    829904
    830905//----------------------- 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
    833908  int k;
    834909  for (k=1; k<=size(#); k++)
     
    890965            kill PP;
    891966          }
    892           if (defined(groebner_error))
     967          if (defined(groebner_error)==1)
    893968          {
    894969            kill groebner_error;
     
    9341009     //is_homog = homog(Qideal); //remembers if Qideal was homog (homog(0)=1)
    9351010  }
    936   list BRlist = ringlist(P);
     1011  list BRlist = ringlist(P);     //ringlist of basering
    9371012
    9381013  // save ordering of basering P for later use
     
    9561031//------------------ cases where std is always used ------------------------
    9571032//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"
    9591035
    9601036  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 ) )
    9641038  {
    9651039    if (p_opt) { "std in basering"; }
     
    10121086
    10131087  //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
    10151090  {
    10161091     partovar = "yes";
     
    10551130  //conversion (fglm or hilb) is specified and if the parameters shall
    10561131  //not be made to variables
    1057 
     1132  //BRlist (=ringlist of basering) > 4 if the basering is non-commutative
    10581133//---------------------------- direct methods -----------------------------
    10591134  if ( direct == "yes" )
    10601135  {
    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
    10621138    {
    10631139      if (p_opt) { "std in " + string(P); }
    10641140      return(std(i));
    10651141    }
    1066     if ( algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0) )
     1142  //if( algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0)) //V1
     1143    if ( algorithm=="slimgb" )                                           //V2
    10671144    {
    10681145      return(qslimgb(i));
     
    10751152//direct=="no" (i.e. "hilb" or "fglm" or "par2var" is given)
    10761153//or no method is given and we have a complicated monomial ordering
    1077 //Note thar "par2var" is not a default strategy, it must be explicitely
     1154//V1: "par2var" is not a default strategy, it must be explicitely
    10781155//given in order to be performed.
     1156//V2: "par2var" is a default strategy if there are more than 1 parameters
    10791157
    10801158//------------ case where no parameters are made to variables  -------------
     
    10871165    if ( conversion=="fglm" )
    10881166    {
    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
    10901169      {
    10911170        return (stdfglm(i,"std"));
    10921171      }
    1093       if ( algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0) )
     1172    //if(algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0))//V1
     1173      if( algorithm=="slimgb" )                                          //V2
    10941174      {
    10951175        return (stdfglm(i,"slimgb"));
     
    10981178    else
    10991179    {
    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
    11011182      {
    11021183        return (stdhilb(i,"std"));
    11031184      }
    1104       if ( algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0) )
     1185    //if(algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0))//V1
     1186      if ( algorithm=="slimgb" )                                         //V2
    11051187      {
    11061188        return (stdhilb(i,"slimgb"));
     
    11461228    else
    11471229    {
    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
    11491232      {
    11501233        i = stdhilb(i,"std");
    11511234      }
    1152       if ( algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0) )
     1235    //if(algorithm=="slimgb" || (algorithm=="stdorslimgb" && char(P)==0))//V1
     1236      if ( algorithm=="slimgb" )                                         //V2
    11531237      {
    11541238        i = stdhilb(i,"slimgb");
     
    11591243//-------------------- go back to original ring ---------------------------
    11601244//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 it
     1245//extra variables is in general too big. We simplify it before mapping it
    11621246//to the basering.
    11631247
     
    20732157  weightKB(i, 12, list(w));
    20742158}
    2075 //////////////////////////////////////////////////////////////////////////////
    2076 
     2159
     2160///////////////////////////////////////////////////////////////////////////////
    20772161/*
    2078 Versuche:
     2162                                Versuche:
    20792163///////////////////////////////////////////////////////////////////////////////
    20802164proc downsizeSB (I, list #)
     
    22262310}
    22272311///////////////////////////////////////////////////////////////////////////////
    2228 //die folgende proc war fuer groebner mit fglm vorgesehen
    2229 //um die projektive Dimension korrekt zu berechnen, muss man aber
     2312//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
    22302314//voerher ein SB bzgl. einer Gradordnung berechnen und dann homogenisieren.
    22312315//Sonst koennen hoeherdimensionale Komponenten in Unendlich entstehen
     
    23432427
    23442428*/
    2345 
     2429///////////////////////////////////////////////////////////////////////////////
     2430//                           EXAMPLES
     2431///////////////////////////////////////////////////////////////////////////////
     2432/*
     2433example stdfglm;
     2434example stdhilb;
     2435example groebner;
     2436example res;
     2437example sprintf;
     2438example fprintf;
     2439example printf;
     2440example weightKB;
     2441example qslimgb;
     2442example par2varRing;
     2443*/
Note: See TracChangeset for help on using the changeset viewer.