Is this the intended behaviour? First, for an ordinary polynomial ring:

sage: R0.<x,y> = QQ[]
sage: (x*y)/x
y
sage: _.parent()
Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field
sage: R0((x*y)/x)
y
sage: _.parent()
Multivariate Polynomial Ring in x, y over Rational Field

kind of makes sense to me. But if the coefficients are not just numbers then 
it doesn't work any more:

sage: Rt.<x,y> = QQ['t'][]
sage: (x*y)/x
x*y/x
sage: _.parent()
Fraction Field of Multivariate Polynomial Ring in x, y over Univariate 
Polynomial Ring in t over Rational Field
sage: Rt((x*y)/x)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/vbraun/Sage/24cell/<ipython console> in <module>()

/home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/rings/polynomial/multi_polynomial_ring.pyc
 
in __call__(self, x, check)
    430                 return x.numerator()
    431             else:
--> 432                 raise TypeError, "unable to coerce since the 
denominator is not 1"
    433 
    434         elif is_SingularElement(x) and self._has_singular:

TypeError: unable to coerce since the denominator is not 1

I think this is the problem, but I'm not sure:

sage: ((x*y)/x).reduce()
---------------------------------------------------------------------------
ArithmeticError                           Traceback (most recent call last)

/home/vbraun/Sage/24cell/<ipython console> in <module>()

/home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/rings/fraction_field_element.so
 
in sage.rings.fraction_field_element.FractionFieldElement.reduce 
(sage/rings/fraction_field_element.c:2736)()

ArithmeticError: unable to reduce because lack of gcd or quo_rem algorithm


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to