It is well known that Schubert polynomials form a basis for the polynomial ring $\mathbb{Z}[x\_1,x\_2,x\_3,...]$. 


I am interested in knowing how to express a particular polynomial into sum of Schubert polynomial.


Does anyone can give me reference on program( say Macaulay2) expressing a particular polynomial in terms of Schubert polynomial?
I did a google search before but could not find a satisfactory answer. 


Also are there any fast ways in determining whether a polynomial is a sum of double Schubert polynomial?


Any hints or reference are appreciated.


Thank you very much!



expressing in terms of sum of (double) schubert polynomial
First break $p$ into its homogeneous components, since Schubert polynomials are homogeneous.


Now find the lex-last term $c \prod\_i x\_i^{L\_i}$ of $p$ -- look for the largest $n$ such that $x\_n$ occurs in a term, then take the terms with the highest power of that $x\_n$, then of those take the terms with the highest power of $x\_{n-1}$, and so on. The resulting exponent vector $L$ is the [Lehmer code](https://en.wikipedia.org/wiki/Lehmer_code "Wikipedia") of a permutation $\pi$, and its Schubert polynomial $S\_\pi$ has that same lex-last exponent vector. Subtract $c S\_\pi$ from $p$ and continue. This process terminates.


It's rather weird to ask whether a polynomial is a $\mathbb Z$-combination of double Schubert polynomials, insofar as they are a $\mathbb Z[y\_1,y\_2,\ldots]$-basis. To compute *those* expansions, the only modifications to the above recipe are that we look for the lex-last term *of the highest degree in the $x$ variables,* and the coefficient $c$ is now a polynomial in the $y$ variables. Your second question is then whether these $c$ all happen to be in $\mathbb Z$, but I can't imagine a natural situation where that would happen.


