Changeset 61c541 in git


Ignore:
Timestamp:
Apr 3, 2006, 3:16:53 PM (18 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '873fc1222e995d7cb33f79d8f1792ce418c8c72c')
Children:
adba541215d6ae43a3f2eafcae46136eeb2be757
Parents:
b66fdff25ea59b6eccb8449f7f51cd88ee9c8abd
Message:
minor upgrade: Cosmetic changes.


git-svn-id: file:///usr/local/Singular/svn/trunk@9054 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/center.lib

    rb66fdf r61c541  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: center.lib,v 1.17 2006-03-13 14:31:42 motsak Exp $"
     2version="$Id: center.lib,v 1.18 2006-04-03 13:16:53 motsak Exp $"
    33category="Noncommutative"
    44info="
    55LIBRARY:  center.lib      computation of central elements of GR-algebras
    66AUTHOR:  Oleksandr Motsak,        motsak@mathematik.uni-kl.de.
    7 OVERVIEW:
    8 This is a library for computing the central elements and centralizers of elements in various non-commutative 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 non-commutative polynomial algebra'.
     7OVERVIEW: A library for computing elements of the center and centralizers of elements in various non-commutative algebras.
    108
    119SUPPORT: Forschungsschwerpunkt 'Mathematik und Praxis', University of Kaiserslautern
    1210
    1311MAIN 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
     13centralizeSet(F, V):           computes a V.S. basis of the centralizer of set F within V,
     14centralizerVS(F, d):           computes a V.S. basis of the centralizer of set F,
     15centralizerRed(F, D[, N]):     computes reduced elements of the centralizer of set F,
     16centerVS(D):                   computes a V.S. basis of the center up to degree D,
     17centerRed(D[, k]):             computes reduced elements of the center up to degree D,
     18
     19center(D[, k]):                computes reduced elements of the center,
     20centralizer(F, D[, k]):        computes reduced elements of the centralizer of set F,
     21
     22sa_reduce(V):                  'subalgebra reduction' of a set of pairwise commuting polynomials V,
     23sa_poly_reduce(p, V):          'subalgebra reduction' of a polynomial p wrt a set of pairwise commuting polynomials V.
     24
     25inCenter(T):                   checks the centrality of polynomials of a list/ideal/poly T,
     26inCentralizer(T, S):           checks whether polynomials of list/ideal/poly T commute with polynomials of S,
     27isCartan(p):                   checks whether polynomial p is a Cartan element,
     28@end format
    2529
    2630AUXILIARY 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
     32applyAdF(Basis, f):            computes images of basis elements under the linear map Ad_{f},
     33linearMapKernel(Images):       computes the kernel of a linear map given by image of basis,
     34linearCombinations(Basis, C):  computes linear combinations of Basis vectors with the coefficients from C,
     35
     36variablesStandard():           computes the set of algebra generators in their natural order,
     37variablesSorted():             computes the sorted set of algebra generators,
     38
     39PBW_eqDeg(Deg):                computes PBW monomials of a given degree Deg,
     40PBW_maxDeg(MaxDeg):            computes PBW monomials up to a given degree MaxDeg,
     41PBW_maxMonom(MaxMonom):        computes PBW monomials up to a given maximal monomial MaxMonom.
     42@end format
    4143
    4244KEYWORDS:  center; centralizer; cartan; reduce; centralize; PBW
     
    314316
    315317/******************************************************/
    316 proc PBW_basis_byMaxDeg( int MaxDeg )
    317 "USAGE: PBW_basis_byMaxDeg(MaxDeg); int MaxDeg
     318proc PBW_maxDeg( int MaxDeg )
     319"USAGE: PBW_maxDeg(MaxDeg); int MaxDeg
    318320PURPOSE: Compute the PBW basis (up to a given maximal degree) of a current algebra.
    319321RETURN: ideal consisting of PBW elements.
     
    321323"
    322324{
    323 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_basis_byMaxDeg", MaxDeg ); }; /*4DEBUG*/
     325/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_maxDeg", MaxDeg ); }; /*4DEBUG*/
    324326   
    325327    ideal Basis = ideal();
     
    332334    ideal T = smoothQideal( Basis ); kill Basis;
    333335   
    334 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_basis_byMaxDeg", T ); }; /*4DEBUG*/
     336/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_maxDeg", T ); }; /*4DEBUG*/
    335337    return( T );
    336338}
     
    344346
    345347// 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 Deg
     348PBW_maxDeg( 2 );
     349}
     350
     351
     352/******************************************************/
     353proc PBW_eqDeg( int Deg )
     354"USAGE: PBW_eqDeg(Deg); int Deg
    353355PURPOSE: Compute the PBW basis (of a given degree) of a current algebra.
    354356RETURN: ideal consisting of PBW elements.
     
    356358"
    357359{
    358 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_basis_byDeg", Deg ); }; /*4DEBUG*/
     360/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_eqDeg", Deg ); }; /*4DEBUG*/
    359361   
    360362    ideal Basis = smoothQideal( maxideal( Deg ) );
    361363   
    362 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_basis_byDeg", Basis ); }; /*4DEBUG*/
     364/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_eqDeg", Basis ); }; /*4DEBUG*/
    363365    return( Basis );
    364366}
     
    372374
    373375// 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 m
     376PBW_eqDeg( 2 );
     377}
     378
     379
     380/******************************************************/
     381proc PBW_maxMonom( poly MaxMonom )
     382"USAGE: PBW_maxMonom(m); poly m
    381383PURPOSE: Compute the PBW basis, up to a given maximal exponent, of a current algebra.
    382384INPUT: Maximal exponent is given by the corresponding monomial.
     
    385387"
    386388{
    387 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_basis_byMaxMonom", MaxMonom ); }; /*4DEBUG*/
     389/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "PBW_maxMonom", MaxMonom ); }; /*4DEBUG*/
    388390   
    389391    ideal K = ideal();
     
    408410    ideal T = smoothQideal( K ); kill K;
    409411
    410 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_basis_byMaxMonom", T ); }; /*4DEBUG*/
     412/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "PBW_maxMonom", T ); }; /*4DEBUG*/
    411413   
    412414    return( T );
     
    421423
    422424// 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 );
     425PBW_maxMonom( e*(f^2)* h );
    424426}
    425427
     
    434436
    435437/******************************************************/
    436 proc ApplyAd( ideal I, poly p )
    437 "
    438 USAGE: ApplyAd( Basis, f); ideal Basis, poly f
     438proc applyAdF( ideal I, poly p )
     439"
     440USAGE: applyAdF( Basis, f); ideal Basis, poly f
    439441PURPOSE: Apply Ad_{f} to every element of Basis
    440442RETURN: ideal, Ad_{f}(Basis)
    441 SEE ALSO:   KER; LinearCombinations
    442 "
    443 {
    444 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "ApplyAd", I, p ); }; /*4DEBUG*/
     443SEE ALSO:   linearMapKernel; linearMapKernel
     444"
     445{
     446/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "applyAdF", I, p ); }; /*4DEBUG*/
    445447
    446448    poly t;
     
    458460    kill II;
    459461   
    460 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "ApplyAd", J ); }; /*4DEBUG*/
     462/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "applyAdF", J ); }; /*4DEBUG*/
    461463    return( J );
    462464}
     
    472474
    473475// Compute the PBW basis of A_2:
    474 ideal Basis = PBW_basis_byMaxDeg( 2 ); Basis;
     476ideal Basis = PBW_maxDeg( 2 ); Basis;
    475477
    476478// Compute images of basis elements under the linear map Ad_e:
    477 ideal Image = ApplyAd( Basis, e ); Image;
     479ideal Image = applyAdF( Basis, e ); Image;
    478480
    479481// Now we have a linear map given by: Basis_i --> Image_i
    480482// Let's compute its kernel:
    481 module C = KER( Image ); C;
     483module C = linearMapKernel( Image ); C;
    482484
    483485// Now we can compute the kernel of Ad_e by means of basis vectors:
    484 ideal K = LinearCombinations(Basis, C); K;
     486ideal K = linearCombinations(Basis, C); K;
    485487
    486488// 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 Images
     489applyAdF( K, e );
     490}
     491
     492
     493
     494/******************************************************/
     495proc linearMapKernel( ideal Images )
     496"USAGE: linearMapKernel( Images ); ideal Images
    495497PURPOSE: Computes the kernel of a linear map given by its images on certain basis vectors
    496498RETURN: syzygy module, or 0 if all images are zeroes
    497 SEE ALSO:   ApplyAd; LinearCombinations
    498 "
    499 {
    500 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "KER", Images ); }; /*4DEBUG*/
     499SEE ALSO:   applyAdF; linearMapKernel
     500"
     501{
     502/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "linearMapKernel", Images ); }; /*4DEBUG*/
    501503
    502504    // This must be a list of monomials in a form of polynomial (sum with coeffs == 1)   
     
    509511        int result = 0;
    510512       
    511 /*4DEBUG*/        if( defined( @@@DEBUG ) ){ ECall( "KER", result ); }; /*4DEBUG*/
     513/*4DEBUG*/        if( defined( @@@DEBUG ) ){ ECall( "linearMapKernel", result ); }; /*4DEBUG*/
    512514        return( result );
    513515    }
     
    570572   
    571573    // 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 );
    573575    // note that MD is a matrix of numbers - no polynomials...
    574576   
     
    579581    kill MD;
    580582   
    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 );
    584586}
    585587example
     
    594596
    595597// Compute the PBW basis of A_2:
    596 ideal Basis = PBW_basis_byMaxDeg( 2 ); Basis;
     598ideal Basis = PBW_maxDeg( 2 ); Basis;
    597599
    598600// Compute images of basis elements under the linear map Ad_e:
    599 ideal Image = ApplyAd( Basis, e ); Image;
     601ideal Image = applyAdF( Basis, e ); Image;
    600602
    601603// Now we have a linear map given by: Basis_i --> Image_i
    602604// Let's compute its kernel:
    603 module C = KER( Image ); C;
     605module C = linearMapKernel( Image ); C;
    604606
    605607// Now we can compute the kernel of Ad_e by means of basis vectors:
    606 ideal K = LinearCombinations(Basis, C); K;
     608ideal K = linearCombinations(Basis, C); K;
    607609
    608610// Let's check that Ad_e(K) is zero:
    609 ideal Z = ApplyAd( K, e ); Z;
    610 
    611 // Now KER will 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 C
     611ideal Z = applyAdF( K, e ); Z;
     612
     613// Now linearMapKernel will return a single integer 0:
     614def CC  = linearMapKernel(Z); typeof(CC); CC;
     615}
     616
     617
     618/******************************************************/
     619proc linearCombinations( ideal Basis, module KER )
     620"
     621USAGE:  linearCombinations( Basis, C ); ideal Basis, module C
    620622PURPOSE: computes linear combinations of Basis vectors with the coefficients from C.
    621623RETURN: ideal of linear combinations of Basis vectors with the coefficients from C.
    622 SEE ALSO:   KER; ApplyAd
    623 "
    624 {
    625    
    626 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "LinearCombinations", Basis, KER ); }; /*4DEBUG*/
     624SEE ALSO:   linearMapKernel; applyAdF
     625"
     626{
     627   
     628/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "linearCombinations", Basis, KER ); }; /*4DEBUG*/
    627629
    628630
     
    659661   
    660662   
    661 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "LinearCombinations", result ); }; /*4DEBUG*/
     663/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "linearCombinations", result ); }; /*4DEBUG*/
    662664   
    663665    return( result );
     
    674676
    675677// Compute the PBW basis of A_2:
    676 ideal Basis = PBW_basis_byMaxDeg( 2 ); Basis;
     678ideal Basis = PBW_maxDeg( 2 ); Basis;
    677679
    678680// Compute images of basis elements under the linear map Ad_e:
    679 ideal Image = ApplyAd( Basis, e ); Image;
     681ideal Image = applyAdF( Basis, e ); Image;
    680682
    681683// Now we have a linear map given by: Basis_i --> Image_i
    682684// Let's compute its kernel:
    683 module C = KER( Image ); C;
     685module C = linearMapKernel( Image ); C;
    684686
    685687// Now we can compute the kernel of Ad_e by means of basis vectors:
    686 ideal K = LinearCombinations(Basis, C); K;
     688ideal K = linearCombinations(Basis, C); K;
    687689
    688690// Let's check that Ad_e(K) is zero:
    689 ApplyAd( K, e );
     691applyAdF( K, e );
    690692}
    691693
     
    709711   
    710712    // compute fundamental solutions system
    711     def T = KER( Images );
    712    
    713    
    714     // check result of KER
     713    def T = linearMapKernel( Images );
     714   
     715   
     716    // check result of linearMapKernel
    715717    if( (typeof(T) == "int") and (T == 0) )
    716718    {
     
    723725        if( typeof(T) != "module" )
    724726        {
    725             ERROR( "Wrong output from the 'KER' function!" );
     727            ERROR( "Wrong output from the 'linearMapKernel' function!" );
    726728        }   
    727729    }
    728730   
    729     result = LinearCombinations( Basis, T );
     731    result = linearCombinations( Basis, T );
    730732   
    731733    kill T;
     
    736738
    737739
     740
     741
    738742/******************************************************/
    739743static proc ZeroKer( ideal Basis, ideal Images ) // VS Basis of a Kernel of the linear map AD_h, h is a Cartan element
     
    769773
    770774/******************************************************/
    771 proc standard_variables() // Returns an ideal of variables in a current base ring.
    772 "USAGE:      standard_variables();
     775proc variablesStandard() // Returns an ideal of variables in a current base ring.
     776"USAGE:      variablesStandard();
    773777RETURN:     ideal, generated by algebra variables
    774778PURPOSE:    computes the ideal generated by algebra variables taken in their natural order
    775 SEE ALSO:   sorted_variables
    776 EXAMPLE:    example standard_variables; shows an example
    777 "
    778 {
    779 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "standard_variables" ); }; /*4DEBUG*/
     779SEE ALSO:   variablesSorted
     780EXAMPLE:    example variablesStandard; shows an example
     781"
     782{
     783/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "variablesStandard" ); }; /*4DEBUG*/
    780784
    781785    ideal result = maxideal(1);
    782786
    783 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "standard_variables", result ); }; /*4DEBUG*/
     787/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "variablesStandard", result ); }; /*4DEBUG*/
    784788    return( result );
    785789}
     
    792796ncalgebra(1,D); // this algebra is U(sl_2)
    793797// 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();
     798variablesStandard();
     799}
     800
     801/******************************************************/
     802proc variablesSorted() // Sorts variables into an ideal. This is a kind of heuristics!
     803"USAGE:      variablesSorted();
    800804RETURN:     ideal, generated by sorted algebra variables
    801805PURPOSE:    computes the ideal generated by algebra variables sorted so that Cartan variables are first and all other variables are behind.
    802806NOTE:       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_variables
    804 EXAMPLE:    example sorted_variables; shows an example
     807SEE ALSO:   variablesStandard
     808EXAMPLE:    example variablesSorted; shows an example
    805809"{
    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();
    809813    int  N    = size( V ); // == nvars( basering )
    810814
     
    831835    }
    832836
    833 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "sorted_variables", result ); }; /*4DEBUG*/
     837/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "variablesSorted", result ); }; /*4DEBUG*/
    834838    return( result );
    835839}
     
    843847// There is only one Cartan variable - z in U(sl_2),
    844848// it must go 1st:
    845 sorted_variables();
     849variablesSorted();
    846850}
    847851
     
    861865
    862866/******************************************************/
    863 proc CENTRALIZE_SET( ideal F, ideal V ) // HL 'core' function
    864 "USAGE:      CENTRALIZE_SET( F, V ); ideal F, ideal V
     867proc centralizeSet( ideal F, ideal V ) // HL 'core' function
     868"USAGE:      centralizeSet( F, V ); ideal F, ideal V
    865869INPUT:       a finite set of elements F, vector space basis V
    866870RETURN:     ideal, generated by base elements
    867871PURPOSE:    computes the vector space basis of the centralizer of F in the vector space spanned by V, that is, Cen(F[N],Cen(F[N-1],...,Cen(F[1],V)...))
    868 SEE ALSO:   CENTRALIZER_VECTORSPACE; centralizer; inCentralizer
    869 EXAMPLE:    example CENTRALIZER_VECTORSPACE; shows an example
    870 "
    871 {
    872 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "CENTRALIZE_SET", F, V ); }; /*4DEBUG*/
     872SEE ALSO:   centralizerVS; centralizer; inCentralizer
     873EXAMPLE:    example centralizeSet; shows an example
     874"
     875{
     876/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "centralizeSet", F, V ); }; /*4DEBUG*/
    873877
    874878    int  N = size(F);
     
    886890       
    887891        //
    888         ideal Images = ApplyAd( V, F[v] );
     892        ideal Images = applyAdF( V, F[v] );
    889893       
    890894        ideal K;       
     
    907911    ideal result = makeNice(V); kill V;
    908912   
    909 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "CENTRALIZE_SET", result ); }; /*4DEBUG*/
     913/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "centralizeSet", result ); }; /*4DEBUG*/
    910914   
    911915    return( result );
     
    921925 ncalgebra(1,D);
    922926 
    923  ideal F = sorted_variables(); F;
     927 ideal F = variablesSorted(); F;
    924928 
    925  // if we know that the center of $A_{41}$ is generated by
     929 // the center of $A_{41}$ is generated by
    926930 // $e(1)$ and $-1/2*e(2)^2+e(1)*e(3)$
    927931 // therefore one may consider computing it in the following way:
     
    929933 // 1. Compute PBW basis consisting of
    930934 //    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) );
    932936 
    933937 // 2. Compute the centralizer of F within vector space
    934938 //    spanned by these monomials:
    935  ideal C = CENTRALIZE_SET( F, V ); C;
     939 ideal C = centralizeSet( F, V ); C;
    936940 
    937941 inCenter(C);
     
    941945
    942946/******************************************************/
    943 proc CENTRALIZER_VECTORSPACE( ideal F, int d )
    944 "USAGE:      CENTRALIZER_VECTORSPACE( F, D ); ideal F, int D
     947proc centralizerVS( ideal F, int d )
     948"USAGE:      centralizerVS( F, D ); ideal F, int D
    945949RETURN:     ideal, generated by elements of degree <= D
    946950PURPOSE:    computes a vector space basis of the centralizer of F up to degree D.
    947951NOTE:       D must be non-negative
    948 SEE ALSO:   CENTER_VECTORSPACE; centralizer; inCentralizer
    949 EXAMPLE:    example CENTER_VECTORSPACE; shows an example
    950 "
    951 {
    952 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "CENTRALIZER_VECTORSPACE", F, d ); }; /*4DEBUG*/
     952SEE ALSO:   centerVS; centralizer; inCentralizer
     953EXAMPLE:    example centralizerVS; shows an example
     954"
     955{
     956/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "centralizerVS", F, d ); }; /*4DEBUG*/
    953957   
    954958    if( size(F) == 0)
     
    957961    }
    958962
    959     ideal V = PBW_basis_byMaxDeg( d ); // PBW basis
    960    
    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>
    962966   
    963967    kill V;
    964968
    965 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "CENTRALIZER_VECTORSPACE", result ); }; /*4DEBUG*/
     969/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "centralizerVS", result ); }; /*4DEBUG*/
    966970   
    967971    return( result );
     
    976980ideal F = x, y;
    977981// find all elements commuting with x and y of degree <= 4:
    978 ideal C = CENTRALIZER_VECTORSPACE(F, 4);
     982ideal C = centralizerVS(F, 4);
    979983C;
    980984inCentralizer(C, F);
     
    992996
    993997/******************************************************/
    994 proc CENTER_VECTORSPACE( int D )
    995 "USAGE:      CENTER_VECTORSPACE( D ); int D
     998proc centerVS( int D )
     999"USAGE:      centerVS( D ); int D
    9961000RETURN:     ideal, generated by elements of degree <= D
    9971001PURPOSE:    computes a vector space basis of the center of the current algebra up to degree D.
    9981002NOTE:       D must be non-negative
    999 SEE ALSO:   CENTRALIZER_VECTORSPACE; center; inCenter
    1000 EXAMPLE:    example CENTER_VECTORSPACE; shows an example
    1001 "
    1002 {
    1003 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "CENTER_VECTORSPACE", D ); }; /*4DEBUG*/
     1003SEE ALSO:   centralizerVS; center; inCenter
     1004EXAMPLE:    example centerVS; shows an example
     1005"
     1006{
     1007/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "centerVS", D ); }; /*4DEBUG*/
    10041008
    10051009
     
    10141018    }
    10151019   
    1016     ideal result = CENTRALIZER_VECTORSPACE( sorted_variables(), D );
     1020    ideal result = centralizerVS( variablesSorted(), D );
    10171021     
    1018 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "CENTER_VECTORSPACE", result ); }; /*4DEBUG*/
     1022/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "centerVS", result ); }; /*4DEBUG*/
    10191023
    10201024    return( result );
     
    10281032ncalgebra(1,D); // this algebra is U(sl_2)
    10291033// find all central elements of degree <= 4
    1030 ideal Z = CENTER_VECTORSPACE(4);
     1034ideal Z = centerVS(4);
    10311035Z;
    10321036// note that the second element is the square of the first
     
    10381042
    10391043/******************************************************/
    1040 proc CENTRALIZER_SUBALGEBRA( ideal F, int D, list # )
    1041 "USAGE:      CENTRALIZER_SUBALGEBRA( F, D[, N] ); ideal F, int D[, int N]
     1044proc centralizerRed( ideal F, int D, list # )
     1045"USAGE:      centralizerRed( F, D[, N] ); ideal F, int D[, int N]
    10421046RETURN:     ideal, generated by computed generators
    10431047PURPOSE:    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.
    10441048NOTE:       Current ordering must be a degree compatible well-ordering.
    1045 SEE ALSO:   CENTRALIZER_VECTORSPACE; CENTER_SUBALGEBRA; centralizer; inCentralizer
    1046 EXAMPLE:    example CENTRALIZER_SUBALGEBRA; shows an example
    1047 "
    1048 {
    1049 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "CENTRALIZER_SUBALGEBRA", F, D, # ); }; /*4DEBUG*/
     1049SEE ALSO:   centralizerVS; centerRed; centralizer; inCentralizer
     1050EXAMPLE:    example centralizerRed; shows an example
     1051"
     1052{
     1053/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "centralizerRed", F, D, # ); }; /*4DEBUG*/
    10501054   
    10511055    if( nameof( basering ) == "basering" )
     
    11281132       
    11291133       
    1130         // just to avoid "no standard basis" warning.
     1134       
    11311135        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,
    11351139        // 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 );
    11371141
    11381142        kill FLM;
     
    11421146       
    11431147        // Compute current centralizer
    1144         NEW = CENTRALIZE_SET( F, P );
     1148        NEW = centralizeSet( F, P );
    11451149       
    11461150        if( size(NEW) > 0 )
     
    12121216            // And refine T one more:
    12131217       
    1214             // just to avoid "no standard basis" warning.
     1218           
    12151219            ideal FLM = imap(COMMRING, FLM);
    1216             attrib(FLM, "isSB", 1);
     1220            attrib(FLM, "isSB", 1);// just to avoid "no standard basis" warning.
    12171221   
    12181222            // we simply kill in T monomials occurring in FOUND_LEADING_MONOMIALS[i]
     
    13001304    result = makeNice(result);
    13011305
    1302 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "CENTRALIZER_SUBALGEBRA", result ); }; /*4DEBUG*/
     1306/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "centralizerRed", result ); }; /*4DEBUG*/
    13031307   
    13041308    return( result );
     
    13141318 // find subalgebra generators degree <= 4 of an algebra of
    13151319 // all elements commuting with x and y:
    1316  ideal C = CENTRALIZER_SUBALGEBRA(F, 4);
     1320 ideal C = centralizerRed(F, 4);
    13171321 C;
    13181322 inCentralizer(C, F);
     
    13211325
    13221326/******************************************************/
    1323 proc CENTER_SUBALGEBRA( int D, list # )
    1324 "USAGE:      CENTER_SUBALGEBRA( D[, k] ); int D[, int k]
     1327proc centerRed( int D, list # )
     1328"USAGE:      centerRed( D[, k] ); int D[, int k]
    13251329RETURN:     ideal, generated by computed generators
    13261330PURPOSE:    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.
    13271331NOTE:       Current ordering must be a degree compatible well-ordering.
    1328 SEE ALSO:   CENTRALIZER_SUBALGEBRA; CENTER_VECTORSPACE; center; inCenter
    1329 EXAMPLE:    example CENTER_SUBALGEBRA; shows an example
    1330 "
    1331 {
    1332 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "CENTER_SUBALGEBRA", D ); }; /*4DEBUG*/
     1332SEE ALSO:   centralizerRed; centerVS; center; inCenter
     1333EXAMPLE:    example centerRed; shows an example
     1334"
     1335{
     1336/*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "centerRed", D ); }; /*4DEBUG*/
    13331337
    13341338    if( nameof( basering ) == "basering" )
     
    13371341    }
    13381342   
    1339     ideal result = CENTRALIZER_SUBALGEBRA( sorted_variables(), D, # );
     1343    ideal result = centralizerRed( variablesSorted(), D, # );
    13401344     
    1341 /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "CENTER_SUBALGEBRA", result ); }; /*4DEBUG*/
     1345/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "centerRed", result ); }; /*4DEBUG*/
    13421346
    13431347    return( result );
     
    13511355ncalgebra(1,D); // it is a Heisenberg algebra
    13521356// find vector space basis of center of degree <= 3
    1353 ideal VSZ = CENTER_VECTORSPACE(3);
     1357ideal VSZ = centerVS(3);
    13541358// There should be 3 degrees of z.
    13551359VSZ;
    13561360inCenter(VSZ);
    13571361// find "minimal" central elements of degree <= 3
    1358 ideal SAZ = CENTER_SUBALGEBRA(3);
     1362ideal SAZ = centerRed(3);
    13591363// Only 'z' must be computed
    13601364SAZ;
     
    18431847ideal I = a, b;
    18441848inCentralizer(I, f);
    1845 printlevel = 1;
     1849printlevel = 2;
    18461850inCentralizer(a, f); // yes
    18471851inCentralizer(b, f); // no
     
    18631867    }
    18641868       
    1865     int result = inCentralizer( a, standard_variables() );
     1869    int result = inCentralizer( a, variablesStandard() );
    18661870
    18671871/*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "inCenter", result ); }; /*4DEBUG*/
     
    19061910   
    19071911
    1908     ideal V = standard_variables();
     1912    ideal V = variablesStandard();
    19091913
    19101914    int r = 1; poly v, g;
     
    19871991    if( DefaultInt( # ) > 0 )
    19881992    {
    1989         return( CENTER_SUBALGEBRA( D, # ) );
     1993        return( centerRed( D, # ) );
    19901994    }
    19911995   
    19921996    if( D >= 0 )
    19931997    {
    1994         return( sa_reduce( CENTER_VECTORSPACE(D) ) ); // Experimental! May be wrong!!!
     1998        return( sa_reduce( centerVS(D) ) ); // Experimental! May be wrong!!!
    19951999    }
    19962000   
     
    20342038    if( DefaultInt( # ) > 0 )
    20352039    {
    2036         return( CENTRALIZER_SUBALGEBRA( S, D, # ) );
     2040        return( centralizerRed( S, D, # ) );
    20372041    }
    20382042   
    20392043    if( D >= 0 )
    20402044    {
    2041         return( sa_reduce( CENTRALIZER_VECTORSPACE(S, D), 1) ); // Experimental! May be wrong!!!
     2045        return( sa_reduce( centralizerVS(S, D) ) ); // Experimental! May be wrong!!!
    20422046    }
    20432047   
     
    20982102center(2);
    20992103
    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.
    21012105center(6);
    21022106
Note: See TracChangeset for help on using the changeset viewer.