On Sep 17, 9:09 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 17, 2008 at 8:59 PM, John H Palmieri <[EMAIL PROTECTED]> wrote: > > > sage: is_FractionField(FractionField(ZZ)) > > False > > > Oy. This seems to be intentional: there is a doctest very similar to > > this. It doesn't seem right, though. How hard would it be to change? > > Is it worth it? > > In most cases in Sage (maybe all cases), is_Foo is a data type > check. It's not making a mathematical assertion. The implementation > is almost always a call to isinstance.
Right, I saw that in the source code. How about we change it, in this case, from return isinstance(x, FractionField_generic) to return isinstance(x, (FractionField_generic, Field)) (Every field is its own fraction field.) I can submit a trac ticket with this change, unless someone convinces me that it's a really bad idea. > > > Along the same lines, partial fraction decomposition should work for > > rational numbers; this would work if elements of QQ were instances of > > FractionFieldElement, right? > > Or you could just implement it, which would likely be a good idea. It might be a good idea, but I don't know how to do it. How do I produce, given 1/20, the output 1/4 - 1/5? That is, how do I tell sage to output 1/4 - 1/5, as an element in QQ, I suppose, without evaluating it and just printing 1/20? > > William > John --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---