Changeset c69ea5 in git for Singular/LIB/sing.lib


Ignore:
Timestamp:
Apr 22, 2005, 6:30:16 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
e25b4746b69e4d983999a7901d33adde7e04a44e
Parents:
834754e36a63571f0f2f35770cdb783eaf40315f
Message:
*hannes: from 2-0 branch


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sing.lib

    r834754e rc69ea5  
    1 // $Id: sing.lib,v 1.24 2001-02-06 11:35:08 anne Exp $
     1// $Id: sing.lib,v 1.25 2005-04-22 16:30:16 Singular Exp $
    22//(GMG/BM, last modified 26.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    4 version="$Id: sing.lib,v 1.24 2001-02-06 11:35:08 anne Exp $";
     4version="$Id: sing.lib,v 1.25 2005-04-22 16:30:16 Singular Exp $";
    55category="Singularities";
    66info="
     
    1818 is_reg(f,id);          is poly f a regular element mod id? (id ideal/module)
    1919 is_regs(i[,id]);       are gen's of ideal i regular sequence modulo id?
     20 locstd(i);             SB for local degree ordering without cancelling units
    2021 milnor(i);             milnor number of ideal i; (assume i is ICIS in nf)
    2122 nf_icis(i);            generic combinations of generators; get ICIS in nf
     
    2728 T_2((i);               T^2-module of ideal i
    2829 T_12(i);               T^1- and T^2-module of ideal i
     30 tangentcone(id);       compute tangent cone of id
     31
    2932";
    3033
    3134LIB "inout.lib";
    3235LIB "random.lib";
     36LIB "primdec.lib";
    3337///////////////////////////////////////////////////////////////////////////////
    3438
     
    362366proc slocus (ideal i)
    363367"USAGE:   slocus(i);  i ideal
     368RETURN:  ideal of singular locus of i
     369EXAMPLE: example slocus; shows an example
     370"
     371{
     372  def R=basering;
     373  int j,k;
     374  ideal res;
     375
     376  if(ord_test(basering)!=1)
     377  {
     378     string va=varstr(basering);
     379     if( size( parstr(basering))>0){va=va+","+parstr(basering);}
     380     execute ("ring S = ("+charstr(basering)+"),("+va+"),dp;");
     381     ideal i=imap(R,i);
     382     list l=equidim(i);
     383     setring R;
     384     list l=imap(S,l);
     385  }
     386  else
     387  {
     388     list l=equidim(i);
     389  }
     390  int n=size(l);
     391  if (n==1){return(slocusEqi(i));}
     392  res=slocusEqi(l[1]);
     393  for(j=2;j<=n;j++){res=intersect(res,slocusEqi(l[j]));}
     394  for(j=1;j<n;j++)
     395  {
     396     for(k=j+1;k<=n;k++){res=intersect(res,l[j]+l[k]);}
     397  }
     398  return(res);
     399}
     400example
     401{ "EXAMPLE:"; echo = 2;
     402   ring r  = 0,(u,v,w,x,y,z),dp;
     403   ideal i = wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2;;
     404   slocus(i);
     405}
     406///////////////////////////////////////////////////////////////////////////////
     407
     408static proc slocusEqi (ideal i)
     409"USAGE:   slocus(i);  i ideal
    364410RETURN:  ideal of singular locus of i if i is pure dimensional
    365411NOTE:    this proc returns i and c-minors of jacobian ideal of i where c is the
     
    370416"
    371417{
    372   int cod  = nvars(basering)-dim(std(i));
     418  ideal ist=std(i);
     419  if(deg(ist[1])==0){return(ist);}
     420  int cod  = nvars(basering)-dim(ist);
    373421  i        = i+minor(jacob(i),cod);
    374422  return(i);
     
    390438         ring of characteristic 0
    391439RETURN:  intvec  d,s1,...,su  where:
    392          d = w-degree(f)  and  si/d = ith spectral-number(f)
     440         d = w-degree(f)  and  si/d = i-th spectral-number(f)
    393441         No return value if basering has parameters or if f is no isolated
    394442         singularity, displays a warning in this case
     
    879927   codim(m,j);          // should be 23 (Milnor number -1 of y7-x5)
    880928}
     929
     930///////////////////////////////////////////////////////////////////////////////
     931
     932proc tangentcone (id,list #)
     933"USAGE:   tangentcone(id [,n]); id = ideal, n = int
     934RETURN:  the tangent cone of id
     935NOTE:    the procedure works for any monomial ordering.
     936         If n=0 use std w.r.t. local ordering ds, if n=1 use locstd
     937EXAMPLE: example tangentcone; shows an example
     938"
     939{
     940  int ii,n;
     941  def bas = basering;
     942  ideal tang;
     943  if (size(#) !=0) { n= #[1]; }
     944  if( n==0 )
     945  {
     946     changeord("@newr@","ds");
     947     ideal @id = imap(bas,id);
     948     @id = std(@id);
     949     setring bas;
     950     id = imap(@newr@,@id);
     951     kill @newr@;
     952  }
     953  else
     954  {
     955    id = locstd(id);
     956  }
     957 
     958  for(ii=1; ii<=size(id); ii++)
     959  {
     960    tang[ii]=jet(id[ii],mindeg(id[ii]));     
     961  }
     962  return(tang); 
     963}
     964example
     965{ "EXAMPLE:"; echo = 2;
     966   ring R = 0,(x,y,z),ds;
     967   ideal i  = 7xyz+z5,x2+y3+z7,5z5+y5;
     968   tangentcone(i);
     969}   
     970///////////////////////////////////////////////////////////////////////////////
     971
     972proc locstd (id)
     973"USAGE:   locstd (id); id = ideal
     974RETURN:  a standard basis for a local degree ordering
     975NOTE:    the procedure homogenizes id w.r.t. a new 1st variable @t@, computes
     976         a SB wrt (dp(1),dp) and substitutes @t@ by 1.
     977         Hence the result is a SB with respect to an ordering which sorts
     978         first w.r.t. the order and then refines it with dp. This is a
     979         local degree ordering.
     980         This is done in order to avoid cancellation of units and thus
     981         be able to use option(contentSB);
     982EXAMPLE: example locstd; shows an example
     983"
     984{
     985  int ii;
     986  def bas = basering;
     987  execute("ring  @r_locstd
     988     =("+charstr(bas)+"),(@t@,"+varstr(bas)+"),(dp(1),dp);");
     989  ideal @id = imap(bas,id);
     990  ideal @hid = homog(@id,@t@);
     991  @hid = std(@hid);
     992  @hid = subst(@hid,@t@,1);
     993  setring bas;
     994  def @hid = imap(@r_locstd,@hid);
     995  attrib(@hid,"isSB",1);
     996  kill @r_locstd;
     997  return(@hid); 
     998}
     999example
     1000{ "EXAMPLE:"; echo = 2;
     1001   ring R = 0,(x,y,z),ds;
     1002   ideal i  = xyz+z5,2x2+y3+z7,3z5+y5;
     1003   locstd(i);
     1004}   
Note: See TracChangeset for help on using the changeset viewer.