Changeset 8960ec in git


Ignore:
Timestamp:
Mar 20, 2001, 7:19:48 PM (22 years ago)
Author:
Mathias Schulze <mschulze@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
b297cc5e6b076f05d48a0f72703fb142cccbb94c
Parents:
93085ab6a10664d6aa7d18b816dda107e95acdb8
Message:
*mschulze: added spmilnor


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gaussman.lib

    r93085a r8960ec  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: gaussman.lib,v 1.35 2001-03-20 14:16:46 mschulze Exp $";
     2version="$Id: gaussman.lib,v 1.36 2001-03-20 18:19:48 mschulze Exp $";
    33category="Singularities";
    44
     
    1616 spectrum(f);               singularity spectrum of f
    1717 endfilt(poly f,list V);    endomorphism filtration of filtration V
    18  gamma(list S);             gamma invariant of spectrum S
    1918 spprint(list S);           print spectrum S
    2019 spadd(list S1,list S2);    sum of spectra S1 and S2
     
    2423 spissemicont(list S[,opt]);        test spectrum S for semicontinuity
    2524 spsemicont(list S0,list S[,opt]);  relative semicontinuity of spectra S0 and S
    26  spgeomgenus(list S);       geometric genus of spectrum S
     25 spmilnor(list S);          milnor number of spectrum S
     26 spgeomgenus(list S);       geometrical genus of spectrum S
     27 spgamma(list S);           gamma invariant of spectrum S
    2728
    2829SEE ALSO: mondromy_lib, spectrum_lib
     
    8990proc monodromy(poly f,list #)
    9091"USAGE:    monodromy(f[,opt]); poly f, int opt
    91 ASSUME:   basering has local ordering, f has isolated singularity at 0
     92ASSUME:   basering has characteristic 0 and local ordering,
     93          f has isolated singularity at 0
    9294RETURN:
    9395@format
     
    103105"
    104106{
    105   int opt=1;
    106   if(size(#)>0)
    107   {
    108     if(typeof(#[1])=="int")
    109     {
    110       opt=#[1];
    111     }
    112   }
    113 
    114   int i,j;
     107  if(charstr(basering)!="0")
     108  {
     109    ERROR("characteristic 0 expected");
     110  }
    115111  int n=nvars(basering)-1;
    116   for(i=n+1;i>=1;i--)
     112  for(int i=n+1;i>=1;i--)
    117113  {
    118114    if(var(i)>1)
    119115    {
    120       ERROR("no local ordering");
     116      ERROR("local ordering expected");
    121117    }
    122118  }
     
    127123    if(vdim(sJ)==0)
    128124    {
    129       ERROR("no singularity at 0");
     125      ERROR("singularity at 0 expected");
    130126    }
    131127    else
    132128    {
    133       ERROR("no isolated singularity at 0");
    134     }
    135   }
     129      ERROR("isolated singularity at 0 expected");
     130    }
     131  }
     132  int opt=1;
     133  if(size(#)>0)
     134  {
     135    if(typeof(#[1])=="int")
     136    {
     137      opt=#[1];
     138    }
     139  }
     140
    136141  ideal m=kbase(sJ);
    137142  int mu,modm=ncols(m),maxorddif(m);
     
    145150  int sdH=1;
    146151  int k=-1;
    147   int K,N,mide;
     152  int j,K,N,mide;
    148153
    149154  while(k<K||sdH>0)
     
    327332proc vfiltration(poly f,list #)
    328333"USAGE:    vfiltration(f[,opt]); poly f, int opt
    329 ASSUME:   basering has local ordering, f has isolated singularity at 0
     334ASSUME:   basering has characteristic 0 and local ordering,
     335          f has isolated singularity at 0
    330336RETURN:
    331337@format
     
    349355"
    350356{
    351   int opt=1;
    352   if(size(#)>0)
    353   {
    354     if(typeof(#[1])=="int")
    355     {
    356       opt=#[1];
    357     }
    358   }
    359 
    360   int i,j;
     357  if(charstr(basering)!="0")
     358  {
     359    ERROR("characteristic 0 expected");
     360  }
    361361  int n=nvars(basering)-1;
    362   for(i=n+1;i>=1;i--)
     362  for(int i=n+1;i>=1;i--)
    363363  {
    364364    if(var(i)>1)
    365365    {
    366       ERROR("no local ordering");
     366      ERROR("local ordering expected");
    367367    }
    368368  }
     
    373373    if(vdim(sJ)==0)
    374374    {
    375       ERROR("no singularity at 0");
     375      ERROR("singularity at 0 expected");
    376376    }
    377377    else
    378378    {
    379       ERROR("no isolated singularity at 0");
    380     }
    381   }
     379      ERROR("isolated singularity at 0 expected");
     380    }
     381  }
     382  int opt=1;
     383  if(size(#)>0)
     384  {
     385    if(typeof(#[1])=="int")
     386    {
     387      opt=#[1];
     388    }
     389  }
     390
    382391  ideal m=kbase(sJ);
    383392  int mu,modm=ncols(m),maxorddif(m);
     
    391400  int sdH=1;
    392401  int k=-1;
    393   int K;
     402  int j,K;
    394403
    395404  while(k<K||sdH>0)
     
    698707proc spectrum(poly f)
    699708"USAGE:    spectrum(f); poly f
    700 ASSUME:   basering has local ordering, f has isolated singularity at 0
     709ASSUME:   basering has characteristic 0 and local ordering,
     710          f has isolated singularity at 0
    701711RETURN:
    702712@format
     
    723733proc endfilt(poly f,list V)
    724734"USAGE:   endfilt(f,V); poly f, list V
    725 ASSUME:  basering has local ordering, f has isolated singularity at 0
     735ASSUME:  basering has characteristic 0 and local ordering,
     736         f has isolated singularity at 0
    726737RETURN:
    727738@format
     
    741752"
    742753{
     754  if(charstr(basering)!="0")
     755  {
     756    ERROR("characteristic 0 expected");
     757  }
     758  int n=nvars(basering)-1;
     759  for(int i=n+1;i>=1;i--)
     760  {
     761    if(var(i)>1)
     762    {
     763      ERROR("local ordering expected");
     764    }
     765  }
     766  ideal sJ=std(jacob(f));
     767  if(vdim(sJ)<=0)
     768  {
     769    if(vdim(sJ)==0)
     770    {
     771      ERROR("singularity at 0 expected");
     772    }
     773    else
     774    {
     775      ERROR("isolated singularity at 0 expected");
     776    }
     777  }
     778
    743779  def a,d,v,m=V[1..4];
    744780  int mu=ncols(m);
    745   ideal sJ=std(jacob(f));
    746 
    747   int i,j,k;
     781
    748782  module V0=v[1];
    749783  for(i=2;i<=size(v);i++)
     
    761795  }
    762796
    763   int i0,j0,i1,j1;
     797  int j,k,i0,j0,i1,j1;
    764798  number b0=number(a[1]-a[ncols(a)]);
    765799  number b1,b2;
     
    880914  poly f=x5+x2y2+y5;
    881915  endfilt(f,vfiltration(f));
    882 }
    883 ///////////////////////////////////////////////////////////////////////////////
    884 
    885 proc gamma(list S)
    886 "USAGE:   gamma(S); list S
    887 RETURN:  number: gamma invariant of spectrum S
    888 EXAMPLE: example gamma; shows an example
    889 "
    890 {
    891   ideal a=S[1];
    892   intvec d=S[2];
    893   int n=nvars(basering)-1;
    894   number g=0;
    895   int i,j;
    896   for(i=1;i<=ncols(a);i++)
    897   {
    898     for(j=1;j<=d[i];j++)
    899     {
    900       g=g+(number(a[i])-number(n-1)/2)^2;
    901     }
    902   }
    903   g=-g/4+sum(d)*number(a[ncols(a)]-a[1])/48;
    904   return(g);
    905 }
    906 example
    907 { "EXAMPLE:"; echo=2;
    908   ring R=0,(x,y),ds;
    909   poly f=x5+x2y2+y5;
    910   gamma(spectrum(f));
    911916}
    912917///////////////////////////////////////////////////////////////////////////////
     
    11911196///////////////////////////////////////////////////////////////////////////////
    11921197
     1198proc spmilnor(list S)
     1199"USAGE:   spmilnor(S); list S
     1200RETURN:  int: Milnor number of spectrum S
     1201EXAMPLE: example spmilnor; shows an example
     1202"
     1203{
     1204  return(sum(S[2]));
     1205}
     1206example
     1207{ "EXAMPLE:"; echo=2;
     1208  ring R=0,(x,y),ds;
     1209  list S=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
     1210  spprint(S);
     1211  spmilnor(S);
     1212}
     1213///////////////////////////////////////////////////////////////////////////////
     1214
    11931215proc spgeomgenus(list S)
    11941216"USAGE:   spgeomgenus(S); list S
    1195 RETURN:  int g: geometric genus of spectrum S
     1217RETURN:  int: geometrical genus of spectrum S
    11961218EXAMPLE: example spgeomgenus; shows an example
    11971219"
     
    12181240}
    12191241///////////////////////////////////////////////////////////////////////////////
     1242
     1243proc spgamma(list S)
     1244"USAGE:   spgamma(S); list S
     1245RETURN:  number: gamma invariant of spectrum S
     1246EXAMPLE: example spgamma; shows an example
     1247"
     1248{
     1249  int i,j;
     1250  number g=0;
     1251  for(i=1;i<=ncols(S[1]);i++)
     1252  {
     1253    for(j=1;j<=S[2][i];j++)
     1254    {
     1255      g=g+(number(S[1][i])-number(nvars(basering)-2)/2)^2;
     1256    }
     1257  }
     1258  g=-g/4+sum(S[2])*number(S[1][ncols(S[1])]-S[1][1])/48;
     1259  return(g);
     1260}
     1261example
     1262{ "EXAMPLE:"; echo=2;
     1263  ring R=0,(x,y),ds;
     1264  list S=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
     1265  spprint(S);
     1266  spgamma(S);
     1267}
     1268///////////////////////////////////////////////////////////////////////////////
  • Singular/LIB/spectrum.lib

    r93085a r8960ec  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: spectrum.lib,v 1.13 2001-03-20 14:18:03 mschulze Exp $";
     2version="$Id: spectrum.lib,v 1.14 2001-03-20 18:19:48 mschulze Exp $";
    33category="Singularities";
    44info="
     
    1919@format
    2020list S:
    21   ideal S[1]: spectral numbers
     21  ideal S[1]: spectral numbers in increasing order
    2222  intvec S[2]:
    2323    int S[2][i]: multiplicity of spectral number S[1][i]
     
    3232  if(size(#)==0)
    3333  {
    34     list l=system("spectrum",f);
     34    list S=system("spectrum",f);
    3535  }
    3636  else
    3737  {
    38     list l=system("spectrum",f,#[1]);
     38    list S=system("spectrum",f,#[1]);
    3939  }
    40   ideal s=number(l[4][1])/l[5][1]-1;
     40  ideal a=number(S[4][1])/S[5][1]-1;
    4141  int i;
    42   for(i=l[3];i>1;i--)
     42  for(i=S[3];i>1;i--)
    4343  {
    44     s[i]=number(l[4][i])/l[5][i]-1;
     44    a[i]=number(S[4][i])/S[5][i]-1;
    4545  }
    46   return(list(s,l[6]));
     46  return(list(a,S[6]));
    4747}
    4848example
    4949{ "EXAMPLE:"; echo = 2;
    50   ring r=0,(x,y),ds;
     50  ring R=0,(x,y),ds;
    5151  poly f=x^31+x^6*y^7+x^2*y^12+x^13*y^2+y^29;
    5252  spectrumnd(f);
     
    6565}
    6666///////////////////////////////////////////////////////////////////////////////
    67 
Note: See TracChangeset for help on using the changeset viewer.