On Fri, May 8, 2009 at 9:23 AM, Kwankyu <ekwan...@gmail.com> wrote:
>
> Hi,
>
> This works:
>
> sage: R.<x,y>=PolynomialRing(QQ,2)
> sage: a=x^2+x*y+y
> sage: a.polynomial(x)
> x^2 + y*x + y
>
> But this does not work:
>
> sage: R.<x,y>=PolynomialRing(GF(5),2)
> sage: a=x^2+x*y+y
> sage: a.polynomial(x)
> Traceback (most recent call last):
> ...
> TypeError: 'tuple' object cannot be interpreted as an index
>
> Perhaps this is a bug. I am using Sage 3.4.2.rc0

I get the same results with the stable sage-3.4.2:

----------------------------------------------------------------------
| Sage Version 3.4.2, Release Date: 2009-05-05                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: R.<x,y>=PolynomialRing(QQ,2)
sage: a=x^2+x*y+y
sage: a.polynomial(x)
x^2 + y*x + y
sage:
sage:
sage: R.<x,y>=PolynomialRing(GF(5),2)
sage: a=x^2+x*y+y
sage: a.polynomial(x)
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', (1314, 0))

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

/home/mvngu/.sage/temp/sage.math.washington.edu/25287/_home_mvngu__sage_init_sage_0.py
in <module>()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial.so
in sage.rings.polynomial.multi_polynomial.MPolynomial.polynomial
(sage/rings/polynomial/multi_polynomial.c:5050)()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/structure/parent.so
in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:4121)()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so
in sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3064)()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so
in sage.structure.coerce_maps._call_
(sage/structure/coerce_maps.c:2955)()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_ring.pyc
in _element_constructor_(self, x, check, is_gen, construct, **kwds)
    310                 x = x.Polrev()
    311
--> 312         return C(self, x, check, is_gen, construct=construct, **kwds)
    313
    314     def is_integral_domain(self):

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_zmod_flint.so
in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint.__init__
(sage/rings/polynomial/polynomial_zmod_flint.c:10716)()

/scratch/mvngu/sage-3.4.2/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_zmod_flint.so
in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_template.__init__
(sage/rings/polynomial/polynomial_zmod_flint.c:5115)()

TypeError: 'tuple' object cannot be interpreted as an index

-- 
Regards
Minh Van Nguyen

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to