23.3 Spec of a ring

Module: sage.schemes.generic.spec

Module-level Functions

is_Spec( X)

sage: is_Spec(QQ^3)
False
sage: X = Spec(QQ); X
Spectrum of Rational Field
sage: is_Spec(X)
True

Class: Spec

class Spec
The spectrum of a commutative ring, as a scheme.

Note: Calling Spec(R) twice produces two distinct (but equal) schemes, which is important for gluing to construct more general schemes.

sage: Spec(Q)
Spectrum of Rational Field
sage: Spec(PolynomialRing(Q))
Spectrum of Univariate Polynomial Ring in x over Rational Field
sage: Spec(PolynomialRing(Q, 3))
Spectrum of Polynomial Ring in x0, x1, x2 over Rational Field
sage: X = Spec(PolynomialRing(GF(49), 3)); X
Spectrum of Polynomial Ring in x0, x1, x2 over Finite Field in a of size
7^2
sage: loads(X.dumps()) == X
True
sage: A = Spec(Z); B = Spec(Z)
sage: A is B
False
sage: A == B
True

A TypeError is raised if the input is not a CommutativeRing.

sage: Spec(5)
Traceback (most recent call last):
...
TypeError: R (=5) must be a commutative ring
sage: Spec(FreeAlgebra(Q,2))
Traceback (most recent call last):
...
TypeError: R (=Free Algebra on 2 generators (x0, x1) over Rational Field)
must be a commutative ring

sage: X = Spec(ZZ)
sage: X
Spectrum of Integer Ring
sage: X.base_scheme()
Spectrum of Integer Ring
sage: X.base_ring()
Integer Ring
sage: X.dimension()
1
Spec( self, R, [S=True], [check=None])

Functions: coordinate_ring,$  $ dimension

coordinate_ring( self)

Return the underlying ring of this scheme.

sage: Spec(Q).coordinate_ring()
Rational Field
sage: Spec(PolynomialRing(Q,3)).coordinate_ring()
Polynomial Ring in x0, x1, x2 over Rational Field

dimension( self)

Return the relative dimension of this scheme over its base.

Special Functions: __call__,$  $ _cmp_,$  $ _repr_

__call__( self, x)

Create a point of this scheme.

_cmp_( self, X)

Anything that is not a Spec is less than X. Spec's are compared with self using comparison of the underlying rings.

sage: Spec(Q) == Spec(Q)
True
sage: Spec(Q) == Spec(ZZ)
False
sage: Spec(Q) == 5
False
sage: Spec(GF(5)) < Spec(GF(7))
True
sage: Spec(GF(7)) < Spec(GF(5))
False

See About this document... for information on suggesting changes.