#4106: error coercing symbolic variable into polynomial ring modulo 4 (but not
mod
3)
---------------------+------------------------------------------------------
Reporter: was | Owner: tbd
Type: defect | Status: new
Priority: minor | Milestone: sage-3.1.3
Component: algebra | Keywords:
---------------------+------------------------------------------------------
Paul Zimmerman reports that one coercion works, and another natural
similar coercion doesn't, as illustrated below:
{{{
x = var('x')
R = IntegerModRing(3)
S = PolynomialRing(R, x)
S(x)
///
x
}}}
{{{
x = var('x')
R = IntegerModRing(4)
S = PolynomialRing(R, x)
S(x)
///
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/wstein/.sage/sage_notebook/worksheets/admin/1/code/22.py",
line 9, in <module>
exec compile(ur'S(x)' + '\n', '', 'single')
File "/home/wstein/sage/local/lib/python2.5/site-
packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>
File "/home/wstein/sage/local/lib/python2.5/site-
packages/sage/rings/polynomial/polynomial_ring.py", line 1097, in __call__
return polynomial_modn_dense_ntl.Polynomial_dense_modn_ntl_zz(self, x,
check, is_gen, construct=construct)
File "polynomial_modn_dense_ntl.pyx", line 574, in
sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_modn_ntl_zz.__init__
(sage/rings/polynomial/polynomial_modn_dense_ntl.cpp:7017)
File "polynomial_modn_dense_ntl.pyx", line 130, in
sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_mod_n.__init__
(sage/rings/polynomial/polynomial_modn_dense_ntl.cpp:3188)
File "/home/wstein/sage/local/lib/python2.5/site-
packages/sage/rings/integer_mod_ring.py", line 617, in __call__
return integer_mod.IntegerMod(self, x)
File "integer_mod.pyx", line 132, in sage.rings.integer_mod.IntegerMod
(sage/rings/integer_mod.c:2187)
File "integer_mod.pyx", line 1430, in
sage.rings.integer_mod.IntegerMod_int.__init__
(sage/rings/integer_mod.c:10773)
File "integer_ring.pyx", line 282, in
sage.rings.integer_ring.IntegerRing_class.__call__
(sage/rings/integer_ring.c:4998)
TypeError: unable to convert x (=x) to an integer
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4106>
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
-~----------~----~----~----~------~----~------~--~---