Changeset 238c959 in git


Ignore:
Timestamp:
Oct 1, 2008, 7:44:38 PM (16 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e40f77ae12c0d4b4f8155bd7ecbcfb7139652262
Parents:
49f94f3754d486ab94e553bfb86651899f334c83
Message:
*levandov: documentation updates, release preparation and minor bugfixes


git-svn-id: file:///usr/local/Singular/svn/trunk@11089 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/bfct.lib

    r49f94f r238c959  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: bfct.lib,v 1.3 2008-08-22 09:31:56 Singular Exp $";
     2version="$Id: bfct.lib,v 1.4 2008-10-01 17:44:37 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    1919
    2020bfct(f[,s,t,v]);           compute the global Bernstein-Sato polynomial of a given poly
    21 bfctsyz(f[,r,s,t,v]);      compute the global Bernstein-Sato polynomial of a given poly
     21bfctsyz(f[,r,s,t,u,v]);    compute the global Bernstein-Sato polynomial of a given poly
    2222bfctonestep(f[,s,t]);      compute the global Bernstein-Sato polynomial of a given poly
    2323bfctideal(I,w[,s,t]);      compute the global b-function of a given ideal w.r.t. a given weight
    24 minpol(f,I);               compute the minimal polynomial of the endormorphism in basering modulo I given by f
    25 minpolsyz(f,I[,p,t]);      compute the minimal polynomial of the endormorphism in basering modulo I given by f
     24minpol(f,I);               compute the minimal polynomial of the endormorphism in basering modulo ideal given by a poly
     25minpolsyz(f,I[,p,s,t]);    compute the minimal polynomial of the endormorphism in basering modulo ideal given by a poly
    2626linreduce(f,I[,s]);        reduce a poly by linear reductions of its leading term
    2727ncsolve(I[,s]);            find and compute a linear dependency of the elements of an ideal
     
    4141
    4242
    43 proc testbfctlib()
     43proc testbfctlib ()
    4444{
    4545  // tests all procs for consistency
    4646  "AUXILIARY PROCEDURES:";
    47 
    4847  example ispositive;
    4948  example isin;
     
    186185RETURN:  an int, the standard scalar product of v and w
    187186PURPOSE: compute the scalar product of two intvecs
     187NOTE:    the arguments must have the same size
    188188EXAMPLE: example scalarprod; shows examples
    189 NOTE:    the arguments must have the same size
    190189"
    191190{
     
    218217proc linreduce(poly f, ideal I, list #)
    219218"USAGE:  linreduce(f, I [,s]);  f a poly, I an ideal, s an optional int
    220 RETURN:  a poly obtained by linear reductions of the leading term with I
    221 PURPOSE: reduce a poly by linear reductions of its leading term only
     219RETURN:  a poly obtained by linear reductions of the leading term of the given poly with an ideal
     220PURPOSE: reduce a poly only by linear reductions of its leading term
    222221NOTE:    If s<>0, a list consisting of the reduced poly and the vector of the used
    223222@*       reductions is returned.
     
    280279  ideal I = 1,y,xy;
    281280  poly f = 5xy+7y+3;
    282   poly g = 5xy+7x+3;
     281  poly g = 5y+7x+3;
    283282  linreduce(f,I);
    284283  linreduce(g,I);
     
    349348    dbprint(ppl, "ncsolve: starting Groebner basis computation with engine:", whichengine);
    350349    QQ = engine(QQ,whichengine);
    351     dbprint(ppl, "QQ after groebner:", QQ);
    352     //    "QQ after groebner:"; QQ;
     350    dbprint(ppl, "QQ after engine:", QQ);
    353351    if (dim(QQ) == -1)
    354352    {
    355353      dbprint(ppl+1, "no solutions by ncsolve");
    356       //      "no solutions by ncsolve";
    357354      // output zeroes
    358355      setring save;
     
    362359    // 4. in order to get the numeric values
    363360    matrix AA = matrix(maxideal(1));
    364     attrib(QQ,"isSB",1); // to suppress NF warnings
    365     AA = NF(AA,QQ);      // todo: we still receive NF warnings
     361    module MQQ = std(module(QQ));
     362    AA = NF(AA,MQQ); // todo: we still receive NF warnings
    366363    dbprint(ppl, "AA after NF:",AA);
    367364    //    "AA after NF:"; print(AA);
     
    483480{
    484481  "EXAMPLE:"; echo = 2;
    485   ring r = 0,(t,x,y,Dt,Dx,Dy),dp;
    486   def D = Weyl();
     482  printlevel = 0;
     483  ring r = 0,(x,y),dp;
     484  poly f = x^2+y^3+x*y^2;
     485  def D = initialmalgrange(f);
    487486  setring D;
    488   ideal I = x*Dt,6*t*Dt+2*y*Dy+3*x*Dx+6,3*y^2*Dx-2*x*Dy,2*y*x*Dy+3*x^2*Dx+6*x,y^2*Dt,y^3+x^2,9*y*x^2*Dx^2+4*x^2*Dy^2+6*y^2*Dy+24*y*x*Dx+18*y,27*x^3*Dx^3-8*x^2*Dy^3-12*y^2*Dy^2+162*x^2*Dx^2-48*y*Dy+186*x*Dx;
    489   // I is a Groebner basis of the initial Malgrange ideal of x2+y3
     487  inF;
    490488  poly s = t*Dt;
    491   vector m = minpol(s,I);m;
     489  minpol(s,inF);
    492490}
    493491
    494492proc minpolsyz (poly s, ideal II, list #)
    495 "USAGE:  minpolsyz(f, I [,p,t]);  f a poly, I an ideal, p, t optial ints, p a prime number
     493"USAGE:  minpolsyz(f, I [,p,s,t]);  f a poly, I an ideal, p, t optial ints, p a prime number
    496494RETURN:  coefficient vector of the minimal polynomial of the endomorphism of basering modulo I defined by f
    497495PURPOSE: compute the minimal polynomial
     
    502500@*       Otherwise, it searched for all degrees.
    503501@*       This is done by computing syzygies.
    504 @*       If s<>0, @code{std} is used for Groebner basis computations,
    505 @*       otherwise @code{slimgb} is used.
    506 @*       By default, @code{slimgb} is used in char 0 and @code{std} in char p.
     502@*       If s<>0, @code{std} is used for Groebner basis computations in char 0,
     503@*       otherwise, and by default, @code{slimgb} is used.
     504@*       If t<>0 and by default, @code{std} is used for Groebner basis computations in char >0,
     505@*       otherwise, @code{slimgb} is used.
    507506@*       If printlevel=1, progress debug messages will be printed,
    508507@*       if printlevel>=2, all the debug messages will be printed.
     
    515514  int ppl = printlevel-voice+2;
    516515  int whichengine  = 0; // default
    517   int enginespec   = 0; // default
     516  int modengine    = 1; // default
    518517  int solveincharp = 0; // default
    519518  def save = basering;
     
    522521    if (typeof(#[1])=="int" || typeof(#[1])=="number")
    523522    {
    524       solveincharp = int( #[1]);
     523      solveincharp = int(#[1]);
    525524    }
    526525    if (size(#)>1)
     
    529528      {
    530529        whichengine = int(#[2]);
    531         enginespec = 1;
     530      }
     531      if (size(#)>2)
     532      {
     533        if (typeof(#[3])=="int" || typeof(#[3])=="number")
     534        {
     535          modengine = int(#[3]);
     536        }
    532537      }
    533538    }
     
    586591      setring Rp;
    587592      NI[i+1] = phi(newNF);
    588       if (enginespec==1)
    589       {
    590         v = ncsolve(NI,whichengine);
    591       }
    592       else
    593       {
    594         v = ncsolve(NI);
    595       }
     593      v = ncsolve(NI,modengine);
    596594      if (v!=0) // there is a modular solution
    597595      {
     
    647645{
    648646  "EXAMPLE:"; echo = 2;
    649   ring r = 0,(t,x,y,Dt,Dx,Dy),dp;
    650   def D = Weyl();
     647  printlevel = 0;
     648  ring r = 0,(x,y),dp;
     649  poly f = x^2+y^3+x*y^2;
     650  def D = initialmalgrange(f);
    651651  setring D;
    652   ideal I = x*Dt,6*t*Dt+2*y*Dy+3*x*Dx+6,3*y^2*Dx-2*x*Dy,2*y*x*Dy+3*x^2*Dx+6*x,y^2*Dt,y^3+x^2,9*y*x^2*Dx^2+4*x^2*Dy^2+6*y^2*Dy+24*y*x*Dx+18*y,27*x^3*Dx^3-8*x^2*Dy^3-12*y^2*Dy^2+162*x^2*Dx^2-48*y*Dy+186*x*Dx;
    653   // I is a Groebner basis of the initial Malgrange ideal of x2+y3
     652  inF;
    654653  poly s = t*Dt;
    655   minpolsyz(s,I);
     654  minpolsyz(s,inF);
    656655  int p = prime(20000);
    657   minpolsyz(s,I,p,0);
     656  minpolsyz(s,inF,p,0,0);
    658657}
    659658
     
    685684  map @m = save,J;
    686685  poly p = @m(p);
    687   if (substitution ==1)
     686  if (substitution == 1)
    688687  {
    689688    p = subst(p,s,-s-1);
     
    706705}
    707706
    708 static proc bfctengine (poly f, int whichengine, int methodord, int methodminpol, int minpolchar, intvec u0)
     707static proc bfctengine (poly f, int whichengine, int methodord, int methodminpol, int minpolchar, int modengine, intvec u0)
    709708{
    710709  int ppl = printlevel - voice +2;
     
    735734          usedprimes = usedprimes,q;
    736735          dbprint(ppl,"used prime is: "+string(q));
    737           b = minpolsyz(s,inI,q,whichengine);
     736          b = minpolsyz(s,inI,q,whichengine,modengine);
    738737        }
    739738        i++;
     
    756755
    757756proc bfct (poly f, list #)
    758 "USAGE:  bfct(f [,s,t,v]);  f a poly, r,s,t optional ints, v an optional intvec
    759 RETURN:  list of roots of the Bernstein-Sato polynomial bs(f) and its multiplicies
     757"USAGE:  bfct(f [,s,t,v]);  f a poly, s,t optional ints, v an optional intvec
     758RETURN:  list of roots of the Bernstein-Sato polynomial bs(f) and their multiplicies
    760759PURPOSE: compute the global Bernstein-Sato polynomial for a hypersurface, defined by f, according to the algorithm by Masayuki Noro
    761760NOTE:    In this proc, a system of linear equations is solved by linear reductions.
     
    802801    }
    803802  }
    804   list b = bfctengine(f,whichengine,methodord,0,0,u0);
     803  list b = bfctengine(f,whichengine,methodord,0,0,0,u0);
    805804  return(b);
    806805}
     
    809808  "EXAMPLE:"; echo = 2;
    810809  ring r = 0,(x,y),dp;
    811   poly f = x2+y3+x*y^2;
     810  poly f = x^2+y^3+x*y^2;
    812811  bfct(f);
    813   bfct(f,1,1);
     812  intvec v = 3,2;
     813  bfct(f,1,0,v);
    814814}
    815815
    816816proc bfctsyz (poly f, list #)
    817 "USAGE:  bfctsyz(f [,r,s,t,v]);  f a poly, r,s,t optional ints, v an optional intvec
     817"USAGE:  bfctsyz(f [,r,s,t,u,v]);  f a poly, r,s,t,u optional ints, v an optional intvec
    818818RETURN:  list of roots of the Bernstein-Sato polynomial bs(f) and its multiplicies
    819819PURPOSE: compute the global Bernstein-Sato polynomial for a hypersurface, defined by f, according to the algorithm by Masayuki Noro
     
    825825@*       If t<>0, the minimal polynomial computation is solely performed over charasteristic 0,
    826826@*       otherwise and by default, a modular method is used.
    827 @*       If u<>0, @code{std} is used for Groebner basis computations in characteristic >0,
    828 @*       otherwise, and by default, @code{slimgb} is used.
     827@*       If u<>0 and by default, @code{std} is used for Groebner basis computations in characteristic >0,
     828@*       otherwise, @code{slimgb} is used.
    829829@*       If v is a positive weight vector, v is used for homogenization computations,
    830830@*       otherwise and by default, no weights are used.
     
    847847  int methodord   = 0; // default
    848848  int minpolchar  = 0; // default
     849  int modengine   = 1; // default
    849850  intvec u0       = 0; // default
    850851  if (size(#)>0)
     
    866867          minpolchar = int(#[3]);
    867868        }
    868         if (size(#)>3)
     869        if (size(#)>3)
    869870        {
    870           if (typeof(#[4])=="intvec" && size(#[4])==n && ispositive(#[4])==1)
     871          if (typeof(#[4])=="int" || typeof(#[4])=="number")
    871872          {
    872             u0 = #[4];
     873            modengine = int(#[4]);
     874          }
     875          if (size(#)>4)
     876          {
     877            if (typeof(#[5])=="intvec" && size(#[5])==n && ispositive(#[5])==1)
     878            {
     879              u0 = #[5];
     880            }
    873881          }
    874882        }
     
    876884    }
    877885  }
    878   list b = bfctengine(f,whichengine,methodord,1,minpolchar,u0);
     886  list b = bfctengine(f,whichengine,methodord,1,minpolchar,modengine,u0);
    879887  return(b);
    880888}
     
    883891  "EXAMPLE:"; echo = 2;
    884892  ring r = 0,(x,y),dp;
    885   poly F = x2+y3;
    886   bfctsyz(F);
    887   bfctsyz(F,1,1,1);
     893  poly f = x^2+y^3+x*y^2;
     894  bfctsyz(f);
     895  intvec v = 3,2;
     896  bfctsyz(f,0,1,1,0,v);
    888897}
    889898
    890899proc bfctideal (ideal I, intvec w, list #)
    891 "USAGE:  bfctideal(I,w[,s,t]);  I an ideal, r,s optional ints
    892 RETURN:  list of roots and its multiplicies of the global b-function of I w.r.t. to the weight -w,w
    893 PURPOSE: compute the global b-function of an ideal according to the algorithm by Masayuki Noro
     900"USAGE:  bfctideal(I,w[,s,t]);  I an ideal, w an intvec, s,t optional ints
     901RETURN:  list of roots and their multiplicies of the global b-function of I w.r.t. the weight vector (-w,w)
     902PURPOSE: compute the global b-function of an ideal according to the algorithm by M. Noro
    894903NOTE:    Assume, I is an ideal in the n-th Weyl algebra where the sequence of the
    895904@*       variables is x(1),...,x(n),D(1),...,D(n).
     
    937946  "EXAMPLE:"; echo = 2;
    938947  ring @D = 0,(x,y,Dx,Dy),dp;
    939   def DD = Weyl();
    940   setring DD;
     948  def D = Weyl();
     949  setring D;
    941950  ideal I = 3*x^2*Dy+2*y*Dx,2*x*Dx+3*y*Dy+6;
    942951  intvec w1 = 1,1;
     
    944953  intvec w3 = 2,3;
    945954  bfctideal(I,w1);
    946   bfctideal(I,w2);
    947   bfctideal(I,w3);
     955  bfctideal(I,w2,1);
     956  bfctideal(I,w3,0,1);
    948957}
    949958
     
    984993  def DDh = initialidealengine("bfctonestep", whichengine, methodord, f);
    985994  setring DDh;
     995  dbprint(ppl, "the initial ideal:", string(matrix(inF)));
    986996  inF = nselect(inF,3,2*n+4);
    987997  inF = nselect(inF,1);
     
    10001010  "EXAMPLE:"; echo = 2;
    10011011  ring r = 0,(x,y),dp;
    1002   poly f = x2+y3;
     1012  poly f = x^2+y^3+x*y^2;
    10031013  bfctonestep(f);
     1014  bfctonestep(f,1,1);
    10041015}
    10051016
  • Singular/LIB/dmodapp.lib

    r49f94f r238c959  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: dmodapp.lib,v 1.7 2008-08-08 12:57:31 Singular Exp $";
     2version="$Id: dmodapp.lib,v 1.8 2008-10-01 17:44:38 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    1919initialideal(I,u,v[,s,t]); compute the initial ideal of a given ideal w.r.t. given weights
    2020
    21 SECONDARY PROCEDURES FOR D-MODULES:
     21SECONDARY PROCEDURES FOR D-MODULES: //todo: no seperate paragraph on web page
    2222isFsat(I, F);            check whether the ideal I is F-saturated
    2323SDLoc(I, F); compute a generic presentation of the localization of D/I w.r.t. f^s, for D a Weyl algebra
     
    6666
    6767proc initialideal (ideal I, intvec u, intvec v, list #)
    68 "USAGE:  initialideal(I, [,s,t]);  I an ideal, s,t optional ints
    69 RETURN:  an ideal, the initial ideal of the input ideal w.r.t. the weights u and v
     68"USAGE:  initialideal(I,u,v [,s,t]);  I an ideal, u,v intvecs, s,t optional ints
     69RETURN:  an ideal, a Broebner basis of the initial ideal of the input ideal w.r.t. the weights u and v
    7070PURPOSE: compute the initial ideal
    7171NOTE:    Assume, I is an ideal in the n-th Weyl algebra where the sequence of the
    72 @*       variables is x(1),...,x(n),D(1),...,D(n).
     72@*       indeterminates is x(1),...,x(n),D(1),...,D(n).
    7373@*       Further assume that u is the weight for the x(i) and v the weight for the D(i).
    7474@*       Note that the returned ideal is not a D-ideal but an ideal in the associated
    75 @*       graded ring.
     75@*       graded ring while the Groebner basis is a subset of D.
    7676@*       If s<>0, @code{std} is used for Groebner basis computations, otherwise,
    7777@*       and by default, @code{slimgb} is used.
     
    119119proc initialmalgrange (poly f,list #)
    120120"USAGE:  initialmalgrange(f, [,s,t,u,v]);  f a poly, s,t,u optional ints, v an optional intvec
    121 RETURN:  a ring, the Weyl algebra induced by the basering, extended in the variables t and Dt
    122 PURPOSE: compute the initial Malgrange ideal of a given poly w.r.t. to the weight vector
     121RETURN:  a ring, the Weyl algebra induced by the basering, extended in the indeterminates t and Dt
     122PURPOSE: compute the initial Malgrange ideal of a given poly w.r.t. the weight vector
    123123@*       (-1,0...,0,1,0,...,0) such that the weight of t is -1 and the weight of Dt is 1.
    124124NOTE:    Activate the output ring with the @code{setring} command.
     
    184184  "EXAMPLE:"; echo = 2;
    185185  ring r = 0,(x,y),dp;
    186   poly f = x2+y3;
     186  poly f = x^2+y^3+x*y^2;
    187187  def D = initialmalgrange(f);
    188188  setring D;
    189189  inF;
    190190  setring r;
    191   def D2 = initialmalgrange(f,1,1,1);
     191  intvec v = 3,2;
     192  def D2 = initialmalgrange(f,1,0,1,v);
    192193  setring D2;
    193194  inF;
     
    218219  {
    219220    poly f = #[1];
    220     uv[n+2] = 1;
    221221    if (calledfrom == "initialmalgrange")
    222222    {
     223      uv[n+2] = 1;
    223224      noofvars = 2*n+3;
    224225      intvec u0 = #[4];
     
    438439proc InForm (list #)
    439440"USAGE:  InForm(f,w) or InForm(I,w);  f a poly, I an ideal, w an intvec
    440 RETURN:  the initial of f or I w.r.t. to the weight w
    441 PURPOSE: compute the initial form of a poly or ideal w.r.t a given weight
     441RETURN:  the initial form of f or I w.r.t. the weight vector w
     442PURPOSE: compute the initial form of a poly or an  ideal w.r.t a given weight
    442443NOTE:    the size of the weight vector must be equal to the number of variables of the basering
    443444EXAMPLE: example InForm; shows examples
     
    628629
    629630
    630 proc AppelF1()
     631proc AppelF1() //todo: create help string
    631632//(number a,b,c,d)
    632633{
     
    654655}
    655656
    656 proc AppelF2()
     657proc AppelF2() //todo: create help string
    657658//(number a,b,c)
    658659{
     
    679680}
    680681
    681 proc AppelF4()
     682proc AppelF4() //todo: create help string
    682683//number a,b,c,d - ?
    683684{
     
    742743PURPOSE: check whether the ideal I is F-saturated
    743744NOTE:    1 is returned if I is F-saturated, otherwise 0 is returned
    744 *   we check indeed that  Ker(D --F--> D/I) is (0)
     745*   we check indeed that  Ker(D --F--> D/I) is (0) //todo: * or @* ??
    745746EXAMPLE: example isFsat; shows examples
    746747"
     
    13581359  RLD;
    13591360  // Now, compare with the output of Macaulay2:
    1360  ideal tst = 3*x*Dx + 2*y*Dy + 1, y^3*Dy^2 - x^2*Dy^2 + 6*y^2*Dy + 6*y, 9*y^2*Dx^2*Dy - 4*y*Dy^3 + 27*y*Dx^2 + 2*Dy^2, 9*y^3*Dx^2 - 4*y^2*Dy^2 + 10*y*Dy -10;
     1361  ideal tst = 3*x*Dx + 2*y*Dy + 1, y^3*Dy^2 - x^2*Dy^2 + 6*y^2*Dy + 6*y, 9*y^2*Dx^2*Dy - 4*y*Dy^3 + 27*y*Dx^2 + 2*Dy^2, 9*y^3*Dx^2 - 4*y^2*Dy^2 + 10*y*Dy -10; //todo: maybe a bit too long
    13611362 option(redSB);
    13621363 option(redTail);
     
    15231524}
    15241525
    1525 proc engine(ideal I, int i)
     1526proc engine(ideal I, int i) //todo: create help string
    15261527{
    15271528  /* std - slimgb mix */
     
    15401541  return(J);
    15411542}
    1542 example
     1543example //todo: strange: example not showing on web page
    15431544{
    15441545  "EXAMPLE:"; echo = 2;
Note: See TracChangeset for help on using the changeset viewer.