Changeset e3f423 in git for Singular/LIB/gaussman.lib


Ignore:
Timestamp:
May 25, 2001, 11:38:10 AM (23 years ago)
Author:
Mathias Schulze <mschulze@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
442ed6ac7e2517e4ea705090a7921a01d9db3a85
Parents:
d1391bf52b65e3d13858d295d40762007171a8f0
Message:
*mschulze: added documentation for gms procs


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gaussman.lib

    rd1391b re3f423  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: gaussman.lib,v 1.38 2001-05-23 16:57:10 mschulze Exp $";
     2version="$Id: gaussman.lib,v 1.39 2001-05-25 09:38:10 mschulze Exp $";
    33category="Singularities";
    44
     
    1212
    1313PROCEDURES:
     14 gms(f,s);                  Brieskorn lattice in the Gauss-Manin system
     15 gmsnf(p,K,Kmax);           Gauss-Manin system normal form
     16 gmscoeffs(p,K,Kmax);       Gauss-Manin system basis representation
    1417 monodromy(f[,opt]);        monodromy matrix, spectrum of monodromy of f
    1518 vfiltration(f[,opt]);      V-filtration on H''/H', singularity spectrum of f
     
    3740///////////////////////////////////////////////////////////////////////////////
    3841
    39 proc gms(poly t,string d)
     42proc gms(poly t,string s)
     43"USAGE:    gms(f,s); poly f, string s;
     44ASSUME:   basering has characteristic 0 and local degree ordering,
     45          f has isolated singularity at 0
     46RETURN:
     47@format
     48ring G:
     49  G=C{{s}}*basering,
     50  s is the inverse of the Gauss-Manin connection of f,
     51  G contains:
     52    poly @t: image of f
     53    ideal @dt: image of Jacobian ideal df of f
     54    ideal @g: image of standard basis of df
     55    matrix @a: matrix(@dt)*s=matrix(@g)
     56    ideal @m: image of monomial vector space basis of Jacobian algebra of f
     57    int @wmax: maximal weight of variables of basering
     58  G projects to H''=C{{s}}*@m
     59@end format
     60NOTE:     do not modify @t, @dt, @g, @a, @m, or @wmax if you want to use
     61          gms procedures
     62KEYWORDS: singularities; Gauss-Manin connection
     63EXAMPLE:  example gms; shows examples
     64"
    4065{
    4166  def R=basering;
     
    5580  for(i=nvars(R);i>=1;i--)
    5681  {
    57     if(deg(var(i))==0)
    58     {
    59       ERROR("degree ordering expected");
    60     }
    6182    if(deg(var(i))>@wmax)
    6283    {
     
    85106  ideal m=kbase(g);
    86107
    87   string s="ring G="+string(charstr(R))+",("+d+","+varstr(R)+
     108  string G="ring @G="+string(charstr(R))+",("+s+","+varstr(R)+
    88109    "),(ws("+string(deg(highcorner(g))+@wmax)+"),",ordstr(R),");";
    89   execute(s);
     110  execute(G);
    90111
    91112  poly @t=imap(R,t);
     
    98119  export @t,@dt,@g,@a,@m,@wmax;
    99120
    100   return(G);
     121  return(@G);
     122}
     123example
     124{ "EXAMPLE:"; echo=2;
     125  ring R=0,(x,y),ds;
     126  poly f=x5+x2y2+y5;
     127  def G=gms(f,"s");
     128  setring(G);
     129  @t;
     130  print(@dt);
     131  print(@g);
     132  print(@a);
     133  @wmax;
    101134}
    102135///////////////////////////////////////////////////////////////////////////////
    103136
    104137proc gmsnf(ideal p,int K,list #)
     138"USAGE:    gmsnf(p,K[,Kmax]); poly p, int K[, int Kmax];
     139ASSUME:   basering was constructed by gms, K<=Kmax
     140RETURN:
     141@format
     142list l:
     143  ideal l[1]: projection of p to H''=C{{s}}*@m mod s^{K+1}
     144  ideal l[2]: p=l[1]+l[2] mod s^(Kmax+1)
     145@end format
     146NOTE:     by setting p=l[2] the computation can be continued up to order
     147          at most Kmax, by default Kmax=infinity
     148KEYWORDS: singularities; Gauss-Manin connection
     149EXAMPLE:  example gmsnf; shows examples
     150"
    105151{
    106152  int Kmax=-1;
    107153  if(size(#)>0)
    108154  {
    109     if(typeof(l[1])=="int")
    110     {
    111       Kmax=l[1];
     155    if(typeof(#[1])=="int")
     156    {
     157      Kmax=#[1];
     158      if(K>Kmax)
     159      {
     160        Kmax=K;
     161      }
    112162    }
    113163  }
     
    116166  v[nvars(basering)]=0;
    117167
     168  int k;
    118169  if(Kmax>=0)
    119170  {
    120     p=jet(jet(p,K,v),(Kmax+1)*deg(var(1))-@wmax);
     171    for(k=ncols(p);k>=1;k--)
     172    {
     173      p[k]=jet(jet(p[k],K,v),(Kmax+1)*deg(var(1))-@wmax);
     174    }
    121175  }
    122176
     
    126180
    127181  poly s;
    128   int i,j,k;
    129   for(k=1;k<=ncols(p);k++)
     182  int i,j;
     183  for(k=ncols(p);k>=1;k--)
    130184  {
    131185    while(p[k]!=0&&deg(lead(p[k]),v)<=K)
     
    146200          {
    147201            p[k]=p[k]+
    148               jet(jet(diff(s*@a[j,i],var(j+1))*var(1),K,v),
     202              jet(jet(diff(s*@a[j,i],var(j+1))*var(1),Kmax,v),
    149203                (Kmax+1)*deg(var(1))-@wmax);
    150204          }
     
    170224  }
    171225
    172   return(r,q);
    173 }
    174 ///////////////////////////////////////////////////////////////////////////////
    175 
    176 proc gmsmat(ideal p,int K)
    177 {
    178   def r,q=gmsnf(p,K);
     226  return(list(r,q));
     227}
     228example
     229{ "EXAMPLE:"; echo=2;
     230  ring R=0,(x,y),ds;
     231  poly f=x5+x2y2+y5;
     232  def G=gms(f,"s");
     233  setring(G);
     234  list l0=gmsnf(@t,0);
     235  print(l0[1]);
     236  list l1=gmsnf(@t,1);
     237  print(l1[1]);
     238  list l=gmsnf(l0[2],1);
     239  print(l[1]);
     240}
     241///////////////////////////////////////////////////////////////////////////////
     242
     243proc gmscoeffs(ideal p,int K,list #)
     244"USAGE:    gmscoeffs(p,K[,Kmax]); poly p, int K[, int Kmax];
     245ASSUME:   basering was constructed by gms, K<=Kmax
     246RETURN:
     247@format
     248list l:
     249  matrix l[1]: projection of p to H''=C{{s}}*@m=C{{s}}^mu mod s^(K+1)
     250  ideal l[2]: p=matrix(@m)*l[1]+l[2] mod s^(Kmax+1)
     251@end format
     252NOTE:     by setting p=l[2] the computation can be continued up to order
     253          at most Kmax, by default Kmax=infinity
     254KEYWORDS: singularities; Gauss-Manin connection
     255EXAMPLE:  example gmscoeffs; shows examples
     256"
     257{
     258  list l=gmsnf(p,K,#);
     259  ideal r,q=l[1..2];
    179260  poly v=1;
    180261  for(int i=2;i<=nvars(basering);i++)
     
    184265  matrix C=coeffs(r,@m,v);
    185266  return(C,q);
     267}
     268example
     269{ "EXAMPLE:"; echo=2;
     270  ring R=0,(x,y),ds;
     271  poly f=x5+x2y2+y5;
     272  def G=gms(f,"s");
     273  setring(G);
     274  list l0=gmscoeffs(@t,0);
     275  print(l0[1]);
     276  list l1=gmscoeffs(@t,1);
     277  print(l1[1]);
     278  list l=gmscoeffs(l0[2],1);
     279  print(l[1]);
    186280}
    187281///////////////////////////////////////////////////////////////////////////////
     
    240334proc monodromy(poly f,list #)
    241335"USAGE:    monodromy(f[,opt]); poly f, int opt
    242 ASSUME:   basering has characteristic 0 and local ordering,
     336ASSUME:   basering has characteristic 0 and local degree ordering,
    243337          f has isolated singularity at 0
    244338RETURN:
     
    265359
    266360  def R=basering;
    267   def G=gms(f,"D");
     361  def G=gms(f,"s");
    268362  setring G;
    269363
     
    271365  int mu,modm=ncols(@m),maxorddif(@m);
    272366  ideal w=@t*@m;
     367  list l;
    273368  matrix U=freemodule(mu);
    274369  matrix A0[mu][mu],A,C;
     
    286381    if(opt==0)
    287382    {
    288       C,w=gmsmat(w,k,mu);
     383      l=gmscoeffs(w,k,mu);
    289384    }
    290385    else
    291386    {
    292       C,w=gmsmat(w,k,mu+n);
    293     }
     387      l=gmscoeffs(w,k,mu+n);
     388    }
     389    C,w=l[1..2];
    294390    A0=A0+C;
    295391
    296392    H0=H;
    297393    dbprint(printlevel-voice+2,"//gaussman::monodromy: compute dH");
    298     dH=jet(module(A0*dH+D^2*diff(matrix(dH),D)),k);
    299     H=H*D+dH;
     394    dH=jet(module(A0*dH+s^2*diff(matrix(dH),s)),k);
     395    H=H*s+dH;
    300396
    301397    dbprint(printlevel-voice+2,"//gaussman::monodromy: test dH==0");
    302     sdH=size(reduce(H,std(H0*D)));
    303   }
    304 
    305   A0=A0-D^k;
     398    sdH=size(reduce(H,std(H0*s)));
     399  }
     400
     401  A0=A0-s^k;
    306402
    307403  dbprint(printlevel-voice+2,
    308404    "//gaussman::monodromy: compute basis of saturation");
    309405  H=minbase(H0);
    310   int modH=maxorddif(H)/deg(D);
     406  int modH=maxorddif(H)/deg(s);
    311407  if(opt==0)
    312408  {
    313     C,w=gmsmat(w,modH+1,modH+1);
     409    l=gmscoeffs(w,modH+1,modH+1);
    314410  }
    315411  else
    316412  {
    317     C,w=gmsmat(w,modH+1,modH+1+n);
    318   }
     413    l=gmscoeffs(w,modH+1,modH+1+n);
     414  }
     415  C,w=l[1..2];
    319416  A0=A0+C;
    320417
    321418  dbprint(printlevel-voice+2,
    322419    "//gaussman::monodromy: compute A on saturation");
    323   list l=division(H*D,A0*H+D^2*diff(matrix(H),D));
     420  l=division(H*s,A0*H+s^2*diff(matrix(H),s));
    324421  A=jet(l[1],l[2],0);
    325422
     
    344441  if(mide>0)
    345442  {
    346     C,w=gmsmat(w,modH+1+mide,modH+1+mide);
     443    l=gmscoeffs(w,modH+1+mide,modH+1+mide);
     444    C,w=l[1..2];
    347445    A0=A0+C;
    348446
     
    438536proc vfiltration(poly f,list #)
    439537"USAGE:    vfiltration(f[,opt]); poly f, int opt
    440 ASSUME:   basering has characteristic 0 and local ordering,
     538ASSUME:   basering has characteristic 0 and local degree ordering,
    441539          f has isolated singularity at 0
    442540RETURN:
     
    472570
    473571  def R=basering;
    474   def G=gms(f,"D");
     572  def G=gms(f,"s");
    475573  setring G;
    476574
     
    478576  int mu,modm=ncols(@m),maxorddif(@m);
    479577  ideal w=@t*@m;
     578  list l;
    480579  matrix U=freemodule(mu);
    481580  matrix A[mu][mu],C;
     
    492591
    493592    dbprint(printlevel-voice+2,"//gaussman::vfiltration: compute C");
    494     C,w=gmsmat(w,k);
     593    l=gmscoeffs(w,k);
     594    C,w=l[1..2];
    495595    A=A+C;
    496596
    497597    H0=H;
    498598    dbprint(printlevel-voice+2,"//gaussman::vfiltration: compute dH");
    499     dH=jet(module(A*dH+D^2*diff(matrix(dH),D)),k);
    500     H=H*D+dH;
     599    dH=jet(module(A*dH+s^2*diff(matrix(dH),s)),k);
     600    H=H*s+dH;
    501601
    502602    dbprint(printlevel-voice+2,"//gaussman::vfiltration: test dH==0");
    503     sdH=size(reduce(H,std(H0*D)));
    504   }
    505 
    506   A=A-D^k;
     603    sdH=size(reduce(H,std(H0*s)));
     604  }
     605
     606  A=A-s^k;
    507607
    508608  dbprint(printlevel-voice+2,
    509609    "//gaussman::vfiltration: compute basis of saturation");
    510610  H=minbase(H0);
    511   int modH=maxorddif(H)/deg(D);
    512   C,w=gmsmat(w,N+modH,N+modH);
     611  int modH=maxorddif(H)/deg(s);
     612  l=gmscoeffs(w,N+modH,N+modH);
     613  C,w=l[1..2];
    513614  A=A+C;
    514615
    515616  dbprint(printlevel-voice+2,
    516617    "//gaussman::vfiltration: transform H0 to saturation");
    517   list l=division(H,freemodule(mu)*D^k);
     618  l=division(H,freemodule(mu)*s^k);
    518619  H0=jet(l[1],l[2],N-1);
    519620
     
    550651  dbprint(printlevel-voice+2,
    551652    "//gaussman::vfiltration: compute A on saturation");
    552   l=division(H*D,A*H+D^2*diff(matrix(H),D));
     653  l=division(H*s,A*H+s^2*diff(matrix(H),s));
    553654  A=jet(l[1],l[2],N-1);
    554655
     
    619720  list V;
    620721  matrix Me;
    621   V[ncols(eM)+1]=std(V1);
     722  V[ncols(eM)+1]=interred(V1);
    622723  intvec d;
    623724  if(opt==0)
     
    634735        "//gaussman::vfiltration: compute V["+string(i)+"]");
    635736      V1=module(V1)+syz(Me);
    636       V[i]=std(intersect(V1,V0));
     737      V[i]=interred(intersect(V1,V0));
    637738
    638739      if(size(V[i])>size(V[i+1]))
     
    659760        "//gaussman::vfiltration: compute V["+string(i)+"]");
    660761      V1=module(V1)+syz(Me);
    661       V[i]=std(intersect(V1,V0));
     762      V[i]=interred(intersect(V1,V0));
    662763
    663764      if(size(V[i])>size(V[i+1]))
     
    698799        "//gaussman::vfiltration: compute V["+string(i)+"]");
    699800      V1=module(V1)+syz(Me);
    700       V[i]=std(intersect(V1,V0));
     801      V[i]=interred(intersect(V1,V0));
    701802
    702803      if(size(V[i])>size(V[i+1]))
     
    737838    dbprint(printlevel-voice+2,
    738839      "//gaussman::vfiltration: compute graded parts");
    739     option(redSB);
    740840    for(k=1;k<size(v);k++)
    741841    {
    742       v[k]=std(reduce(v[k],std(v[k+1])));
     842      v[k]=interred(reduce(v[k],std(v[k+1])));
    743843      d[k]=size(v[k]);
    744844    }
    745     v[k]=std(v[k]);
     845    v[k]=interred(v[k]);
    746846    d[k]=size(v[k]);
    747847
     
    763863proc spectrum(poly f)
    764864"USAGE:    spectrum(f); poly f
    765 ASSUME:   basering has characteristic 0 and local ordering,
     865ASSUME:   basering has characteristic 0 and local degree ordering,
    766866          f has isolated singularity at 0
    767867RETURN:
     
    789889proc endfilt(poly f,list V)
    790890"USAGE:   endfilt(f,V); poly f, list V
    791 ASSUME:  basering has characteristic 0 and local ordering,
     891ASSUME:  basering has characteristic 0 and local degree ordering,
    792892         f has isolated singularity at 0
    793893RETURN:
Note: See TracChangeset for help on using the changeset viewer.