I am working with a power series with coefficients being rational functions of several variables (everything over QQ). Is there any way to make sage automatically simplify the coefficients?
Here is an example of what is going on
k=RR.zero()+(-524288x^2 - 1048576xy - 524288y^2 + 524288xz + 524288yz)/(-1048576*z^2)
print k
print u
print u-k
print (simplify(u))
print u
print parent(u)
print parent(k)
print factor(u.numerator())/factor(u.denominator())
And results:
(1/2x^2 + xy + 1/2y^2 - 1/2xz - 1/2y*z)/z^2
(-524288x^2 - 1048576xy - 524288y^2 + 524288xz + 524288yz)/(-1048576*z^2)
0
(-524288x^2 - 1048576xy - 524288y^2 + 524288xz + 524288yz)/(-1048576*z^2)
(-524288x^2 - 1048576xy - 524288y^2 + 524288xz + 524288yz)/(-1048576*z^2)
Fraction Field of Multivariate Polynomial Ring in x, y, z over Rational Field
Fraction Field of Multivariate Polynomial Ring in x, y, z over Rational Field
(-1/2) * z^-2 * (-x - y + z) * (x + y)