I have the following code, which produces a list of polynomials in the infinite number of variables e_0, e_1, ...
M.<e> = InfinitePolynomialRing(QQ, implementation="sparse") > S.<z> = LaurentSeriesRing(M) > Qxy.<X,Y> = PolynomialRing(QQ) > a=var('a') > b=var('b') > k=var('k') > L=[] > n=6 > x = 1/z^2 + > sum([(-1)^(a+2)*(2*a+1)/factorial(2*a+2)*bernoulli(2*a+2)*e[2*a+2]*z^(2*a) > for a in [1..n]]) > y = x.derivative(z) > v = y^2 - 4*x^3 - 20*3/factorial(4)*bernoulli(4)*e[4]*x + > 28*5/factorial(6)*bernoulli(6)*e[6] > coeff = v.coefficients() > for k in [0..n]: > a = vector(coeff[k].coefficients()) > L.append((coeff[k]*a.denominator()).polynomial()) > print L The output looks something like this: [-e_8 + e_4^2, -e_10 + e_6*e_4, -1382*e_12 + 2205*e_8*e_4 + 500*e_6^2 - > 1323*e_4^3, -10*e_14 + 21*e_10*e_4 + 22*e_8*e_6 - 33*e_6*e_4^2, > 45606*e_12*e_4 + 65000*e_10*e_6 + 42042*e_8^2 - 63063*e_8*e_4^2 - > 71500*e_6^2*e_4, 126126*e_14*e_4 + 212828*e_12*e_6 + 309582*e_10*e_8 - > 154791*e_10*e_4^2 - 378378*e_8*e_6*e_4 - 71500*e_6^3, 858000*e_14*e_6 + > 1337776*e_12*e_8 - 501666*e_12*e_4^2 + 760500*e_10^2 - > 1287000*e_10*e_6*e_4 - 693693*e_8^2*e_4 - 786500*e_8*e_6^2] These list elements should be interpreted as relations between the variables e_i (for even i), so that, for instance, the first one should be interpreted as e_8 = e_4^2. Moreover, I know that these relations should allow me to inductively express each e_k in terms of e_4 and e_6. For instance, the second relation shows that e_10 = e_4e_6. The third relation -1382*e_12 + 2205*e_8*e_4 + 500*e_6^2 -1323*e_4^3 = 0 allows me (using a pen and paper...) to express e_12 only in terms of e_4 and e_6, by using e_8 = e_4^2. What I would like is to be able, for each k in the appropriate range, to obtain a polynomial f_k(u,v) with rational coefficients, such that f_k(e_4, e_6) = e_k. For instance, the first relation should give me f_8(u,v) = u^2. However, I've been having a lot of trouble figuring out how to do substitutions in these polynomial rings in order to get what I want. I would really appreciate it if someone could point me in the right direction. Thank you! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.