Changeset db347cb in git


Ignore:
Timestamp:
Oct 6, 2012, 1:02:39 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
95197e27d1277756b09bcdadc0b4e418cd280274
Parents:
20c54056198f825ef62888512342886cf96c82a6
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-10-06 13:02:39+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-10-06 13:03:40+02:00
Message:
fix from master: exceptional cases (algebra.lib), rename sum (modstd.lib)
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/algebra.lib

    r20c540 rdb347cb  
    33//new proc  nonZeroEntry(id), used to fix a bug in proc finitenessTest
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id$";
     5version="$Id: algebra.lib 14661 2012-03-05 11:00:14Z motsak $";
    66category="Commutative Algebra";
    77info="
     
    329329@end format
    330330NOTE:    Three different algorithms are used depending on c = 1,2,3.
    331          If c is not given or c=0, a heuristically best method is choosen.
     331         If c is not given or c=0, a heuristically best method is chosen.
    332332         The basering may be a quotient ring.
    333333         To access to the ring l[2] and see ker you must give the ring a name,
     
    532532@end format
    533533NOTE:    Three differnt algorithms are used depending on c = 1,2,3.
    534          If c is not given or c=0, a heuristically best method is choosen.
     534         If c is not given or c=0, a heuristically best method is chosen.
    535535         The basering may be a quotient ring. However, if the preimage ring is
    536536         a quotient ring, say pr = P/I, consider phi as a map from P and then
     
    799799"
    800800{
    801    if ( deg(i[1]) <= 0)
    802    {
    803      list l = ideal(0),i;
     801   i=simplify(i,2);
     802   if ( i== 0)
     803   {
     804     list l = maxideal(1),maxideal(1);
    804805     return( l );
    805806   }
     
    821822   i = j[2];
    822823   int d = dim(j[1]);
    823    if ( d == 0)
     824   if ( d <= 0)
    824825   {
    825826     setring r;
    826      list l = ideal(0),maxideal(1);
     827     list l = maxideal(1),ideal(0);
    827828     return( l );
    828829   }
  • Singular/LIB/modstd.lib

    r20c540 rdb347cb  
    11////////////////////////////////////////////////////////////////////////////////
    2 version="$Id: modstd.lib 14375 2011-08-23 09:29:47Z steidel $";
     2version="$Id: modstd.lib 15103 2012-07-11 10:00:13Z motsak $";
    33category = "Commutative Algebra";
    44info="
     
    421421   int i,p;
    422422   int ncores = 1;
    423    
     423
    424424//-----------------  Initialize optional parameter ncores  ---------------------
    425425   if(size(#) > 0)
     
    438438      }
    439439   }
    440    
     440
    441441   if(size(#) == 0)
    442442   {
     
    692692      kill HomR;
    693693   }
    694    
     694
    695695   if(variant == 4)
    696696   {
     
    711711   ideal I = cyclic(4);
    712712   int p = 181;
    713    list P = modpStd(I,p,5);
     713   list P = modpStd(I,p,2);
    714714   P;
    715715
     716   ring r2 = 0, x(1..5), lp;
     717   ideal I = cyclic(5);
    716718   int q = 32003;
    717    list Q = modpStd(I,q,2);
     719   list Q = modpStd(I,q,4);
    718720   Q;
    719721}
     
    732734RETURN:  a standard basis of I if no warning appears;
    733735NOTE:    The procedure computes a standard basis of I (over the rational
    734          numbers) by using  modular methods.
     736         numbers) by using modular methods.
    735737         By default the procedure computes a standard basis of I for sure, but
    736738         if the optional parameter #[2] = 0, it computes a standard basis of I
     
    774776         int exactness = 1;
    775777         if(n1 >= 10)
    776          { 
     778         {
    777779            int n2 = n1 + 1;
    778780            int n3 = n1;
     
    789791         int exactness = #[2];
    790792         if(n1 >= 10)
    791          { 
     793         {
    792794            int n2 = n1 + 1;
    793795            int n3 = n1;
     
    864866         variant = 1;
    865867         if(printlevel >= 10) { "variant = 1"; }
    866          
     868
    867869         rl[1] = L[5];
    868870         def @r = ring(rl);
     
    907909               def @r = ring(rl);
    908910               setring @r;
    909                
     911
    910912               def @s = changeord("dp");
    911913               setring @s;
     
    920922                  variant = 3;
    921923                  if(printlevel >= 10) { "variant = 3"; }
    922                  
     924
    923925                  int nvar@r = nvars(@r);
    924926                  intvec w;
     
    937939                  intvec hi = hilb(Id(1), 1, W);
    938940               }
    939                
     941
    940942               setring R0;
    941943               kill @r,@s;
     
    10781080   {
    10791081      tt = timer; rt = rtimer;
    1080      
     1082
    10811083      if(printlevel >= 10) { "size(L) = "+string(size(L)); }
    1082          
     1084
    10831085      if(n1 > 1)
    10841086      {
     
    12181220
    12191221         attrib(J,"isSB",1);
    1220          
     1222
    12211223         if(exactness == 0)
    12221224         {
     
    12251227            return(J);
    12261228         }
    1227          
     1229
    12281230         if(exactness == 1)
    12291231         {
     
    14291431   {
    14301432      i++;
    1431       G1 = ideal(1/(p^i) * sum(F*PrevZ,(-1)*PrevG));
     1433      G1 = ideal(1/(p^i) * sum_id(F*PrevZ,(-1)*PrevG));
    14321434      setring S;
    14331435      G1 = imap(R,G1);
    14341436      G2 = reduce(G1,Gp);
    1435       G3 = sum(G1,(-1)*G2);
     1437      G3 = sum_id(G1,(-1)*G2);
    14361438      M = lift(Gp,G3);
    14371439      Z2 = (-1)*Z*M;
     
    14401442      G2 = imap(S,G2);
    14411443      Z2 = imap(S,Z2);
    1442       PrevG = sum(PrevG, module(p^i*G2));
    1443       PrevZ = sum(PrevZ, multiply(poly(p^i),Z2));
     1444      PrevG = sum_id(PrevG, module(p^i*G2));
     1445      PrevZ = sum_id(PrevZ, multiply(poly(p^i),Z2));
    14441446      testG1 = farey(ideal(PrevG),p^(i+1));
    14451447      attrib(testG1,"isSB",1);
     
    14731475////////////////////////////////////////////////////////////////////////////////
    14741476
    1475 static proc sum(list #)
     1477static proc sum_id(list #)
    14761478{
    14771479   if(typeof(#[1])=="ideal")
Note: See TracChangeset for help on using the changeset viewer.