On 29 April 2014 16:17, Nils Bruin <[email protected]> wrote:
> On Tuesday, April 29, 2014 7:47:39 AM UTC-7, Volker Braun wrote:
>>
>> Always putting things in canonical form will be slow (there is no hook for
>> "you are about to be put into a set") and/or not possible (fp group
>> elements).
>
>
> I disagree in this particular case. Making the denominator monic is *much*
> cheaper than doing the GCD computation for removing common factors from
> numerator and denominator. And for fields like this, it help keeping
> unnecessary coefficient explosion in check, so it may actually be faster in
> some cases.
>
> There is a more problematic issue. If you construct:
>
> sage: O=K.maximal_order()
> sage: Pu.<u> =PolynomialRing(O)
> sage: Ku.<u> = FractionField(Pu)
>
> you get an isomorphic field (and over ZZ this is can even be good idea: keep
> coefficients denominator-free), but it's no longer possible to make
> denominators always monic.

That is true.  In my code I construct function fields like QQ(u) as
the field of fractions of ZZ[u] for this reason, but sometimes have to
base change up to a number field.  (If I say much more then Nils will
be able to guess what computation I am doing!  Hint: modular curves.)

In #16268 I only propose to change the reduce method for the class
'sage.rings.fraction_field_element.FractionFieldElement_1poly_field'
which will unfortunately not solve the issue of sets of elements from
fields constructed as in your example.  One thing at a time...

John

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" 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 http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to