# [sympy] Quotient rings of polynomial rings over finite fields

```I've been having some trouble working with quotient rings. I can't even
seem to instantiate an element:```
```

import sympy
from sympy.abc import x, yfrom sympy.polys.domains.quotientring import
QuotientRingElement

k = sympy.FF(2)R = FF(2).old_poly_ring(x,y)
I = FF(2).old_poly_ring(x,y).ideal(x**2, x*y, y**2)
S = R/I

X = QuotientRingElement(S, x)
X+X

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python3.6/site-packages/sympy/polys/domains/quotientring.py"
return self.ring(self.data + om.data)
File "/usr/local/lib/python3.6/site-packages/sympy/polys/domains/domain.py"
, line 84, in __call__
return self.new(*args)
File
"/usr/local/lib/python3.6/site-packages/sympy/polys/domains/quotientring.py"
, line 139, in new
a = self.ring(a)
File "/usr/local/lib/python3.6/site-packages/sympy/polys/domains/domain.py"
, line 84, in __call__
return self.new(*args)
File
"/usr/local/lib/python3.6/site-packages/sympy/polys/domains/old_polynomialring.py"
, line 56, in new
return self.dtype(element, self.dom, len(self.gens) - 1, ring=self)
File "/usr/local/lib/python3.6/site-packages/sympy/polys/polyclasses.py",
line 155, in __init__
rep = dmp_ground(dom.convert(rep), lev)
File "/usr/local/lib/python3.6/site-packages/sympy/polys/domains/domain.py"
, line 145, in convert
return self.from_sympy(element)
File
"/usr/local/lib/python3.6/site-packages/sympy/polys/domains/finitefield.py",
line 71, in from_sympy
raise CoercionFailed("expected an integer, got %s" % a)
sympy.polys.polyerrors.CoercionFailed: expected an integer, got 2*x

Is there another idiomatic way I should be doing this? Or are quotients of
polynomial rings over finite fields not well-supported? I was hoping to do
a couple quotients of free modules too...

--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email