Ask Your Question

Weaam's profile - activity

2019-04-18 19:58:01 +0200 received badge  Famous Question (source)
2016-02-12 01:14:18 +0200 received badge  Notable Question (source)
2013-10-23 12:24:31 +0200 received badge  Famous Question (source)
2013-04-15 09:48:57 +0200 received badge  Popular Question (source)
2013-03-29 07:23:51 +0200 received badge  Taxonomist
2012-10-04 16:19:28 +0200 received badge  Notable Question (source)
2012-04-28 02:54:07 +0200 received badge  Popular Question (source)
2011-03-16 13:55:18 +0200 received badge  Student (source)
2011-03-16 12:58:28 +0200 commented answer Prime ideals and "Point on Spectrum"

@niles -- Thanks again for your efforts. I filed the ticked (#10949).

2011-03-15 23:16:03 +0200 received badge  Scholar (source)
2011-03-15 23:16:03 +0200 marked best answer Prime ideals and "Point on Spectrum"

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:

sage: S = Spec(ZZ)
sage: nZ = ZZ.ideal(6)
sage: from sage.schemes.generic.point import SchemeTopologicalPoint_prime_ideal as primept
sage: primept(S,nZ)
Point on Spectrum of Integer Ring defined by the Principal ideal (6) of Integer Ring
sage: primept(S,nZ,check=True)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
...
ValueError: The argument Principal ideal (6) of Integer Ring must be a prime ideal of Integer Ring

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.

2011-03-15 23:16:02 +0200 received badge  Supporter (source)
2011-03-15 23:15:56 +0200 commented answer Prime ideals and "Point on Spectrum"

@John Palmieri. I shouldn't fill a trac ticket then? Thanks for your efforts.

2011-03-15 23:02:16 +0200 commented answer Prime ideals and "Point on Spectrum"

@niles It makes perfect sense now. Thank you.

2011-03-15 16:13:32 +0200 asked a question Prime ideals and "Point on Spectrum"

The spectrum of the ring of integers $\mathbb{Z}$ consists of the prime ideals, i.e. $Spec(\mathbb{Z}) = \cup_{p \space prime}p\mathbb{Z} \cup (0)$.

i1: S = Spec(ZZ)
i2: nZ = ZZ.ideal(6)
i3: S(nZ)
o3: Point on Spectrum of Integer Ring defined by the Principal ideal (6) of Integer Ring

i4: nZ.is_prime()
o4: False

Obviously, nZ is not a prime ideal, as 6 is composite. Hence by definition, it is not in $Spec(\mathbb{Z})$. So what does "Point on Spectrum" means exactly in Sage?

Thanks

2011-03-13 11:01:01 +0200 received badge  Editor (source)
2011-03-13 10:58:43 +0200 asked a question Tensor products in Sage

Computing the tensor product of two matrices A, B is quite straightforward through A.tensor_product(B).

What about computing the tensor product of some field extensions L and K over $\mathbb{Q}$? Or the tensor products of some ring of integers $\mathcal{O}_K$ of a field extension K and $\mathbb{Z}/\mathbb{pZ}$ over $\mathbb{Z}$.

Other instances of tensor product computations in Sage is welcomed, not necessarily as constructive, but illustrative enough to aid in studying Tensor products.