Is there supposed to be a canonical coercion map between a relative
number field and its associated absolute field?

At present (at least, in Sage 3.1.2), there doesn't seem to be:

sage: K1.<a> = NumberField(x^3 - 2)
sage: R.<y> = PolynomialRing(K1).gen()
sage: K2.<b> = K1.extension(y^2 - a)
sage: K2abs = K2.absolute_field('w')
sage: K2abs(b)
TypeError: Cannot coerce element into this number field

But surely there should be a canonical map, sending b in K2 to w in
K2abs?

Not having such a map causes problems elsewhere, as the code for
orders in relative number fields relies on being able to coerce to
absolute fields in order to do membership checks, and as a result all
of these are broken. I've opened a trac ticket for this issue, #4193,
with some examples of the kind of things that break.

I'm happy to have a go at fixing this myself (by hacking
NumberField_absolute.__call__ to accept as input an element of a
relative field whose absolute field is self), but I don't fully
understand all of the intricacies of the coercion model, and I recall
reading somewhere on this list that lots of coercion-related things
were changing in 3.1.3 anyway, so please let me know if my suggestion
is morally wrong, or would break something else.


--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to