Opened 10 years ago

# Ideal membership for univariate polynomial

Reported by: Owned by: hivert AlexGhitza major sage-6.4 algebra Ideal, univariate polynomial jakobkroeker N/A wrongAnswerMarker

```sage: R.<x> = PolynomialRing(ZZ)
sage: p, q = 4 + 3*x + x^2, 1 + x^2
sage: I = R.ideal([p, q])
sage: S = R.quotient_ring(I)
sage: S(p) == S(0)
False
```

This is plain wrong !

```sage: p in I
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/tmp/<ipython console> in <module>()

/home/data/Sage-Install/sage-5.6.rc1/local/lib/python2.7/site-packages/sage/rings/ideal.pyc in __contains__(self, x)
316     def __contains__(self, x):
317         try:
--> 318             return self._contains_(self.__ring(x))
319         except TypeError:
320             return False

/home/data/Sage-Install/sage-5.6.rc1/local/lib/python2.7/site-packages/sage/rings/ideal.pyc in _contains_(self, x)
322     def _contains_(self, x):
323         # check if x, which is assumed to be in the ambient ring, is actually in this ideal.
--> 324         raise NotImplementedError
325
326     def __nonzero__(self):

NotImplementedError:
```

Florent

### comment:1 Changed 10 years ago by hivert

• Description modified (diff)

### comment:2 Changed 10 years ago by hivert

I left a todo in #12510 deactivating some generic tests (`TestSuite`) in

```sage/rings/quotient_ring.py
```

Those generic test should be reinstated when this ticket is fixed.

Florent

### comment:3 Changed 9 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:4 Changed 9 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:5 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:6 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4