# Checking an ideal over $\overline{\mathbb Q}$ for primality

I'm trying to check an ideal in a multivariate polynomial ring over $\overline{\mathbb Q}$ for primality.

Using just a single variable, I can type

```
R.<x> = PolynomialRing(QQ.algebraic_closure())
print Ideal([x^2+2]).is_prime()
```

and Sage tells me that $\langle x^2+2\rangle$ is not prime in $\overline{\mathbb Q}[x]$, as expected.

However, as soon as I add another variable, e.g. `R.<x,y> = ...`

I get the following output:

verbose 0 (3539: multi_polynomial_ideal.py, groebner_basis) Warning: falling back to very slow toy implementation. --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-8-c0542a5be0f8> in <module>() ----> 1 print Ideal([x**Integer(2)+Integer(2)]).is_prime() /opt/sage-6.4.beta4/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in is_prime(self, **kwds) 1265 if not self.ring().base_ring().is_field(): 1266 raise NotImplementedError -> 1267 CPD = self.complete_primary_decomposition(**kwds) 1268 if len(CPD) != 1: 1269 return False /opt/sage-6.4.beta4/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in __call__(self, *args, **kwds) 602 if not R.base_ring().is_field(): 603 raise ValueError("Coefficient ring must be a field for function '%s'."%(self.f.__name__)) --> 604 return self.f(self._instance, *args, **kwds) 605 606 require_field = RequireField /opt/sage-6.4.beta4/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in wrapper(*args, **kwds) 503 """ 504 with LibSingularDefaultContext(): --> 505 return func(*args, **kwds) 506 return wrapper 507 /opt/sage-6.4.beta4/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in complete_primary_decomposition(self, algorithm) 1079 if algorithm == 'sy': 1080 primdecSY = sage.libs.singular.ff.primdec__lib.primdecSY -> 1081 P = primdecSY(self) 1082 elif algorithm == 'gtz': 1083 primdecGTZ = sage.libs.singular.ff.primdec__lib.primdecGTZ /opt/sage-6.4.beta4/local/lib/python2.7/site-packages/sage/libs/singular/function.so in sage.libs.singular.function.SingularFunction.__call__ (build/cythonized/sage/libs/singular/function.cpp:13788)() TypeError: Cannot call Singular function 'primdecSY' with ring parameter of type '<class 'sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_polydict_domain_with_category'>'

Is there a way to work around this or is there really no implementation for primality checks in $\overline{\mathbb Q}[x_1,\dots,x_n]$?