On Sunday, January 17, 2016 at 10:37:14 AM UTC-8, William wrote:
>
> Hi,
>
> Does anybody understand number field embeddings
>
> http://doc.sagemath.org/html/en/reference/number_fields/sage/rings/number_field/number_field_morphisms.html
>
>
> and whether the default I in SR (i.e., NumberField(x^2+1)) is equipped
> with any embeddings.
I wouldn't claim I understand exactly what sage does there. I do know that
in the coercion model, there is a slot available for pretty much any parent
to have a coercion *to* some other structure (for the most part, coercions
are stored on the target rather than on the domain). This is mainly to
accommodate, e.g., numberfields to act as "subfields" of CC while still
being able to have a shorter lifetime than CC.
The parent of I.pyobject() has one of those registered:
sage: CC.coerce_map_from(parent(I.pyobject()))
Composite map:
From: Number Field in I with defining polynomial x^2 + 1
To: Complex Field with 53 bits of precision
Defn: Generic morphism:
From: Number Field in I with defining polynomial x^2 + 1
To: Complex Lazy Field
Defn: I -> 1*I
then
Conversion map:
From: Complex Lazy Field
To: Complex Field with 53 bits of precision
whereas a "normal" imaginary quadratic field does not:
sage: CC.coerce_map_from(NumberField(x^2+1,"ii")) is None
True
This doesn't seem to be what triggers the path to SR, though:
sage: SR.coerce_map_from(parent(I.pyobject()))
Conversion via _symbolic_ method map:
From: Number Field in I with defining polynomial x^2 + 1
To: Symbolic Ring
sage: SR.coerce_map_from(NumberField(x^2+1,"ii")) is None
True
so it seems the coercion for I.pyobject() is in fact registered on SR
(hence nailing I.pyobject().parent() in memory, which isn't an issue)
--
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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.