Changeset 9a3ece in git
 Timestamp:
 May 26, 1999, 2:25:23 PM (24 years ago)
 Branches:
 (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
 Children:
 1598568cca6b50706674b0e35565a4c89bcfef83
 Parents:
 9fd5f8a67b2159d3a039d7b0b34e704f6a617dfb
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/normal.lib
r9fd5f8 r9a3ece 2 2 // normal.lib 3 3 // algorithms for computing the normalization based on 4 // the ideas of De Jong,Vasconcelos4 // the criterion of Grauert/Remmert and ideas of De Jong & Vasconcelos 5 5 // written by GertMartin Greuel and Gerhard Pfister 6 6 /////////////////////////////////////////////////////////////////////////////// 7 7 8 version="$Id: normal.lib,v 1.1 1 19990315 12:07:19 SingularExp $";8 version="$Id: normal.lib,v 1.12 19990526 12:25:23 obachman Exp $"; 9 9 info=" 10 LIBRARY: normal.lib : PROCEDURE FOR NORMALIZATION (I)11 12 normal(ideal I)13 // computes a set of rings such that their product is the14 // normalization of the reduced basering/I10 LIBRARY: normal.lib PROCEDURES FOR NORMALIZATION 11 12 normal(I); computes the normalization of basering/I 13 extraweight(R); intvec of variable weights of ring R 14 HomJJ(L); presentation of End_R(J) as affine ring, L a list 15 15 "; 16 16 … … 20 20 LIB "presolve.lib"; 21 21 /////////////////////////////////////////////////////////////////////////////// 22 22 static 23 23 proc isR_HomJR (list Li) 24 24 "USAGE: isR_HomJR (Li); Li = list: ideal SBid, ideal J, poly p … … 153 153 /////////////////////////////////////////////////////////////////////////////// 154 154 155 proc HomJJ (list Li ,list #)156 "USAGE: HomJJ (Li); Li = list: SBid,id,J,poly p155 proc HomJJ (list Li) 156 "USAGE: HomJJ (Li); Li = list: ideal SBid, ideal id, ideal J, poly p 157 157 ASSUME: R = P/id, P = basering, a polynomial ring, id an ideal of P, 158 158 SBid = standard basis of id, … … 166 166 endphi describes the canonical map R > Hom_R(J,J) 167 167 _[2]: an integer which is 1 if phi is an isomorphism, 0 if not 168 NOTE: printlevel >=1: display comments (default: printlevel=0) 168 169 EXAMPLE: example HomJJ; shows an example 169 170 " … … 174 175 intvec rw,rw1; 175 176 list L; 176 if( size(#) >=1 ) 177 { 178 if( typeof(#[1]) == "int" ) { y = #[1]; } 179 } 177 178 y = printlevelvoice+2; // y=printlevel (default: y=0) 180 179 def P = basering; 181 180 ideal SBid, id, J = Li[1], Li[2], Li[3]; … … 219 218 // computation of p*Hom(J,J) as Rideal  220 219 f = quotient(p*J,J); 221 if(y==1) 222 { 223 "the module Hom(rad(J),rad(J)) presented by the values on"; 224 "the nonzerodivisor"; 225 " "; 226 p; 227 " "; 228 f; 220 if ( y>=1 ) 221 { "// the module p*Hom(rad(J),rad(J)) = p*J:J, p a nonzerodivisor"; 222 223 "// p"; p; 224 "// f=p*J:J";f; 229 225 } 230 226 f2 = std(p); … … 271 267 L=lastRing; 272 268 L = insert(L,1,1); 273 dbprint( printlevelvoice+3,"// case R = Hom(J,J)");274 if(y ==1)269 dbprint(y,"// case R = Hom(J,J)"); 270 if(y>=1) 275 271 { 276 272 "R=Hom(rad(J),rad(J))"; … … 300 296 return(L); 301 297 } 302 if(y ==1)298 if(y>=1) 303 299 { 304 300 "R is not equal to Hom(rad(J),rad(J)), we have to try again"; … … 340 336 list L1; 341 337 342 // computation of Hom(J,J) as ring 338 // computation of Hom(J,J) as affine ring  343 339 // determine kernel of: R[T1,...,Tq] > J:J >> R[1/p]=R[t]/(t*p1), 344 340 // Ti > fi/p > t*fi (p=f1=f[1]), to get ring structure. This is of course … … 350 346 T = matrix(ideal(T(1..q)),1,q); 351 347 Lin = ideal(T*syzf); 352 if(y ==1)348 if(y>=1) 353 349 { 354 350 "the ring structure of Hom(rad(J),rad(J)) as Ralgebra"; … … 367 363 } 368 364 } 369 if(y ==1)365 if(y>=1) 370 366 { 371 367 "the quadratic relations"; … … 402 398 // export(endid); 403 399 // export(endphi); 404 if(y ==1)400 if(y>=1) 405 401 { 406 402 "the new ring after reduction of the number of variables"; … … 439 435 list Li = std(id),id,J,p; 440 436 list L = HomJJ(Li); 441 def end = L[1]; 442 setring end; 437 def end = L[1]; // defines ring L[1], containing ideals endid and endphi 438 setring end; // makes end the basering 443 439 end; 444 endid; 445 map psi = r,endphi; 440 endid; // end/endid is isomorphic to End(r/id) as ring 441 map psi = r,endphi;// defines the canonical map r/id > End(r/id) 446 442 psi; 447 448 ring r = 32003,(x,y,z),dp;449 ideal id = x2xyxz+yz;450 ideal J =yz,xz;451 poly p = x+16001y+16001z;452 list Li = std(id),id,J,p;453 list L = HomJJ(Li,0);454 def end = L[1]; // defines ring L[1], containing ideals endid and endphi455 setring end; // makes end the basering456 end;457 endid; // end/endid is isomorphic to End(r/id) as ring458 459 443 } 460 444 461 445 /////////////////////////////////////////////////////////////////////////////// 462 446 proc normal(ideal id, list #) 463 "USAGE: normal(i,choose); i ideal,choose empty or 1 464 in case you choose 1 the factorizing Buchberger algorithm 465 is not used which is sometimes more efficient 466 RETURN: a list of rings L=R1,...,Rk, in each Ri are two ideals 467 Si,Mi such that the product of Ri/Mi is the normalization 468 Si is a standardbasis of Mi 469 NOTE: to use the rings: def r=L[i];setring r; 447 "USAGE: normal(i [,choose]); i ideal, choose empty or 1 448 if choose=1 the factorizing Buchberger algorithm is not used 449 (which is sometimes more efficient) 450 RETURN: a list L of rings, in each ring L[i] are two ideals 451 norid, normap such that the product of the L[i]/norid is the 452 normalization of basering/id and normap is the map from basering/id 453 to L[i]/norid 454 NOTE: to use the rings type: def r=L[i]; setring r; norid; normap; 455 increasing printlevel displays more comments (default: printlevel=0) 456 COMMENT: The algoritm works in principle for any basering and reduced ideal. 457 The implementation should work correctly for any global (p) ordering, 458 however, this is not fully tested. 459 If the input ideal i is weighted homogeneous a weighted ordering may 460 be used (qhweight(i); computes weights). 470 461 EXAMPLE: example normal; shows an example 471 462 " … … 473 464 int i,j,y; 474 465 list result,prim,keepresult; 466 y=printlevelvoice+2; 467 468 if ( find(ordstr(basering),"s")+find(ordstr(basering),"M") != 0) 469 { 470 " 471 // Not implemented for this ordering, 472 // please change to global ordering!"; 473 return(result); 474 } 475 475 476 476 477 if(size(#)==0) … … 535 536 attrib(prim[1],"isRegInCodim2",0); 536 537 } 538 dbprint(y+1," 539 // If the name of your list is L type: 540 // def r=L[i]; setring r; norid; normap; 541 // then r/norid is the ith ring of the normaliztion 542 // and normap the map of the basring to r/norid"); 543 537 544 return(normalizationPrimes(prim[1],maxideal(1))); 538 545 } … … 548 555 } 549 556 550 if(y ==1)557 if(y>=1) 551 558 { 552 559 "we have ";size(prim);"components"; … … 554 561 for(i=1;i<=size(prim);i++) 555 562 { 556 if(y ==1)563 if(y>=1) 557 564 { 558 565 "we are in loop";i; … … 592 599 } 593 600 } 601 602 dbprint(y+1," 603 // If the name of your list is L type: 604 // def r=L[i]; setring r; norid; normap; 605 // then r/norid is the ith ring of the normaliztion 606 // and normap the map of the basring to r/norid"); 607 594 608 return(result); 595 609 } … … 597 611 example 598 612 { "EXAMPLE:"; echo = 2; 599 ring r = 0,(x,y,z),dp; 600 613 ring r=32003,(x,y,z),wp(2,1,2); 614 ideal i=z3xy4; 615 list pr=normal(i); 616 pr; 617 def r1=pr[1]; 618 setring r1; 619 norid; 620 normap; 601 621 } 602 622 603 623 /////////////////////////////////////////////////////////////////////////////// 624 static 604 625 proc normalizationPrimes(ideal i,ideal ihp, list #) 605 626 "USAGE: normalizationPrimes(i); i prime ideal … … 608 629 S is a standardbasis of M 609 630 NOTE: to use the ring: def r=L[1];setring r; 631 printlevel >=1: display comments (default: printlevel=0) 610 632 EXAMPLE: example normalizationPrimes; shows an example 611 633 " 612 634 { 613 int y; 614 if(y==1) 635 int y = printlevelvoice+2; // y=printlevel (default: y=0) 636 637 if(y>=1) 615 638 { 616 639 "START one normalization loop with the ideal"; … … 625 648 def BAS=basering; 626 649 list result,keepresult1,keepresult2; 627 ideal J,SB,MB ,KK;650 ideal J,SB,MB; 628 651 int depth,lauf,prdim; 629 652 int ti=timer; … … 631 654 if(size(i)==0) 632 655 { 633 if(y ==1)656 if(y>=1) 634 657 { 635 658 "the ideal was the zeroideal"; … … 637 660 execute "ring newR7="+charstr(basering)+",("+varstr(basering)+"),(" 638 661 +ordstr(basering)+");"; 639 ideal KK=ideal(0);640 ideal PP=fetch(BAS,ihp);641 export PP;642 export KK;662 ideal norid=ideal(0); 663 ideal normap=fetch(BAS,ihp); 664 export norid; 665 export normap; 643 666 result=newR7; 644 667 setring BAS; … … 647 670 } 648 671 649 if(y ==1)672 if(y>=1) 650 673 { 651 674 " "; … … 656 679 list SM=mstd(i); 657 680 658 if(y ==1)681 if(y>=1) 659 682 { 660 683 " the dimension is "; … … 727 750 if(dim(JM[1])==1) 728 751 { 729 if(y ==1)752 if(y>=1) 730 753 { 731 754 "the ideal was smooth"; … … 736 759 def newR6=LL[1]; 737 760 setring newR6; 738 ideal KK=endid; 739 ideal PP=endphi; 740 // execute "ring newR6="+charstr(basering)+",("+varstr(basering)+"),(" 741 // +ordstr(basering)+");"; 742 // ideal KK=fetch(BAS,MB); 743 // ideal PP=fetch(BAS,ihp); 744 export PP; 745 export KK; 761 ideal norid=endid; 762 ideal normap=endphi; 763 export norid; 764 export normap; 746 765 result=newR6; 747 766 setring BAS; … … 753 772 if((dim(SM[1])==0)&&(homog(SM[2])==1)) 754 773 { 755 if(y ==1)774 if(y>=1) 756 775 { 757 776 "the ideal was zerodimensional and homogeneous"; … … 762 781 def newR5=LL[1]; 763 782 setring newR5; 764 ideal KK=endid; 765 ideal PP=endphi; 766 // execute "ring newR5="+charstr(basering)+",("+varstr(basering)+"),(" 767 // +ordstr(basering)+");"; 768 // ideal KK=fetch(BAS,MB); 769 // ideal PP=fetch(BAS,ihp); 770 export PP; 771 export KK; 783 ideal norid=endid; 784 ideal normap=endphi; 785 export norid; 786 export normap; 772 787 result=newR5; 773 788 setring BAS; … … 781 796 &&(homog(SM[2])==1)) 782 797 { 783 if(y ==1)798 if(y>=1) 784 799 { 785 800 "the ideal defines a line"; … … 790 805 def newR4=LL[1]; 791 806 setring newR4; 792 ideal KK=endid; 793 ideal PP=endphi; 794 // execute "ring newR4="+charstr(basering)+",("+varstr(basering)+"),(" 795 // +ordstr(basering)+");"; 796 // ideal KK=fetch(BAS,MB); 797 // ideal PP=fetch(BAS,ihp); 798 export PP; 799 export KK; 807 ideal norid=endid; 808 ideal normap=endphi; 809 export norid; 810 export normap; 800 811 result=newR4; 801 812 setring BAS; … … 812 823 attrib(SM[2],"isCompleteIntersection",1); 813 824 attrib(SM[2],"isEquidimensional",1); 814 if(y ==1)825 if(y>=1) 815 826 { 816 827 "it is a complete Intersection"; 817 828 } 818 829 } 819 // if(attrib(i,"isIsolatedSingularity")==0)820 // {821 // list L=sres(SM[2],0);822 // prdim=ncols(betti(L))1;823 // depth=nvars(basering)prdim;824 // }825 826 // if(attrib(SM[2],"isCohenMacaulay")==0)827 // {828 // test for CohenMacaulay829 // if((dim(SM[1]))==depth)830 // {831 // attrib(SM[2],"isCohenMacaulay",1);832 // "it is CohenMacaulay";833 // }834 // }835 830 836 831 //compute the singular locus+lower dimensional components … … 841 836 J=minor(jacob(SM[2]),nvars(basering)dim(SM[1])); 842 837 //ti=timer; 843 if(y ==1)838 if(y>=1) 844 839 { 845 840 "SB of singular locus will be computed"; … … 848 843 849 844 //kills the embeded components 850 // if(homog(SM[2])==1)851 // {852 // sin=sat(sin,maxideal(1))[1];853 // }854 845 855 846 list JM=mstd(sin); 856 if(y ==1)847 if(y>=1) 857 848 { 858 849 " "; … … 867 858 if(dim(JM[1])==1) 868 859 { 869 if(y ==1)860 if(y>=1) 870 861 { 871 862 "it is smooth"; … … 874 865 intvec rw; 875 866 list LL=substpart(MB,ihp,0,rw); 876 // execute "ring newR3="+charstr(basering)+",("+varstr(basering)+"),("877 // +ordstr(basering)+");";878 867 def newR3=LL[1]; 879 868 setring newR3; 880 // ideal KK=fetch(BAS,MB); 881 // ideal PP=fetch(BAS,ihp); 882 ideal KK=endid; 883 ideal PP=endphi; 884 export PP; 885 export KK; 869 ideal norid=endid; 870 ideal normap=endphi; 871 export norid; 872 export normap; 886 873 result=newR3; 887 874 setring BAS; … … 916 903 if(size(qAnn)==0) 917 904 { 918 if(y ==1)905 if(y>=1) 919 906 { 920 907 " "; … … 928 915 //Hom(I,R)=R 929 916 list RR; 930 // list RR=SM[1],maxideal(1),SL[1];931 // "test with Hom(I,R)";932 // ti=timer;933 // if(isR_HomJR(RR)==1)934 // {935 // "it was normal";936 // timerti;937 // SB=SM[1];938 // SM=SM[2];939 // export SB,MB;940 // result=BAS;941 // return(result);942 // }943 // timerti;944 917 RR=SM[1],SM[2],maxideal(1),SL[1]; 945 918 ti=timer; 946 919 RR=HomJJ(RR,y); 947 // timerti;948 920 if(RR[2]==0) 949 921 { … … 961 933 execute "ring newR7="+charstr(basering)+",("+varstr(basering)+"),(" 962 934 +ordstr(basering)+");"; 963 ideal KK=fetch(BAS,MB);964 ideal PP=fetch(BAS,ihp);965 export PP;966 export KK;935 ideal norid=fetch(BAS,MB); 936 ideal normap=fetch(BAS,ihp); 937 export norid; 938 export normap; 967 939 result=newR7; 968 940 setring BAS; … … 1014 986 { 1015 987 list RR; 1016 // "test with Hom(I,I) before the radical computation";1017 //again test for normality1018 //Hom(I,R)=R1019 // list RR=SM[1],JM[2],SL[1];1020 // "test with Hom(I,R)";1021 // ti=timer;1022 // if(isR_HomJR(RR)==1)1023 // {1024 // "it was normal";1025 // timerti;1026 // SB=SM[1];1027 // SM=SM[2];1028 // export SB,MB;1029 // result=BAS;1030 // return(result);1031 // }1032 // timerti;1033 1034 // list RR=SM[1],SM[2],JM[2],SL[1];1035 // ti=timer;1036 988 list RS; 1037 // list RS=HomJJ(RR);1038 // timerti;1039 // if(RS[2]==0)1040 // {1041 // "Hom(I,I) was sucessfull without radical";1042 // def newR=RS[1];1043 // setring newR;1044 // list tluser=normalizationPrimes(SM);1045 // setring BAS;1046 // return(tluser);1047 // }1048 989 1049 990 //now we have to compute the radical 1050 if(y ==1)991 if(y>=1) 1051 992 { 1052 993 "radical computation"; 1053 994 } 1054 // ti=timer;1055 1056 995 1057 996 if((attrib(JM[2],"isRad")==0)&&(attrib(SM[2],"isEquidimensional")==0)) … … 1077 1016 } 1078 1017 } 1079 // timerti;1080 1018 1081 1019 JM=J,J; 1082 1020 1083 1021 //evtl. fuer SL[1] anderen Nichtnullteiler aus J waehlen 1084 // SL=simplify(reduce(J,SM[1]),2);1085 // Ann=quotient(SM[2],SL[1]);1086 // qAnn=simplify(reduce(Ann,SM[1]),2);1087 // if(size(qAnn)!=0)1088 // {1089 // keepresult1=normalizationPrimes(qAnn+SM[2]);1090 // keepresult2=normalizationPrimes(SL[1]+SM[2]);1091 // for(lauf=1;lauf<=size(keepresult2);j++)1092 // {1093 // keepresult1=insert(keepresult1,keepresult2[lauf]);1094 // }1095 // return(keepresult1);1096 // }1097 1022 RR=SM[1],SM[2],JM[2],SL[1]; 1098 1023 1099 1024 // evtl eine geeignete Potenz von JM? 1100 if(y ==1)1025 if(y>=1) 1101 1026 { 1102 1027 "compute Hom(rad(J),rad(J)):"; 1103 1028 } 1104 // ti=timer;1105 1029 1106 1030 RS=HomJJ(RR,y); 1107 // timerti;1108 1031 1109 1032 if(RS[2]==1) … … 1112 1035 setring lastR; 1113 1036 map psi1=BAS,endphi; 1114 ideal KK=endid;1115 ideal PP=psi1(ihp);1116 export PP;1117 export KK;1037 ideal norid=endid; 1038 ideal normap=psi1(ihp); 1039 export norid; 1040 export normap; 1118 1041 setring BAS; 1119 // return(RS[1]);1120 1042 return(lastR); 1121 1043 } … … 1129 1051 list tluser= 1130 1052 normalizationPrimes(endid,psi(ihp),simplify(psi(MJ)+endid,4)); 1131 // normalizationPrimes(endid);1132 1053 setring BAS; 1133 1054 return(tluser); … … 1139 1060 execute "ring newR1="+charstr(basering)+",("+varstr(basering)+"),(" 1140 1061 +ordstr(basering)+");"; 1141 if(y ==1)1062 if(y>=1) 1142 1063 { 1143 1064 "zerodivisor found"; … … 1164 1085 ideal new2=quotient(SM[2],Ann)+SM[2]; 1165 1086 // evtl. qAnn nehmen 1166 // ideal new2=SL[1]+SM[2];1167 1087 execute "ring newR2="+charstr(basering)+",("+varstr(basering)+"),(" 1168 1088 +ordstr(basering)+");"; … … 1196 1116 example 1197 1117 { "EXAMPLE:";echo = 2; 1198 LIB"normal.lib";1199 1118 //Huneke 1200 ring qr=31991,(a,b,c,d,e),dp; 1201 ideal i= 1202 5abcdea5b5c5d5e5, 1203 ab3c+bc3d+a3be+cd3e+ade3, 1204 a2bc2+b2cd2+a2d2e+ab2e2+c2de2, 1205 abc5b4c2d2a2b2cde+ac3d2ea4de2+bcd2e3+abe5, 1206 ab2c4b5cda2b3de+2abc2d2e+ad4e2a2bce3cde5, 1207 a3b2cdbc2d4+ab2c3eb5ded6e+3abcd2e2a2be4de6, 1208 a4b2cabc2d3ab5eb3c2dead5e+2a2bcde2+cd2e4, 1209 b6c+bc6+a2b4e3ab2c2de+c4d2ea3cde2abd3e2+bce5; 1210 1211 list pr=normal(i); 1212 def r1=pr[1]; 1213 setring r1; 1214 KK; 1119 ring qr=31991,(a,b,c,d,e),dp; 1120 ideal i= 1121 5abcdea5b5c5d5e5, 1122 ab3c+bc3d+a3be+cd3e+ade3, 1123 a2bc2+b2cd2+a2d2e+ab2e2+c2de2, 1124 abc5b4c2d2a2b2cde+ac3d2ea4de2+bcd2e3+abe5, 1125 ab2c4b5cda2b3de+2abc2d2e+ad4e2a2bce3cde5, 1126 a3b2cdbc2d4+ab2c3eb5ded6e+3abcd2e2a2be4de6, 1127 a4b2cabc2d3ab5eb3c2dead5e+2a2bcde2+cd2e4, 1128 b6c+bc6+a2b4e3ab2c2de+c4d2ea3cde2abd3e2+bce5; 1129 1130 list pr=normalizationPrimes(i); 1131 def r1=pr[1]; 1132 setring r1; 1133 norid; 1134 normap; 1215 1135 } 1216 1217 proc substpart(ideal endid,ideal endphi, int homo, intvec rw) 1136 /////////////////////////////////////////////////////////////////////////////// 1137 static 1138 proc substpart(ideal endid, ideal endphi, int homo, intvec rw) 1218 1139 { 1219 1140 def newRing=basering; … … 1297 1218 return(L); 1298 1219 } 1299 1220 /////////////////////////////////////////////////////////////////////////////// 1221 static 1300 1222 proc diagon(ideal i) 1301 1223 { … … 1308 1230 ///////////////////////////////////////////////////////////////////////////// 1309 1231 /* 1232 Examples: 1310 1233 LIB"normal.lib"; 1311 int aa=timer;list pr=normal(i);timeraa;1312 1313 1314 1315 1234 //Huneke 1316 1235 ring qr=31991,(a,b,c,d,e),dp;
Note: See TracChangeset
for help on using the changeset viewer.