36.3 Spec of a ring

Module: sage.schemes.generic.spec

Spec of a ring

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(QQ)
Spectrum of Rational Field
sage: Spec(PolynomialRing(QQ, 'x'))
Spectrum of Univariate Polynomial Ring in x over Rational Field
sage: Spec(PolynomialRing(QQ, 'x', 3))
Spectrum of Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: X = Spec(PolynomialRing(GF(49,'a'), 3, 'x')); X
Spectrum of Multivariate Polynomial Ring in x0, x1, x2 over Finite Field in
a of size 7^2
sage: loads(X.dumps()) == X
True
sage: A = Spec(ZZ); B = Spec(ZZ)
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(QQ,2, 'x'))
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=None], [check=True])

Functions: coordinate_ring,$ \,$ dimension

coordinate_ring( self)

Return the underlying ring of this scheme.

sage: Spec(QQ).coordinate_ring()
Rational Field
sage: Spec(PolynomialRing(QQ,3, 'x')).coordinate_ring()
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field

dimension( self)

Return the relative dimension of this scheme over its base.

Special Functions: __call__,$ \,$ __init__,$ \,$ _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(QQ) == Spec(QQ)
True
sage: Spec(QQ) == Spec(ZZ)
False
sage: Spec(QQ) == 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.