Changeset ca2528 in git


Ignore:
Timestamp:
May 24, 2007, 1:06:54 PM (17 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
794151225ce935a04d5383edb53d935c5a799062
Parents:
6cb5391051cee3dc93fa18196344d56195ad11e5
Message:
*levandov: new headliner function annfs and fixes


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/dmod.lib

    r6cb539 rca2528  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: dmod.lib,v 1.12 2007-01-23 15:03:30 Singular Exp $";
     2version="$Id: dmod.lib,v 1.13 2007-05-24 11:06:54 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    3434@* - all the relevant data (LD, LD0, bs, PS) are computed by operatorBM
    3535
    36 PROCEDURES:
    37 
    38 annfs0(I,F [,eng]);    compute Ann F^s0 in D and Bernstein poly from the known Ann F^s in D[s]
     36MAIN PROCEDURES:
     37
     38annfs(F[,S,eng]);      compute Ann F^s0 in D and Bernstein poly for a poly F
     39
     40bernsteinBM(F[,eng]);  compute global Bernstein poly for a poly F (algorithm of Briancon-Maisonobe)
     41operatorBM(F[,eng]);   compute Ann F^s, Ann F^s0, BS and PS for a poly F (algorithm of Briancon-Maisonobe)
     42annfsParamBM(F[,eng]); compute the generic Ann F^s (algorithm by Briancon and Maisonobe) and exceptional parametric constellations for a poly F with parametric coefficients
     43annfsBMI(F[,eng]);     compute Ann F^s and Bernstein ideal for a poly F=f1*..*fP (multivariate algorithm of Briancon-Maisonobe)
     44
     45SECONDARY D-MOD PROCEDURES:
     46
    3947annfsBM(F[,eng]);      compute Ann F^s0 in D and Bernstein poly for a poly F (algorithm of Briancon-Maisonobe)
    4048annfsLOT(F[,eng]);     compute Ann F^s0 in D and Bernstein poly for a poly F (Levandovskyy modification of the Oaku-Takayama algorithm)
    4149annfsOT(F[,eng]);      compute Ann F^s0 in D and Bernstein poly for a poly F (algorithm of Oaku-Takayama)
    42 
    4350SannfsBM(F[,eng]);     compute Ann F^s in D[s] for a poly F (algorithm of Briancon-Maisonobe)
    4451SannfsLOT(F[,eng]);    compute Ann F^s in D[s] for a poly F (Levandovskyy modification of the Oaku-Takayama algorithm)
    4552SannfsOT(F[,eng]);     compute Ann F^s in D[s] for a poly F (algorithm of Oaku-Takayama)
    46 
    47 bernsteinBM(F[,eng]);  compute global Bernstein poly for a poly F (algorithm of Briancon-Maisonobe)
    48 operatorBM(F[,eng]);   compute Ann F^s, Ann F^s0, BS and PS for a poly F (algorithm of Briancon-Maisonobe)
    49 annfsParamBM(F[,eng]); compute the generic Ann F^s and exceptional parametric constellations for a poly F with parametric coefficients (algorithm by Briancon and Maisonobe)
    50 
    51 annfsBMI(F[,eng]);  compute Ann F^s and Bernstein ideal for a poly F=f1*..*fP (multivariate algorithm of Briancon-Maisonobe)
    52 
     53annfs0(I,F [,eng]);    compute Ann F^s0 in D and Bernstein poly from the known Ann F^s in D[s]
    5354
    5455AUXILIARY PROCEDURES:
     
    5960convloc(L);       replace global orderings with local in the ringlist L
    6061minIntRoot(P,fact); minimal integer root among the roots of a maximal ideal P
     62
     63SEE ALSO: gmssing.lib
    6164";
    6265
     
    8487  }
    8588  return(J);
     89}
     90
     91
     92// new top-level procedure
     93proc annfs(poly F, list #)
     94"USAGE:  annfs(f [,S,eng]);  f a poly, S a string, eng an optional int
     95RETURN:  ring
     96PURPOSE: compute the D-module structure of basering[f^s] with the algorithm given in S and with the
     97Groebner basis engine given in eng
     98NOTE:    activate the output ring with the @code{setring} command.
     99@*       The value of a string S can be
     100@*       'bm' (default) - for the algorithm of  Briancon and Maisonobe,
     101@*       'ot'  - for the algorithm of Oaku and Takayama,
     102@*       'lot' - for the Levandovskyy's modification of the algorithm of Oaku and Takayama.
     103@*       If eng <>0, @code{std} is used for Groebner basis computations,
     104@*       otherwise, and by default @code{slimgb} is used.
     105@*       In the output ring:
     106@*       - the ideal LD is the needed D-module structure,
     107@*       - the list  BS is the list of roots and multiplicities of a Bernstein polynomial of f.
     108@*       If @code{printlevel}=1, progress debug messages will be printed,
     109@*       if @code{printlevel}>=2, all the debug messages will be printed.
     110EXAMPLE: example annfs; shows examples
     111"
     112{
     113  int eng = 0;
     114  int chs = 0; // choice
     115  string algo = "bm";
     116  string st;
     117  if ( size(#)>0 )
     118  {
     119   if ( typeof(#[1]) == "string" )
     120   {
     121     st = string(#[1]);
     122     if ( (st == "BM") || (st == "Bm") || (st == "bM") ||(st == "bm"))
     123     {
     124       algo = "bm";
     125       chs  = 1;
     126     }
     127     if ( (st == "OT") || (st == "Ot") || (st == "oT") || (st == "ot"))
     128     {
     129       algo = "ot";
     130       chs  = 1;
     131     }
     132     if ( (st == "LOT") || (st == "lOT") || (st == "Lot") || (st == "lot"))
     133     {
     134       algo = "lot";
     135       chs  = 1;
     136     }
     137     if (chs != 1)
     138     {
     139       // incorrect value of S
     140       print("Incorrect algorithm given, proceed with the default BM");
     141       algo = "bm";
     142     }
     143     // second arg
     144     if (size(#)>1)
     145     {
     146       // exists 2nd arg
     147       if ( typeof(#[2]) == "int" )
     148       {
     149         // the case: given alg, given engine
     150         eng = int(#[2]);
     151       }
     152       else
     153       {
     154         eng = 0;
     155       }
     156     }
     157     else
     158     {
     159       // no second arg
     160       eng = 0;
     161     }
     162   }
     163   else
     164   {
     165     if ( typeof(#[1]) == "int" )
     166     {
     167     // the case: default alg, engine
     168     eng = int(#[1]);
     169     //      algo = "bm";  //is already set
     170     }
     171     else
     172     {
     173       // incorr. 1st arg
     174       algo = "bm";
     175     }
     176   }
     177  }
     178
     179   // size(#)=0, i.e. there is no algorithm and no engine given
     180   //  eng = 0; algo = "bm";  //are already set
     181   // int ppl = printlevel-voice+2;
     182  printlevel=printlevel+1;
     183  def save = basering;
     184  if ( algo=="ot")
     185  {
     186    def @A = annfsOT(F,eng);
     187  }
     188  else
     189  {
     190    if ( algo=="lot")
     191    {
     192      def @A = annfsLOT(F,eng);
     193    }
     194    else
     195    {
     196      // bm = default
     197      def @A = annfsBM(F,eng);
     198    }
     199  }
     200  return(@A);
     201}
     202example
     203{
     204  "EXAMPLE:"; echo = 2;
     205  ring r = 0,(x,y,z),Dp;
     206  poly F = x^3+y^3+z^3;
     207  printlevel = 0;
     208  def A  = annfs(F); // here, the default BM algorithm will be used
     209  setring A;
     210  LD;
     211  BS;
    86212}
    87213
     
    493619  bernsteinBM(F);
    494620}
    495 
     621 
    496622// some changes
    497623proc annfsBM (poly F, list #)
     
    10731199  "EXAMPLE:"; echo = 2;
    10741200  //  ring r = 0,(x,y,z,w),Dp;
     1201  //  poly F = x^3+y^3+z^2*w;
    10751202  ring r = 0,(x,y,z),Dp;
    1076   //  poly F = x^3+y^3+z^2*w;
    10771203  poly F = x^3+y^3+z^3;
    10781204  printlevel = 0;
     
    35733699  poly F = x*y*(x+y);
    35743700  int eng = 0;
    3575   def A = annfsOT(F,eng);
     3701  def A = annfsBM(F,eng);
    35763702  setring A;
    35773703  LD;
     
    35803706static proc ex_BMI()
    35813707{
     3708  // a hard example
    35823709  ring r = 0,(x,y),Dp;
    35833710  poly F1 = (x2-y3)*(x3-y2);
    35843711  poly F2 = (x2-y3)*(xy4+y5+x4);
    3585 }
     3712  ideal F = F1,F2;
     3713  def A = annfsBMI(F);
     3714  setring A;
     3715  LD;
     3716  BS;
     3717}
     3718
     3719static proc ex2_BMI()
     3720{
     3721  // this example was believed to be intractable in 2005 by Gago-Vargas, Castro and Ucha
     3722  ring r = 0,(x,y),Dp;
     3723  option(prot);
     3724  option(mem);
     3725  ideal F = x2+y3,x3+y2;
     3726  printlevel = 2;
     3727  def A = annfsBMI(F);
     3728  setring A;
     3729  LD;
     3730  BS;
     3731}
     3732
     3733static proc ex_operatorBM()
     3734{
     3735  ring r = 0,(x,y,z,w),Dp;
     3736  poly F = x^3+y^3+z^2*w;
     3737  printlevel = 0;
     3738  def A = operatorBM(F);
     3739  setring A;
     3740  F; // the original polynomial itself
     3741  LD; // generic annihilator
     3742  LD0; // annihilator
     3743  bs; // normalized Bernstein poly
     3744  BS; // root and multiplicities of the Bernstein poly
     3745  PS; // the operator, s.t. PS*F^{s+1} = bs*F^s mod LD
     3746  reduce(PS*F-bs,LD); // check the property of PS
     3747}
Note: See TracChangeset for help on using the changeset viewer.