On Mar 1, 2010, at 11:46 AM, Pierre wrote:

oooh wait wait wait. I've said something totally confusing.

My previous two posts apply to rational fractions... for which indeed,
the numerator method gives the 'correct' answer ! The issue I raised
in my original post is the 'funny' behaviour when you ask for the
numerator of something in QQ[x] -- which, come to think of it, is
mathematically a little unsound. I just totally assumed this should
give the same answer as coercing into the field of rational fractions
and then applying numerator(), but it doesn't. You (Robert) assumed
something absolutely different.

(Now i still think it would be less surprising is sage acted as i
suggested, but i don't have strong feelings about it anymore :) )

In terms of usefulness, since for f(x) in QQ[x] we have f(x) = f(x)/1 in QQ(x), coercing to the fraction field yields less information. I think things are more obvious to think about in terms of the denominator (which, for example, is used in matrices and polynomials over Q to "clear the denominator" to get something over the integers), and the numerator is then defined to agree with that.

Also, note that in QQ(x) the numerator/denominator are only defined up to a unit, so the currently returned answer is still valid there (though as you said has a different parent than you were expecting).

- Robert


--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to