Changeset 47a6aec in git
- Timestamp:
- Jun 7, 1999, 7:01:26 PM (24 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- f937e20ea755161f0ffc5168e6b102697901293d
- Parents:
- 00b574855c4c3b834269f6a81fed2006d7408463
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
r00b574 r47a6aec 6 6 /////////////////////////////////////////////////////////////////////////////// 7 7 8 version="$Id: normal.lib,v 1.1 2 1999-05-26 12:25:23 obachmanExp $";8 version="$Id: normal.lib,v 1.13 1999-06-07 17:01:26 greuel Exp $"; 9 9 info=" 10 10 LIBRARY: normal.lib PROCEDURES FOR NORMALIZATION … … 217 217 218 218 //---------- computation of p*Hom(J,J) as R-ideal ----------------------------- 219 if ( y>=1 ) 220 { 221 "// compute p*Hom(rad(J),rad(J)) = p*J:J, p a non-zerodivisor"; 222 "// p is equal to:"; ""; 223 p; 224 ""; 225 } 226 219 227 f = quotient(p*J,J); 220 228 if ( y>=1 ) … … 270 278 if(y>=1) 271 279 { 272 " R=Hom(rad(J),rad(J))";280 "// R=Hom(rad(J),rad(J))"; 273 281 " "; 274 282 lastRing; 275 283 " "; 276 " the new ideal";284 "// the new ideal"; 277 285 endid; 278 286 " "; 279 " the old ring";287 "// the old ring"; 280 288 " "; 281 289 P; 282 290 " "; 283 " the old ideal";291 "// the old ideal"; 284 292 " "; 285 293 setring P; … … 287 295 " "; 288 296 setring lastRing; 289 " the map";297 "// the map"; 290 298 " "; 291 299 endphi; 292 300 " "; 293 301 pause; 302 newline; 294 303 } 295 304 setring P; … … 298 307 if(y>=1) 299 308 { 300 " R is not equal to Hom(rad(J),rad(J)), we have to try again";309 "// R is not equal to Hom(rad(J),rad(J)), we have to try again"; 301 310 pause; 311 newline; 302 312 } 303 313 //---------- Hom(J,j) != R: create new ring and map form old ring ------------- … … 348 358 if(y>=1) 349 359 { 350 " the ring structure of Hom(rad(J),rad(J)) as R-algebra";360 "// the ring structure of Hom(rad(J),rad(J)) as R-algebra"; 351 361 " "; 352 " the linear relations";362 "// the linear relations"; 353 363 " "; 354 364 Lin; … … 365 375 if(y>=1) 366 376 { 367 " the quadratic relations";377 "// the quadratic relations"; 368 378 " "; 369 379 interred(Quad); 370 380 pause; 381 newline; 371 382 } 372 383 Q = Lin+Quad; … … 400 411 if(y>=1) 401 412 { 402 " the new ring after reduction of the number of variables";413 "// the new ring after reduction of the number of variables"; 403 414 " "; 404 415 lastRing; 405 416 " "; 406 "the new ideal"; 417 "// the new ideal"; 418 " "; 407 419 endid; 408 420 " "; 409 " the old ring";421 "// the old ring"; 410 422 " "; 411 423 P; 412 424 " "; 413 " the old ideal";425 "// the old ideal"; 414 426 " "; 415 427 setring P; … … 417 429 " "; 418 430 setring lastRing; 419 " the map";431 "// the map"; 420 432 " "; 421 433 endphi; 422 434 " "; 423 435 pause; 436 newline; 424 437 } 425 438 L = lastRing; … … 445 458 /////////////////////////////////////////////////////////////////////////////// 446 459 proc normal(ideal id, list #) 447 "USAGE: normal(i [,choose]); i ideal, choose empty or 1460 "USAGE: normal(i [,choose]); i a radical ideal, choose empty or 1 448 461 if choose=1 the factorizing Buchberger algorithm is not used 449 462 (which is sometimes more efficient) 450 RETURN: a list L of rings, in each ring L[i] are two ideals451 norid, normap such that the product of the L[i]/norid is the463 RETURN: a list of rings (say nor), in each ring nor[i] are two ideals 464 norid, normap such that the product of the nor[i]/norid is the 452 465 normalization of basering/id and normap is the map from basering/id 453 to L[i]/norid454 NOTE: to use the rings type: def r=L[i]; setring r; norid; normap;466 to nor[i]/norid 467 NOTE: to use the i-th ring type: def R=nor[i]; setring R; 455 468 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. 469 COMMENT: Not implemented for local or mixed orderings. 459 470 If the input ideal i is weighted homogeneous a weighted ordering may 460 471 be used (qhweight(i); computes weights). 472 CAUTION: The proc does not check whether the input is radical, for non radical 473 ideals the output may be wrong (i=radical(i); makes i radical) 461 474 EXAMPLE: example normal; shows an example 462 475 " 463 476 { 464 477 int i,j,y; 478 string sr; 465 479 list result,prim,keepresult; 466 y =printlevel-voice+2;480 y = printlevel-voice+2; 467 481 468 482 if ( find(ordstr(basering),"s")+find(ordstr(basering),"M") != 0) 469 483 { 470 " 471 // Not implemented for this ordering, 472 // please change to global ordering!";484 ""; 485 "// Not implemented for this ordering,"; 486 "// please change to global ordering!"; 473 487 return(result); 474 488 } 475 476 489 477 490 if(size(#)==0) … … 536 549 attrib(prim[1],"isRegInCodim2",0); 537 550 } 551 552 result = normalizationPrimes(prim[1],maxideal(1)); 553 sr = string(size(result)); 554 538 555 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 i-th ring of the normaliztion 542 // and normap the map of the basring to r/norid"); 543 544 return(normalizationPrimes(prim[1],maxideal(1))); 556 // 'normal' created a list of "+sr+" ring(s). 557 // To see the rings, type (if the name of your list is nor): 558 show( nor); 559 // To access the 1-st ring and map (and similair for the others), type: 560 def R = nor[1]; setring R; norid; normap; 561 // R/norid is the 1-st ring of the normalization and 562 // normap the map from the original basering to R/norid"); 563 564 // kill endphi,endid; 565 return(result); 545 566 } 546 567 else … … 557 578 if(y>=1) 558 579 { 559 " we have ";size(prim);"components";580 "// we have ",size(prim),"components"; 560 581 } 561 582 for(i=1;i<=size(prim);i++) … … 563 584 if(y>=1) 564 585 { 565 " we are in loop";i;586 "// we are in loop ",i; 566 587 } 567 588 attrib(prim[i],"isCohenMacaulay",0); … … 599 620 } 600 621 } 622 sr = string(size(result)); 601 623 602 624 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 i-th ring of the normaliztion 606 // and normap the map of the basring to r/norid"); 607 625 // 'normal' created a list of "+sr+" ring(s). 626 // To see the rings, type (if the name of your list is nor): 627 show( nor); 628 // To access the 1-st ring and map (and similair for the others), type: 629 def R = nor[1]; setring R; norid; normap; 630 // R/norid is the 1-st ring of the normalization and 631 // normap the map from the original basering to R/norid"); 632 633 //kill endphi,endid; 608 634 return(result); 609 635 } … … 613 639 ring r=32003,(x,y,z),wp(2,1,2); 614 640 ideal i=z3-xy4; 615 list pr=normal(i);616 pr;617 def r1= pr[1];641 list nor=normal(i); 642 show(nor); 643 def r1=nor[1]; 618 644 setring r1; 619 645 norid; … … 637 663 if(y>=1) 638 664 { 639 "START one normalization loop with the ideal"; 640 " "; 641 i; 642 " "; 643 basering; 644 " "; 645 pause; 665 ""; 666 "// START a normalization loop with the ideal"; ""; 667 i; ""; 668 basering; ""; 669 pause; 670 newline; 646 671 } 647 672 … … 656 681 if(y>=1) 657 682 { 658 " the ideal was the zero-ideal";683 "// the ideal was the zero-ideal"; 659 684 } 660 685 execute "ring newR7="+charstr(basering)+",("+varstr(basering)+"),(" … … 672 697 if(y>=1) 673 698 { 674 " "; 675 " "; 676 " SB-computation of the input ideal"; 677 " "; 699 "// SB-computation of the input ideal"; 678 700 } 679 701 list SM=mstd(i); … … 681 703 if(y>=1) 682 704 { 683 " the dimension is "; 684 dim(SM[1]); 685 " "; 705 "// the dimension is:"; ""; 706 dim(SM[1]);""; 686 707 } 687 708 … … 752 773 if(y>=1) 753 774 { 754 " the ideal was smooth";775 "// the ideal was smooth"; 755 776 } 756 777 MB=SM[2]; … … 761 782 ideal norid=endid; 762 783 ideal normap=endphi; 784 kill endid,endphi; 763 785 export norid; 764 786 export normap; … … 774 796 if(y>=1) 775 797 { 776 " the ideal was zero-dimensional and homogeneous";798 "// the ideal was zero-dimensional and homogeneous"; 777 799 } 778 800 MB=maxideal(1); … … 783 805 ideal norid=endid; 784 806 ideal normap=endphi; 807 kill endid,endphi; 785 808 export norid; 786 809 export normap; … … 798 821 if(y>=1) 799 822 { 800 " the ideal defines a line";823 "// the ideal defines a line"; 801 824 } 802 825 MB=SM[2]; … … 807 830 ideal norid=endid; 808 831 ideal normap=endphi; 832 kill endid,endphi; 809 833 export norid; 810 834 export normap; … … 825 849 if(y>=1) 826 850 { 827 " itis a complete Intersection";851 "// the ideal is a complete Intersection"; 828 852 } 829 853 } … … 838 862 if(y>=1) 839 863 { 840 " SB of singular locus will be computed";864 "// SB of singular locus will be computed"; 841 865 } 842 866 ideal sin=J+SM[2]; … … 847 871 if(y>=1) 848 872 { 849 " "; 850 "the dimension of the singular locus is"; 851 dim(JM[1]); 852 " "; 873 "// the dimension of the singular locus is:";""; 874 dim(JM[1]); ""; 853 875 } 854 876 … … 860 882 if(y>=1) 861 883 { 862 " itis smooth";884 "// the ideal is smooth"; 863 885 } 864 886 MB=SM[2]; … … 869 891 ideal norid=endid; 870 892 ideal normap=endphi; 893 kill endid,endphi; 871 894 export norid; 872 895 export normap; … … 905 928 if(y>=1) 906 929 { 907 " 908 " the ideal rad(J):";909 " 930 ""; 931 "// the ideal rad(J):"; 932 ""; 910 933 maxideal(1); 911 " "; 912 " "; 934 newline; 913 935 } 914 936 //again test for normality … … 938 960 export normap; 939 961 result=newR7; 962 def R = nor[1]; setring R; //make the 1-st ring the basering 963 norid; normap; //data of the normalization) 940 964 setring BAS; 941 965 return(result); … … 991 1015 if(y>=1) 992 1016 { 993 " radical computation";1017 "// radical computation of singular locus"; 994 1018 } 995 1019 … … 1017 1041 } 1018 1042 1043 if(y>=1) 1044 { 1045 "// radical is equal to:";""; 1046 J; 1047 ""; 1048 } 1049 1019 1050 JM=J,J; 1020 1051 … … 1022 1053 RR=SM[1],SM[2],JM[2],SL[1]; 1023 1054 1024 // evtl eine geeignete Potenz von JM?1055 // evtl eine geeignete Potenz von JM? 1025 1056 if(y>=1) 1026 1057 { 1027 " compute Hom(rad(J),rad(J)):";1058 "// compute Hom(rad(J),rad(J))"; 1028 1059 } 1029 1060 … … 1037 1068 ideal norid=endid; 1038 1069 ideal normap=psi1(ihp); 1070 kill endid,endphi; 1039 1071 export norid; 1040 1072 export normap; … … 1062 1094 if(y>=1) 1063 1095 { 1064 " zero-divisor found";1096 "// zero-divisor found"; 1065 1097 } 1066 1098 ideal vid=fetch(BAS,new1); … … 1145 1177 1146 1178 list Le = elimpart(endid); 1147 //this proc and the next loop try to1179 //this proc and the next loop try to 1148 1180 int q = size(Le[2]); //substitute as many variables as possible 1149 1181 intvec rw1 = 0; //indices of substituted variables … … 1223 1255 { 1224 1256 matrix m; 1257 intvec iv = option(get); 1225 1258 option(redSB); 1226 1259 ideal j=liftstd(jet(i,1),m); 1227 option( noredSB);1260 option(set,iv); 1228 1261 return(ideal(matrix(i)*m)); 1229 1262 }
Note: See TracChangeset
for help on using the changeset viewer.