#12271: coercion and conversion for relativize
-----------------------------+----------------------------------------------
   Reporter:  mstreng        |          Owner:  davidloeffler                   
           
       Type:  enhancement    |         Status:  new                             
           
   Priority:  major          |      Milestone:  sage-5.0                        
           
  Component:  number fields  |       Keywords:  relativize conversion coercion 
number field
Work_issues:                 |       Upstream:  N/A                             
           
   Reviewer:                 |         Author:                                  
           
     Merged:                 |   Dependencies:                                  
           
-----------------------------+----------------------------------------------
 There is no coercion and conversion for fields constructed by relativize,
 even though the structure morphisms are present:
 {{{
 sage: L.<a> = NumberField(x^3+2)
 sage: L_rel = L.relativize(1,'b')
 sage: b = L_rel.gen()
 sage: L(b)
 # Falls back to the generic code from #11869, which fails with
 # TypeError: No compatible natural embeddings found for Number Field in a
 with defining polynomial x^3 + 2 and Number Field in b0 with defining
 polynomial x^3 + 2 over its base field
 sage: L_rel.structure()[0](b)
 # a
 sage: L_rel(a)
 # Does not even fall back to the generic code from #11869
 # TypeError: Cannot coerce element into this number field
 sage: L_rel.structure()[1](a)
 # b0
 sage: b
 # b0
 sage: a+b
 # TypeError: unsupported operand parent(s) for '+': 'Number Field in a
 with defining polynomial x^3 + 2' and 'Number Field in b0 with defining
 polynomial x^3 + 2 over its base field'
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12271>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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