1 | initial version |
Here's how I'd get around it if I needed it to work Right Now(tm):
sage: var("x y")
(x, y)
sage: t = gp.simplify((x+y)/y)
sage:
sage: R.<x,y> = PolynomialRing(QQ)
sage: S = R.fraction_field()
sage:
sage: t2 = S(sage_eval(repr(t),locals=locals()))
sage: t2
(x + y)/y
sage: parent(t2)
Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field
sage: parent(t2) is S
True
2 | No.2 Revision |
Here's how I'd get around it the problem if I needed it to work Right Now(tm):
sage: var("x y")
(x, y)
sage: t = gp.simplify((x+y)/y)
sage:
sage: R.<x,y> = PolynomialRing(QQ)
sage: S = R.fraction_field()
sage:
sage: t2 = S(sage_eval(repr(t),locals=locals()))
sage: t2
(x + y)/y
sage: parent(t2)
Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field
sage: parent(t2) is S
True