1 answer

Spec means the same thing in Sage that it does everywhere else. It's just that
Spec just doesn't check to see whether its input is a prime ideal: it relies on SchemeTopologicalPoint_prime_ideal: You can tell this because the __call__ method of sage.schemes.generic.spec.Spec is simply

return point.SchemeTopologicalPoint_prime_ideal(self, x)

However SchemeTopologicalPoint_prime_ideal doesn't check to see whether the input ideal is prime either! It does allow an optional argument check which will perform the check, but this is disabled by default. Here is the code from sage.schemes.generic.point.SchemeTopologicalPoint_prime_ideal.__init__:

R = S.coordinate_ring()
from sage.rings.ideal import Ideal
P = Ideal(R, P)
# ideally we would have check=True by default, but
# unfortunately is_prime() is only implemented in a small
# number of cases
if check and not P.is_prime():
raise ValueError, "The argument %s must be a prime ideal of %s"%(P, R)
SchemeTopologicalPoint.__init__(self, S)
self.__P = P

So if you were calling SchemeTopologicalPoint_prime_ideal directly, you could pass check=True to have it check for you:

Unfortunately, the __call__ method of Spec doesn't take a check argument, and it doesn't pass its additional keyword arguments along using **kwds, so there isn't a way to have Spec check for you directly.

To me, this all seems confusing, shoddy, and disappointing; you should file a ticket on Trac for this (if there isn't one already). If you're in a situation where you need this functionality, I would suggest adding a line of code to check whether the ideal is prime before you pass it to Spec.

Comments

If someone is filing a trac ticket about this, then I have two comments: first, note this problem: `Spec(IntegerModRing(9)).an_element()` has output `Point on Spectrum of Ring of integers modulo 9 defined by the Principal ideal (2) of Ring of integers modulo 9`. Second, http://trac.sagemath.org/sage_trac/ticket/10934 is somewhat related.