The general rule is that anytime you do division, it pushes itself out to 
the ring where it makes sense. You can even see this with integers. The 
reason for this is because checking if something is a unit or is exactly 
divisible by the denominator is generally expensive.

Best,
Travis


On Saturday, June 15, 2019 at 4:17:23 AM UTC+10, Henry Talbott wrote:
>
> The following code produces the weird result:
>
> sage: R.<c>=QQ[]
> sage: S.<x,y>=R[]
> sage: u=FractionField(S)(x^2+y^2)
> sage: v = u.numerator()/u.denominator()
> sage: print u.numerator().parent()
> sage: print v.numerator().parent()
>
> Output:
>
> Multivariate Polynomial Ring in x, y over Univariate Polynomial Ring in c 
> over Rational Field
> Multivariate Polynomial Ring in x, y over Fraction Field of Univariate 
> Polynomial Ring in c over Rational Field
>
> Since u.denominator()=1, I expected v to be equal to u, and certainly for 
> their numerators to be over the same base field. I think the base field 
> change may be an issue with the method inverse_of_unit in 
> rings/polynomial/multi_polynomial_element.py.
>
> Any advice would be greatly appreciated! This base field change was 
> causing an error with the dynatomic_polynomial method.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/2762ab68-c53f-4409-8095-a32f2fcc538d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to