Changeset 800a62 in git


Ignore:
Timestamp:
Mar 9, 2010, 10:24:47 PM (14 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
ea590fa528c7ccd8037ce62d79d09f081a0af332
Parents:
cfbee28a6ff075e6e44432df114e0bd291f54bfa
Message:
*levandov: Sannfslog returns now the same ring as Sannfs

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/dmod.lib

    rcfbee28 r800a62  
    9090";
    9191
     92// reworked by JM+VL on 9.3.2010: Sannfslog
    9293// added by VL on 2.3.2010: bernsteinLift
    9394// ****** commented out for better readability by VL on 2.3.2010
     
    451452  tmp[1] = "s";
    452453  list NName;
    453   for (i=1; i<=N; i++)
    454   {
    455     NName[2*i-1] = Name[i];
    456     NName[2*i] = DName[i];
    457     //NName[2*i-1] = DName[i];
    458     //NName[2*i] = Name[i];
    459   }
    460   NName[Nnew] = tmp[1];
     454  NName = Name + DName + tmp;
    461455  L[2] = NName;
    462456  tmp = 0;
    463   // block ord (a(1,1),a(0,0,1,1),...,dp);
    464   //list("a",intvec(1,1)), list("a",intvec(0,0,1,1)), ...
    465   tmp[1] = "a";  // string
    466   for (i=1; i<=N; i++)
    467   {
    468     iv[2*i-1] = 1;
    469     iv[2*i]   = 1;
    470     tmp[2]    = iv;  iv = 0;  // intvec
    471     Lord[i]   = tmp;
    472   }
    473   //list("dp",intvec(1,1,1,1,1,...))
     457  // block ord (dp(N),dp);
    474458  s = "iv=";
    475   for (i=1; i<=Nnew; i++)
     459  for (i=1; i<=Nnew-1; i++)
    476460  {
    477461    s = s+"1,";
     
    479463  s[size(s)]=";";
    480464  execute(s);
     465  tmp[1] = "dp";  // string
     466  tmp[2] = iv;   // intvec
     467  Lord[1] = tmp;
     468  // continue with dp 1,1,1,1...
     469  tmp[1] = "dp";  // string
     470  s[size(s)] = ",";
     471  s = s+"1;";
     472  execute(s);
    481473  kill s;
    482   tmp[1] = "dp";  // string
    483   tmp[2] = iv;    // intvec
    484   Lord[N+1] = tmp;
    485   //list("C",intvec(0))
    486   tmp[1] = "C";  // string
    487   iv = 0;
    488   tmp[2] = iv;   // intvec
    489   Lord[N+2] = tmp;
    490   tmp = 0;
    491   L[3]    = Lord;
     474  kill NName;
     475  tmp[2]      = iv;
     476  Lord[2]     = tmp;
     477  tmp[1]      = "C";  iv  = 0;  tmp[2]=iv;
     478  Lord[3]     = tmp;  tmp = 0;
     479  L[3]        = Lord;
    492480  // we are done with the list. Now add a Plural part
    493481  def @R@ = ring(L);
     
    496484  for (i=1; i<=N; i++)
    497485  {
    498     @D[2*i-1,2*i]=1;
    499     //@D[2*i-1,2*i]=-1;
     486    @D[i,N+i]=1;
    500487  }
    501488  def @R = nc_algebra(1,@D);
     
    509496  for (i=1; i<=N; i++)
    510497  {
    511     v = v + var(2*i)*gen(i+1);
    512     //v = v + var(2*i-1)*gen(i+1);
     498    v = v + var(i+N)*gen(i+1);
    513499  }
    514500  ideal J = ideal(M*v);
     
    530516  "EXAMPLE:"; echo = 2;
    531517  ring r = 0,(x,y),Dp;
    532   poly F = x^4+y^5+x*y^4;
     518  poly F = x4+y5+x*y4;
    533519  printlevel = 0;
    534520  def A  = Sannfslog(F);
     
    536522  LD1;
    537523}
     524
     525// JM+VL: output ring restructured into "normal"
     526
     527// proc Sannfslog (poly F, list #)
     528// "USAGE:  Sannfslog(f [,eng]);  f a poly, eng an optional int
     529// RETURN:  ring
     530// PURPOSE: compute the D-module structure of basering[1/f]*f^s
     531// NOTE:    activate the output ring with the @code{setring} command.
     532// @*   In the output ring D[s], the ideal LD1 is generated by the elements
     533// @*   in Ann F^s in D[s], coming from logarithmic derivations.
     534// @*       If eng <>0, @code{std} is used for Groebner basis computations,
     535// @*       otherwise, and by default @code{slimgb} is used.
     536// DISPLAY: If @code{printlevel}=1, progress debug messages will be printed,
     537// @*          if @code{printlevel}>=2, all the debug messages will be printed.
     538// EXAMPLE: example Sannfslog; shows examples
     539// "
     540// {
     541//   int eng = 0;
     542//   if ( size(#)>0 )
     543//   {
     544//     if ( typeof(#[1]) == "int" )
     545//     {
     546//       eng = int(#[1]);
     547//     }
     548//   }
     549//   int ppl = printlevel-voice+2;
     550//   def save = basering;
     551//   int N = nvars(basering);
     552//   int Nnew = 2*N+1;
     553//   int i;
     554//   string s;
     555//   list RL = ringlist(basering);
     556//   list L, Lord;
     557//   list tmp;
     558//   intvec iv;
     559//   L[1] = RL[1]; // char
     560//   L[4] = RL[4]; // char, minpoly
     561//   // check whether vars have admissible names
     562//   list Name = RL[2];
     563//   for (i=1; i<=N; i++)
     564//   {
     565//     if (Name[i] == "s")
     566//     {
     567//       ERROR("Variable names should not include s");
     568//     }
     569//   }
     570//   // the ideal I
     571//   ideal I = -F, jacob(F);
     572//   dbprint(ppl,"// -1-1- starting the computation of syz(-F,_Dx(F))");
     573//   dbprint(ppl-1, I);
     574//   matrix M = syz(I);
     575//   M = transpose(M);  // it is more usefull working with columns
     576//   dbprint(ppl,"// -1-2- the module syz(-F,_Dx(F)) has been computed");
     577//   dbprint(ppl-1, M);
     578//   // ------------ the ring @R ------------
     579//   // _x, _Dx, s;  elim.ord for _x,_Dx.
     580//   // now, create the names for new vars
     581//   list DName;
     582//   for (i=1; i<=N; i++)
     583//   {
     584//     DName[i] = "D"+Name[i]; // concat
     585//   }
     586//   tmp[1] = "s";
     587//   list NName;
     588//   for (i=1; i<=N; i++)
     589//   {
     590//     NName[2*i-1] = Name[i];
     591//     NName[2*i] = DName[i];
     592//     //NName[2*i-1] = DName[i];
     593//     //NName[2*i] = Name[i];
     594//   }
     595//   NName[Nnew] = tmp[1];
     596//   L[2] = NName;
     597//   tmp = 0;
     598//   // block ord (a(1,1),a(0,0,1,1),...,dp);
     599//   //list("a",intvec(1,1)), list("a",intvec(0,0,1,1)), ...
     600//   tmp[1] = "a";  // string
     601//   for (i=1; i<=N; i++)
     602//   {
     603//     iv[2*i-1] = 1;
     604//     iv[2*i]   = 1;
     605//     tmp[2]    = iv;  iv = 0;  // intvec
     606//     Lord[i]   = tmp;
     607//   }
     608//   //list("dp",intvec(1,1,1,1,1,...))
     609//   s = "iv=";
     610//   for (i=1; i<=Nnew; i++)
     611//   {
     612//     s = s+"1,";
     613//   }
     614//   s[size(s)]=";";
     615//   execute(s);
     616//   kill s;
     617//   tmp[1] = "dp";  // string
     618//   tmp[2] = iv;    // intvec
     619//   Lord[N+1] = tmp;
     620//   //list("C",intvec(0))
     621//   tmp[1] = "C";  // string
     622//   iv = 0;
     623//   tmp[2] = iv;   // intvec
     624//   Lord[N+2] = tmp;
     625//   tmp = 0;
     626//   L[3]    = Lord;
     627//   // we are done with the list. Now add a Plural part
     628//   def @R@ = ring(L);
     629//   setring @R@;
     630//   matrix @D[Nnew][Nnew];
     631//   for (i=1; i<=N; i++)
     632//   {
     633//     @D[2*i-1,2*i]=1;
     634//     //@D[2*i-1,2*i]=-1;
     635//   }
     636//   def @R = nc_algebra(1,@D);
     637//   setring @R;
     638//   kill @R@;
     639//   dbprint(ppl,"// -2-1- the ring @R(_x,_Dx,s) is ready");
     640//   dbprint(ppl-1, @R);
     641//   matrix M = imap(save,M);
     642//   // now, create the vector [-s,_Dx]
     643//   vector v = [-s];  // now s is a variable
     644//   for (i=1; i<=N; i++)
     645//   {
     646//     v = v + var(2*i)*gen(i+1);
     647//     //v = v + var(2*i-1)*gen(i+1);
     648//   }
     649//   ideal J = ideal(M*v);
     650//   // make leadcoeffs positive
     651//   for (i=1; i<= ncols(J); i++)
     652//   {
     653//     if ( leadcoef(J[i])<0 )
     654//     {
     655//       J[i] = -J[i];
     656//     }
     657//   }
     658//   ideal LD1 = J;
     659//   kill J;
     660//   export LD1;
     661//   return(@R);
     662// }
     663// example
     664// {
     665//   "EXAMPLE:"; echo = 2;
     666//   ring r = 0,(x,y),Dp;
     667//   poly F = x^4+y^5+x*y^4;
     668//   printlevel = 0;
     669//   def A  = Sannfslog(F);
     670//   setring A;
     671//   LD1;
     672// }
    538673
    539674
Note: See TracChangeset for help on using the changeset viewer.