Changeset dc2e7d5 in git


Ignore:
Timestamp:
Dec 11, 2013, 1:30:04 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'b0600ca938adb77a8cb08f73867bd8009f2ca8b1')
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
Files:
4 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);
  • Tst/Short/bug_532_s.res.gz.uu

    r3bc27a3 rdc2e7d5  
    1 begin 664 bug_532_s.res.gz
    2 M'XL(")_>H5(``V)U9U\U,S)?<RYR97,`39%1:\(P%(7?^RL.96`R:C76;E-I
    3 M'\;V(`P'NF<EKK$+U%3:B-*Q_[ZDE=2\).1^]YSDW,W7VW(%@*48C7#Y$0I"
    4 M\7TA58X+KQ3*DY:E"E"+_,#/A>Z8;UZTR"`7ZEP3&3`Z\#8WK4EHM;I&XEL5
    5 MGR[@RE'8GZ<A/I:O\'6MPT+N_86KQ"G,Y4XJJ0E=>'9'FF)_SG=Q--G5H1*7
    6 ML-9<NXZGM-=]OO-X"6&7\2&^*JLC+UHKVGO-^DXV[NC*_JY"@G%`FN!*@^SD
    7 M>&;"LDMF@A>0!FJV\;#91L/F\6I.U^VL9R<=>\O)YC!SM:BK9?)(4.O,E&$`
    8 MDUW"@"1M4T:?,&2-0N12RR/7PF-.9WKW_KA[OSR`J%*#.&<DB=."$:,4^,7[
    9 K>OVY)K[-%5)AU>8SGW<@M7/[<])W`3,3L!V/'8`!F>$>O'__/`,D3`(`````
     1begin 644 bug_532_s.res.gz
     2M'XL("-L]J%(``V)U9U\U,S)?<RYR97,`G9)1:\(P%(7?^RL.86`Z:K36ZE3:
     3MA[$]#(8#W;,2U]H%:BIM1.G8?U_2NM3'L;PTY'[W'.ZY7;\_O2P!^#$&`YP_
     4M4XE4\ETN9(8S+R6*HQ*%]%"EV9Z?<M4R'SQOD%Z6RE-%A>>[/6=]U1HQH]4V
     5M4F)4B+N`+0>LNX\97E\>052E6"YV9&$K80S]N!52*.HN'/-%'&-WRK9A,-I6
     6M3*9G5BFN;,<D[G2G-QX/#.9H'TID41YXWEBYG=>LZ_2'+5V:Z4I$&'JT]BZN
     7MEQPM[^NPS!%)RG,(#=6;L%]O@GY]?]&WRV;6L:.6O>9D<IC96M#6$G&@J%2B
     8MR]"`SB[R@2AN4O[M]!AC+D2%/,V$$@>N4L>W2N.;"<)V`K$'E84"M=Z((JL&
     9M<BP%T7XN\(7GU>IM18E)%T)BV:0TG[>P:[;W;>4G\9_D==+_DI_>3*(W9_X!
     101LV4-^IJ[<WX`Z73[3K$"````
    1011`
    1112end
  • Tst/Short/bug_532_s.tst

    r3bc27a3 rdc2e7d5  
    1111    ideal i = z^5-z^3-z*x^5-x^9;
    1212    genus(i);
    13     dim( std(i) ); // =1  => call genus(i,1) is legitimate
     13    dim( std(i) ); // =1  => call genus(i,...) is legitimate
    1414
    15     if (not ( genus(i) == genus(i, 1) ))  { ERROR(" bug in Normal::genus()"); }
     15    if (not ( genus(i) == genus(i, "pri") ))  { ERROR(" bug in Normal::genus()"); }
     16    if (not ( genus(i) == genus(i, "nor") ))  { ERROR(" bug in Normal::genus()"); }
    1617
    1718tst_status(1); $
  • bug_532_s.stat

    r3bc27a3 rdc2e7d5  
    1 1 >> tst_memory_0 :: 1386345906:3170:3-1-7:ix86-Linux:mamawutz:406104
    2 1 >> tst_memory_1 :: 1386345906:3170:3-1-7:ix86-Linux:mamawutz:2490368
    3 1 >> tst_memory_2 :: 1386345906:3170:3-1-7:ix86-Linux:mamawutz:2583456
    4 1 >> tst_timer_1 :: 1386345906:3170:3-1-7:ix86-Linux:mamawutz:39
     11 >> tst_memory_0 :: 1386757595:3170:3-1-7:ix86-Linux:mamawutz:448676
     21 >> tst_memory_1 :: 1386757595:3170:3-1-7:ix86-Linux:mamawutz:2531328
     31 >> tst_memory_2 :: 1386757595:3170:3-1-7:ix86-Linux:mamawutz:2670592
     41 >> tst_timer_1 :: 1386757595:3170:3-1-7:ix86-Linux:mamawutz:100
Note: See TracChangeset for help on using the changeset viewer.