#7654: Conversion bug in MPolynomialRing_libsingular
-----------------------------------+----------------------------------------
   Reporter:  SimonKing            |       Owner:  malb                  
       Type:  defect               |      Status:  new                   
   Priority:  critical             |   Milestone:  sage-4.3              
  Component:  commutative algebra  |    Keywords:  conversion libsingular
Work_issues:                       |      Author:                        
   Upstream:  N/A                  |    Reviewer:                        
     Merged:                       |  
-----------------------------------+----------------------------------------
 The following happens in sage-4.2.1 and sage-4.3.alpha1:
 {{{
 sage: R.<y_6, y_3, y_2, y_1, z_6, z_5, z_4, z_3, z_2, z_1> = QQ[]
 sage: R.<y_6, y_3, y_2, y_1, z_6, z_5, z_4, z_3, z_2, z_1> = GF(3)[]
 sage: S = GF(3)['y_4', 'y_3', 'y_2', 'y_1', 'z_5', 'z_4', 'z_3', 'z_2',
 'z_1']
 sage: S(y_1*z_2^2*z_1)
 ERROR: An unexpected error occurred while tokenizing input
 The following traceback may be corrupted or invalid
 The error message is: ('EOF in multi-line statement', (947, 0))

 ERROR: An unexpected error occurred while tokenizing input
 The following traceback may be corrupted or invalid
 The error message is: ('EOF in multi-line statement', (952, 0))

 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/king/.sage/temp/gauss/12072/_home_king__sage_init_sage_0.py in
 <module>()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/polynomial/multi_polynomial_libsingular.so in
 
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
 (sage/rings/polynomial/multi_polynomial_libsingular.cpp:7032)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/polynomial/multi_polynomial.so in
 sage.rings.polynomial.multi_polynomial.MPolynomial._polynomial_
 (sage/rings/polynomial/multi_polynomial.c:3259)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/polynomial/multi_polynomial_libsingular.so in
 
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
 (sage/rings/polynomial/multi_polynomial_libsingular.cpp:7195)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/integer_mod_ring.pyc in __call__(self, x)
     761         """
     762         try:
 --> 763             return integer_mod.IntegerMod(self, x)
     764         except (NotImplementedError, PariError):
     765             raise TypeError, "error coercing to finite field"

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/integer_mod.so in sage.rings.integer_mod.IntegerMod
 (sage/rings/integer_mod.c:2969)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/integer_mod.so in
 sage.rings.integer_mod.IntegerMod_int.__init__
 (sage/rings/integer_mod.c:13984)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
 (sage/structure/parent.c:4241)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:3109)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps._call_ (sage/structure/coerce_maps.c:3000)()

 /home/king/SAGE/sage-4.1/local/lib/python2.6/site-
 packages/sage/rings/integer.so in sage.rings.integer.Integer.__init__
 (sage/rings/integer.c:7009)()

 TypeError: unable to coerce <type 'list'> to an integer
 }}}

 String conversion is fine.
 {{{
 sage: S('y_1*z_2^2*z_1')
 y_1*z_2^2*z_1
 }}}

 I know that there is no coercion between these two rings. However, here we
 have ''conversion''. Conversion should -- as much as I understand -- try
 to make a meaning out of the input, even if the parents do not support
 coercion.

 Therefore I consider this a quite serious bug.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7654>
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