Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am trying to get Macaulay2 to confirm if $(y+zi,x^2 - z^2 - 1)$ is a prime ideal in $\Bbb{C}[x,y,z]$. Now as a small test, I tried to compute its radical by doing R = CC[x,y,z] and then setting I = ideal (y+z*ii,x^2 - z^2 - 1). However when I put radical I and hit enter I get

error: expected base field to be QQ or ZZ/p

Then I tried instead to set R = RR[x] and I = (x^2 + 1) and set S = R/I[w,z,y]. Then my ideal in the ring S should be (y+z*x,w^2 - z^2 - 1) but when I set J = (y+z*x,w^2-z^2-1) I get:

error: expected pair to have a method for '*'

How can I get Macaulay2 to do this computation for me? I already know that my ideal is prime but I want to get Macaualay2 to do this computation. This is so that in future I can work over general base rings and not just $\Bbb{Q}$ or $\Bbb{Z}/p\Bbb{Z}$.

share|improve this question
And for those uninitiated Maculay2 is a software system for doing algebraic geometry computations. –  Sasha Mar 2 '13 at 15:04

1 Answer 1

up vote 3 down vote accepted

You usually get that error message when you're working in one ring and try to multiply elements in another ring. Try use S, and then J = ideal (y+z*x,w^2-z^2-1).

This code worked for me:

R = QQ[x]
I = ideal(x^2+1)
S = R/I[w,z,y]
J = ideal(y+z*x,w^2-z^2-1)
isPrime J
>> true

Macaulay2 uses Gröbner bases to compute prime ideals and radicals. Because elements of $\mathbb{C}$ are represented as floating point numbers, the algorithms wont work over $\mathbb{C}$.

What you can do, is to do the computation over $\mathbb{Q}$, check that the generators is a Gröbner basis, and check that they (the generators of the ideal) remain irreducible after tensoring with $\mathbb{C}$, if so, then prime over $\mathbb{Q}$ should imply prime over $\mathbb{C}$.

Added: What I ment with the previous paragraph: tensoring with an algebraically closed field can sometimes destroy primeness (for example the ideal $(x^2+1) \subseteq \mathbb{Q}[x]$ is prime, but not after tensoring with $\mathbb{C}$).

However, after thinking about this, I don't know if it is possible to do this in M2 - you really would have to use some kind of tricks to prove primeness over $\mathbb{C}$.

share|improve this answer
Dear Fredrik, thanks for your answer. I get that a Groebner basis for my ideal is $(y - zi,x^2 - z^2 - 1)$. I can probably tensor it with $\Bbb{C}$, but what do you mean "check if they remain irreducible after tensoring with $\Bbb{C}$"? I know that $y+zi$ and $x^2 -z^2 - 1$ are irreducible polynomials over $\Bbb{C}$. –  user38268 Mar 3 '13 at 0:33
@BenjaLim: I've tried to expand my answer in order to explain what I ment. However, after thinking about this, I don't know if there are any algorithms in M2 that can factor over algebraically closed fields. –  Fredrik Meyer Mar 3 '13 at 18:54
Thanks for your answer anyway, I've accepted it. –  user38268 Mar 4 '13 at 6:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.