Changeset 3cec5e in git


Ignore:
Timestamp:
Feb 12, 2009, 9:25:23 PM (14 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
fec31e1b0b4219695838afd56e61b869215483ec
Parents:
40165d708d5c5de0e1ae9846acbc8942e2533da5
Message:
*levandov: fixes and doc improvements, bfun instead of bfct_lib


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/all.lib

    r40165d r3cec5e  
    1 // $Id: all.lib,v 1.59 2008-10-07 09:16:09 Singular Exp $
     1// $Id: all.lib,v 1.60 2009-02-12 20:25:23 levandov Exp $
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: all.lib,v 1.59 2008-10-07 09:16:09 Singular Exp $";
     3version="$Id: all.lib,v 1.60 2009-02-12 20:25:23 levandov Exp $";
    44category = "General purpose";
    55info="
     
    8888LIB "zeroset.lib";
    8989LIB "phindex.lib";
    90 LIB "bfct.lib";
     90LIB "bfun.lib";
    9191LIB "central.lib";
    9292LIB "discretize.lib";
  • Singular/LIB/dmod.lib

    r40165d r3cec5e  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: dmod.lib,v 1.34 2009-01-14 16:07:04 Singular Exp $";
     2version="$Id: dmod.lib,v 1.35 2009-02-12 20:25:22 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    7373
    7474
    75 SEE ALSO: gmssing_lib, bfct_lib, dmodapp_lib
     75SEE ALSO: gmssing_lib, bfun_lib, dmodapp_lib
    7676";
    7777
     
    18871887//  poly F = x^3+y^3+z^2*w;
    18881888
    1889 // TODO: 1 has to appear in the 2nd column of transp. matrix
     1889// TODO: 1 has to appear in the 1nd column of transp. matrix
    18901890// this does not happen automatically
    1891 // for this, do special modulo with emphasis on the 2comp
     1891// for this, do special modulo with emphasis on the 1comp (c,<)
    18921892// of the transp matrix, there must appear 1 in the GB
    18931893// then use lift to get the expression...
     
    18981898"USAGE:  operatorModulo(f,I,b);  f a poly, I an ideal, b a poly
    18991899RETURN:  poly
    1900 PURPOSE: compute the B-operator from the poly F, ideal I = Ann f^s and Bernstein-Sato
    1901 polynomial b using modulo
     1900PURPOSE: compute the B-operator from the poly f, ideal I = Ann f^s and Bernstein-Sato
     1901polynomial b using modulo i.e. kernel of module homomorphism
    19021902NOTE:  The computations take place in the ring, similar to the one returned by Sannfs procedure.
    19031903@*       If printlevel=1, progress debug messages will be printed,
     
    34093409"USAGE:  SannfsBFCT(f [,eng]);  f a poly, eng an optional int
    34103410RETURN:  ring
    3411 PURPOSE: compute the D-module structure of basering[1/f]*f^s, according to the 1st step of the algorithm by Briancon and Maisonobe in the ring D[s], where D is the Weyl algebra
     3411PURPOSE: compute ann f^s and Groebner basis of ann f^s+f in D[s]
    34123412NOTE:    activate this ring with the @code{setring} command.
    34133413@*       This procedure, unlike SannfsBM, returns a ring with the degrevlex ordering in all variables.
    3414 @*       In the ring D[s], the ideal LD (which is NOT a Groebner basis) is the needed D-module structure,
     3414@*       In the ring D[s], the ideal LD (which IS a Groebner basis) is the needed ideal.
    34153415@*       If eng <>0, @code{std} is used for Groebner basis computations,
    34163416@*       otherwise, and by default @code{slimgb} is used.
     
    34203420"
    34213421{
     3422  // DEBUG INFO: ordering on the output ring = dp, engine on the sum of ideals is used
     3423  // hence it's the situation for slimgb
     3424
    34223425  int eng = 0;
    34233426  if ( size(#)>0 )
     
    35873590  dbprint(ppl-1, LD);
    35883591  LD = engine(LD,eng);
     3592  dbprint(ppl,"//  -2-3- finished GB computations for Ann f^s + f");
     3593  dbprint(ppl-1, LD);
     3594  // make leadcoeffs positive
     3595  for (i=1; i<= ncols(LD); i++)
     3596  {
     3597    if (leadcoef(LD[i]) <0 )
     3598    {
     3599      LD[i] = -LD[i];
     3600    }
     3601  }
     3602  export LD;
     3603  kill @R;
     3604  return(@R2);
     3605}
     3606example
     3607{
     3608  "EXAMPLE:"; echo = 2;
     3609  ring r = 0,(x,y,z,w),Dp;
     3610  poly F = x^3+y^3+z^3*w;
     3611  printlevel = 0;
     3612  def A = SannfsBFCT(F); setring A;
     3613  intvec v = 1,2,3,4,5,6,7,8;
     3614  // are there polynomials, depending on s only?
     3615  nselect(LD,v);
     3616  // a fancier example:
     3617  def R = reiffen(4,5); setring R;
     3618  v = 1,2,3,4;
     3619  RC; // the Reiffen curve in 4,5
     3620  def B = SannfsBFCT(RC);
     3621  setring B;
     3622  // are there polynomials, depending on s only?
     3623  nselect(LD,v);
     3624  // it is not the case. Are there leading monomials in s only?
     3625  nselect(lead(LD),v);
     3626}
     3627
     3628proc SannfsBFCTstd(poly F, list #)
     3629"USAGE:  SannfsBFCTstd(f [,eng]);  f a poly, eng an optional int
     3630RETURN:  ring
     3631PURPOSE: compute ann f^s and Groebner basis of ann f^s+f in D[s]
     3632NOTE:    activate this ring with the @code{setring} command.
     3633@*       This procedure, unlike SannfsBM, returns a ring with the degrevlex ordering in all variables.
     3634@*       In the ring D[s], the ideal LD (which IS a Groebner basis) is the needed ideal.
     3635@*       In this procedure @code{std} is used for Groebner basis computations.
     3636DISPLAY: If printlevel=1, progress debug messages will be printed,
     3637@*       if printlevel>=2, all the debug messages will be printed.
     3638EXAMPLE: example SannfsBFCTstd; shows examples
     3639"
     3640{
     3641  // DEBUG INFO: ordering on the output ring = dp,
     3642  // use std(K,F); for reusing the std property of K
     3643
     3644  int eng = 0;
     3645  if ( size(#)>0 )
     3646  {
     3647    if ( typeof(#[1]) == "int" )
     3648    {
     3649      eng = int(#[1]);
     3650    }
     3651  }
     3652  // returns a list with a ring and an ideal LD in it
     3653  int ppl = printlevel-voice+2;
     3654  //  printf("plevel :%s, voice: %s",printlevel,voice);
     3655  def save = basering;
     3656  int N = nvars(basering);
     3657  int Nnew = 2*N+2;
     3658  int i,j;
     3659  string s;
     3660  list RL = ringlist(basering);
     3661  list L, Lord;
     3662  list tmp;
     3663  intvec iv;
     3664  L[1] = RL[1]; // char
     3665  L[4] = RL[4]; // char, minpoly
     3666  // check whether vars have admissible names
     3667  list Name  = RL[2];
     3668  list RName;
     3669  RName[1] = "@t";
     3670  RName[2] = "@s";
     3671  for(i=1;i<=N;i++)
     3672  {
     3673    for(j=1; j<=size(RName);j++)
     3674    {
     3675      if (Name[i] == RName[j])
     3676      {
     3677        ERROR("Variable names should not include @t,@s");
     3678      }
     3679    }
     3680  }
     3681  // now, create the names for new vars
     3682  list DName;
     3683  for(i=1;i<=N;i++)
     3684  {
     3685    DName[i] = "D"+Name[i]; // concat
     3686  }
     3687  tmp[1] = "t";
     3688  tmp[2] = "s";
     3689  list NName = tmp + DName + Name ;
     3690  L[2]   = NName;
     3691  // Name, Dname will be used further
     3692  kill NName;
     3693  // block ord (lp(2),dp);
     3694  tmp[1]  = "lp"; // string
     3695  iv      = 1,1;
     3696  tmp[2]  = iv; //intvec
     3697  Lord[1] = tmp;
     3698  // continue with dp 1,1,1,1...
     3699  tmp[1]  = "dp"; // string
     3700  s       = "iv=";
     3701  for(i=1;i<=Nnew;i++)
     3702  {
     3703    s = s+"1,";
     3704  }
     3705  s[size(s)]= ";";
     3706  execute(s);
     3707  kill s;
     3708  tmp[2]    = iv;
     3709  Lord[2]   = tmp;
     3710  tmp[1]    = "C";
     3711  iv        = 0;
     3712  tmp[2]    = iv;
     3713  Lord[3]   = tmp;
     3714  tmp       = 0;
     3715  L[3]      = Lord;
     3716  // we are done with the list
     3717  def @R@ = ring(L);
     3718  setring @R@;
     3719  matrix @D[Nnew][Nnew];
     3720  @D[1,2]=t;
     3721  for(i=1; i<=N; i++)
     3722  {
     3723    @D[2+i,N+2+i]=-1;
     3724  }
     3725  //  L[5] = matrix(UpOneMatrix(Nnew));
     3726  //  L[6] = @D;
     3727  def @R = nc_algebra(1,@D);
     3728  setring @R;
     3729  kill @R@;
     3730  dbprint(ppl,"// -1-1- the ring @R(t,s,_Dx,_x) is ready");
     3731  dbprint(ppl-1, @R);
     3732  // create the ideal I
     3733  poly  F = imap(save,F);
     3734  ideal I = t*F+s;
     3735  poly p;
     3736  for(i=1; i<=N; i++)
     3737  {
     3738    p = t; // t
     3739    p = diff(F,var(N+2+i))*p;
     3740    I = I, var(2+i) + p;
     3741  }
     3742  // -------- the ideal I is ready ----------
     3743  dbprint(ppl,"// -1-2- starting the elimination of t in @R");
     3744  dbprint(ppl-1, I);
     3745  ideal J = engine(I,eng);
     3746  ideal K = nselect(J,1);
     3747  dbprint(ppl,"// -1-3- t is eliminated");
     3748  dbprint(ppl-1, K);  // K is without t
     3749  K = engine(K,eng);  // std does the job too
     3750  // now, we must change the ordering
     3751  // and create a ring without t
     3752  //  setring S;
     3753  // ----------- the ring @R3 ------------
     3754  // _Dx,_x,s;  +fast ord !
     3755  // keep: N, i,j,s, tmp, RL
     3756  Nnew = 2*N+1;
     3757  kill Lord, tmp, iv, RName;
     3758  list Lord, tmp;
     3759  intvec iv;
     3760  list L=imap(save,L);
     3761  list RL=imap(save,RL);
     3762  L[1] = RL[1];
     3763  L[4] = RL[4];  // char, minpoly
     3764  // check whether vars hava admissible names -> done earlier
     3765  // now, create the names for new var
     3766  tmp[1] = "s";
     3767  // DName is defined earlier
     3768  list NName = DName + Name + tmp;
     3769  L[2] = NName;
     3770  tmp = 0;
     3771  // just dp
     3772  // block ord (dp(N),dp);
     3773  string s = "iv=";
     3774  for (i=1; i<=Nnew; i++)
     3775  {
     3776    s = s+"1,";
     3777  }
     3778  s[size(s)]=";";
     3779  execute(s);
     3780  tmp[1] = "dp";  // string
     3781  tmp[2] = iv;   // intvec
     3782  Lord[1] = tmp;
     3783  kill s;
     3784  kill NName;
     3785  tmp[1]      = "C";
     3786  Lord[2]     = tmp;  tmp = 0;
     3787  L[3]        = Lord;
     3788  // we are done with the list. Now add a Plural part
     3789  def @R2@ = ring(L);
     3790  setring @R2@;
     3791  matrix @D[Nnew][Nnew];
     3792  for (i=1; i<=N; i++)
     3793  {
     3794    @D[i,N+i]=-1;
     3795  }
     3796  def @R2 = nc_algebra(1,@D);
     3797  setring @R2;
     3798  kill @R2@;
     3799  dbprint(ppl,"//  -2-1- the ring @R2(_Dx,_x,s) is ready");
     3800  dbprint(ppl-1, @R2);
     3801  ideal MM = maxideal(1);
     3802  MM = 0,s,MM;
     3803  map R01 = @R, MM;
     3804  ideal K = R01(K);
     3805  // total cleanup
     3806  poly F = imap(save, F);
     3807  //  ideal LD = K,F;
     3808  dbprint(ppl,"//  -2-2- start GB computations for Ann f^s + f");
     3809  //  dbprint(ppl-1, LD);
     3810  ideal LD = std(K,F);
     3811  //  LD = engine(LD,eng);
    35893812  dbprint(ppl,"//  -2-3- finished GB computations for Ann f^s + f");
    35903813  dbprint(ppl-1, LD);
     
    50685291  // check whether basering is D[s]=K(_x,_Dx,s)
    50695292  list Name = RL[2];
    5070   for (i=1; i<=n; i++)
    5071   {
    5072     if ( bracket(var(i+n),var(i))!=1 )
    5073     {
    5074       ERROR("basering should be D[s]=K(_x,_Dx,s)");
    5075     }
    5076   }
     5293//   for (i=1; i<=n; i++)
     5294//   {
     5295//     if ( bracket(var(i+n),var(i))!=1 )
     5296//     {
     5297//       ERROR("basering should be D[s]=K(_x,_Dx,s)");
     5298//     }
     5299//   }
    50775300  if ( Name[N]!="s" )
    50785301  {
  • Singular/LIB/dmodapp.lib

    r40165d r3cec5e  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: dmodapp.lib,v 1.17 2009-01-15 19:19:08 levandov Exp $";
     2version="$Id: dmodapp.lib,v 1.18 2009-02-12 20:25:23 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    4949
    5050
    51 SEE ALSO: dmod_lib, gmssing_lib, bfct_lib
     51SEE ALSO: dmod_lib, gmssing_lib, bfun_lib
    5252";
    5353
     
    5656LIB "primdec.lib";
    5757LIB "dmod.lib"; // loads e.g. nctools.lib
    58 LIB "bfct.lib";
     58LIB "bfun.lib"; //formerly LIB "bfct.lib";
    5959
    6060// todo: complete and include into above list
Note: See TracChangeset for help on using the changeset viewer.