AUTHORS:
Bases: sage.structure.unique_representation.UniqueRepresentation, sage.schemes.generic.scheme.Scheme
Class for general affine schemes.
TESTS:
sage: from sage.schemes.generic.scheme import AffineScheme
sage: A = QQ['t']
sage: X_abs = AffineScheme(A); X_abs
Spectrum of Univariate Polynomial Ring in t over Rational Field
sage: X_rel = AffineScheme(A, QQ); X_rel
Spectrum of Univariate Polynomial Ring in t over Rational Field
sage: X_abs == X_rel
False
sage: X_abs.base_ring()
Integer Ring
sage: X_rel.base_ring()
Rational Field
See also
For affine spaces over a base ring and subschemes thereof, see sage.schemes.generic.algebraic_scheme.AffineSpace.
alias of SchemeTopologicalPoint_prime_ideal
Extend the base ring/scheme.
INPUT:
EXAMPLES:
sage: Spec_ZZ = Spec(ZZ); Spec_ZZ
Spectrum of Integer Ring
sage: Spec_ZZ.base_extend(QQ)
Spectrum of Rational Field
Return the underlying ring of this scheme.
OUTPUT:
A commutative ring.
EXAMPLES:
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
Return the absolute dimension of this scheme.
OUTPUT:
Integer.
EXAMPLES:
sage: S = Spec(ZZ)
sage: S.dimension_absolute()
1
sage: S.dimension()
1
Return the absolute dimension of this scheme.
OUTPUT:
Integer.
EXAMPLES:
sage: S = Spec(ZZ)
sage: S.dimension_absolute()
1
sage: S.dimension()
1
Return the relative dimension of this scheme over its base.
OUTPUT:
Integer.
EXAMPLES:
sage: S = Spec(ZZ)
sage: S.dimension_relative()
0
Return the scheme morphism from self to Y defined by x.
INPUT:
OUTPUT:
The scheme morphism from self to Y defined by x.
EXAMPLES:
We construct the inclusion from into
induced by the inclusion from
into
:
sage: X = Spec(QQ)
sage: X.hom(ZZ.hom(QQ))
Affine Scheme morphism:
From: Spectrum of Rational Field
To: Spectrum of Integer Ring
Defn: Ring Coercion morphism:
From: Integer Ring
To: Rational Field
TESTS:
We can construct a morphism to an affine curve (trac ticket #7956):
sage: S.<p,q> = QQ[]
sage: A1.<r> = AffineSpace(QQ,1)
sage: A1_emb = Curve(p-2)
sage: A1.hom([2,r],A1_emb)
Scheme morphism:
From: Affine Space of dimension 1 over Rational Field
To: Affine Curve over Rational Field defined by p - 2
Defn: Defined on coordinates by sending (r) to
(2, r)
Return True if self is Noetherian, False otherwise.
EXAMPLES:
sage: Spec(ZZ).is_noetherian()
True
Bases: sage.structure.parent.Parent
The base class for all schemes.
INPUT:
EXAMPLES:
sage: from sage.schemes.generic.scheme import Scheme
sage: Scheme(ZZ)
<class 'sage.schemes.generic.scheme.Scheme_with_category'>
A scheme is in the category of all schemes over its base:
sage: ProjectiveSpace(4, QQ).category()
Category of schemes over Rational Field
There is a special and unique that is the default base
scheme:
sage: Spec(ZZ).base_scheme() is Spec(QQ).base_scheme()
True
Extend the base of the scheme.
Derived clases must override this method.
EXAMPLES:
sage: from sage.schemes.generic.scheme import Scheme
sage: X = Scheme(ZZ)
sage: X.base_scheme()
Spectrum of Integer Ring
sage: X.base_extend(QQ)
Traceback (most recent call last):
...
NotImplementedError
Return the structure morphism from self to its base scheme.
OUTPUT:
A scheme morphism.
EXAMPLES:
sage: A = AffineSpace(4, QQ)
sage: A.base_morphism()
Scheme morphism:
From: Affine Space of dimension 4 over Rational Field
To: Spectrum of Rational Field
Defn: Structure map
sage: X = Spec(QQ)
sage: X.base_morphism()
Scheme morphism:
From: Spectrum of Rational Field
To: Spectrum of Integer Ring
Defn: Structure map
Return the base ring of the scheme self.
OUTPUT:
A commutative ring.
EXAMPLES:
sage: A = AffineSpace(4, QQ)
sage: A.base_ring()
Rational Field
sage: X = Spec(QQ)
sage: X.base_ring()
Integer Ring
Return the base scheme.
OUTPUT:
A scheme.
EXAMPLES:
sage: A = AffineSpace(4, QQ)
sage: A.base_scheme()
Spectrum of Rational Field
sage: X = Spec(QQ)
sage: X.base_scheme()
Spectrum of Integer Ring
Return the coordinate ring.
OUTPUT:
The global coordinate ring of this scheme, if defined. Otherwise raise a ValueError.
EXAMPLES:
sage: R.<x, y> = QQ[]
sage: I = (x^2 - y^2)*R
sage: X = Spec(R.quotient(I))
sage: X.coordinate_ring()
Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x^2 - y^2)
Count points over finite fields.
INPUT:
OUTPUT:
An integer. The number of points over on a scheme over a finite field
.
Note
This is currently only implemented for schemes over prime order finite fields.
EXAMPLES:
sage: P.<x> = PolynomialRing(GF(3))
sage: C = HyperellipticCurve(x^3+x^2+1)
sage: C.count_points(4)
[6, 12, 18, 96]
sage: C.base_extend(GF(9,'a')).count_points(2)
[12, 96]
Return the absolute dimension of this scheme.
OUTPUT:
Integer.
EXAMPLES:
sage: R.<x, y> = QQ[]
sage: I = (x^2 - y^2)*R
sage: X = Spec(R.quotient(I))
sage: X.dimension_absolute()
Traceback (most recent call last):
...
NotImplementedError
sage: X.dimension()
Traceback (most recent call last):
...
NotImplementedError
Return the absolute dimension of this scheme.
OUTPUT:
Integer.
EXAMPLES:
sage: R.<x, y> = QQ[]
sage: I = (x^2 - y^2)*R
sage: X = Spec(R.quotient(I))
sage: X.dimension_absolute()
Traceback (most recent call last):
...
NotImplementedError
sage: X.dimension()
Traceback (most recent call last):
...
NotImplementedError
Return the relative dimension of this scheme over its base.
OUTPUT:
Integer.
EXAMPLES:
sage: R.<x, y> = QQ[]
sage: I = (x^2 - y^2)*R
sage: X = Spec(R.quotient(I))
sage: X.dimension_relative()
Traceback (most recent call last):
...
NotImplementedError
Return the scheme morphism from self to Y defined by x.
INPUT:
OUTPUT:
The scheme morphism from self to Y defined by x.
EXAMPLES:
sage: P = ProjectiveSpace(ZZ, 3)
sage: P.hom(Spec(ZZ))
Scheme morphism:
From: Projective Space of dimension 3 over Integer Ring
To: Spectrum of Integer Ring
Defn: Structure map
Return the identity morphism.
OUTPUT:
The identity morphism of the scheme self.
EXAMPLES:
sage: X = Spec(QQ)
sage: X.identity_morphism()
Scheme endomorphism of Spectrum of Rational Field
Defn: Identity map
Create a point.
INPUT:
OUTPUT:
A point of the scheme.
EXAMPLES:
sage: A2 = AffineSpace(QQ,2)
sage: A2.point([4,5])
(4, 5)
sage: R.<t> = PolynomialRing(QQ)
sage: E = EllipticCurve([t + 1, t, t, 0, 0])
sage: E.point([0, 0])
(0 : 0 : 1)
Return the set of S-valued points of this scheme.
INPUT:
OUTPUT:
The set of morphisms .
EXAMPLES:
sage: P = ProjectiveSpace(ZZ, 3)
sage: P.point_homset(ZZ)
Set of rational points of Projective Space of dimension 3 over Integer Ring
sage: P.point_homset(QQ)
Set of rational points of Projective Space of dimension 3 over Rational Field
sage: P.point_homset(GF(11))
Set of rational points of Projective Space of dimension 3 over
Finite Field of size 11
TESTS:
sage: P = ProjectiveSpace(QQ,3)
sage: P.point_homset(GF(11))
Traceback (most recent call last):
...
ValueError: There must be a natural map S --> R, but
S = Rational Field and R = Finite Field of size 11
Return the set of S-valued points of this scheme.
INPUT:
OUTPUT:
The set of morphisms .
EXAMPLES:
sage: P = ProjectiveSpace(ZZ, 3)
sage: P.point_homset(ZZ)
Set of rational points of Projective Space of dimension 3 over Integer Ring
sage: P.point_homset(QQ)
Set of rational points of Projective Space of dimension 3 over Rational Field
sage: P.point_homset(GF(11))
Set of rational points of Projective Space of dimension 3 over
Finite Field of size 11
TESTS:
sage: P = ProjectiveSpace(QQ,3)
sage: P.point_homset(GF(11))
Traceback (most recent call last):
...
ValueError: There must be a natural map S --> R, but
S = Rational Field and R = Finite Field of size 11
Return the structure morphism from self to its base scheme.
OUTPUT:
A scheme morphism.
EXAMPLES:
sage: A = AffineSpace(4, QQ)
sage: A.base_morphism()
Scheme morphism:
From: Affine Space of dimension 4 over Rational Field
To: Spectrum of Rational Field
Defn: Structure map
sage: X = Spec(QQ)
sage: X.base_morphism()
Scheme morphism:
From: Spectrum of Rational Field
To: Spectrum of Integer Ring
Defn: Structure map
Return the disjoint union of the schemes self and X.
EXAMPLES:
sage: S = Spec(QQ)
sage: X = AffineSpace(1, QQ)
sage: S.union(X)
Traceback (most recent call last):
...
NotImplementedError
Return the zeta series.
Compute a power series approximation to the zeta function of a scheme over a finite field.
INPUT:
OUTPUT:
A power series approximating the zeta function of self
EXAMPLES:
sage: P.<x> = PolynomialRing(GF(3))
sage: C = HyperellipticCurve(x^3+x^2+1)
sage: R.<t> = PowerSeriesRing(Integers())
sage: C.zeta_series(4,t)
1 + 6*t + 24*t^2 + 78*t^3 + 240*t^4 + O(t^5)
sage: (1+2*t+3*t^2)/(1-t)/(1-3*t) + O(t^5)
1 + 6*t + 24*t^2 + 78*t^3 + 240*t^4 + O(t^5)
Note that this function depends on count_points, which is only defined for prime order fields for general schemes. Nonetheless, since trac ticket #15108 and trac ticket #15148, it supports hyperelliptic curves over non-prime fields:
sage: C.base_extend(GF(9,'a')).zeta_series(4,t)
1 + 12*t + 120*t^2 + 1092*t^3 + 9840*t^4 + O(t^5)
Return True if is an affine scheme.
EXAMPLES:
sage: from sage.schemes.generic.scheme import is_AffineScheme
sage: is_AffineScheme(5)
False
sage: E = Spec(QQ)
sage: is_AffineScheme(E)
True