Changeset 651cce in git for Singular/LIB/normal.lib
- Timestamp:
- Nov 4, 2010, 4:38:05 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 575e1d69abebbd00c1bdff81f7e716b23b3f5df7
- Parents:
- 018ee93eacab982f9eb9248a037a688cebe35065
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normal.lib
r018ee9 r651cce 2578 2578 " 2579 2579 { 2580 intvec save_opt=option(get); 2580 2581 option(redSB); 2581 2582 def R=basering; … … 2671 2672 { 2672 2673 setring R; 2674 option(set,save_opt); 2673 2675 return(list(0,0,1)); 2674 2676 } … … 2680 2682 setring R; 2681 2683 delt=(tau+1)/2; 2684 option(set,save_opt); 2682 2685 return(list(d*delt,d*tau,d*(2*delt-tau+1))); 2683 2686 } … … 2688 2691 setring R; 2689 2692 delt=(tau+2)/2; 2693 option(set,save_opt); 2690 2694 return(list(d*delt,d*tau,d*(2*delt-tau+1))); 2691 2695 } … … 2706 2710 } 2707 2711 if(w>=1){"Newton-Polygon is non-degenerated";"";} 2712 option(set,save_opt); 2708 2713 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 2709 2714 } … … 2738 2743 nb=deltaLoc(f1,maxideal(1))[3]+deltaLoc(f2,maxideal(1))[3]; 2739 2744 setring R; 2745 option(set,save_opt); 2740 2746 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 2741 2747 } … … 2752 2758 } 2753 2759 setring R; 2760 option(set,save_opt); 2754 2761 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 2755 2762 } … … 2766 2773 nb=size(HNEXP); 2767 2774 } 2775 option(set,save_opt); 2768 2776 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 2769 2777 } … … 2773 2781 if(w>=1){"now we have to use Hamburger-Noether (Puiseux) expansion";} 2774 2782 delt=delta(f); 2783 option(set,save_opt); 2775 2784 return(list(d*delt,d*tau,d)); 2776 2785 } 2786 option(set,save_opt); 2777 2787 } 2778 2788 example … … 4250 4260 // denomOption = i > 0 -> Uses a polynomial in the i-th variable 4251 4261 4252 option("redSB"); 4253 option("returnSB"); 4262 intvec save_opt=option(get); 4263 option(redSB); 4264 option(returnSB); 4254 4265 int step = 0; // Number of steps. (for debugging) 4255 4266 int dbg = printlevel - voice + 2; // dbg = printlevel (default: dbg = 0) … … 4262 4273 4263 4274 //------------------------ Groebner bases and dimension of I----------------- 4264 if(isGlobal == 1){ 4275 if(isGlobal == 1) 4276 { 4265 4277 list IM = mstd(I); 4266 4278 I = IM[1]; … … 4280 4292 // This is done only in the first step. 4281 4293 qring Q = I; // We work in the quotient by the groebner base of the ideal I 4282 option( "redSB");4283 option( "returnSB");4294 option(redSB); 4295 option(returnSB); 4284 4296 4285 4297 // If a conductor ideal was given as input, we use it instead of the … … 4288 4300 ideal inputC = fetch(R, inputC); 4289 4301 ideal inputJ = fetch(R, inputJ); 4290 if((inputC == 0) && (inputJ == 0)){ 4302 if((inputC == 0) && (inputJ == 0)) 4303 { 4291 4304 // We compute the radical of the ideal of minors modulo the original ideal. 4292 4305 // This is done only in the first step. … … 4301 4314 ideal J = minor(jacob(IMin), nvars(basering) - d, I); 4302 4315 J = groebner(J); 4303 } else { 4316 } 4317 else 4318 { 4304 4319 ideal J = fetch(R, inputC); 4305 4320 J = groebner(J); … … 4307 4322 4308 4323 //------------------ We check if the singular locus is empty ------------- 4309 if(J[1] == 1){ 4324 if(J[1] == 1) 4325 { 4310 4326 // The original ring R/I was normal. Nothing to do. 4311 4327 // We define anyway a new ring, equal to R, to be able to return it. … … 4319 4335 export normap; 4320 4336 setring R; 4321 if(withDelta){ 4337 if(withDelta) 4338 { 4322 4339 list output = ideal(1), poly(1), ROut, 0; 4323 4340 } … … 4326 4343 list output = ideal(1), poly(1), ROut; 4327 4344 } 4345 option(set,save_opt); 4328 4346 return(list(output)); 4329 4347 } … … 4334 4352 // compute a universal denominator. 4335 4353 ideal Id1; 4336 if(J != 0){ 4337 if(denomOption == 0){ 4354 if(J != 0) 4355 { 4356 if(denomOption == 0) 4357 { 4338 4358 poly condu = getSmallest(J); // Choses the polynomial of smallest degree 4339 4359 // of J as universal denominator. 4340 } else { 4360 } 4361 else 4362 { 4341 4363 poly condu = getOneVar(J, denomOption); 4342 4364 } 4343 if(dbg >= 1){ 4365 if(dbg >= 1) 4366 { 4344 4367 ""; 4345 4368 "The universal denominator is ", condu; … … 4350 4373 // the universal denominator is a non-zerodivisor of R/I. 4351 4374 // If not, we split I. 4352 if((decomp == 1) or (decomp == 2)){ 4375 if((decomp == 1) or (decomp == 2)) 4376 { 4353 4377 Id1 = quotient(0, condu); 4354 if(size(Id1) > 0){ 4378 if(size(Id1) > 0) 4379 { 4355 4380 // We have to split. 4356 if(dbg >= 1){ 4381 if(dbg >= 1) 4382 { 4357 4383 "A zerodivisor was found. We split the ideal. The zerodivisor is ", condu; 4358 4384 } … … 4367 4393 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault)[1]; 4368 4394 printlevel = printlevel - 1; 4395 option(set,save_opt); 4369 4396 return(list(nor1, nor2)); 4370 4397 } 4371 4398 } 4372 } else { 4399 } 4400 else 4401 { 4373 4402 poly condu = 0; 4374 4403 } … … 4380 4409 setring R; 4381 4410 // If a test ideal is given at the input, we use it. 4382 if(inputJ == 0){ 4383 if(isGlobal == 1){ 4411 if(inputJ == 0) 4412 { 4413 if(isGlobal == 1) 4414 { 4384 4415 ideal J = fetch(Q, J); 4385 4416 J = J, I; 4386 if(dbg >= 1){ 4417 if(dbg >= 1) 4418 { 4387 4419 "The original singular locus is"; 4388 4420 groebner(J); … … 4393 4425 // If so, the radical is the maximal ideal at the origin. 4394 4426 J = groebner(J); 4395 if(locAtZero(J)){ 4427 if(locAtZero(J)) 4428 { 4396 4429 J = maxideal(1); 4397 } else { 4430 } 4431 else 4432 { 4398 4433 J = radical(J); 4399 4434 } 4400 } else { 4435 } 4436 else 4437 { 4401 4438 // We change to global dp ordering. 4402 4439 list rl = ringlist(R); … … 4409 4446 ideal I = fetch(R, I); 4410 4447 J = J, I; 4411 if(dbg >= 1){ 4448 if(dbg >= 1) 4449 { 4412 4450 "The original singular locus is"; 4413 4451 groebner(J); … … 4419 4457 ideal J = fetch(globR, J); 4420 4458 } 4421 } else { 4459 } 4460 else 4461 { 4422 4462 ideal J = inputJ; 4423 4463 } 4424 4464 4425 if(dbg >= 1){ 4465 if(dbg >= 1) 4466 { 4426 4467 "The radical of the original singular locus is"; 4427 4468 J; … … 4433 4474 J = fetch(R, J); 4434 4475 J = interred(J); 4435 if(denomOption == 0){ 4476 if(denomOption == 0) 4477 { 4436 4478 poly D = getSmallest(J); // Chooses the polynomial of smallest degree as 4437 4479 // non-zerodivisor. 4438 } else { 4480 } 4481 else 4482 { 4439 4483 poly D = getOneVar(J, denomOption); 4440 4484 } 4441 if(dbg >= 1){ 4485 if(dbg >= 1) 4486 { 4442 4487 "The non zero divisor is ", D; 4443 4488 ""; … … 4448 4493 // is actually a non-zerodivisor of R/I. 4449 4494 // If not, we split I. 4450 if((decomp == 1) or (decomp == 2)){ 4495 if((decomp == 1) or (decomp == 2)) 4496 { 4451 4497 // We check if D is actually a non-zerodivisor of R/I. 4452 4498 // If not, we split I. 4453 4499 Id1 = quotient(0, D); 4454 if(size(Id1) > 0){ 4500 if(size(Id1) > 0) 4501 { 4455 4502 // We have to split. 4456 if(dbg >= 1){ 4503 if(dbg >= 1) 4504 { 4457 4505 "A zerodivisor was found. We split the ideal. The zerodivisor is ", D; 4458 4506 } … … 4468 4516 list nor2 = normalM(Id2, decomp, withDelta, denomOption, JDefault, JDefault)[1]; 4469 4517 printlevel = printlevel - 1; 4518 option(set,save_opt); 4470 4519 return(list(nor1, nor2)); 4471 4520 } … … 4481 4530 list result = normalMEqui(I, J, condu, D, withDelta, denomOption); 4482 4531 printlevel = printlevel - 1; 4532 option(set,save_opt); 4483 4533 return(list(result)); 4484 4534 } … … 4511 4561 4512 4562 qring Q = groebner(I); 4513 option("redSB"); 4514 option("returnSB"); 4563 intvec save_opt=option(get); 4564 option(redSB); 4565 option(returnSB); 4515 4566 ideal J = imap(R, origJ); 4516 4567 poly c = imap(R, c); … … 4561 4612 list output = ideal(1), poly(1), ROut; 4562 4613 } 4614 option(set,save_opt); 4563 4615 return(output); 4564 4616 } … … 4621 4673 // If we have a universal denominator of smaller degree than c, 4622 4674 // we replace c by it. 4623 if(condu != 0){ 4675 if(condu != 0) 4676 { 4624 4677 if(deg(c) > deg(condu)) 4625 4678 { … … 4660 4713 list output = U, c, ere; 4661 4714 } 4715 option(set,save_opt); 4662 4716 return(output); 4663 4717 } … … 4889 4943 4890 4944 // ----- computation of the test ideal using the ring structure of Ai ----- 4891 option("redSB"); 4892 option("returnSB"); 4945 intvec save_opt=option(get); 4946 option(redSB); 4947 option(returnSB); 4893 4948 4894 4949 if(dbg > 1){"Computing the radical of J...";} … … 4996 5051 J = imap(Q, J); 4997 5052 5053 option(set,save_opt); 4998 5054 return(list(J, ele[1])); 4999 5055 }
Note: See TracChangeset
for help on using the changeset viewer.