On Apr 14, 7:21 am, John Cremona <[email protected]> wrote: > This issue comes up periodically, but no-one (as far as I know) has > come up with a good algorithm. The obvious one here is what you get > if you work in the fraction field of Z[X] instead of Q[X]. Are there > other special cases which should be handled apart from coefficient > rings which are fields of fractions of PIDs or UFDs? > > John
What it boils down to is that, given a rational function (f_n x^n + ... + f_0)/(g_m x^m + ... + g_0) you want to find a nice representative for the point in projective space (f_n: ... : f_0 : g_m : ... : g_0) For a fraction field over a PID one way is to normalize the coefficients such that they lie in the PID, with gcd equal to 1. Without reference to a ring inside the field there is also a standard way of normalizing: make the leftmost/rightmost coordinate equal to 1. That means that the polynomials in the numerator or denominator might have denominators in their coefficients. That's the price you pay for having a unique representative of your function field element. In the absence of an appropriate PID-like normalization, the "normalize one coefficient to 1" is still preferable, because at least it lets coefficients not explode faster than necessary. Should fields have a "give a nice projective representative of this tuple" method on them? It could default to "divide by the leftmost nonzero entry" and be overridden on fields that know they have some nicer properties ... I'm pretty sure the right solution for Q(x) is to compute in FieldOfFractions(ZZ[x]) [and construct the thing as such]. It might be nice if Q[x] knows it's a subring of that, but that could cause problems too, because that's not "by construction". Currently it does not work: sage: P.<x>=ZZ[] sage: QP=parent(1/x) sage: QP Fraction Field of Univariate Polynomial Ring in x over Integer Ring sage: PQ.<x>=QQ[] sage: parent(PQ.0+QP.0) Fraction Field of Univariate Polynomial Ring in x over Rational Field sage: PQ(QP.0/2) TypeError: denominator must be a unit -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
