coefficients of power series with Laurent series coefficients
I want to be able to pick out the different monomials in a power series ring with coefficient ring Laurent series in another variable (or more). For example:
Q.<q> = LaurentSeriesRing(QQ)
S.<X> = LaurentSeriesRing(Q)
SS.<s> = PowerSeriesRing(S)
U = 1 + 2*X^3*s^4 + 5*q^6*X^7*s^8
What's the best way to extract the different monomials together with their coefficients?
Reformatted for intelligibility : to quote code, isolate it with blank lines and indent it four spaces (or use the "101010" button).
FWIW :
which is consitent with:
Is that what you want ?
Thank you! I always forget "list" and never find it in my documentation searches! Since this list will begin with the power series coefficient of 0, that's easy -- but to get the coefficient of a power of X, I'll need to know where the Laurent series starts. I typically do a zip of exponents and coefficients, but that seems rather clunky. Is there a better way? Thanks again.
Try conversion to polynomial via
U.polynomial()