Changeset db347cb in git
- Timestamp:
- Oct 6, 2012, 1:02:39 PM (10 years ago)
- 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
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/algebra.lib
r20c540 rdb347cb 3 3 //new proc nonZeroEntry(id), used to fix a bug in proc finitenessTest 4 4 /////////////////////////////////////////////////////////////////////////////// 5 version="$Id $";5 version="$Id: algebra.lib 14661 2012-03-05 11:00:14Z motsak $"; 6 6 category="Commutative Algebra"; 7 7 info=" … … 329 329 @end format 330 330 NOTE: 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 cho osen.331 If c is not given or c=0, a heuristically best method is chosen. 332 332 The basering may be a quotient ring. 333 333 To access to the ring l[2] and see ker you must give the ring a name, … … 532 532 @end format 533 533 NOTE: 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 cho osen.534 If c is not given or c=0, a heuristically best method is chosen. 535 535 The basering may be a quotient ring. However, if the preimage ring is 536 536 a quotient ring, say pr = P/I, consider phi as a map from P and then … … 799 799 " 800 800 { 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); 804 805 return( l ); 805 806 } … … 821 822 i = j[2]; 822 823 int d = dim(j[1]); 823 if ( d == 0)824 if ( d <= 0) 824 825 { 825 826 setring r; 826 list l = ideal(0),maxideal(1);827 list l = maxideal(1),ideal(0); 827 828 return( l ); 828 829 } -
Singular/LIB/modstd.lib
r20c540 rdb347cb 1 1 //////////////////////////////////////////////////////////////////////////////// 2 version="$Id: modstd.lib 1 4375 2011-08-23 09:29:47Z steidel$";2 version="$Id: modstd.lib 15103 2012-07-11 10:00:13Z motsak $"; 3 3 category = "Commutative Algebra"; 4 4 info=" … … 421 421 int i,p; 422 422 int ncores = 1; 423 423 424 424 //----------------- Initialize optional parameter ncores --------------------- 425 425 if(size(#) > 0) … … 438 438 } 439 439 } 440 440 441 441 if(size(#) == 0) 442 442 { … … 692 692 kill HomR; 693 693 } 694 694 695 695 if(variant == 4) 696 696 { … … 711 711 ideal I = cyclic(4); 712 712 int p = 181; 713 list P = modpStd(I,p, 5);713 list P = modpStd(I,p,2); 714 714 P; 715 715 716 ring r2 = 0, x(1..5), lp; 717 ideal I = cyclic(5); 716 718 int q = 32003; 717 list Q = modpStd(I,q, 2);719 list Q = modpStd(I,q,4); 718 720 Q; 719 721 } … … 732 734 RETURN: a standard basis of I if no warning appears; 733 735 NOTE: The procedure computes a standard basis of I (over the rational 734 numbers) by using 736 numbers) by using modular methods. 735 737 By default the procedure computes a standard basis of I for sure, but 736 738 if the optional parameter #[2] = 0, it computes a standard basis of I … … 774 776 int exactness = 1; 775 777 if(n1 >= 10) 776 { 778 { 777 779 int n2 = n1 + 1; 778 780 int n3 = n1; … … 789 791 int exactness = #[2]; 790 792 if(n1 >= 10) 791 { 793 { 792 794 int n2 = n1 + 1; 793 795 int n3 = n1; … … 864 866 variant = 1; 865 867 if(printlevel >= 10) { "variant = 1"; } 866 868 867 869 rl[1] = L[5]; 868 870 def @r = ring(rl); … … 907 909 def @r = ring(rl); 908 910 setring @r; 909 911 910 912 def @s = changeord("dp"); 911 913 setring @s; … … 920 922 variant = 3; 921 923 if(printlevel >= 10) { "variant = 3"; } 922 924 923 925 int nvar@r = nvars(@r); 924 926 intvec w; … … 937 939 intvec hi = hilb(Id(1), 1, W); 938 940 } 939 941 940 942 setring R0; 941 943 kill @r,@s; … … 1078 1080 { 1079 1081 tt = timer; rt = rtimer; 1080 1082 1081 1083 if(printlevel >= 10) { "size(L) = "+string(size(L)); } 1082 1084 1083 1085 if(n1 > 1) 1084 1086 { … … 1218 1220 1219 1221 attrib(J,"isSB",1); 1220 1222 1221 1223 if(exactness == 0) 1222 1224 { … … 1225 1227 return(J); 1226 1228 } 1227 1229 1228 1230 if(exactness == 1) 1229 1231 { … … 1429 1431 { 1430 1432 i++; 1431 G1 = ideal(1/(p^i) * sum (F*PrevZ,(-1)*PrevG));1433 G1 = ideal(1/(p^i) * sum_id(F*PrevZ,(-1)*PrevG)); 1432 1434 setring S; 1433 1435 G1 = imap(R,G1); 1434 1436 G2 = reduce(G1,Gp); 1435 G3 = sum (G1,(-1)*G2);1437 G3 = sum_id(G1,(-1)*G2); 1436 1438 M = lift(Gp,G3); 1437 1439 Z2 = (-1)*Z*M; … … 1440 1442 G2 = imap(S,G2); 1441 1443 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)); 1444 1446 testG1 = farey(ideal(PrevG),p^(i+1)); 1445 1447 attrib(testG1,"isSB",1); … … 1473 1475 //////////////////////////////////////////////////////////////////////////////// 1474 1476 1475 static proc sum (list #)1477 static proc sum_id(list #) 1476 1478 { 1477 1479 if(typeof(#[1])=="ideal")
Note: See TracChangeset
for help on using the changeset viewer.