Changeset 72c1b9 in git
- Timestamp:
- May 9, 2000, 4:28:41 PM (23 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 4c852afb0419364a8ee3f4adf3ec70ab9f3e69ea
- Parents:
- b1926022497677c8d2f91e7c017f1c7a2317bc9a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
rb19260 r72c1b9 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 7 version="$Id: normal.lib,v 1.2 2 2000-05-08 15:52:50 pfister Exp $";7 version="$Id: normal.lib,v 1.23 2000-05-09 14:28:41 Singular 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 normalization of the associated primes is computed379 if choose=1 the factorizing Buchberger algorithm is not used 380 380 (which is sometimes more efficient) 381 381 RETURN: a list of rings (say nor), in each ring nor[i] are two ideals … … 405 405 return(result); 406 406 } 407 if( typeof(attrib(id,"isCompleteIntersection"))=="int" ) 408 { 409 if(attrib(id,"isCompleteIntersection")==1) 410 { 411 attrib(id,"isCohenMacaulay",1); 412 attrib(id,"isEquidimensional",1); 413 } 414 } 415 if( typeof(attrib(id,"isCohenMacaulay"))=="int" ) 416 { 417 if(attrib(id,"isCohenMacaulay")==1) 418 { 419 attrib(id,"isEquidimensional",1); 420 } 421 } 422 if( typeof(attrib(id,"isPrim"))=="int" ) 423 { 424 if(attrib(id,"isPrim")==1) 425 { 426 attrib(id,"isEquidimensional",1); 427 } 428 } 407 429 408 if(size(#)==0) 430 { 409 //--------------- the factorizing Buchberger algorithm is used --------------- 410 { 411 prim[1]=id; 431 412 if( typeof(attrib(id,"isEquidimensional"))=="int" ) 432 413 { 433 if(attrib(id,"isEquidimensional")==1) 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 504 { 435 prim[1]=id; 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 520 } 437 521 else 438 522 { 439 prim=equidim(id);523 attrib(prim[i],"isEquidimensional",0); 440 524 } 441 } 442 else 443 { 444 prim=equidim(id); 445 } 446 if(y>=1) 447 { 448 "// we have ",size(prim),"equidimensional components"; 449 } 450 } 451 else 452 { 453 if( typeof(attrib(id,"isPrim"))=="int" ) 454 { 455 if(attrib(id,"isPrim")==1) 525 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 456 526 { 457 prim[1]=id; 527 if(attrib(id,"isIsolatedSingularity")==1) 528 {attrib(prim[i],"isIsolatedSingularity",1); } 458 529 } 459 530 else 460 { 461 prim=minAssPrimes(id);531 { 532 attrib(prim[i],"isIsolatedSingularity",0); 462 533 } 463 } 464 else 465 { 466 prim=minAssPrimes(id); 467 } 468 if(y>=1) 469 { 470 "// we have ",size(prim),"irreducible components"; 471 } 472 } 473 for(i=1; i<=size(prim); i++) 474 { 475 if(y>=1) 476 { 477 "// we are in loop ",i; 478 } 479 attrib(prim[i],"isCohenMacaulay",0); 480 if(size(#)!=0) 481 { 482 attrib(prim[i],"isPrim",1); 483 } 484 else 485 { 486 attrib(prim[i],"isPrim",0); 487 } 488 attrib(prim[i],"isRegInCodim2",0); 489 attrib(prim[i],"isIsolatedSingularity",0); 490 attrib(prim[i],"isEquidimensional",1); 491 attrib(prim[i],"isCompleteIntersection",0); 492 493 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 494 { 495 if(attrib(id,"isIsolatedSingularity")==1) 496 {attrib(prim[i],"isIsolatedSingularity",1); } 497 } 498 499 if( typeof(attrib(id,"isCompleteIntersection"))=="int" ) 500 { 501 if((attrib(id,"isIsolatedSingularity")==1)&&(size(#)==0)) 502 {attrib(prim[i],"isIsolatedSingularity",1); } 503 } 504 keepresult=normalizationPrimes(prim[i],maxideal(1)); 505 for(j=1;j<=size(keepresult);j++) 506 { 507 result=insert(result,keepresult[j]); 534 535 keepresult=normalizationPrimes(prim[i],maxideal(1)); 536 for(j=1;j<=size(keepresult);j++) 537 { 538 result=insert(result,keepresult[j]); 539 } 508 540 } 509 541 sr = string(size(result)); 510 } 542 511 543 dbprint(y+1," 512 544 // 'normal' created a list of "+sr+" ring(s). … … 520 552 //kill endphi,endid; 521 553 return(result); 554 } 522 555 } 523 556 example … … 585 618 "// SB-computation of the input ideal"; 586 619 } 587 588 620 list SM=mstd(i); //here the work starts 589 621 int dimSM = dim(SM[1]); … … 656 688 attrib(SM[2],"isRegInCodim2",0); 657 689 } 658 if(attrib(i,"isEquidimensional")==1)690 if(attrib(i,"isEquidimensional")==1) 659 691 { 660 692 attrib(SM[2],"isEquidimensional",1); … … 789 821 dim(JM[1]); ""; 790 822 } 823 791 824 attrib(JM[2],"isRad",0); 792 825 // timer-ti; … … 816 849 attrib(SM[2],"isIsolatedSingularity",1); 817 850 } 818 if(dim(JM[1])<= dim(SM[1])-2)851 if(dim(JM[1])<=nvars(basering)-2) 819 852 { 820 853 attrib(SM[2],"isRegInCodim2",1); … … 829 862 attrib(SM[2],"isRegInCodim2",1); 830 863 } 831 }832 if((attrib(SM[2],"isRegInCodim2")==1)&&(attrib(SM[2],"isCohenMacaulay")==1))833 {834 if(y>=1)835 {836 "// the ideal was CohenMacaulay and regular in codimension 2";837 }838 MB=SM[2];839 intvec rw;840 list LL=substpart(MB,ihp,0,rw);841 def newR6=LL[1];842 setring newR6;843 ideal norid=endid;844 ideal normap=endphi;845 kill endid,endphi;846 export norid;847 export normap;848 result=newR6;849 setring BAS;850 return(result);851 864 } 852 865 //if it is an isolated singularity things are easier … … 1237 1250 b6c+bc6+a2b4e-3ab2c2de+c4d2e-a3cde2-abd3e2+bce5; 1238 1251 1239 int aa=timer;list nor=normal(i);timer-aa;1240 1252 1241 1253 //Vasconcelos … … 1250 1262 ring r=32003,(x,y,z),wp(2,3,6); 1251 1263 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 1257 1264 1258 1265 //Theo2 … … 1405 1412 puv2-puw; 1406 1413 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 1411 1414 1412 1415 */
Note: See TracChangeset
for help on using the changeset viewer.