Changeset a2b50c in git
- Timestamp:
- May 29, 2009, 11:27:20 AM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 30bb07aae70a2a23ab764df7a9aa5063f1dd3698
- Parents:
- 3ea5cee1504eb5dced1aa095461b2eafa2c20a37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
r3ea5cee ra2b50c 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: normal.lib,v 1.5 4 2009-05-25 16:29:04Singular Exp $";2 version="$Id: normal.lib,v 1.55 2009-05-29 09:27:20 Singular Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" … … 228 228 { 229 229 result = list(list(ideal(1), poly(1), ROut), 0); 230 } else { 230 } 231 else 232 { 231 233 result = list(list(ideal(1), poly(1), ROut)); 232 234 } … … 380 382 "// Sum of delta for all components: ", deltI; 381 383 } 382 if(size(prim) > 1){ 384 if(size(prim) > 1) 385 { 383 386 dbprint(dbg, "// Computing the sum of the intersection multiplicities of the components..."); 384 387 int mul = iMult(prim); … … 386 389 { 387 390 deltI = -1; 388 } else { 391 } 392 else 393 { 389 394 deltI = deltI + mul; 390 395 } … … 416 421 { 417 422 resultNew = list(RL, MG, list(DV, deltI)); 418 } else { 423 } 424 else 425 { 419 426 resultNew = list(RL, MG); 420 427 } … … 428 435 { 429 436 "// 'normal' created a list, say nor, of two elements."; 430 } else { 437 } 438 else 439 { 431 440 "// 'normal' created a list, say nor, of three elements."; 432 441 } … … 522 531 if(size(Li) > 4) 523 532 { 524 if(Li[5] == 1) 525 { 526 noRed = 1; 527 } 533 if(Li[5] == 1) { noRed = 1; } 528 534 } 529 535 … … 776 782 setring lastRing; 777 783 //return(lastRing); 778 } else { 784 } 785 else 786 { 779 787 list RL = ringlist(newRing); 780 788 def lastRing = ring(RL); … … 4301 4309 ideal oldU = 1; 4302 4310 4303 if(dbg >= 2) 4304 { 4305 "The quotient is"; U; 4306 } 4311 if(dbg >= 2) { "The quotient is"; U; } 4307 4312 4308 4313 // ----------------- Grauer-Remmert criterion check ----------------------- … … 4345 4350 { 4346 4351 step++; 4347 if(dbg >= 1) 4348 { 4349 ""; 4350 "Step ", step, " begins."; 4351 } 4352 if(dbg >= 1) { ""; "Step ", step, " begins."; } 4352 4353 dbprint(dbg, "Computing the test ideal..."); 4353 4354 … … 4371 4372 cJMod = getGenerators(cJ, U, c); 4372 4373 4373 if(dbg >= 2) 4374 { 4375 "The test ideal in this step is "; 4376 cJMod; 4377 } 4374 if(dbg >= 2) { "The test ideal in this step is "; cJMod; } 4378 4375 4379 4376 cJ = cJMod; … … 4432 4429 // Ring structure of the new ring 4433 4430 def ere = testOut[2]; 4434 if(withDelta){ 4431 if(withDelta) 4432 { 4435 4433 list output = U, c, ere, delt; 4436 } else { 4434 } 4435 else 4436 { 4437 4437 list output = U, c, ere; 4438 4438 } 4439 4439 return(output); 4440 4441 4440 } 4442 4441 … … 4453 4452 { 4454 4453 if(size(newU) == 0) 4455 { 4456 newU = U[i]; 4457 } 4454 { newU = U[i]; } 4458 4455 else 4459 { 4460 newU = newU, U[i]; 4461 } 4456 { newU = newU, U[i]; } 4462 4457 } 4463 4458 } 4464 4459 if(size(newU) == 0) 4465 { 4466 newU = c; 4467 } 4460 { newU = c; } 4468 4461 else 4469 { 4470 newU = newU, c; 4471 } 4462 { newU = newU, c; } 4472 4463 return(newU); 4473 4464 } … … 4552 4543 { 4553 4544 "New polynoial added:", p; 4554 if(dbg>4) {pause();}4545 if(dbg>4) {pause();} 4555 4546 } 4556 4547 JGr = JGr, p; … … 4683 4674 } 4684 4675 4685 if(dbg > 1) 4686 { 4687 "Computing the map..."; 4688 } 4676 if(dbg > 1){ "Computing the map..."; } 4689 4677 4690 4678 J = f(mapJ); … … 4708 4696 else 4709 4697 { 4710 if(degs[i]==0) 4711 { 4712 J[i] = c*J[i]; 4713 } 4698 if(degs[i]==0) { J[i] = c*J[i]; } 4714 4699 } 4715 4700 } … … 4760 4745 ideal U2; 4761 4746 poly p; 4762 for(a = 1; a <= ncols(U1); a++){ 4747 for(a = 1; a <= ncols(U1); a++) 4748 { 4763 4749 p = lift(c1, c2*U1[a])[1,1]; 4764 4750 U2[a] = p; … … 4794 4780 reduction2 = reduce(U1, groebner(U2)); 4795 4781 reduction2[1]; 4796 if(size(reduction2[1]) > 0){ 4782 if(size(reduction2[1]) > 0) 4783 { 4797 4784 "Something went wrong... (this inclusion should always be satisfied)"; 4798 4785 ~; … … 4863 4850 int d = degSubring(p, @v); 4864 4851 poly g = 0; 4865 for(i = 1; i <= size(p); i++) 4852 int size_p=size(p); 4853 for(i = 1; i <= size_p; i++) 4866 4854 { 4867 4855 e = sum(leadexp(p[i]), @v); … … 5105 5093 attrib(id,"isRad",0); 5106 5094 } 5107 5108 5095 return(id); 5109 5096 } … … 5730 5717 return(result); 5731 5718 } 5719 5732 5720 example 5733 5721 { "EXAMPLE:"; … … 5779 5767 int n=size(L); 5780 5768 for (int i=1;i<=n;i++) 5781 { 5782 if (defined(R(i))) 5783 { 5784 string s="Fixed name R("+string(i)+") leads to conflict with existing " 5785 +"object having this name"; 5786 ERROR(s); 5787 } 5788 def R(i)=L[i]; 5789 export R(i); 5790 } 5769 { 5770 if (defined(R(i))) 5771 { 5772 string s="Fixed name R("+string(i)+") leads to conflict with existing " 5773 +"object having this name"; 5774 ERROR(s); 5775 } 5776 def R(i)=L[i]; 5777 export R(i); 5778 } 5779 5791 5780 return(); 5792 5781 } … … 5798 5787 list L=primeClosure(ReesAlgebra(I)[1]); 5799 5788 L=delete(L,size(L)); 5800 L;5789 L; 5801 5790 closureRingtower(L); 5802 5791 R(1); … … 6036 6025 { 6037 6026 int s = 1; 6038 while(s*s < n) 6039 { 6040 s++; 6041 } 6027 while(s*s < n) { s++; } 6042 6028 return(s); 6043 6029 }
Note: See TracChangeset
for help on using the changeset viewer.