Changeset b15ad0 in git
- Timestamp:
- May 10, 2000, 3:05:16 PM (23 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 0658d94b02b071f2a019543baea28fe2c95d9226
- Parents:
- a9cf54361b742e9fc5c8efe5927396e566518869
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
ra9cf54 rb15ad0 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 7 version="$Id: normal.lib,v 1.2 3 2000-05-09 14:28:41 Singular Exp $";7 version="$Id: normal.lib,v 1.24 2000-05-10 13:05:16 pfister Exp $"; 8 8 info=" 9 9 LIBRARY: normal.lib PROCEDURES FOR NORMALIZATION … … 377 377 proc normal(ideal id, list #) 378 378 "USAGE: normal(i [,choose]); i a radical ideal, choose empty or 1 379 if choose=1 the factorizing Buchberger algorithm is not used379 if choose=1 the normalization of the associated primes is computed 380 380 (which is sometimes more efficient) 381 381 RETURN: a list of rings (say nor), in each ring nor[i] are two ideals … … 397 397 list result,prim,keepresult; 398 398 y = printlevel-voice+2; 399 399 400 attrib(id,"isRadical",1); 400 401 if ( find(ordstr(basering),"s")+find(ordstr(basering),"M") != 0) 401 402 { … … 405 406 return(result); 406 407 } 407 408 if( typeof(attrib(id,"isCompleteIntersection"))=="int" ) 409 { 410 if(attrib(id,"isCompleteIntersection")==1) 411 { 412 attrib(id,"isCohenMacaulay",1); 413 attrib(id,"isEquidimensional",1); 414 } 415 } 416 if( typeof(attrib(id,"isCohenMacaulay"))=="int" ) 417 { 418 if(attrib(id,"isCohenMacaulay")==1) 419 { 420 attrib(id,"isEquidimensional",1); 421 } 422 } 423 if( typeof(attrib(id,"isPrim"))=="int" ) 424 { 425 if(attrib(id,"isPrim")==1) 426 { 427 attrib(id,"isEquidimensional",1); 428 } 429 } 408 430 if(size(#)==0) 409 //--------------- the factorizing Buchberger algorithm is used --------------- 410 { 411 prim[1]=id; 431 { 412 432 if( typeof(attrib(id,"isEquidimensional"))=="int" ) 413 433 { 414 if(attrib(id,"isEquidimensional")==1) 415 { 416 attrib(prim[1],"isEquidimensional",1); 417 } 418 } 419 else 420 { 421 attrib(prim[1],"isEquidimensional",0); 422 } 423 if( typeof(attrib(id,"isCompleteIntersection"))=="int" ) 424 { 425 if(attrib(id,"isCompleteIntersection")==1) 426 { 427 attrib(prim[1],"isCompleteIntersection",1); 428 } 429 } 430 else 431 { 432 attrib(prim[1],"isCompleteIntersection",0); 433 } 434 435 if( typeof(attrib(id,"isPrim"))=="int" ) 436 { 437 if(attrib(id,"isPrim")==1) {attrib(prim[1],"isPrim",1); } 438 } 439 else 440 { 441 attrib(prim[1],"isPrim",0); 442 } 443 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 444 { 445 if(attrib(id,"isIsolatedSingularity")==1) 446 {attrib(prim[1],"isIsolatedSingularity",1); } 447 } 448 else 449 { 450 attrib(prim[1],"isIsolatedSingularity",0); 451 } 452 if( typeof(attrib(id,"isCohenMacaulay"))=="int" ) 453 { 454 if(attrib(id,"isCohenMacaulay")==1) 455 { attrib(prim[1],"isCohenMacaulay",1); } 456 } 457 else 458 { 459 attrib(prim[1],"isCohenMacaulay",0); 460 } 461 if( typeof(attrib(id,"isRegInCodim2"))=="int" ) 462 { 463 if(attrib(id,"isRegInCodim2")==1) 464 { attrib(prim[1],"isRegInCodim2",1);} 465 } 466 else 467 { 468 attrib(prim[1],"isRegInCodim2",0); 469 } 470 471 result = normalizationPrimes(prim[1],maxideal(1)); 472 sr = string(size(result)); 473 474 dbprint(y+1," 475 // 'normal' created a list of "+sr+" ring(s). 476 // To see the rings, type (if the name of your list is nor): 477 show( nor); 478 // To access the 1-st ring and map (and similair for the others), type: 479 def R = nor[1]; setring R; norid; normap; 480 // R/norid is the 1-st ring of the normalization and 481 // normap the map from the original basering to R/norid"); 482 483 return(result); 484 } 485 else 486 //------------- the factorizing Buchberger algorithm is not used ------------- 487 { 488 if(#[1]==0) 489 { 490 prim=minAssPrimes(id); 491 } 492 else 493 { 494 prim=minAssPrimes(id,1); 495 } 496 497 if(y>=1) 498 { 499 "// we have ",size(prim),"components"; 500 } 501 for(i=1; i<=size(prim); i++) 502 { 503 if(y>=1) 434 if(attrib(id,"isEquidimensional")==1) 504 435 { 505 "// we are in loop ",i; 506 } 507 attrib(prim[i],"isCohenMacaulay",0); 508 attrib(prim[i],"isPrim",1); 509 attrib(prim[i],"isRegInCodim2",0); 510 attrib(prim[i],"isIsolatedSingularity",0); 511 attrib(prim[i],"isEquidimensional",0); 512 attrib(prim[i],"isCompleteIntersection",0); 513 514 if( typeof(attrib(id,"isEquidimensional"))=="int" ) 515 { 516 if(attrib(id,"isEquidimensional")==1) 517 { 518 attrib(prim[i],"isEquidimensional",1); 519 } 436 prim[1]=id; 520 437 } 521 438 else 522 439 { 523 attrib(prim[i],"isEquidimensional",0);440 prim=equidim(id); 524 441 } 525 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 442 } 443 else 444 { 445 prim=equidim(id); 446 } 447 if(y>=1) 448 { 449 "// we have ",size(prim),"equidimensional components"; 450 } 451 } 452 else 453 { 454 if( typeof(attrib(id,"isPrim"))=="int" ) 455 { 456 if(attrib(id,"isPrim")==1) 526 457 { 458 prim[1]=id; 459 } 460 else 461 { 462 prim=minAssPrimes(id); 463 } 464 } 465 else 466 { 467 prim=minAssPrimes(id); 468 } 469 if(y>=1) 470 { 471 "// we have ",size(prim),"irreducible components"; 472 } 473 } 474 for(i=1; i<=size(prim); i++) 475 { 476 if(y>=1) 477 { 478 "// we are in loop ",i; 479 } 480 attrib(prim[i],"isCohenMacaulay",0); 481 if(size(#)!=0) 482 { 483 attrib(prim[i],"isPrim",1); 484 } 485 else 486 { 487 attrib(prim[i],"isPrim",0); 488 } 489 attrib(prim[i],"isRegInCodim2",0); 490 attrib(prim[i],"isIsolatedSingularity",0); 491 attrib(prim[i],"isEquidimensional",1); 492 attrib(prim[i],"isCompleteIntersection",0); 493 494 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 495 { 527 496 if(attrib(id,"isIsolatedSingularity")==1) 528 497 {attrib(prim[i],"isIsolatedSingularity",1); } 529 530 else 531 {532 attrib(prim[i],"isIsolatedSingularity",0);533 }534 535 keepresult=normalizationPrimes(prim[i],maxideal(1));536 for(j=1;j<=size(keepresult);j++)537 {538 result=insert(result,keepresult[j]);539 }498 } 499 500 if( typeof(attrib(id,"isCompleteIntersection"))=="int" ) 501 { 502 if((attrib(id,"isIsolatedSingularity")==1)&&(size(#)==0)) 503 {attrib(prim[i],"isIsolatedSingularity",1); } 504 } 505 keepresult=normalizationPrimes(prim[i],maxideal(1)); 506 for(j=1;j<=size(keepresult);j++) 507 { 508 result=insert(result,keepresult[j]); 540 509 } 541 510 sr = string(size(result)); 542 511 } 543 512 dbprint(y+1," 544 513 // 'normal' created a list of "+sr+" ring(s). … … 552 521 //kill endphi,endid; 553 522 return(result); 554 }555 523 } 556 524 example … … 618 586 "// SB-computation of the input ideal"; 619 587 } 588 620 589 list SM=mstd(i); //here the work starts 621 590 int dimSM = dim(SM[1]); … … 688 657 attrib(SM[2],"isRegInCodim2",0); 689 658 } 690 659 if(attrib(i,"isEquidimensional")==1) 691 660 { 692 661 attrib(SM[2],"isEquidimensional",1); … … 821 790 dim(JM[1]); ""; 822 791 } 823 824 792 attrib(JM[2],"isRad",0); 825 793 // timer-ti; … … 849 817 attrib(SM[2],"isIsolatedSingularity",1); 850 818 } 851 if(dim(JM[1])<= nvars(basering)-2)819 if(dim(JM[1])<=dim(SM[1])-2) 852 820 { 853 821 attrib(SM[2],"isRegInCodim2",1); … … 862 830 attrib(SM[2],"isRegInCodim2",1); 863 831 } 832 } 833 if((attrib(SM[2],"isRegInCodim2")==1)&&(attrib(SM[2],"isCohenMacaulay")==1)) 834 { 835 if(y>=1) 836 { 837 "// the ideal was CohenMacaulay and regular in codimension 2"; 838 } 839 MB=SM[2]; 840 intvec rw; 841 list LL=substpart(MB,ihp,0,rw); 842 def newR6=LL[1]; 843 setring newR6; 844 ideal norid=endid; 845 ideal normap=endphi; 846 kill endid,endphi; 847 export norid; 848 export normap; 849 result=newR6; 850 setring BAS; 851 return(result); 864 852 } 865 853 //if it is an isolated singularity things are easier … … 1262 1250 ring r=32003,(x,y,z),wp(2,3,6); 1263 1251 ideal i=zy2-zx3-x6; 1252 1253 //Theo1a (CohenMacaulay and regular in codimension 2) 1254 ring r=32003,(x,y,z,u),wp(2,3,6,6); 1255 ideal i=zy2-zx3-x6+u2; 1256 1264 1257 1265 1258 //Theo2 … … 1412 1405 puv2-puw; 1413 1406 1407 ring r=0,(u,v,w,x,y,z),wp(1,1,1,3,2,1); 1408 ideal i=wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2; 1409 1410 1414 1411 1415 1412 */
Note: See TracChangeset
for help on using the changeset viewer.