#11824: Bug in ring_generators for relative orders
------------------------------+---------------------------------------------
   Reporter:  davidloeffler   |          Owner:  davidloeffler  
       Type:  defect          |         Status:  positive_review
   Priority:  major           |      Milestone:  sage-4.7.2     
  Component:  number fields   |       Keywords:  relative order 
Work_issues:                  |       Upstream:  N/A            
   Reviewer:  Francis Clarke  |         Author:  David Loeffler 
     Merged:                  |   Dependencies:                 
------------------------------+---------------------------------------------
Description changed by leif:

Old description:

> The function "ring_generators" crashes for orders in relative number
> fields:
>
> {{{
> ----------------------------------------------------------------------
> | Sage Version 4.7.1, Release Date: 2011-08-11                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: K.<a,b> = NumberField([x^2 + 1, x^2 - 2])
> sage: OK = K.maximal_order()
> sage: OK.ring_generators()
> ---------------------------------------------------------------------------
> NotImplementedError                       Traceback (most recent call
> last)
>
> /home/masiao/<ipython console> in <module>()
>
> /usr/local/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/rings/number_field/order.pyc in ring_generators(self)
>     586             K = self._K
>     587             n = []
> --> 588             V, from_V, to_V = self._K.vector_space()
>     589             A = ZZ**self.rank()
>     590             remaining = [x for x in self.basis() if x != 1]
>
> /usr/local/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/rings/number_field/number_field_rel.pyc in
> vector_space(self)
>    1310
>    1311         """
> -> 1312         raise NotImplementedError, "For a relative number field L
> you must use either L.relative_vector_space() or
> L.absolute_vector_space() as appropriate"
>    1313
>    1314     def absolute_base_field(self):
>
> NotImplementedError: For a relative number field L you must use either
> L.relative_vector_space() or L.absolute_vector_space() as appropriate
> }}}

New description:

 The function "ring_generators" crashes for orders in relative number
 fields:

 {{{
 ----------------------------------------------------------------------
 | Sage Version 4.7.1, Release Date: 2011-08-11                       |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: K.<a,b> = NumberField([x^2 + 1, x^2 - 2])
 sage: OK = K.maximal_order()
 sage: OK.ring_generators()
 ---------------------------------------------------------------------------
 NotImplementedError                       Traceback (most recent call
 last)

 /home/masiao/<ipython console> in <module>()

 /usr/local/sage/sage-4.7.1/local/lib/python2.6/site-
 packages/sage/rings/number_field/order.pyc in ring_generators(self)
     586             K = self._K
     587             n = []
 --> 588             V, from_V, to_V = self._K.vector_space()
     589             A = ZZ**self.rank()
     590             remaining = [x for x in self.basis() if x != 1]

 /usr/local/sage/sage-4.7.1/local/lib/python2.6/site-
 packages/sage/rings/number_field/number_field_rel.pyc in
 vector_space(self)
    1310
    1311         """
 -> 1312         raise NotImplementedError, "For a relative number field L
 you must use either L.relative_vector_space() or L.absolute_vector_space()
 as appropriate"
    1313
    1314     def absolute_base_field(self):

 NotImplementedError: For a relative number field L you must use either
 L.relative_vector_space() or L.absolute_vector_space() as appropriate
 }}}

 ----

 Apply [attachment:trac_11824-relative_orders.patch] to the Sage library.

--

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