Changeset dc2e7d5 in git for Singular/LIB


Ignore:
Timestamp:
Dec 11, 2013, 1:30:04 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
f1babfbabc0fc2906b36df32051eaaf09673dc6f
Parents:
3bc27a35af1aa573f7b8b110c0fda5e484414166
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-12-11 13:30:04+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-12-11 13:33:06+01:00
Message:
fix: genus (tr.259)

Conflicts:
	Tst/Short/bug_532_s.res.gz.uu
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normal.lib

    r3bc27a3 rdc2e7d5  
    21562156
    21572157proc genus(ideal I,list #)
    2158 "USAGE:   genus(i) or genus(i,1); I a 1-dimensional ideal
     2158"USAGE:   genus(I) or genus(I,<option>); I a 1-dimensional ideal
    21592159RETURN:  an integer, the geometric genus p_g = p_a - delta of the projective
    21602160         curve defined by i, where p_a is the arithmetic genus.
     
    21622162         i.e. dim(R'/R), R' the normalization of the local ring R of the
    21632163         singularity. @*
    2164          genus(i,1) uses the normalization to compute delta. Usually genus(i,1)
    2165          is slower than genus(i) but sometimes not.
     2164         genus(I,"nor") uses the normalization to compute delta. Usually genus(I,"nor")
     2165         is slower than genus(I) but sometimes not. @*
     2166         genus(I,"pri") starts with a primary decompsition.
    21662167EXAMPLE: example genus; shows an example
    21672168"
     
    21692170   int w = printlevel-voice+2;  // w=printlevel (default: w=0)
    21702171
     2172   int ono,rpr,ll;
     2173   if(size(#)>0)
     2174   {
     2175     if(typeof(#[1])=="string")
     2176     {
     2177        if(#[1]=="nor"){ono=1;}
     2178        if(#[1]=="pri"){rpr=1;}
     2179     }
     2180     else { ERROR("invalid option for genus");}
     2181   }
    21712182   def R0=basering;
    2172    if(char(basering)>0)
     2183   if((char(basering)>0)||(ono))
    21732184   {
    21742185     def R1=changeord(list(list("dp",1:nvars(basering))));
     
    21982209       J=std(J);
    21992210     }
    2200      int pa=1-hilbPoly(J)[1];
    2201      pa=pa-deltaP(J);
     2211
     2212     list LL=normal(J,"prim");
     2213     int pa,i;
     2214     for(i=1;i<=size(LL[1]);i++)
     2215     {
     2216        def T=LL[1][i];
     2217        setring T;
     2218        pa=pa-hilbPoly(std(norid))[1];
     2219        setring S;
     2220        kill T;
     2221     }
     2222     pa=pa+1;
    22022223     setring R0;
    22032224     return(pa);
     2225   }
     2226   if(!rpr)
     2227   {
     2228      list LZ=minAssGTZ(I);
     2229      if(size(LZ)>1)
     2230      {
     2231         int p_g;
     2232         for(ll=1;ll<=size(LZ);ll++)
     2233         {
     2234            p_g=p_g+genus(LZ[ll],"pri")-1;
     2235         }
     2236         return(p_g+1);
     2237      }
     2238      else
     2239      {
     2240         I=LZ[1];
     2241      }
    22042242   }
    22052243   I=std(I);
     
    24322470   map sigma=S,var(1),var(2),1;
    24332471   ideal I=sigma(F);
    2434 
    2435    if(size(#)!=0)
    2436    {                              //uses the normalization to compute delta
    2437       list nor=normal(I,"withDelta");
    2438       delt=nor[size(nor)][2];
    2439       genus=genus-delt-deltainf;
    2440       setring R0;
    2441       return(genus);
    2442    }
    24432472
    24442473   ideal I1=jacob(I);
Note: See TracChangeset for help on using the changeset viewer.