#4276: [with patch, needs review] move number fields to new coercion, implement
embeddings
----------------------+-----------------------------------------------------
 Reporter:  robertwb  |        Owner:  robertwb  
     Type:  defect    |       Status:  new       
 Priority:  major     |    Milestone:  sage-3.2.2
Component:  coercion  |   Resolution:            
 Keywords:            |  
----------------------+-----------------------------------------------------
Old description:

> I'm not sure what is supposed to happen, but this probably isn't it.
> AFAICT, these embeddings are *not* compatible.  Or they are only after
> some work, that makes the results at the end strange.
>
> Please explain why this is correct if it is!
>
> {{{
> sage: F1 = NumberField(x^3 + 2, 'a', embedding=2)
> sage: F1.coerce_embedding()
>
> Generic morphism:
>   From: Number Field in a with defining polynomial x^3 + 2
>   To:   Real Lazy Field
>   Defn: a -> -1.259921049894873?
> sage: F2 = NumberField(x^3 + 2, 'a', embedding=CC.0)
> sage: F2.coerce_embedding()
>
> Generic morphism:
>   From: Number Field in a with defining polynomial x^3 + 2
>   To:   Complex Lazy Field
>   Defn: a -> 0.6299605249474365? + 1.091123635971722?*I
>
> sage: F1.gen() + F2.gen()
> 2*a
> sage: (F1.gen() + F2.gen()).parent()
> Number Field in a with defining polynomial x^3 + 2
> sage: (F1.gen() + F2.gen()).parent().coerce_embedding()
>
> Generic morphism:
>   From: Number Field in a with defining polynomial x^3 + 2
>   To:   Real Lazy Field
>   Defn: a -> -1.259921049894873?
> sage: CC(F1.gen())
> -1.25992104989487
> sage: CC(F1.gen()) + CC(F2.gen())
> -0.629960524947436 + 1.09112363597172*I
> sage: CC(F1.gen() + F2.gen())
> -2.51984209978975
> sage: CC(F2.gen() + F1.gen())
> 1.25992104989487 + 2.18224727194344*I
> }}}

New description:

 See summary.

Comment (by mabshoff):

 Comment by Nick Alexander, but it ended up in the wrong box, so I am
 appending it here:

 I'm not sure what is supposed to happen, but this probably isn't it.
 AFAICT, these embeddings are *not* compatible.  Or they are only after
 some work, that makes the results at the end strange.

 Please explain why this is correct if it is!

 {{{
 sage: F1 = NumberField(x^3 + 2, 'a', embedding=2)
 sage: F1.coerce_embedding()

 Generic morphism:
   From: Number Field in a with defining polynomial x^3 + 2
   To:   Real Lazy Field
   Defn: a -> -1.259921049894873?
 sage: F2 = NumberField(x^3 + 2, 'a', embedding=CC.0)
 sage: F2.coerce_embedding()

 Generic morphism:
   From: Number Field in a with defining polynomial x^3 + 2
   To:   Complex Lazy Field
   Defn: a -> 0.6299605249474365? + 1.091123635971722?*I

 sage: F1.gen() + F2.gen()
 2*a
 sage: (F1.gen() + F2.gen()).parent()
 Number Field in a with defining polynomial x^3 + 2
 sage: (F1.gen() + F2.gen()).parent().coerce_embedding()

 Generic morphism:
   From: Number Field in a with defining polynomial x^3 + 2
   To:   Real Lazy Field
   Defn: a -> -1.259921049894873?
 sage: CC(F1.gen())
 -1.25992104989487
 sage: CC(F1.gen()) + CC(F2.gen())
 -0.629960524947436 + 1.09112363597172*I
 sage: CC(F1.gen() + F2.gen())
 -2.51984209978975
 sage: CC(F2.gen() + F1.gen())
 1.25992104989487 + 2.18224727194344*I
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4276#comment:25>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to