(Mis-)inspired by this question . Let F
b some (not uninteresting) rational fraction:
sage: F=tan(2*arctan(x)+3*arctan(y)).trig_expand().trig_expand() ; F
((y^3 - 3*y)/(3*y^2 - 1) - 2*x/(x^2 - 1))/(2*(y^3 - 3*y)*x/((x^2 - 1)*(3*y^2 - 1)) + 1)
Question : when working in the (fraction field of) congruence rings, when is this fraction a polynomial ? This question has a trivial answer : when its denominator has a multiplicative inverse.
However :
sage: F.fraction(Integers(2))
(x^2*y^3 + x^2*y + y^3 + y)/(x^2*y^2 + x^2 + y^2 + 1)
Here, Sage
does not simplify its results, notwithstanding the fact that it "knows" that such simplifications are possible) :
sage: F.fraction(GF(2)).parent().is_integral_domain()
True
In consequence :
sage: F.fraction(Integers(2)).denominator().is_unit()
False
However, if we work with the finite field of size 2 (which is the same ring...) :
sage: F.fraction(GF(2))
y
sage: F.fraction(GF(2)).denominator()
1
The documentation is not especially enlightening. I still do not see why there should be any difference between GF(2)
and Integers(2)
Could some kind soul point me to the direction and magnitude of my (ignorance|stupidity) ?