Changeset 71a8ba in git
 Timestamp:
 Apr 11, 2011, 9:58:27 AM (12 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 0f93f5f4a65af4c121349d23f99a0869a0a9be2d
 Parents:
 2272157187c82cb5bd15a8c9b7faff7e3b064132
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/primdecint.lib
r2272157 r71a8ba 22 22 heightZ(I); compute the height of I 23 23 equidimZ(I); compute the equidimensional part of I 24 intersectZ(I,J) compute the intersection of I and J25 24 "; 26 25 … … 233 232 if(size(reduce(TES,Q))>0) 234 233 { 235 TQ=intersectZ(TQ,Q); 236 //TQ=intersect(TQ,Q); 234 TQ=intersect(TQ,Q); 237 235 P[size(P)+1]=list(Q,K); 238 236 } … … 253 251 if(size(reduce(TES,Q))>0) 254 252 { 255 //TQ=intersect Z(TQ,Q);253 //TQ=intersect(TQ,Q); 256 254 P[size(P)+1]=list(Q,K); 257 255 } … … 262 260 JJ=JJ,p; 263 261 JJ=stdZ(JJ); 264 TQ=intersectZ(TQ,JJ); 265 //TQ=intersect(TQ,JJ); 262 TQ=intersect(TQ,JJ); 266 263 } 267 264 } … … 276 273 if(!ex){return(P);} 277 274 J=stdZ(J); 278 TQ=intersectZ(TQ,TES); 279 //TQ=intersect(TQ,TES); 275 TQ=intersect(TQ,TES); 280 276 if(size(reduce(TQ,J))!=0) 281 277 { … … 284 280 ideal W=K; 285 281 m++; 286 while(size(reduce(intersectZ(W,TQ),J))!=0) 287 //while(size(reduce(intersect(W,TQ),J))!=0) 282 while(size(reduce(intersect(W,TQ),J))!=0) 288 283 { 289 284 //W=stdZ(addIdealZ(I,K^m)); … … 363 358 ideal I5=9c5,6d5; 364 359 ideal I6=17,a15,b15,c15,d15; 365 ideal I=intersect Z(I1,I2);366 I=intersect Z(I,I3);367 I=intersect Z(I,I4);368 I=intersect Z(I,I5);369 I=intersect Z(I,I6);360 ideal I=intersect(I1,I2); 361 I=intersect(I,I3); 362 I=intersect(I,I4); 363 I=intersect(I,I5); 364 I=intersect(I,I6); 370 365 primdecZ(I); 371 ideal J=intersect Z(ideal(17,a),ideal(17,a2,b));366 ideal J=intersect(ideal(17,a),ideal(17,a2,b)); 372 367 primdecZ(J); 373 ideal K=intersect Z(ideal(9,a+3),ideal(9,b+3));368 ideal K=intersect(ideal(9,a+3),ideal(9,b+3)); 374 369 primdecZ(K); 375 370 } … … 499 494 ideal I5=9c5,6d5; 500 495 ideal I6=17,a15,b15,c15,d15; 501 ideal I=intersect Z(I1,I2);502 I=intersect Z(I,I3);503 I=intersect Z(I,I4);504 I=intersect Z(I,I5);505 I=intersect Z(I,I6);496 ideal I=intersect(I1,I2); 497 I=intersect(I,I3); 498 I=intersect(I,I4); 499 I=intersect(I,I5); 500 I=intersect(I,I6); 506 501 minAssZ(I); 507 ideal J=intersect Z(ideal(17,a),ideal(17,a2,b));502 ideal J=intersect(ideal(17,a),ideal(17,a2,b)); 508 503 minAssZ(J); 509 ideal K=intersect Z(ideal(9,a+3),ideal(9,b+3));504 ideal K=intersect(ideal(9,a+3),ideal(9,b+3)); 510 505 minAssZ(K); 511 506 } … … 595 590 ideal I5=9c5,6d5; 596 591 ideal I6=17,a15,b15,c15,d15; 597 ideal I=intersect Z(I1,I2);598 I=intersect Z(I,I3);599 I=intersect Z(I,I4);600 I=intersect Z(I,I5);601 I=intersect Z(I,I6);592 ideal I=intersect(I1,I2); 593 I=intersect(I,I3); 594 I=intersect(I,I4); 595 I=intersect(I,I5); 596 I=intersect(I,I6); 602 597 heightZ(I); 603 598 } … … 652 647 B=B,p; 653 648 B=stdZ(B); 654 K=stdZ(intersectZ(K,B)); 655 //K=stdZ(intersect(K,B)); 649 K=stdZ(intersect(K,B)); 656 650 setring Rhelp; 657 651 } … … 681 675 { 682 676 ideal M=radicalZ(J); 683 K=intersectZ(K,M); 684 //K=intersect(K,M); 677 K=intersect(K,M); 685 678 } 686 679 return(K); … … 695 688 ideal I5=9c5,6d5; 696 689 ideal I6=17,a15,b15,c15,d15; 697 ideal I=intersect Z(I1,I2);698 I=intersect Z(I,I3);699 I=intersect Z(I,I4);700 I=intersect Z(I,I5);701 I=intersect Z(I,I6);690 ideal I=intersect(I1,I2); 691 I=intersect(I,I3); 692 I=intersect(I,I4); 693 I=intersect(I,I5); 694 I=intersect(I,I6); 702 695 radicalZ(I); 703 ideal J=intersect Z(ideal(17,a),ideal(17,a2,b));696 ideal J=intersect(ideal(17,a),ideal(17,a2,b)); 704 697 radicalZ(J); 705 698 } … … 811 804 N=stdZ(N); 812 805 Q=extractZ(N,j,IS,B); 813 TQ=intersectZ(TQ,Q); 814 //TQ=intersect(TQ,Q); 806 TQ=intersect(TQ,Q); 815 807 } 816 808 setring Rhelp; … … 825 817 E=E,p; 826 818 E=stdZ(E); 827 TQ=intersectZ(TQ,E); 828 //TQ=intersect(TQ,E); 819 TQ=intersect(TQ,E); 829 820 } 830 821 } … … 863 854 if(he==heightZ(M)) 864 855 { 865 E=intersectZ(M,E); 866 //E=intersect(M,E); 856 E=intersect(M,E); 867 857 } 868 858 } … … 878 868 ideal I5=9c5,6d5; 879 869 ideal I6=17,a15,b15,c15,d15; 880 ideal I=intersect Z(I1,I2);881 I=intersect Z(I,I3);882 I=intersect Z(I,I4);883 I=intersect Z(I,I5);884 I=intersect Z(I,I6);870 ideal I=intersect(I1,I2); 871 I=intersect(I,I3); 872 I=intersect(I,I4); 873 I=intersect(I,I5); 874 I=intersect(I,I6); 885 875 equidimZ(I); 886 }887 888 ////////////////////////////////////////////////////////////////////////////////889 890 proc intersectZ(ideal I, ideal J)891 "USAGE: intersectZ(I,J); I,J ideals892 RETURN: the intersection of the input ideals893 NOTE: this is needed because intersect(I,J) does not work, should be replaced894 by intersect later895 EXAMPLE: example intersectZ; shows an example896 {897 def R = basering;898 execute("ring S=integer,(t,"+varstr(R)+"),(dp(1),dp(nvars(R)));");899 ideal I=imap(R,I);900 ideal J=imap(R,J);901 ideal K=addIdealZ(t*I,(1t)*J);902 K=stdZ(K);903 int i;904 ideal L;905 for(i=1;i<=size(K);i++)906 {907 if(lead(K[i])/t==0){L[size(L)+1]=K[i];}908 }909 setring R;910 ideal L=imap(S,L);911 return(L);912 }913 example914 { "EXAMPLE:"; echo = 2;915 ring R=integer,(a,b,c,d),dp;916 ideal I1=9,a,b;917 ideal I2=3,c;918 ideal I3=11,2a,7b;919 ideal I4=13a2,17b4;920 ideal I5=9c5,6d5;921 ideal I6=17,a15,b15,c15,d15;922 ideal I=intersectZ(I1,I2); I;923 I=intersectZ(I,I3); I;924 I=intersectZ(I,I4); I;925 I=intersectZ(I,I5); I;926 I=intersectZ(I,I6); I;927 876 } 928 877 … … 1270 1219 def R=basering; 1271 1220 int i; 1272 ideal K=intersectZ(I,ideal(f)); 1273 //ideal K=intersect(I,ideal(f)); 1221 ideal K=intersect(I,ideal(f)); 1274 1222 //=== K[i]/f; does not work in rings with integer! This should be replaced 1275 1223 //=== later … … 1296 1244 for(i=2;i<=size(J);i++) 1297 1245 { 1298 K=intersectZ(K,quotientOneZ(I,J[i])); 1299 //K=intersect(K,quotientOneZ(I,J[i])); 1246 K=intersect(K,quotientOneZ(I,J[i])); 1300 1247 } 1301 1248 return(K); … … 1389 1336 for(i=2;i<=size(L);i++) 1390 1337 { 1391 K=intersectZ(K,L[i][1]); 1392 //K=intersect(K,L[i][1]); 1338 K=intersect(K,L[i][1]); 1393 1339 } 1394 1340 i=size(reduce(K,stdZ(I)))+size(reduce(I,stdZ(K))); … … 1541 1487 x(1)*x(4)^3*x(5), 1542 1488 x(4)^4*x(5); 1543 I=intersect Z(I,ideal(64*181,x(1)^2));1489 I=intersect(I,ideal(64*181,x(1)^2)); 1544 1490 1545 1491 ring R17=integer,(x,y,z),dp;
Note: See TracChangeset
for help on using the changeset viewer.