#10281: Multimodular echelon form over cyclotomic fields fails
---------------------------------------+------------------------------------
       Reporter:  mraum                |         Owner:  jason, was     
           Type:  defect               |        Status:  positive_review
       Priority:  critical             |     Milestone:                 
      Component:  linear algebra       |    Resolution:                 
       Keywords:  cyclotomic, echelon  |   Work issues:                 
Report Upstream:  N/A                  |     Reviewers:  Martin Raum    
        Authors:  William Stein        |     Merged in:                 
   Dependencies:                       |      Stopgaps:                 
---------------------------------------+------------------------------------
Description changed by was:

Old description:

> The following example comes from Eisenstein series. It leads to
> previous_prime being called with invalid arguments.
>
> {{{
> sage: K.<rho> = CyclotomicField(106)
> sage: coeffs = [(18603/107*rho^51 - 11583/107*rho^50 - 19907/107*rho^49 -
> 13588/107*rho^48 - 8722/107*rho^47 + 2857/107*rho^46 - 19279/107*rho^45 -
> 16666/107*rho^44 - 11327/107*rho^43 + 3802/107*rho^42 + 18998/107*rho^41
> - 10798/107*rho^40 + 16210/107*rho^39 - 13768/107*rho^38 +
> 15063/107*rho^37 - 14433/107*rho^36 - 19434/107*rho^35 - 12606/107*rho^34
> + 3786/107*rho^33 - 17996/107*rho^32 + 12341/107*rho^31 -
> 15656/107*rho^30 - 19092/107*rho^29 + 8382/107*rho^28 - 18147/107*rho^27
> + 14024/107*rho^26 + 18751/107*rho^25 - 8301/107*rho^24 -
> 20112/107*rho^23 - 14483/107*rho^22 + 4715/107*rho^21 + 20065/107*rho^20
> + 15293/107*rho^19 + 10072/107*rho^18 + 4775/107*rho^17 - 953/107*rho^16
> - 19782/107*rho^15 - 16020/107*rho^14 + 5633/107*rho^13 -
> 17618/107*rho^12 - 18187/107*rho^11 + 7492/107*rho^10 + 19165/107*rho^9 -
> 9988/107*rho^8 - 20042/107*rho^7 + 10109/107*rho^6 - 17677/107*rho^5 -
> 17723/107*rho^4 - 12489/107*rho^3 - 6321/107*rho^2 - 4082/107*rho -
> 1378/107, 1, 4*rho + 1), (0, 1, rho + 4)]
> sage: m = matrix(2, coeffs)
> sage: m.echelon_form()
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call
> last)
>
> /home/martin/<ipython console> in <module>()
>
> /opt/sage/local/lib/python2.6/site-
> packages/sage/matrix/matrix_cyclo_dense.so in
> sage.matrix.matrix_cyclo_dense.Matrix_cyclo_dense.echelon_form
> (sage/matrix/matrix_cyclo_dense.cpp:13469)()
>
> /opt/sage/local/lib/python2.6/site-
> packages/sage/matrix/matrix_cyclo_dense.so in
> sage.matrix.matrix_cyclo_dense.Matrix_cyclo_dense._echelon_form_multimodular
> (sage/matrix/matrix_cyclo_dense.cpp:14366)()
>
> /opt/sage/local/lib/python2.6/site-packages/sage/rings/arith.pyc in
> previous_prime(n)
>    1044     n = ZZ(n)-1
>    1045     if n <= 1:
> -> 1046         raise ValueError, "no previous prime"
>    1047     if n <= 3:
>    1048         return ZZ(n)
>
> ValueError: no previous prime
> }}}
>
> Apply:
>   1. [attachment:trac_10281-sage-5.0-beta9.patch​]
>
> Install:
>   1. http://wstein.org/home/wstein/patches/linbox-1.1.6.p8.spkg

New description:

 The following example comes from Eisenstein series. It leads to
 previous_prime being called with invalid arguments.

 {{{
 sage: K.<rho> = CyclotomicField(106)
 sage: coeffs = [(18603/107*rho^51 - 11583/107*rho^50 - 19907/107*rho^49 -
 13588/107*rho^48 - 8722/107*rho^47 + 2857/107*rho^46 - 19279/107*rho^45 -
 16666/107*rho^44 - 11327/107*rho^43 + 3802/107*rho^42 + 18998/107*rho^41 -
 10798/107*rho^40 + 16210/107*rho^39 - 13768/107*rho^38 + 15063/107*rho^37
 - 14433/107*rho^36 - 19434/107*rho^35 - 12606/107*rho^34 + 3786/107*rho^33
 - 17996/107*rho^32 + 12341/107*rho^31 - 15656/107*rho^30 -
 19092/107*rho^29 + 8382/107*rho^28 - 18147/107*rho^27 + 14024/107*rho^26 +
 18751/107*rho^25 - 8301/107*rho^24 - 20112/107*rho^23 - 14483/107*rho^22 +
 4715/107*rho^21 + 20065/107*rho^20 + 15293/107*rho^19 + 10072/107*rho^18 +
 4775/107*rho^17 - 953/107*rho^16 - 19782/107*rho^15 - 16020/107*rho^14 +
 5633/107*rho^13 - 17618/107*rho^12 - 18187/107*rho^11 + 7492/107*rho^10 +
 19165/107*rho^9 - 9988/107*rho^8 - 20042/107*rho^7 + 10109/107*rho^6 -
 17677/107*rho^5 - 17723/107*rho^4 - 12489/107*rho^3 - 6321/107*rho^2 -
 4082/107*rho - 1378/107, 1, 4*rho + 1), (0, 1, rho + 4)]
 sage: m = matrix(2, coeffs)
 sage: v = m.echelon_form()
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)

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

 /opt/sage/local/lib/python2.6/site-
 packages/sage/matrix/matrix_cyclo_dense.so in
 sage.matrix.matrix_cyclo_dense.Matrix_cyclo_dense.echelon_form
 (sage/matrix/matrix_cyclo_dense.cpp:13469)()

 /opt/sage/local/lib/python2.6/site-
 packages/sage/matrix/matrix_cyclo_dense.so in
 sage.matrix.matrix_cyclo_dense.Matrix_cyclo_dense._echelon_form_multimodular
 (sage/matrix/matrix_cyclo_dense.cpp:14366)()

 /opt/sage/local/lib/python2.6/site-packages/sage/rings/arith.pyc in
 previous_prime(n)
    1044     n = ZZ(n)-1
    1045     if n <= 1:
 -> 1046         raise ValueError, "no previous prime"
    1047     if n <= 3:
    1048         return ZZ(n)

 ValueError: no previous prime
 }}}

 Apply:
   1. [attachment:trac_10281-sage-5.0-beta9.patch​]

 Install:
   1. http://wstein.org/home/wstein/patches/linbox-1.1.6.p8.spkg

--

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