Changeset 61c541 in git
 Timestamp:
 Apr 3, 2006, 3:16:53 PM (18 years ago)
 Branches:
 (u'spielwiese', '873fc1222e995d7cb33f79d8f1792ce418c8c72c')
 Children:
 adba541215d6ae43a3f2eafcae46136eeb2be757
 Parents:
 b66fdff25ea59b6eccb8449f7f51cd88ee9c8abd
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/center.lib
rb66fdf r61c541 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: center.lib,v 1.1 7 20060313 14:31:42motsak Exp $"2 version="$Id: center.lib,v 1.18 20060403 13:16:53 motsak Exp $" 3 3 category="Noncommutative" 4 4 info=" 5 5 LIBRARY: center.lib computation of central elements of GRalgebras 6 6 AUTHOR: Oleksandr Motsak, motsak@mathematik.unikl.de. 7 OVERVIEW: 8 This is a library for computing the central elements and centralizers of elements in various noncommutative algebras. 9 Implementation is based on algorithms written in the frame of the diploma thesis by O. Motsak (adviser: Prof. S.A. Ovsienko, support: V. Levandovskyy), at Kyiv Taras Shevchenko University (Ukraine) with the title 'An algorithm for the computation of the center of a noncommutative polynomial algebra'. 7 OVERVIEW: A library for computing elements of the center and centralizers of elements in various noncommutative algebras. 10 8 11 9 SUPPORT: Forschungsschwerpunkt 'Mathematik und Praxis', University of Kaiserslautern 12 10 13 11 MAIN PROCEDURES: 14 CENTRALIZE_SET(F, V); computes a VS basis of the centralizer of F within V, 15 CENTRALIZER_VECTORSPACE(F, d); computes a VS basis of the centralizer of F up to degree D, 16 CENTRALIZER_SUBALGEBRA(F, D[, N]); computes a SA base of the centralizer of F up to degree D, 17 CENTER_VECTORSPACE(D); computes a VS basis of the center up to degree D, 18 CENTER_SUBALGEBRA(D[, k]); computes a SA base of the center up to degree D, 19 20 center(D[,k]); computes a SA generators of the center, 21 centralizer(S, D[, k]); computes a SA generators of the centralizer of S, 22 23 sa_reduce(V); 'subalgebra reduction' of a set of pairwise commuting polynomials, 24 sa_poly_reduce(p,V); 'subalgebra reduction' of a polynomial p wrt a set of pairwise commuting polynomials. 12 @format 13 centralizeSet(F, V): computes a V.S. basis of the centralizer of set F within V, 14 centralizerVS(F, d): computes a V.S. basis of the centralizer of set F, 15 centralizerRed(F, D[, N]): computes reduced elements of the centralizer of set F, 16 centerVS(D): computes a V.S. basis of the center up to degree D, 17 centerRed(D[, k]): computes reduced elements of the center up to degree D, 18 19 center(D[, k]): computes reduced elements of the center, 20 centralizer(F, D[, k]): computes reduced elements of the centralizer of set F, 21 22 sa_reduce(V): 'subalgebra reduction' of a set of pairwise commuting polynomials V, 23 sa_poly_reduce(p, V): 'subalgebra reduction' of a polynomial p wrt a set of pairwise commuting polynomials V. 24 25 inCenter(T): checks the centrality of polynomials of a list/ideal/poly T, 26 inCentralizer(T, S): checks whether polynomials of list/ideal/poly T commute with polynomials of S, 27 isCartan(p): checks whether polynomial p is a Cartan element, 28 @end format 25 29 26 30 AUXILIARY PROCEDURES: 27 ApplyAd( Basis, f); Computes images of basis elements under the linear map Ad_{f}, 28 KER(Images); Computes the kernel of a linear map given by its images on certain basis vectors, 29 LinearCombinations(Basis, C); computes linear combinations of Basis vectors with the coefficients from C, 30 31 inCenter(T); checks the centrality of polynomials of a list/ideal/poly T, 32 inCentralizer(T, S); checks whether polynomials of list/ideal/poly T commute with polynomials of S, 33 isCartan(p); checks whether polynomial p is a Cartan element, 34 35 standard_variables(); computes the set of algebra generators in their natural order, 36 sorted_variables(); computes the sorted set of algebra generators, 37 38 PBW_basis_byDeg( Deg ); computes monomials of a given degree Deg, 39 PBW_basis_byMaxDeg( MaxDeg ); computes monomials up to a given degree MaxDeg, 40 PBW_basis_byMaxMonom( MaxMonom ); computes monomials up to a given maximal monomial MaxMonom. 31 @format 32 applyAdF(Basis, f): computes images of basis elements under the linear map Ad_{f}, 33 linearMapKernel(Images): computes the kernel of a linear map given by image of basis, 34 linearCombinations(Basis, C): computes linear combinations of Basis vectors with the coefficients from C, 35 36 variablesStandard(): computes the set of algebra generators in their natural order, 37 variablesSorted(): computes the sorted set of algebra generators, 38 39 PBW_eqDeg(Deg): computes PBW monomials of a given degree Deg, 40 PBW_maxDeg(MaxDeg): computes PBW monomials up to a given degree MaxDeg, 41 PBW_maxMonom(MaxMonom): computes PBW monomials up to a given maximal monomial MaxMonom. 42 @end format 41 43 42 44 KEYWORDS: center; centralizer; cartan; reduce; centralize; PBW … … 314 316 315 317 /******************************************************/ 316 proc PBW_ basis_byMaxDeg( int MaxDeg )317 "USAGE: PBW_ basis_byMaxDeg(MaxDeg); int MaxDeg318 proc PBW_maxDeg( int MaxDeg ) 319 "USAGE: PBW_maxDeg(MaxDeg); int MaxDeg 318 320 PURPOSE: Compute the PBW basis (up to a given maximal degree) of a current algebra. 319 321 RETURN: ideal consisting of PBW elements. … … 321 323 " 322 324 { 323 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_ basis_byMaxDeg", MaxDeg ); }; /*4DEBUG*/325 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_maxDeg", MaxDeg ); }; /*4DEBUG*/ 324 326 325 327 ideal Basis = ideal(); … … 332 334 ideal T = smoothQideal( Basis ); kill Basis; 333 335 334 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_ basis_byMaxDeg", T ); }; /*4DEBUG*/336 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_maxDeg", T ); }; /*4DEBUG*/ 335 337 return( T ); 336 338 } … … 344 346 345 347 // PBW Basis of A_2  monomials of degree <= 2, without unit: 346 PBW_ basis_byMaxDeg( 2 );347 } 348 349 350 /******************************************************/ 351 proc PBW_ basis_byDeg( int Deg )352 "USAGE: PBW_ basis_byDeg(Deg); int Deg348 PBW_maxDeg( 2 ); 349 } 350 351 352 /******************************************************/ 353 proc PBW_eqDeg( int Deg ) 354 "USAGE: PBW_eqDeg(Deg); int Deg 353 355 PURPOSE: Compute the PBW basis (of a given degree) of a current algebra. 354 356 RETURN: ideal consisting of PBW elements. … … 356 358 " 357 359 { 358 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_ basis_byDeg", Deg ); }; /*4DEBUG*/360 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_eqDeg", Deg ); }; /*4DEBUG*/ 359 361 360 362 ideal Basis = smoothQideal( maxideal( Deg ) ); 361 363 362 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_ basis_byDeg", Basis ); }; /*4DEBUG*/364 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_eqDeg", Basis ); }; /*4DEBUG*/ 363 365 return( Basis ); 364 366 } … … 372 374 373 375 // PBW Basis of A_2 \ A_1  monomials of degree == 2: 374 PBW_ basis_byDeg( 2 );375 } 376 377 378 /******************************************************/ 379 proc PBW_ basis_byMaxMonom( poly MaxMonom )380 "USAGE: PBW_ basis_byMaxMonom(m); poly m376 PBW_eqDeg( 2 ); 377 } 378 379 380 /******************************************************/ 381 proc PBW_maxMonom( poly MaxMonom ) 382 "USAGE: PBW_maxMonom(m); poly m 381 383 PURPOSE: Compute the PBW basis, up to a given maximal exponent, of a current algebra. 382 384 INPUT: Maximal exponent is given by the corresponding monomial. … … 385 387 " 386 388 { 387 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_ basis_byMaxMonom", MaxMonom ); }; /*4DEBUG*/389 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "PBW_maxMonom", MaxMonom ); }; /*4DEBUG*/ 388 390 389 391 ideal K = ideal(); … … 408 410 ideal T = smoothQideal( K ); kill K; 409 411 410 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_ basis_byMaxMonom", T ); }; /*4DEBUG*/412 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "PBW_maxMonom", T ); }; /*4DEBUG*/ 411 413 412 414 return( T ); … … 421 423 422 424 // At most 1st degree in e, h and at most 2nd degree in f, unit is omitted: 423 PBW_ basis_byMaxMonom( e*(f^2)* h );425 PBW_maxMonom( e*(f^2)* h ); 424 426 } 425 427 … … 434 436 435 437 /******************************************************/ 436 proc ApplyAd( ideal I, poly p )437 " 438 USAGE: ApplyAd( Basis, f); ideal Basis, poly f438 proc applyAdF( ideal I, poly p ) 439 " 440 USAGE: applyAdF( Basis, f); ideal Basis, poly f 439 441 PURPOSE: Apply Ad_{f} to every element of Basis 440 442 RETURN: ideal, Ad_{f}(Basis) 441 SEE ALSO: KER; LinearCombinations442 " 443 { 444 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " ApplyAd", I, p ); }; /*4DEBUG*/443 SEE ALSO: linearMapKernel; linearMapKernel 444 " 445 { 446 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "applyAdF", I, p ); }; /*4DEBUG*/ 445 447 446 448 poly t; … … 458 460 kill II; 459 461 460 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " ApplyAd", J ); }; /*4DEBUG*/462 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "applyAdF", J ); }; /*4DEBUG*/ 461 463 return( J ); 462 464 } … … 472 474 473 475 // Compute the PBW basis of A_2: 474 ideal Basis = PBW_ basis_byMaxDeg( 2 ); Basis;476 ideal Basis = PBW_maxDeg( 2 ); Basis; 475 477 476 478 // Compute images of basis elements under the linear map Ad_e: 477 ideal Image = ApplyAd( Basis, e ); Image;479 ideal Image = applyAdF( Basis, e ); Image; 478 480 479 481 // Now we have a linear map given by: Basis_i > Image_i 480 482 // Let's compute its kernel: 481 module C = KER( Image ); C;483 module C = linearMapKernel( Image ); C; 482 484 483 485 // Now we can compute the kernel of Ad_e by means of basis vectors: 484 ideal K = LinearCombinations(Basis, C); K;486 ideal K = linearCombinations(Basis, C); K; 485 487 486 488 // Let's check that Ad_e(K) is zero: 487 ApplyAd( K, e );488 } 489 490 491 492 /******************************************************/ 493 proc KER( ideal Images )494 "USAGE: KER( Images ); ideal Images489 applyAdF( K, e ); 490 } 491 492 493 494 /******************************************************/ 495 proc linearMapKernel( ideal Images ) 496 "USAGE: linearMapKernel( Images ); ideal Images 495 497 PURPOSE: Computes the kernel of a linear map given by its images on certain basis vectors 496 498 RETURN: syzygy module, or 0 if all images are zeroes 497 SEE ALSO: ApplyAd; LinearCombinations498 " 499 { 500 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " KER", Images ); }; /*4DEBUG*/499 SEE ALSO: applyAdF; linearMapKernel 500 " 501 { 502 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "linearMapKernel", Images ); }; /*4DEBUG*/ 501 503 502 504 // This must be a list of monomials in a form of polynomial (sum with coeffs == 1) … … 509 511 int result = 0; 510 512 511 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " KER", result ); }; /*4DEBUG*/513 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "linearMapKernel", result ); }; /*4DEBUG*/ 512 514 return( result ); 513 515 } … … 570 572 571 573 // compute everything in a right form 572 module KER= simplify( std( syz(MD) ), 1 + 2 + 8 );574 module linearMapKernel = simplify( std( syz(MD) ), 1 + 2 + 8 ); 573 575 // note that MD is a matrix of numbers  no polynomials... 574 576 … … 579 581 kill MD; 580 582 581 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " KER", KER); }; /*4DEBUG*/582 583 return( KER);583 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "linearMapKernel", linearMapKernel ); }; /*4DEBUG*/ 584 585 return( linearMapKernel ); 584 586 } 585 587 example … … 594 596 595 597 // Compute the PBW basis of A_2: 596 ideal Basis = PBW_ basis_byMaxDeg( 2 ); Basis;598 ideal Basis = PBW_maxDeg( 2 ); Basis; 597 599 598 600 // Compute images of basis elements under the linear map Ad_e: 599 ideal Image = ApplyAd( Basis, e ); Image;601 ideal Image = applyAdF( Basis, e ); Image; 600 602 601 603 // Now we have a linear map given by: Basis_i > Image_i 602 604 // Let's compute its kernel: 603 module C = KER( Image ); C;605 module C = linearMapKernel( Image ); C; 604 606 605 607 // Now we can compute the kernel of Ad_e by means of basis vectors: 606 ideal K = LinearCombinations(Basis, C); K;608 ideal K = linearCombinations(Basis, C); K; 607 609 608 610 // Let's check that Ad_e(K) is zero: 609 ideal Z = ApplyAd( K, e ); Z;610 611 // Now KERwill return a single integer 0:612 def CC = KER(Z); typeof(CC); CC;613 } 614 615 616 /******************************************************/ 617 proc LinearCombinations( ideal Basis, module KER )618 " 619 USAGE: LinearCombinations( Basis, C ); ideal Basis, module C611 ideal Z = applyAdF( K, e ); Z; 612 613 // Now linearMapKernel will return a single integer 0: 614 def CC = linearMapKernel(Z); typeof(CC); CC; 615 } 616 617 618 /******************************************************/ 619 proc linearCombinations( ideal Basis, module KER ) 620 " 621 USAGE: linearCombinations( Basis, C ); ideal Basis, module C 620 622 PURPOSE: computes linear combinations of Basis vectors with the coefficients from C. 621 623 RETURN: ideal of linear combinations of Basis vectors with the coefficients from C. 622 SEE ALSO: KER; ApplyAd623 " 624 { 625 626 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " LinearCombinations", Basis, KER ); }; /*4DEBUG*/624 SEE ALSO: linearMapKernel; applyAdF 625 " 626 { 627 628 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "linearCombinations", Basis, KER ); }; /*4DEBUG*/ 627 629 628 630 … … 659 661 660 662 661 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " LinearCombinations", result ); }; /*4DEBUG*/663 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "linearCombinations", result ); }; /*4DEBUG*/ 662 664 663 665 return( result ); … … 674 676 675 677 // Compute the PBW basis of A_2: 676 ideal Basis = PBW_ basis_byMaxDeg( 2 ); Basis;678 ideal Basis = PBW_maxDeg( 2 ); Basis; 677 679 678 680 // Compute images of basis elements under the linear map Ad_e: 679 ideal Image = ApplyAd( Basis, e ); Image;681 ideal Image = applyAdF( Basis, e ); Image; 680 682 681 683 // Now we have a linear map given by: Basis_i > Image_i 682 684 // Let's compute its kernel: 683 module C = KER( Image ); C;685 module C = linearMapKernel( Image ); C; 684 686 685 687 // Now we can compute the kernel of Ad_e by means of basis vectors: 686 ideal K = LinearCombinations(Basis, C); K;688 ideal K = linearCombinations(Basis, C); K; 687 689 688 690 // Let's check that Ad_e(K) is zero: 689 ApplyAd( K, e );691 applyAdF( K, e ); 690 692 } 691 693 … … 709 711 710 712 // compute fundamental solutions system 711 def T = KER( Images );712 713 714 // check result of KER713 def T = linearMapKernel( Images ); 714 715 716 // check result of linearMapKernel 715 717 if( (typeof(T) == "int") and (T == 0) ) 716 718 { … … 723 725 if( typeof(T) != "module" ) 724 726 { 725 ERROR( "Wrong output from the ' KER' function!" );727 ERROR( "Wrong output from the 'linearMapKernel' function!" ); 726 728 } 727 729 } 728 730 729 result = LinearCombinations( Basis, T );731 result = linearCombinations( Basis, T ); 730 732 731 733 kill T; … … 736 738 737 739 740 741 738 742 /******************************************************/ 739 743 static proc ZeroKer( ideal Basis, ideal Images ) // VS Basis of a Kernel of the linear map AD_h, h is a Cartan element … … 769 773 770 774 /******************************************************/ 771 proc standard_variables() // Returns an ideal of variables in a current base ring.772 "USAGE: standard_variables();775 proc variablesStandard() // Returns an ideal of variables in a current base ring. 776 "USAGE: variablesStandard(); 773 777 RETURN: ideal, generated by algebra variables 774 778 PURPOSE: computes the ideal generated by algebra variables taken in their natural order 775 SEE ALSO: sorted_variables776 EXAMPLE: example standard_variables; shows an example777 " 778 { 779 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " standard_variables" ); }; /*4DEBUG*/779 SEE ALSO: variablesSorted 780 EXAMPLE: example variablesStandard; shows an example 781 " 782 { 783 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "variablesStandard" ); }; /*4DEBUG*/ 780 784 781 785 ideal result = maxideal(1); 782 786 783 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " standard_variables", result ); }; /*4DEBUG*/787 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "variablesStandard", result ); }; /*4DEBUG*/ 784 788 return( result ); 785 789 } … … 792 796 ncalgebra(1,D); // this algebra is U(sl_2) 793 797 // Variables in their natural order: 794 standard_variables();795 } 796 797 /******************************************************/ 798 proc sorted_variables() // Sorts variables into an ideal. This is a kind of heuristics!799 "USAGE: sorted_variables();798 variablesStandard(); 799 } 800 801 /******************************************************/ 802 proc variablesSorted() // Sorts variables into an ideal. This is a kind of heuristics! 803 "USAGE: variablesSorted(); 800 804 RETURN: ideal, generated by sorted algebra variables 801 805 PURPOSE: computes the ideal generated by algebra variables sorted so that Cartan variables are first and all other variables are behind. 802 806 NOTE: This is a heuristics for the computation of center: it is better to compute centralizers of Cartan variables first since we can omit solving the system of equations. 803 SEE ALSO: standard_variables804 EXAMPLE: example sorted_variables; shows an example807 SEE ALSO: variablesStandard 808 EXAMPLE: example variablesSorted; shows an example 805 809 "{ 806 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " sorted_variables" ); }; /*4DEBUG*/807 808 ideal V = standard_variables();810 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "variablesSorted" ); }; /*4DEBUG*/ 811 812 ideal V = variablesStandard(); 809 813 int N = size( V ); // == nvars( basering ) 810 814 … … 831 835 } 832 836 833 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " sorted_variables", result ); }; /*4DEBUG*/837 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "variablesSorted", result ); }; /*4DEBUG*/ 834 838 return( result ); 835 839 } … … 843 847 // There is only one Cartan variable  z in U(sl_2), 844 848 // it must go 1st: 845 sorted_variables();849 variablesSorted(); 846 850 } 847 851 … … 861 865 862 866 /******************************************************/ 863 proc CENTRALIZE_SET( ideal F, ideal V ) // HL 'core' function864 "USAGE: CENTRALIZE_SET( F, V ); ideal F, ideal V867 proc centralizeSet( ideal F, ideal V ) // HL 'core' function 868 "USAGE: centralizeSet( F, V ); ideal F, ideal V 865 869 INPUT: a finite set of elements F, vector space basis V 866 870 RETURN: ideal, generated by base elements 867 871 PURPOSE: computes the vector space basis of the centralizer of F in the vector space spanned by V, that is, Cen(F[N],Cen(F[N1],...,Cen(F[1],V)...)) 868 SEE ALSO: CENTRALIZER_VECTORSPACE; centralizer; inCentralizer869 EXAMPLE: example CENTRALIZER_VECTORSPACE; shows an example870 " 871 { 872 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " CENTRALIZE_SET", F, V ); }; /*4DEBUG*/872 SEE ALSO: centralizerVS; centralizer; inCentralizer 873 EXAMPLE: example centralizeSet; shows an example 874 " 875 { 876 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "centralizeSet", F, V ); }; /*4DEBUG*/ 873 877 874 878 int N = size(F); … … 886 890 887 891 // 888 ideal Images = ApplyAd( V, F[v] );892 ideal Images = applyAdF( V, F[v] ); 889 893 890 894 ideal K; … … 907 911 ideal result = makeNice(V); kill V; 908 912 909 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " CENTRALIZE_SET", result ); }; /*4DEBUG*/913 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "centralizeSet", result ); }; /*4DEBUG*/ 910 914 911 915 return( result ); … … 921 925 ncalgebra(1,D); 922 926 923 ideal F = sorted_variables(); F;927 ideal F = variablesSorted(); F; 924 928 925 // if we know thatthe center of $A_{41}$ is generated by929 // the center of $A_{41}$ is generated by 926 930 // $e(1)$ and $1/2*e(2)^2+e(1)*e(3)$ 927 931 // therefore one may consider computing it in the following way: … … 929 933 // 1. Compute PBW basis consisting of 930 934 // monomials of exponent <= (1,2,1,0) 931 ideal V = PBW_ basis_byMaxMonom( e(1) * e(2)^ 2 * e(3) );935 ideal V = PBW_maxMonom( e(1) * e(2)^ 2 * e(3) ); 932 936 933 937 // 2. Compute the centralizer of F within vector space 934 938 // spanned by these monomials: 935 ideal C = CENTRALIZE_SET( F, V ); C;939 ideal C = centralizeSet( F, V ); C; 936 940 937 941 inCenter(C); … … 941 945 942 946 /******************************************************/ 943 proc CENTRALIZER_VECTORSPACE( ideal F, int d )944 "USAGE: CENTRALIZER_VECTORSPACE( F, D ); ideal F, int D947 proc centralizerVS( ideal F, int d ) 948 "USAGE: centralizerVS( F, D ); ideal F, int D 945 949 RETURN: ideal, generated by elements of degree <= D 946 950 PURPOSE: computes a vector space basis of the centralizer of F up to degree D. 947 951 NOTE: D must be nonnegative 948 SEE ALSO: CENTER_VECTORSPACE; centralizer; inCentralizer949 EXAMPLE: example CENTER_VECTORSPACE; shows an example950 " 951 { 952 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " CENTRALIZER_VECTORSPACE", F, d ); }; /*4DEBUG*/952 SEE ALSO: centerVS; centralizer; inCentralizer 953 EXAMPLE: example centralizerVS; shows an example 954 " 955 { 956 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "centralizerVS", F, d ); }; /*4DEBUG*/ 953 957 954 958 if( size(F) == 0) … … 957 961 } 958 962 959 ideal V = PBW_ basis_byMaxDeg( d ); // PBW basis960 961 ideal result = CENTRALIZE_SET( F, V ); // basis of the Centralizer of S in VS <V>963 ideal V = PBW_maxDeg( d ); // PBW basis 964 965 ideal result = centralizeSet( F, V ); // basis of the Centralizer of S in VS <V> 962 966 963 967 kill V; 964 968 965 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " CENTRALIZER_VECTORSPACE", result ); }; /*4DEBUG*/969 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "centralizerVS", result ); }; /*4DEBUG*/ 966 970 967 971 return( result ); … … 976 980 ideal F = x, y; 977 981 // find all elements commuting with x and y of degree <= 4: 978 ideal C = CENTRALIZER_VECTORSPACE(F, 4);982 ideal C = centralizerVS(F, 4); 979 983 C; 980 984 inCentralizer(C, F); … … 992 996 993 997 /******************************************************/ 994 proc CENTER_VECTORSPACE( int D )995 "USAGE: CENTER_VECTORSPACE( D ); int D998 proc centerVS( int D ) 999 "USAGE: centerVS( D ); int D 996 1000 RETURN: ideal, generated by elements of degree <= D 997 1001 PURPOSE: computes a vector space basis of the center of the current algebra up to degree D. 998 1002 NOTE: D must be nonnegative 999 SEE ALSO: CENTRALIZER_VECTORSPACE; center; inCenter1000 EXAMPLE: example CENTER_VECTORSPACE; shows an example1001 " 1002 { 1003 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " CENTER_VECTORSPACE", D ); }; /*4DEBUG*/1003 SEE ALSO: centralizerVS; center; inCenter 1004 EXAMPLE: example centerVS; shows an example 1005 " 1006 { 1007 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "centerVS", D ); }; /*4DEBUG*/ 1004 1008 1005 1009 … … 1014 1018 } 1015 1019 1016 ideal result = CENTRALIZER_VECTORSPACE( sorted_variables(), D );1020 ideal result = centralizerVS( variablesSorted(), D ); 1017 1021 1018 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " CENTER_VECTORSPACE", result ); }; /*4DEBUG*/1022 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "centerVS", result ); }; /*4DEBUG*/ 1019 1023 1020 1024 return( result ); … … 1028 1032 ncalgebra(1,D); // this algebra is U(sl_2) 1029 1033 // find all central elements of degree <= 4 1030 ideal Z = CENTER_VECTORSPACE(4);1034 ideal Z = centerVS(4); 1031 1035 Z; 1032 1036 // note that the second element is the square of the first … … 1038 1042 1039 1043 /******************************************************/ 1040 proc CENTRALIZER_SUBALGEBRA( ideal F, int D, list # )1041 "USAGE: CENTRALIZER_SUBALGEBRA( F, D[, N] ); ideal F, int D[, int N]1044 proc centralizerRed( ideal F, int D, list # ) 1045 "USAGE: centralizerRed( F, D[, N] ); ideal F, int D[, int N] 1042 1046 RETURN: ideal, generated by computed generators 1043 1047 PURPOSE: if N is absent and D >= 0 computes a subalgebra generators of the centralizer of F up to degree D, otherwise if N is present computes N(at least) first generators of the centralizer, if moreover D > 0 it will be used as the first maximal degree estimation. 1044 1048 NOTE: Current ordering must be a degree compatible wellordering. 1045 SEE ALSO: CENTRALIZER_VECTORSPACE; CENTER_SUBALGEBRA; centralizer; inCentralizer1046 EXAMPLE: example CENTRALIZER_SUBALGEBRA; shows an example1047 " 1048 { 1049 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " CENTRALIZER_SUBALGEBRA", F, D, # ); }; /*4DEBUG*/1049 SEE ALSO: centralizerVS; centerRed; centralizer; inCentralizer 1050 EXAMPLE: example centralizerRed; shows an example 1051 " 1052 { 1053 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "centralizerRed", F, D, # ); }; /*4DEBUG*/ 1050 1054 1051 1055 if( nameof( basering ) == "basering" ) … … 1128 1132 1129 1133 1130 // just to avoid "no standard basis" warning.1134 1131 1135 ideal FLM = imap(COMMRING, FLM); 1132 attrib(FLM, "isSB", 1); 1133 1134 // degrees should not change 1136 attrib(FLM, "isSB", 1); // just to avoid "no standard basis" warning. 1137 1138 // degrees should not change, 1135 1139 // no monomials should be multiplied here 1136 ideal T = reduce( PBW_ basis_byDeg( i ), FLM, 1 );1140 ideal T = reduce( PBW_eqDeg( i ), FLM, 1 ); 1137 1141 1138 1142 kill FLM; … … 1142 1146 1143 1147 // Compute current centralizer 1144 NEW = CENTRALIZE_SET( F, P );1148 NEW = centralizeSet( F, P ); 1145 1149 1146 1150 if( size(NEW) > 0 ) … … 1212 1216 // And refine T one more: 1213 1217 1214 // just to avoid "no standard basis" warning.1218 1215 1219 ideal FLM = imap(COMMRING, FLM); 1216 attrib(FLM, "isSB", 1); 1220 attrib(FLM, "isSB", 1);// just to avoid "no standard basis" warning. 1217 1221 1218 1222 // we simply kill in T monomials occurring in FOUND_LEADING_MONOMIALS[i] … … 1300 1304 result = makeNice(result); 1301 1305 1302 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " CENTRALIZER_SUBALGEBRA", result ); }; /*4DEBUG*/1306 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "centralizerRed", result ); }; /*4DEBUG*/ 1303 1307 1304 1308 return( result ); … … 1314 1318 // find subalgebra generators degree <= 4 of an algebra of 1315 1319 // all elements commuting with x and y: 1316 ideal C = CENTRALIZER_SUBALGEBRA(F, 4);1320 ideal C = centralizerRed(F, 4); 1317 1321 C; 1318 1322 inCentralizer(C, F); … … 1321 1325 1322 1326 /******************************************************/ 1323 proc CENTER_SUBALGEBRA( int D, list # )1324 "USAGE: CENTER_SUBALGEBRA( D[, k] ); int D[, int k]1327 proc centerRed( int D, list # ) 1328 "USAGE: centerRed( D[, k] ); int D[, int k] 1325 1329 RETURN: ideal, generated by computed generators 1326 1330 PURPOSE: if N is absent and D >= 0 computes a subalgebra generators of the center up to degree D, otherwise if N is present computes N(at least) first generators of the center, if moreover D > 0 it will be used as the first maximal degree estimation. 1327 1331 NOTE: Current ordering must be a degree compatible wellordering. 1328 SEE ALSO: CENTRALIZER_SUBALGEBRA; CENTER_VECTORSPACE; center; inCenter1329 EXAMPLE: example CENTER_SUBALGEBRA; shows an example1330 " 1331 { 1332 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( " CENTER_SUBALGEBRA", D ); }; /*4DEBUG*/1332 SEE ALSO: centralizerRed; centerVS; center; inCenter 1333 EXAMPLE: example centerRed; shows an example 1334 " 1335 { 1336 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ BCall( "centerRed", D ); }; /*4DEBUG*/ 1333 1337 1334 1338 if( nameof( basering ) == "basering" ) … … 1337 1341 } 1338 1342 1339 ideal result = CENTRALIZER_SUBALGEBRA( sorted_variables(), D, # );1343 ideal result = centralizerRed( variablesSorted(), D, # ); 1340 1344 1341 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( " CENTER_SUBALGEBRA", result ); }; /*4DEBUG*/1345 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "centerRed", result ); }; /*4DEBUG*/ 1342 1346 1343 1347 return( result ); … … 1351 1355 ncalgebra(1,D); // it is a Heisenberg algebra 1352 1356 // find vector space basis of center of degree <= 3 1353 ideal VSZ = CENTER_VECTORSPACE(3);1357 ideal VSZ = centerVS(3); 1354 1358 // There should be 3 degrees of z. 1355 1359 VSZ; 1356 1360 inCenter(VSZ); 1357 1361 // find "minimal" central elements of degree <= 3 1358 ideal SAZ = CENTER_SUBALGEBRA(3);1362 ideal SAZ = centerRed(3); 1359 1363 // Only 'z' must be computed 1360 1364 SAZ; … … 1843 1847 ideal I = a, b; 1844 1848 inCentralizer(I, f); 1845 printlevel = 1;1849 printlevel = 2; 1846 1850 inCentralizer(a, f); // yes 1847 1851 inCentralizer(b, f); // no … … 1863 1867 } 1864 1868 1865 int result = inCentralizer( a, standard_variables() );1869 int result = inCentralizer( a, variablesStandard() ); 1866 1870 1867 1871 /*4DEBUG*/ if( defined( @@@DEBUG ) ){ ECall( "inCenter", result ); }; /*4DEBUG*/ … … 1906 1910 1907 1911 1908 ideal V = standard_variables();1912 ideal V = variablesStandard(); 1909 1913 1910 1914 int r = 1; poly v, g; … … 1987 1991 if( DefaultInt( # ) > 0 ) 1988 1992 { 1989 return( CENTER_SUBALGEBRA( D, # ) );1993 return( centerRed( D, # ) ); 1990 1994 } 1991 1995 1992 1996 if( D >= 0 ) 1993 1997 { 1994 return( sa_reduce( CENTER_VECTORSPACE(D) ) ); // Experimental! May be wrong!!!1998 return( sa_reduce( centerVS(D) ) ); // Experimental! May be wrong!!! 1995 1999 } 1996 2000 … … 2034 2038 if( DefaultInt( # ) > 0 ) 2035 2039 { 2036 return( CENTRALIZER_SUBALGEBRA( S, D, # ) );2040 return( centralizerRed( S, D, # ) ); 2037 2041 } 2038 2042 2039 2043 if( D >= 0 ) 2040 2044 { 2041 return( sa_reduce( CENTRALIZER_VECTORSPACE(S, D), 1) ); // Experimental! May be wrong!!!2045 return( sa_reduce( centralizerVS(S, D) ) ); // Experimental! May be wrong!!! 2042 2046 } 2043 2047 … … 2098 2102 center(2); 2099 2103 2100 // hard example (some minutes), must compute two polynomials of degrees 2 and 6.2104 // hard example (~hours), must compute two polynomials of degrees 2 and 6. 2101 2105 center(6); 2102 2106
Note: See TracChangeset
for help on using the changeset viewer.