#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:            |  
----------------------+-----------------------------------------------------
Comment (by ncalexan):

 I see now that I typoed in the last stanza.  Try this instead:

 {{{
 sage: NumberField(x^4 + 6*x^2 + 1, 'a').extension(x^4 + 111, 'b',
 embedding=I*2.5).absolute_field().coerce_embedding()
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call
 last)

 
/Users/ncalexan/.sage/temp/pv139196.reshsg.uci.edu/23733/_Users_ncalexan__sage_init_sage_0.py
 in <module>()
 ----> 1
       2
       3
       4
       5

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field.pyc in extension(self, poly,
 name, names, check, embedding)
    2559         if name is None:
    2560             raise TypeError, "the variable name must be
 specified."
 -> 2561         return NumberField_relative(self, poly, str(name),
 check=check, embedding=embedding)
    2562
    2563     def factor(self, n):

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field.pyc in __init__(self, base,
 polynomial, name, latex_name, names, check, embedding)
    4577
    4578         v[0] = self._gen_relative()
 -> 4579         v = [self(x) for x in v]
    4580         self.__gens = tuple(v)
    4581         self._zero_element = self(0)

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
 (sage/structure/parent.c:3712)()
     282
     283
 --> 284
     285
     286

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:2763)()
      74
      75
 ---> 76
      77
      78

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps._call_ (sage/structure/coerce_maps.c:2675)()
      69
      70
 ---> 71
      72
      73

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field.pyc in
 _element_constructor_(self, x)
    4848             elif P == self:
    4849                 return self._element_class(self, x.polynomial())
 -> 4850             return self.__base_inclusion(self.base_field()(x))
    4851
    4852         if not isinstance(x, (int, long, rational.Rational,

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field.pyc in
 __base_inclusion(self, element)
    4920         # Convert to a SAGE polynomial, then to one in gen(), and
 return it
    4921         R = self.polynomial_ring()
 -> 4922         return self(R(expr_x))
    4923
    4924     def _fractional_ideal_class_(self):

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
 (sage/structure/parent.c:3665)()
     277
     278
 --> 279
     280
     281

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in
 sage.structure.parent.Parent.convert_map_from
 (sage/structure/parent.c:8640)()
    1000
    1001
 -> 1002
    1003
    1004

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in
 sage.structure.parent.Parent.discover_convert_map_from
 (sage/structure/parent.c:8833)()
    1013
    1014
 -> 1015
    1016
    1017

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in
 sage.structure.parent.Parent.coerce_map_from
 (sage/structure/parent.c:7791)()
     838
     839
 --> 840
     841
     842

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/structure/parent.so in
 sage.structure.parent.Parent.coerce_map_from
 (sage/structure/parent.c:7522)()
     864
     865
 --> 866
     867
     868

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field.pyc in __cmp__(self, other)
    1645         else:
    1646             return cmp(self.coerce_embedding()(self.gen()),
 -> 1647                        other.coerce_embedding()(other.gen()))
    1648
    1649     def _ideal_class_(self):

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/categories/map.so in sage.categories.map.Map.__call__
 (sage/categories/map.c:2729)()
     122
     123
 --> 124
     125
     126

 /Users/ncalexan/sage-3.2.1.alpha1/local/lib/python2.5/site-
 packages/sage/rings/number_field/number_field_morphisms.so in
 sage.rings.number_field.number_field_morphisms.NumberFieldEmbedding._call_
 (sage/rings/number_field/number_field_morphisms.c:1777)()
      66
      67
 ---> 68
      69
      70

 AttributeError: 'NoneType' object has no attribute 'polynomial'
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4276#comment:19>
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