AUTHORS:
Apply the Spec functor to .
INPUT:
OUTPUT:
EXAMPLES:
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: TestSuite(X).run(skip=["_test_an_element", "_test_elements", "_test_some_elements"])
Applying Spec twice gives equal but non-identical output:
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 commutative ring:
sage: Spec(5)
Traceback (most recent call last):
...
TypeError: x (=5) is not in Category of commutative rings
sage: Spec(FreeAlgebra(QQ,2, 'x'))
Traceback (most recent call last):
...
TypeError: x (=Free Algebra on 2 generators (x0, x1) over Rational Field) is not in Category of commutative rings
TESTS:
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
sage: Spec(QQ,QQ).base_scheme()
Spectrum of Rational Field
sage: Spec(RDF,QQ).base_scheme()
Spectrum of Rational Field
Bases: sage.categories.functor.Functor, sage.structure.unique_representation.UniqueRepresentation
The Spec functor.