# Non-Symmetric Macdonald expansion

I want to expand a given polynomial in $n$ variables, homogeneous of degree $k$ as a linear combination of Non-Symmetric Macdonald polynomials $E_{\alpha}$ where $\alpha$ varies over $\mathbb{Z}^n_{\geq 0}$ with $\sum \alpha_i = k$.

Background: We know that these Macdonald polynomials do indeed form a basis of the vector space of homogeneous degree $k$ polynomials in $n$ variables. The Non-Symmetric Macdonald polynomials I am interested in is the type $GL_n$ kind. And their sage implementation can be found here: sage documentation

Bottom line is that we have a basis of a vector space already implemented in sage. Now how do we use it to compute coefficients of any vector when written in terms of this basis?

edit retag close merge delete

Sort by » oldest newest most voted

Here is a sample code that find such a representation for a given polynomial pol:

from sage.combinat.sf.ns_macdonald import E

def repM(pol):
k = pol.degree()
n = len( pol.variables() )
E2a = { E(a):a for a in IntegerVectors(k, n) }
J = ideal( list(E2a.keys()) )
gens = J.gens()
return { E2a[g]:c for g,c in zip(gens, pol.change_ring(J.base_ring()).lift(gens)) if c }


It return a dict where each $\alpha$ is mapped to the corresponding coefficient (a function in $q,t$) of $E_\alpha$, omitting zero coefficients. For example, running it on elementary symmetric polynomial $e_{2,1}$ in 3 variables:

e = SymmetricFunctions(QQ).elementary()
repM(e[2,1].expand(3))


returns

{[2, 1, 0]: (q^4*t^4 - 2*q^3*t^4 + q^2*t^4 - q^2*t^3 + 2*q*t^3 - t^3)/(q^4*t^4 - 2*q^3*t^3 + 2*q*t - 1),
[2, 0, 1]: (q^3*t^3 - q^2*t^3 - q*t^2 + t^2)/(q^3*t^3 - q^2*t^2 - q*t + 1),
[1, 2, 0]: (q^3*t^3 - q^2*t^3 - q*t^2 + t^2)/(q^3*t^3 - q^2*t^2 - q*t + 1),
[1, 1, 1]: (q*t^2 + q*t - t^2 + q - t - 1)/(q*t^2 - 1),
[1, 0, 2]: (q*t - t)/(q*t - 1),
[0, 2, 1]: (q*t - t)/(q*t - 1),
[0, 1, 2]: 1}

more

Can you explain what is happening in the repM definition please?

( 2021-10-22 15:24:57 +0200 )edit
1

Essentially it defines the ideal $J$ generated by the Macdonald polynomials, and computes a representation of the given polynomial in terms of the ideal generators (via function .lift()). To do so, the base ring of the polynomial first needs to be changed to that of the ideal, which is done via .change_ring() function. The rest is just for formatting purposes.

( 2021-10-22 17:01:11 +0200 )edit