Changeset c403c6 in git
- Timestamp:
- Oct 1, 2010, 11:30:20 AM (14 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 4131d807c7d28a79ca0e9721b4af967315686e45
- Parents:
- 9f5ebf25535e7f3b32e56ffc7635be3bcf1c05bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/sagbi2.lib
r9f5ebf rc403c6 3 3 category="Commutative Algebra"; 4 4 info=" 5 LIBRARY: sagbi2.lib Compute SAGBI basis (subalgebra bases analogous to Groebner bases for ideals) of a givensubalgebra5 LIBRARY: sagbi2.lib Compute SAGBI basis (subalgebra bases analogous to Groebner bases for ideals) of a subalgebra 6 6 AUTHORS: Jan Hackfeld, Jan.Hackfeld@rwth-aachen.de 7 7 … … 11 11 sagbi(A [,m,t]); construct a SAGBI basis for the given subalgebra 12 12 sagbiPart(A,k[,m]); constructs a partial SAGBI basis for the given subalgebra 13 13 algebraicDependence(I,it); compute it iteration of SAGBI for algebraic dependencies of I 14 15 SEE ALSO: algebra_lib 14 16 "; 17 18 15 19 //AUXILIARY PROCEDURES: 16 20 //uniqueVariableName(s) adds character "@" at the beginning of string s until this is a unique new variable name 17 21 //extendRing(r, ...) creates a new ring, which is an extension of r 18 // procstdKernPhi(kernNew, kernOld,...) computes Groebner basis of kernNew+kernOld22 //stdKernPhi(kernNew, kernOld,...) computes Groebner basis of kernNew+kernOld 19 23 //spolynomialsGB(A,...) computes the SAGBI S-polynomials of the subalgebra defined by the generators in A using Groebner bases 20 24 //spolynomialsToric(A) computes the SAGBI S-polynomials of the subalgebra defined by the generators in A using toric.lib … … 423 427 424 428 proc sagbiSPoly(ideal algebra,list #) 425 426 RETURN: Returns SAGBI S-polynomials of the leading terms of given ideal A if returnRing= =0.429 "USAGE: sagbiSPoly(A[, returnRing, meth]); A is an ideal, returnRing and meth are integers. 430 RETURN: Returns SAGBI S-polynomials of the leading terms of given ideal A if returnRing=0. 427 431 @* Otherwise returns a new ring containing the ideals algebraicRelations 428 432 @* and spolynomials, where these objects are explained by their name. … … 491 495 ring r= 0,(x,y),dp; 492 496 ideal A=x*y+x,x*y^2,y^2+y,x^2+x; 493 //------------------ Comput ingthe SAGBI S-polynomials only497 //------------------ Compute the SAGBI S-polynomials only 494 498 sagbiSPoly(A); 495 //------------------ Now the extended ring is returned,496 // containingthe ideal of algebraic relations and the ideal of the S-polynomials499 //------------------ Extended ring is to be returned, which contains 500 // the ideal of algebraic relations and the ideal of the S-polynomials 497 501 def rNew=sagbiSPoly(A,1); setring rNew; 498 502 spolynomials; … … 508 512 509 513 proc sagbiReduce(idealORpoly, ideal algebra, list #) 510 "USAGE: sagbiReduce(idealORpoly, A[, tailred, meth]]); idealORPoly is an ideal or poly, A is an ideal, tailred and meth are bothintegers511 RETURN: Returns the remainder(s) of idealORPoly after SAGBI reduction by A of type ideal or poly (same as input type).514 "USAGE: sagbiReduce(I, A[, tr, mt]); I, A ideals, tr, mt optional integers 515 RETURN: Returns the remainder(s) of I after SAGBI reduction by A 512 516 @format 513 The optional argument t ailred determines if tail-reduction is done.514 - If (tailred= =0), no tail-reduction is done.515 - If (tailred !=0), tail-reduction is done.517 The optional argument tr=tailred determines whether tail reduction will be performed. 518 - If (tailred=0), no tail reduction is done. 519 - If (tailred<>0), tail reduction is done. 516 520 The other optional argument meth determines which method is 517 521 used for Groebner basis computations. 518 - If m eth==0 (default), the procedure std is used.519 - If m eth==1, the procedure slimgb is used.522 - If mt=0 (default), the procedure std is used. 523 - If mt=1, the procedure slimgb is used. 520 524 @end format 521 525 EXAMPLE: example sagbiReduce; shows an example" … … 571 575 poly p2=x^16+x^12*y^5+6*x^8*y^4+x^6+y^4+3; 572 576 ideal P=p1,p2; 573 577 //--------------------------------------------- 574 578 //SAGBI reduction of polynomial p1 by algebra A. Default call, that is, no tail-reduction is done. 575 579 sagbiReduce(p1,A); 576 580 //--------------------------------------------- 577 581 //SAGBI reduction of set of polynomials P by algebra A, now tail-reduction is done. 578 582 sagbiReduce(P,A,1); … … 580 584 581 585 proc sagbi(ideal algebra, list #) 582 "USAGE: sagbi(A[, tailred, meth]]) A is an ideal, tailred and meth are bothintegers586 "USAGE: sagbi(A[, tr, mt]); A ideal, tr, mt optional integers 583 587 RETURN: A SAGBI basis for the subalgebra given by the generators in A. 584 588 @format 585 The optional argument t ailred determines if tail reduction is done.586 - If (tailred= =0), no tail-reduction is done.587 - If (tailred !=0), tail-reduction is done.589 The optional argument tr=tailred determines whether tail reduction will be performed. 590 - If (tailred=0), no tail reduction is performed, 591 - If (tailred<>0), tail reduction is performed. 588 592 The other optional argument meth determines which method is 589 593 used for Groebner basis computations. 590 - If m eth==0 (default), the procedure std is used.591 - If m eth==1, the procedure slimgb is used.594 - If mt=0 (default), the procedure std is used. 595 - If mt=1, the procedure slimgb is used. 592 596 @end format 593 597 EXAMPLE: example sagbi; shows an example" … … 624 628 //Default call, no tail-reduction is done. 625 629 sagbi(A); 626 630 //--------------------------------------------- 627 631 //Call with tail-reduction and method specified. 628 632 sagbi(A,1,0); 629 633 } 630 634 631 632 635 proc sagbiPart(ideal algebra, int iterations, list #) 633 "USAGE: sagbiPart(A, k,[tailred, meth]]); A is an ideal, k, integer, tailred and meth are bothintegers636 "USAGE: sagbiPart(A, k,[tr, mt]); A is an ideal, k, tr and mt are integers 634 637 RETURN: Performs k iterations of the SAGBI construction algorithm for the subalgebra given by the generators in A. 635 638 @format 636 The optional argument t ailred determines if tailreduction is done.637 - If (tailred= =0), no tail-reduction is done.638 - If (tailred !=0), tail-reduction is done.639 The optional argument tr=tailred determines if tail reduction will be performed. 640 - If (tailred=0), no tail reduction is performed, 641 - If (tailred<>0), tail reduction is performed. 639 642 The other optional argument meth determines which method is 640 643 used for Groebner basis computations. 641 - If m eth==0 (default), the procedure std is used.642 - If m eth==1, the procedure slimgb is used.644 - If mt=0 (default), the procedure std is used. 645 - If mt=1, the procedure slimgb is used. 643 646 @end format 644 647 EXAMPLE: example sagbiPart; shows an example" … … 677 680 //The following algebra does not have a finite SAGBI basis. 678 681 ideal A=x,xy-y2,xy2; 679 680 //Call with two iterations, no ttail-reduction is done.682 //--------------------------------------------------- 683 //Call with two iterations, no tail-reduction is done. 681 684 sagbiPart(A,2); 682 685 //--------------------------------------------------- 683 686 //Call with three iterations, tail-reduction and method 0. 684 687 sagbiPart(A,3,1,0); … … 686 689 687 690 688 //TODO: 1nsen als werden noch mit ausgegeben, aus algebraischen AbhÀngigkeiten entfernen 689 // TODO2: finish the documentation 691 //DONE? 1nsen als werden noch mit ausgegeben, aus algebraischen AbhÀngigkeiten entfernen 692 // VL: finished the documentation 693 // TO comapre with algDependent from algebra_lib 690 694 proc algebraicDependence(ideal I,int iterations) 695 "USAGE: algebraicDependence(I,it); I an an ideal, it is an integer 696 RETURN: In 'it' iterations, compute algebraic dependencies between elements of I 697 EXAMPLE: example algebraicDependence; shows an example" 691 698 { 692 699 def br=basering; … … 782 789 return(extendVarRing); 783 790 } 791 example 792 { "EXAMPLE:"; echo = 2; 793 ring r= 0,(x,y),dp; 794 //The following algebra does not have a finite SAGBI basis. 795 ideal I=x^2, xy-y2, xy2; 796 //--------------------------------------------------- 797 //Call with two iterations 798 def DI = algebraicDependence(I,2); 799 setring DI; algDep; 800 // we see that no dependency has been seen so far 801 //--------------------------------------------------- 802 //Call with two iterations 803 setring r; kill DI; 804 def DI = algebraicDependence(I,3); 805 setring DI; algDep; 806 map F = DI,x,y,x^2, xy-y2, xy2; 807 F(algDep); // we see that it is a dependence indeed 808 } 809 810 /* 811 ring r= 0,(x,y),dp; 812 //The following algebra does not have a finite SAGBI basis. 813 ideal J=x^2, xy-y2, xy2, x^2*(x*y-y^2)^2 - (x*y^2)^2*x^4 + 11; 814 //--------------------------------------------------- 815 //Call with two iterations 816 def DI = algebraicDependence(J,2); 817 setring DI; algDep; 818 */
Note: See TracChangeset
for help on using the changeset viewer.