Algebraic schemes¶
An algebraic scheme is defined by a set of polynomials in some suitable affine or projective coordinates. Possible ambient spaces are
- Affine spaces (
AffineSpace
),- Projective spaces (
ProjectiveSpace
), or- Toric varieties (
ToricVariety
).
Note that while projective spaces are of course toric varieties themselves, they are implemented differently in Sage due to efficiency considerations. You still can create a projective space as a toric variety if you wish.
In the following, we call the corresponding subschemes affine algebraic schemes, projective algebraic schemes, or toric algebraic schemes. In the future other ambient spaces, perhaps by means of gluing relations, may be intoduced.
Generally, polynomials \(p_0, p_1, \dots, p_n\) define an ideal \(I=\left<p_0, p_1, \dots, p_n\right>\). In the projective and toric case, the polynomials (and, therefore, the ideal) must be homogeneous. The associated subscheme \(V(I)\) of the ambient space is, roughly speaking, the subset of the ambient space on which all polynomials vanish simultaneously.
Warning
You should not construct algebraic scheme objects directly. Instead, use
.subscheme()
methods of ambient spaces. See below for examples.
EXAMPLES:
We first construct the ambient space, here the affine space \(\QQ^2\):
sage: A2 = AffineSpace(2, QQ, 'x, y')
sage: A2.coordinate_ring().inject_variables()
Defining x, y
Now we can write polynomial equations in the variables \(x\) and \(y\). For example, one equation cuts out a curve (a one-dimensional subscheme):
sage: V = A2.subscheme([x^2+y^2-1]); V
Closed subscheme of Affine Space of dimension 2
over Rational Field defined by:
x^2 + y^2 - 1
sage: V.dimension()
1
Here is a more complicated example in a projective space:
sage: P3 = ProjectiveSpace(3, QQ, 'x')
sage: P3.inject_variables()
Defining x0, x1, x2, x3
sage: Q = matrix([[x0, x1, x2], [x1, x2, x3]]).minors(2); Q
[-x1^2 + x0*x2, -x1*x2 + x0*x3, -x2^2 + x1*x3]
sage: twisted_cubic = P3.subscheme(Q)
sage: twisted_cubic
Closed subscheme of Projective Space of dimension 3
over Rational Field defined by:
-x1^2 + x0*x2,
-x1*x2 + x0*x3,
-x2^2 + x1*x3
sage: twisted_cubic.dimension()
1
Note that there are 3 equations in the 3-dimensional ambient space, yet the subscheme is 1-dimensional. One can show that it is not possible to eliminate any of the equations, that is, the twisted cubic is not a complete intersection of two polynomial equations.
Let us look at one affine patch, for example the one where \(x_0=1\)
sage: patch = twisted_cubic.affine_patch(0)
sage: patch
Closed subscheme of Affine Space of dimension 3
over Rational Field defined by:
-x0^2 + x1,
-x0*x1 + x2,
-x1^2 + x0*x2
sage: patch.embedding_morphism()
Scheme morphism:
From: Closed subscheme of Affine Space of dimension 3
over Rational Field defined by:
-x0^2 + x1,
-x0*x1 + x2,
-x1^2 + x0*x2
To: Closed subscheme of Projective Space of dimension 3
over Rational Field defined by:
x1^2 - x0*x2,
x1*x2 - x0*x3,
x2^2 - x1*x3
Defn: Defined on coordinates by sending (x0, x1, x2) to
(1 : x0 : x1 : x2)
AUTHORS:
- David Kohel (2005): initial version.
- William Stein (2005): initial version.
- Andrey Novoseltsev (2010-05-17): subschemes of toric varieties.
- Volker Braun (2010-12-24): documentation of schemes and refactoring. Added coordinate neighborhoods and is_smooth()
- Ben Hutz (2014): subschemes of Cartesian products of projective space
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme
(A)¶ Bases:
sage.schemes.generic.scheme.Scheme
An algebraic scheme presented as a subscheme in an ambient space.
This is the base class for all algebraic schemes, that is, schemes defined by equations in affine, projective, or toric ambient spaces.
-
ambient_space
()¶ Return the ambient space of this algebraic scheme.
EXAMPLES:
sage: A.<x, y> = AffineSpace(2, GF(5)) sage: S = A.subscheme([]) sage: S.ambient_space() Affine Space of dimension 2 over Finite Field of size 5 sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([x-y, x-z]) sage: S.ambient_space() is P True
-
coordinate_ring
()¶ Return the coordinate ring of this algebraic scheme. The result is cached.
OUTPUT:
The coordinate ring. Usually a polynomial ring, or a quotient thereof.
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([x-y, x-z]) sage: S.coordinate_ring() Quotient of Multivariate Polynomial Ring in x, y, z over Integer Ring by the ideal (x - y, x - z)
-
embedding_center
()¶ Return the distinguished point, if there is any.
If the scheme \(Y\) was constructed as a neighbourhood of a point \(p \in X\), then
embedding_morphism()
returns a local isomorphism \(f:Y\to X\) around the preimage point \(f^{-1}(p)\). The latter is returned byembedding_center()
.OUTPUT:
A point of
self
. RaisesAttributeError
if there is no distinguished point, depending on howself
was constructed.EXAMPLES:
sage: P3.<w,x,y,z> = ProjectiveSpace(QQ,3) sage: X = P3.subscheme( (w^2-x^2)*(y^2-z^2) ) sage: p = [1,-1,3,4] sage: nbhd = X.neighborhood(p); nbhd Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x0^2*x2^2 - x1^2*x2^2 + 6*x0^2*x2 - 6*x1^2*x2 + 2*x0*x2^2 + 2*x1*x2^2 - 7*x0^2 + 7*x1^2 + 12*x0*x2 + 12*x1*x2 - 14*x0 - 14*x1 sage: nbhd.embedding_center() (0, 0, 0) sage: nbhd.embedding_morphism()(nbhd.embedding_center()) (1/4 : -1/4 : 3/4 : 1) sage: nbhd.embedding_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x0^2*x2^2 - x1^2*x2^2 + 6*x0^2*x2 - 6*x1^2*x2 + 2*x0*x2^2 + 2*x1*x2^2 - 7*x0^2 + 7*x1^2 + 12*x0*x2 + 12*x1*x2 - 14*x0 - 14*x1 To: Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: w^2*y^2 - x^2*y^2 - w^2*z^2 + x^2*z^2 Defn: Defined on coordinates by sending (x0, x1, x2) to (x0 + 1 : x1 - 1 : x2 + 3 : 4)
-
embedding_morphism
()¶ Return the default embedding morphism of
self
.If the scheme \(Y\) was constructed as a neighbourhood of a point \(p \in X\), then
embedding_morphism()
returns a local isomorphism \(f:Y\to X\) around the preimage point \(f^{-1}(p)\). The latter is returned byembedding_center()
.If the algebraic scheme \(Y\) was not constructed as a neighbourhood of a point, then the embedding in its
ambient_space()
is returned.OUTPUT:
A scheme morphism whose
domain()
isself
.- By default, it is the tautological embedding into its own
ambient space
ambient_space()
. - If the algebraic scheme (which itself is a subscheme of an
auxiliary
ambient_space()
) was constructed as a patch or neighborhood of a point then the embedding is the embedding into the original scheme. - A
NotImplementedError
is raised if the construction of the embedding morphism is not implemented yet.
EXAMPLES:
sage: A2.<x,y> = AffineSpace(QQ,2) sage: C = A2.subscheme(x^2+y^2-1) sage: C.embedding_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^2 + y^2 - 1 To: Affine Space of dimension 2 over Rational Field Defn: Defined on coordinates by sending (x, y) to (x, y) sage: P1xP1.<x,y,u,v> = toric_varieties.P1xP1() sage: P1 = P1xP1.subscheme(x-y) sage: P1.embedding_morphism() Scheme morphism: From: Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: x - y To: 2-d CPR-Fano toric variety covered by 4 affine patches Defn: Defined on coordinates by sending [x : y : u : v] to [y : y : u : v]
So far, the embedding was just in the own ambient space. Now a bit more interesting examples:
sage: P2.<x,y,z> = ProjectiveSpace(QQ,2) sage: X = P2.subscheme((x^2-y^2)*z) sage: p = (1,1,0) sage: nbhd = X.neighborhood(p) sage: nbhd Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: -x0^2*x1 - 2*x0*x1
Note that \(p=(1,1,0)\) is a singular point of \(X\). So the neighborhood of \(p\) is not just affine space. The :meth:neighborhood` method returns a presentation of the neighborhood as a subscheme of an auxiliary 2-dimensional affine space:
sage: nbhd.ambient_space() Affine Space of dimension 2 over Rational Field
But its
embedding_morphism()
is not into this auxiliary affine space, but the original subscheme \(X\):sage: nbhd.embedding_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: -x0^2*x1 - 2*x0*x1 To: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2*z - y^2*z Defn: Defined on coordinates by sending (x0, x1) to (1 : x0 + 1 : x1)
A couple more examples:
sage: patch1 = P1xP1.affine_patch(1) sage: patch1 2-d affine toric variety sage: patch1.embedding_morphism() Scheme morphism: From: 2-d affine toric variety To: 2-d CPR-Fano toric variety covered by 4 affine patches Defn: Defined on coordinates by sending [y : u] to [1 : y : u : 1] sage: subpatch = P1.affine_patch(1) sage: subpatch Closed subscheme of 2-d affine toric variety defined by: -y + 1 sage: subpatch.embedding_morphism() Scheme morphism: From: Closed subscheme of 2-d affine toric variety defined by: -y + 1 To: Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: x - y Defn: Defined on coordinates by sending [y : u] to [1 : y : u : 1]
- By default, it is the tautological embedding into its own
ambient space
-
is_projective
()¶ Return True if self is presented as a subscheme of an ambient projective space.
OUTPUT:
Boolean.
EXAMPLES:
sage: PP.<x,y,z,w> = ProjectiveSpace(3,QQ) sage: f = x^3 + y^3 + z^3 + w^3 sage: R = f.parent() sage: I = [f] + [f.derivative(zz) for zz in PP.gens()] sage: V = PP.subscheme(I) sage: V.is_projective() True sage: AA.<x,y,z,w> = AffineSpace(4,QQ) sage: V = AA.subscheme(I) sage: V.is_projective() False
Note that toric varieties are implemented differently than projective spaces. This is why this method returns
False
for toric varieties:sage: PP.<x,y,z,w> = toric_varieties.P(3) sage: V = PP.subscheme(x^3 + y^3 + z^3 + w^3) sage: V.is_projective() False
-
ngens
()¶ Return the number of generators of the ambient space of this algebraic scheme.
EXAMPLES:
sage: A.<x, y> = AffineSpace(2, GF(5)) sage: S = A.subscheme([]) sage: S.ngens() 2 sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([x-y, x-z]) sage: P.ngens() 3
-
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_quasi
(X, Y)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme
The quasi-affine or quasi-projective scheme \(X - Y\), where \(X\) and \(Y\) are both closed subschemes of a common ambient affine or projective space.
Warning
You should not create objects of this class directly. The preferred method to construct such subschemes is to use
complement()
method of algebraic schemes.OUTPUT:
An instance of
AlgebraicScheme_quasi
.EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([]) sage: T = P.subscheme([x-y]) sage: T.complement(S) Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring, where X is defined by: (no polynomials) and Y is defined by: x - y
-
X
()¶ Return the scheme \(X\) such that self is represented as \(X - Y\).
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([]) sage: T = P.subscheme([x-y]) sage: U = T.complement(S) sage: U.X() is S True
-
Y
()¶ Return the scheme \(Y\) such that self is represented as \(X - Y\).
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([]) sage: T = P.subscheme([x-y]) sage: U = T.complement(S) sage: U.Y() is T True
-
rational_points
(F=None, bound=0)¶ Return the set of rational points on this algebraic scheme over the field \(F\).
EXAMPLES:
sage: A.<x, y> = AffineSpace(2, GF(7)) sage: S = A.subscheme([x^2-y]) sage: T = A.subscheme([x-y]) sage: U = T.complement(S) sage: U.rational_points() [(2, 4), (3, 2), (4, 2), (5, 4), (6, 1)] sage: U.rational_points(GF(7^2, 'b')) [(2, 4), (3, 2), (4, 2), (5, 4), (6, 1), (b, b + 4), (b + 1, 3*b + 5), (b + 2, 5*b + 1), (b + 3, 6), (b + 4, 2*b + 6), (b + 5, 4*b + 1), (b + 6, 6*b + 5), (2*b, 4*b + 2), (2*b + 1, b + 3), (2*b + 2, 5*b + 6), (2*b + 3, 2*b + 4), (2*b + 4, 6*b + 4), (2*b + 5, 3*b + 6), (2*b + 6, 3), (3*b, 2*b + 1), (3*b + 1, b + 2), (3*b + 2, 5), (3*b + 3, 6*b + 3), (3*b + 4, 5*b + 3), (3*b + 5, 4*b + 5), (3*b + 6, 3*b + 2), (4*b, 2*b + 1), (4*b + 1, 3*b + 2), (4*b + 2, 4*b + 5), (4*b + 3, 5*b + 3), (4*b + 4, 6*b + 3), (4*b + 5, 5), (4*b + 6, b + 2), (5*b, 4*b + 2), (5*b + 1, 3), (5*b + 2, 3*b + 6), (5*b + 3, 6*b + 4), (5*b + 4, 2*b + 4), (5*b + 5, 5*b + 6), (5*b + 6, b + 3), (6*b, b + 4), (6*b + 1, 6*b + 5), (6*b + 2, 4*b + 1), (6*b + 3, 2*b + 6), (6*b + 4, 6), (6*b + 5, 5*b + 1), (6*b + 6, 3*b + 5)]
-
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme
(A, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme
An algebraic scheme presented as a closed subscheme is defined by explicit polynomial equations. This is as opposed to a general scheme, which could, e.g., be the Neron model of some object, and for which we do not want to give explicit equations.
INPUT:
A
- ambient space (e.g. affine or projective \(n\)-space)polynomials
- single polynomial, ideal or iterable of defining- polynomials; in any case polynomials must belong to the coordinate ring of the ambient space and define valid polynomial functions (e.g. they should be homogeneous in the case of a projective space)
OUTPUT:
- algebraic scheme
EXAMPLES:
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme sage: P.<x, y, z> = ProjectiveSpace(2, QQ) sage: P.subscheme([x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z sage: AlgebraicScheme_subscheme(P, [x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z
-
Jacobian
()¶ Return the Jacobian ideal.
This is the ideal generated by
- the \(d\times d\) minors of the Jacobian matrix, where \(d\) is
the
codimension()
of the algebraic scheme, and - the defining polynomials of the algebraic scheme. Note that some authors do not include these in the definition of the Jacobian ideal. An example of a reference that does include the defining equations is [LazarsfeldJacobian].
OUTPUT:
An ideal in the coordinate ring of the ambient space.
REFERENCES:
[LazarsfeldJacobian] Robert Lazarsfeld: Positivity in algebraic geometry II; Positivity for Vector Bundles, and Multiplier Ideals, page 181. EXAMPLES:
sage: P3.<w,x,y,z> = ProjectiveSpace(3, QQ) sage: twisted_cubic = P3.subscheme(matrix([[w, x, y],[x, y, z]]).minors(2)) sage: twisted_cubic.Jacobian() Ideal (-x^2 + w*y, -x*y + w*z, -y^2 + x*z, x*z, -2*w*z, w*y, 3*w*y, -2*w*x, w^2, y*z, -2*x*z, w*z, 3*w*z, -2*w*y, w*x, z^2, -2*y*z, x*z, 3*x*z, -2*w*z, w*y) of Multivariate Polynomial Ring in w, x, y, z over Rational Field sage: twisted_cubic.defining_ideal() Ideal (-x^2 + w*y, -x*y + w*z, -y^2 + x*z) of Multivariate Polynomial Ring in w, x, y, z over Rational Field
This example addresses ticket trac ticket #20512:
sage: X = P3.subscheme([]) sage: X.Jacobian() == P3.coordinate_ring().unit_ideal() True
- the \(d\times d\) minors of the Jacobian matrix, where \(d\) is
the
-
Jacobian_matrix
()¶ Return the matrix \(\frac{\partial f_i}{\partial x_j}\) of (formal) partial derivatives.
OUTPUT:
A matrix of polynomials.
EXAMPLES:
sage: P3.<w,x,y,z> = ProjectiveSpace(3, QQ) sage: twisted_cubic = P3.subscheme(matrix([[w, x, y],[x, y, z]]).minors(2)) sage: twisted_cubic.Jacobian_matrix() [ y -2*x w 0] [ z -y -x w] [ 0 z -2*y x]
This example addresses ticket trac ticket #20512:
sage: X = P3.subscheme([]) sage: X.Jacobian_matrix().base_ring() == P3.coordinate_ring() True
-
base_extend
(R)¶ Return the base change to the ring \(R\) of this scheme.
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, GF(11)) sage: S = P.subscheme([x^2-y*z]) sage: S.base_extend(GF(11^2, 'b')) Closed subscheme of Projective Space of dimension 2 over Finite Field in b of size 11^2 defined by: x^2 - y*z sage: S.base_extend(ZZ) Traceback (most recent call last): ... ValueError: no natural map from the base ring (=Finite Field of size 11) to R (=Integer Ring)!
-
change_ring
(R)¶ Returns a new algebraic subscheme which is this subscheme coerced to
R
.INPUT:
R
– ring or morphism.
OUTPUT:
- A new algebraic subscheme which is this subscheme coerced to
R
.
EXAMPLES:
sage: P.<x,y> = ProjectiveSpace(QQ, 1) sage: X = P.subscheme([3*x^2-y^2]) sage: H = Hom(X,X) sage: X.change_ring(GF(3)) Closed subscheme of Projective Space of dimension 1 over Finite Field of size 3 defined by: -y^2
sage: K.<w> = QuadraticField(2) sage: R.<z> = K[] sage: L.<v> = K.extension(z^3-5) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: X = P.subscheme(x - w*y) sage: X.change_ring(L) Closed subscheme of Projective Space of dimension 1 over Number Field in v with defining polynomial z^3 - 5 over its base field defined by: x + (-w)*y
sage: K.<w> = QuadraticField(2) sage: R.<z> = K[] sage: L.<v> = K.extension(z^3-5) sage: P.<x,y,z> = AffineSpace(L,3) sage: X = P.subscheme([x-w*y, z^2-v*x]) sage: emb = L.embeddings(QQbar) sage: X.change_ring(emb[0]) Closed subscheme of Affine Space of dimension 3 over Algebraic Field defined by: x + (-1.414213562373095? + 0.?e-16*I)*y, z^2 + (0.8549879733383485? + 1.480882609682365?*I)*x
sage: K.<w> = QuadraticField(2) sage: R.<z> = K[] sage: L.<v> = K.extension(z^3-5) sage: P.<x,y,z> = AffineSpace(L,3) sage: X = P.subscheme([x-w*y, z^2-v*x]) sage: emb = L.embeddings(QQbar) sage: X.change_ring(emb[1]) Closed subscheme of Affine Space of dimension 3 over Algebraic Field defined by: x + (-1.414213562373095? + 0.?e-16*I)*y, z^2 + (0.8549879733383485? - 1.480882609682365?*I)*x
sage: K.<w> = QuadraticField(-3) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: X = P.subscheme(x-w*y) sage: X.change_ring(CC) Closed subscheme of Projective Space of dimension 1 over Complex Field with 53 bits of precision defined by: x + (-1.73205080756888*I)*y
sage: K.<w> = QuadraticField(3) sage: P.<x,y> = ProjectiveSpace(K,1) sage: X = P.subscheme(x-w*y) sage: X.change_ring(RR) Closed subscheme of Projective Space of dimension 1 over Real Field with 53 bits of precision defined by: x - 1.73205080756888*y
sage: K.<v> = CyclotomicField(7) sage: O = K.maximal_order() sage: P.<x,y> = ProjectiveSpace(O, 1) sage: X = P.subscheme([x^2+O(v)*y^2]) sage: X.change_ring(CC) Closed subscheme of Projective Space of dimension 1 over Complex Field with 53 bits of precision defined by: x^2 + (0.623489801858734 + 0.781831482468030*I)*y^2 sage: X.change_ring(K).change_ring(K.embeddings(QQbar)[0]) Closed subscheme of Projective Space of dimension 1 over Algebraic Field defined by: x^2 + (-0.9009688679024191? - 0.4338837391175581?*I)*y^2
sage: R.<x> = QQ[] sage: f = x^6-2 sage: L.<b> = NumberField(f, embedding=f.roots(CC)[2][0]) sage: A.<x,y> = AffineSpace(L, 2) sage: H = Hom(A,A) sage: X = A.subscheme([b*x^2, y^2]) sage: X.change_ring(CC) Closed subscheme of Affine Space of dimension 2 over Complex Field with 53 bits of precision defined by: (-0.561231024154687 - 0.972080648619833*I)*x^2, y^2
-
codimension
()¶ Return the codimension of the algebraic subscheme.
OUTPUT:
Integer.
EXAMPLES:
sage: PP.<x,y,z,w,v> = ProjectiveSpace(4,QQ) sage: V = PP.subscheme(x*y) sage: V.codimension() 1 sage: V.dimension() 3
-
complement
(other=None)¶ Return the scheme-theoretic complement other - self, where self and other are both closed algebraic subschemes of the same ambient space.
If other is unspecified, it is taken to be the ambient space of self.
EXAMPLES:
sage: A.<x, y, z> = AffineSpace(3, ZZ) sage: X = A.subscheme([x+y-z]) sage: Y = A.subscheme([x-y+z]) sage: Y.complement(X) Quasi-affine subscheme X - Y of Affine Space of dimension 3 over Integer Ring, where X is defined by: x + y - z and Y is defined by: x - y + z sage: Y.complement() Quasi-affine subscheme X - Y of Affine Space of dimension 3 over Integer Ring, where X is defined by: (no polynomials) and Y is defined by: x - y + z sage: P.<x, y, z> = ProjectiveSpace(2, QQ) sage: X = P.subscheme([x^2+y^2+z^2]) sage: Y = P.subscheme([x*y+y*z+z*x]) sage: Y.complement(X) Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Rational Field, where X is defined by: x^2 + y^2 + z^2 and Y is defined by: x*y + x*z + y*z sage: Y.complement(P) Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Rational Field, where X is defined by: (no polynomials) and Y is defined by: x*y + x*z + y*z
-
defining_ideal
()¶ Return the ideal that defines this scheme as a subscheme of its ambient space.
OUTPUT:
An ideal in the coordinate ring of the ambient space.
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([x^2-y*z, x^3+z^3]) sage: S.defining_ideal() Ideal (x^2 - y*z, x^3 + z^3) of Multivariate Polynomial Ring in x, y, z over Integer Ring
-
defining_polynomials
()¶ Return the polynomials that define this scheme as a subscheme of its ambient space.
OUTPUT:
A tuple of polynomials in the coordinate ring of the ambient space.
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: S = P.subscheme([x^2-y*z, x^3+z^3]) sage: S.defining_polynomials() (x^2 - y*z, x^3 + z^3)
-
intersection
(other)¶ Return the scheme-theoretic intersection of self and other in their common ambient space.
EXAMPLES:
sage: A.<x, y> = AffineSpace(2, ZZ) sage: X = A.subscheme([x^2-y]) sage: Y = A.subscheme([y]) sage: X.intersection(Y) Closed subscheme of Affine Space of dimension 2 over Integer Ring defined by: x^2 - y, y
-
irreducible_components
()¶ Return the irreducible components of this algebraic scheme, as subschemes of the same ambient space.
OUTPUT:
an immutable sequence of irreducible subschemes of the ambient space of this scheme
The components are cached.
EXAMPLES:
We define what is clearly a union of four hypersurfaces in \(\P^4_{\QQ}\) then find the irreducible components:
sage: PP.<x,y,z,w,v> = ProjectiveSpace(4,QQ) sage: V = PP.subscheme( (x^2 - y^2 - z^2)*(w^5 - 2*v^2*z^3)* w * (v^3 - x^2*z) ) sage: V.irreducible_components() [ Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: w, Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: x^2 - y^2 - z^2, Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: x^2*z - v^3, Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: w^5 - 2*z^3*v^2 ]
We verify that the irrelevant ideal isn’t accidently returned (see trac ticket #6920):
sage: PP.<x,y,z,w> = ProjectiveSpace(3,QQ) sage: f = x^3 + y^3 + z^3 + w^3 sage: R = f.parent() sage: I = [f] + [f.derivative(zz) for zz in PP.gens()] sage: V = PP.subscheme(I) sage: V.irreducible_components() [ <BLANKLINE> ]
The same polynomial as above defines a scheme with a nontrivial irreducible component in affine space (instead of the empty scheme as above):
sage: AA.<x,y,z,w> = AffineSpace(4,QQ) sage: V = AA.subscheme(I) sage: V.irreducible_components() [ Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: w, z, y, x ]
-
is_irreducible
()¶ Return whether this subscheme is or is not irreducible.
OUTPUT: Boolean.
EXAMPLES:
sage: K = QuadraticField(-3) sage: P.<x,y,z,w,t,u> = ProjectiveSpace(K, 5) sage: X = P.subscheme([x*y - z^2 - K.0*t^2, t*w*x + y*z^2 - u^3]) sage: X.is_irreducible() True
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2) sage: X = P.subscheme([(y + x - z)^2]) sage: X.is_irreducible() False
sage: A.<x,y,z,w> = AffineSpace(GF(17), 4) sage: X = A.subscheme([x*y*z^2 - x*y*z*w - z*w^2 + w^3, x^3*y*z*w - x*y^3*z - x^2*y*z*w \ - x^2*w^3 + y^2*w^2 + x*w^3]) sage: X.is_irreducible() False
-
rational_points
(bound=0, F=None)¶ Return the rational points on the algebraic subscheme.
EXAMPLES:
Enumerate over a projective scheme over a number field:
sage: u = QQ['u'].0 sage: K.<v> = NumberField(u^2 + 3) sage: A.<x,y> = ProjectiveSpace(K,1) sage: X=A.subscheme(x^2 - y^2) sage: X.rational_points(3) [(-1 : 1), (1 : 1)]
One can enumerate points up to a given bound on a projective scheme over the rationals:
sage: E = EllipticCurve('37a') sage: E.rational_points(bound=8) [(-1 : -1 : 1), (-1 : 0 : 1), (0 : -1 : 1), (0 : 0 : 1), (0 : 1 : 0), (1/4 : -5/8 : 1), (1/4 : -3/8 : 1), (1 : -1 : 1), (1 : 0 : 1), (2 : -3 : 1), (2 : 2 : 1)]
For a small finite field, the complete set of points can be enumerated.
sage: Etilde = E.base_extend(GF(3)) sage: Etilde.rational_points() [(0 : 0 : 1), (0 : 1 : 0), (0 : 2 : 1), (1 : 0 : 1), (1 : 2 : 1), (2 : 0 : 1), (2 : 2 : 1)]
The class of hyperelliptic curves does not (yet) support desingularization of the places at infinity into two points:
sage: FF = FiniteField(7) sage: P.<x> = PolynomialRing(FiniteField(7)) sage: C = HyperellipticCurve(x^8+x+1) sage: C.rational_points() [(0 : 1 : 0), (0 : 1 : 1), (0 : 6 : 1), (2 : 0 : 1), (4 : 0 : 1), (6 : 1 : 1), (6 : 6 : 1)]
TODO:
- The above algorithms enumerate all projective points and test whether they lie on the scheme; Implement a more naive sieve at least for covers of the projective line.
- Implement Stoll’s model in weighted projective space to resolve singularities and find two points (1 : 1 : 0) and (-1 : 1 : 0) at infinity.
-
reduce
()¶ Return the corresponding reduced algebraic space associated to this scheme.
EXAMPLES: First we construct the union of a doubled and tripled line in the affine plane over \(\QQ\)
sage: A.<x,y> = AffineSpace(2, QQ) sage: X = A.subscheme([(x-1)^2*(x-y)^3]); X Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^5 - 3*x^4*y + 3*x^3*y^2 - x^2*y^3 - 2*x^4 + 6*x^3*y - 6*x^2*y^2 + 2*x*y^3 + x^3 - 3*x^2*y + 3*x*y^2 - y^3 sage: X.dimension() 1
Then we compute the corresponding reduced scheme:
sage: Y = X.reduce(); Y Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^2 - x*y - x + y
Finally, we verify that the reduced scheme \(Y\) is the union of those two lines:
sage: L1 = A.subscheme([x-1]); L1 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - 1 sage: L2 = A.subscheme([x-y]); L2 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - y sage: W = L1.union(L2); W # taken in ambient space Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^2 - x*y - x + y sage: Y == W True
-
union
(other)¶ Return the scheme-theoretic union of self and other in their common ambient space.
EXAMPLES: We construct the union of a line and a tripled-point on the line.
sage: A.<x,y> = AffineSpace(2, QQ) sage: I = ideal([x,y])^3 sage: P = A.subscheme(I) sage: L = A.subscheme([y-1]) sage: S = L.union(P); S Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: y^4 - y^3, x*y^3 - x*y^2, x^2*y^2 - x^2*y, x^3*y - x^3 sage: S.dimension() 1 sage: S.reduce() Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: y^2 - y, x*y - x
We can also use the notation “+” for the union:
sage: A.subscheme([x]) + A.subscheme([y^2 - (x^3+1)]) Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^4 - x*y^2 + x
Saving and loading:
sage: loads(S.dumps()) == S True
-
weil_restriction
()¶ Compute the Weil restriction of this variety over some extension field. If the field is a finite field, then this computes the Weil restriction to the prime subfield.
A Weil restriction of scalars - denoted \(Res_{L/k}\) - is a functor which, for any finite extension of fields \(L/k\) and any algebraic variety \(X\) over \(L\), produces another corresponding variety \(Res_{L/k}(X)\), defined over \(k\). It is useful for reducing questions about varieties over large fields to questions about more complicated varieties over smaller fields.
This function does not compute this Weil restriction directly but computes on generating sets of polynomial ideals:
Let \(d\) be the degree of the field extension \(L/k\), let \(a\) a generator of \(L/k\) and \(p\) the minimal polynomial of \(L/k\). Denote this ideal by \(I\).
Specifically, this function first maps each variable \(x\) to its representation over \(k\): \(\sum_{i=0}^{d-1} a^i x_i\). Then each generator of \(I\) is evaluated over these representations and reduced modulo the minimal polynomial \(p\). The result is interpreted as a univariate polynomial in \(a\) and its coefficients are the new generators of the returned ideal.
If the input and the output ideals are radical, this is equivalent to the statement about algebraic varieties above.
OUTPUT: Affine subscheme - the Weil restriction of
self
.EXAMPLES:
sage: R.<x> = QQ[] sage: K.<w> = NumberField(x^5-2) sage: R.<x> = K[] sage: L.<v> = K.extension(x^2+1) sage: A.<x,y> = AffineSpace(L,2) sage: X = A.subscheme([y^2-L(w)*x^3-v]) sage: X.weil_restriction() Closed subscheme of Affine Space of dimension 4 over Number Field in w with defining polynomial x^5 - 2 defined by: (-w)*z0^3 + (3*w)*z0*z1^2 + z2^2 - z3^2, (-3*w)*z0^2*z1 + (w)*z1^3 + 2*z2*z3 - 1 sage: X.weil_restriction().ambient_space() is A.weil_restriction() True
sage: A.<x,y,z> = AffineSpace(GF(5^2,'t'),3) sage: X = A.subscheme([y^2-x*z, z^2+2*y]) sage: X.weil_restriction() Closed subscheme of Affine Space of dimension 6 over Finite Field of size 5 defined by: z2^2 - 2*z3^2 - z0*z4 + 2*z1*z5, 2*z2*z3 + z3^2 - z1*z4 - z0*z5 - z1*z5, z4^2 - 2*z5^2 + 2*z2, 2*z4*z5 + z5^2 + 2*z3
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme_affine
(A, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme
Construct an algebraic subscheme of affine space.
Warning
You should not create objects of this class directly. The preferred method to construct such subschemes is to use
subscheme()
method ofaffine space
.INPUT:
A
– ambientaffine space
polynomials
– single polynomial, ideal or iterable of defining polynomials.
EXAMPLES:
sage: A3.<x, y, z> = AffineSpace(3, QQ) sage: A3.subscheme([x^2-y*z]) Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x^2 - y*z
TESTS:
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme_affine sage: AlgebraicScheme_subscheme_affine(A3, [x^2-y*z]) Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x^2 - y*z
-
dimension
()¶ Return the dimension of the affine algebraic subscheme.
OUTPUT:
Integer.
EXAMPLES:
sage: A.<x,y> = AffineSpace(2, QQ) sage: A.subscheme([]).dimension() 2 sage: A.subscheme([x]).dimension() 1 sage: A.subscheme([x^5]).dimension() 1 sage: A.subscheme([x^2 + y^2 - 1]).dimension() 1 sage: A.subscheme([x*(x-1), y*(y-1)]).dimension() 0
Something less obvious:
sage: A.<x,y,z,w> = AffineSpace(4, QQ) sage: X = A.subscheme([x^2, x^2*y^2 + z^2, z^2 - w^2, 10*x^2 + w^2 - z^2]) sage: X Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: x^2, x^2*y^2 + z^2, z^2 - w^2, 10*x^2 - z^2 + w^2 sage: X.dimension() 1
-
intersection_multiplicity
(X, P)¶ Return the intersection multiplicity of this subscheme and the subscheme
X
at the pointP
.The intersection of this subscheme with
X
must be proper, that is \(\mathrm{codim}(self\cap X) = \mathrm{codim}(self) + \mathrm{codim}(X)\), and must also be finite. We use Serre’s Tor formula to compute the intersection multiplicity. If \(I\), \(J\) are the defining ideals ofself
,X
, respectively, then this is \(\sum_{i=0}^{\infty}(-1)^i\mathrm{length}(\mathrm{Tor}_{\mathcal{O}_{A,p}}^{i} (\mathcal{O}_{A,p}/I,\mathcal{O}_{A,p}/J))\) where \(A\) is the affine ambient space of these subschemes.INPUT:
X
– subscheme in the same ambient space as this subscheme.P
– a point in the intersection of this subscheme withX
.
OUTPUT: An integer.
EXAMPLES:
sage: A.<x,y> = AffineSpace(QQ, 2) sage: C = Curve([y^2 - x^3 - x^2], A) sage: D = Curve([y^2 + x^3], A) sage: Q = A([0,0]) sage: C.intersection_multiplicity(D, Q) 4
sage: R.<a> = QQ[] sage: K.<b> = NumberField(a^6 - 3*a^5 + 5*a^4 - 5*a^3 + 5*a^2 - 3*a + 1) sage: A.<x,y,z,w> = AffineSpace(K, 4) sage: X = A.subscheme([x*y, y*z + 7, w^3 - x^3]) sage: Y = A.subscheme([x - z^3 + z + 1]) sage: Q = A([0, -7*b^5 + 21*b^4 - 28*b^3 + 21*b^2 - 21*b + 14, -b^5 + 2*b^4 - 3*b^3 \ + 2*b^2 - 2*b, 0]) sage: X.intersection_multiplicity(Y, Q) 3
sage: A.<x,y,z> = AffineSpace(QQ, 3) sage: X = A.subscheme([z^2 - 1]) sage: Y = A.subscheme([z - 1, y - x^2]) sage: Q = A([1,1,1]) sage: X.intersection_multiplicity(Y, Q) Traceback (most recent call last): ... TypeError: the intersection of this subscheme and (=Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: z - 1, -x^2 + y) must be proper and finite
sage: A.<x,y,z,w,t> = AffineSpace(QQ, 5) sage: X = A.subscheme([x*y, t^2*w, w^3*z]) sage: Y = A.subscheme([y*w + z]) sage: Q = A([0,0,0,0,0]) sage: X.intersection_multiplicity(Y, Q) Traceback (most recent call last): ... TypeError: the intersection of this subscheme and (=Closed subscheme of Affine Space of dimension 5 over Rational Field defined by: y*w + z) must be proper and finite
-
is_smooth
(point=None)¶ Test whether the algebraic subscheme is smooth.
INPUT:
point
– A point orNone
(default). The point to test smoothness at.
OUTPUT:
Boolean. If no point was specified, returns whether the algebraic subscheme is smooth everywhere. Otherwise, smoothness at the specified point is tested.
EXAMPLES:
sage: A2.<x,y> = AffineSpace(2,QQ) sage: cuspidal_curve = A2.subscheme([y^2-x^3]) sage: cuspidal_curve Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: -x^3 + y^2 sage: smooth_point = cuspidal_curve.point([1,1]) sage: smooth_point in cuspidal_curve True sage: singular_point = cuspidal_curve.point([0,0]) sage: singular_point in cuspidal_curve True sage: cuspidal_curve.is_smooth(smooth_point) True sage: cuspidal_curve.is_smooth(singular_point) False sage: cuspidal_curve.is_smooth() False
-
multiplicity
(P)¶ Return the multiplicity of
P
on this subscheme.This is computed as the multiplicity of the local ring of this subscheme corresponding to
P
. This subscheme must be defined over a field. An error is raised ifP
is not a point on this subscheme.INPUT:
P
– a point on this subscheme.
OUTPUT:
An integer.
EXAMPLES:
sage: A.<x,y,z,w> = AffineSpace(QQ, 4) sage: X = A.subscheme([z*y - x^7, w - 2*z]) sage: Q1 = A([1,1/3,3,6]) sage: X.multiplicity(Q1) 1 sage: Q2 = A([0,0,0,0]) sage: X.multiplicity(Q2) 2
sage: A.<x,y,z,w,v> = AffineSpace(GF(23), 5) sage: C = A.curve([x^8 - y, y^7 - z, z^3 - 1, w^5 - v^3]) sage: Q = A([22,1,1,0,0]) sage: C.multiplicity(Q) 3
sage: K.<a> = QuadraticField(-1) sage: A.<x,y,z,w,t> = AffineSpace(K, 5) sage: X = A.subscheme([y^7 - x^2*z^5 + z^3*t^8 - x^2*y^4*z - t^8]) sage: Q1 = A([1,1,0,1,-1]) sage: X.multiplicity(Q1) 1 sage: Q2 = A([0,0,0,-a,0]) sage: X.multiplicity(Q2) 7
-
projective_closure
(i=None, PP=None)¶ Return the projective closure of this affine subscheme.
INPUT:
i
– (default: None) determines the embedding to use to compute the projective closure of this affine subscheme. The embedding used is the one which has a 1 in the i-th coordinate, numbered from 0.PP
– (default: None) ambient projective space, i.e., ambient space of codomain of morphism; this is constructed if it is not given.
OUTPUT:
- a projective subscheme.
EXAMPLES:
sage: A.<x,y,z,w> = AffineSpace(QQ,4) sage: X = A.subscheme([x^2 - y, x*y - z, y^2 - w, x*z - w, y*z - x*w, z^2 - y*w]) sage: X.projective_closure() Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: x0^2 - x1*x4, x0*x1 - x2*x4, x1^2 - x3*x4, x0*x2 - x3*x4, x1*x2 - x0*x3, x2^2 - x1*x3
sage: A.<x,y,z> = AffineSpace(QQ, 3) sage: P.<a,b,c,d> = ProjectiveSpace(QQ, 3) sage: X = A.subscheme([z - x^2 - y^2]) sage: X.projective_closure(1, P).ambient_space() == P True
-
projective_embedding
(i=None, PP=None)¶ Returns a morphism from this affine scheme into an ambient projective space of the same dimension.
The codomain of this morphism is the projective closure of this affine scheme in
PP
, if given, or otherwise in a new projective space that is constructed.INPUT:
i
– integer (default: dimension of self = last coordinate) determines which projective embedding to compute. The embedding is that which has a 1 in the i-th coordinate, numbered from 0.PP
– (default: None) ambient projective space, i.e., ambient space- of codomain of morphism; this is constructed if it is not given.
EXAMPLES:
sage: A.<x, y, z> = AffineSpace(3, ZZ) sage: S = A.subscheme([x*y-z]) sage: S.projective_embedding() Scheme morphism: From: Closed subscheme of Affine Space of dimension 3 over Integer Ring defined by: x*y - z To: Closed subscheme of Projective Space of dimension 3 over Integer Ring defined by: x0*x1 - x2*x3 Defn: Defined on coordinates by sending (x, y, z) to (x : y : z : 1)
sage: A.<x, y, z> = AffineSpace(3, ZZ) sage: P = ProjectiveSpace(3,ZZ,'u') sage: S = A.subscheme([x^2-y*z]) sage: S.projective_embedding(1,P) Scheme morphism: From: Closed subscheme of Affine Space of dimension 3 over Integer Ring defined by: x^2 - y*z To: Closed subscheme of Projective Space of dimension 3 over Integer Ring defined by: u0^2 - u2*u3 Defn: Defined on coordinates by sending (x, y, z) to (x : 1 : y : z)
sage: A.<x,y,z> = AffineSpace(QQ, 3) sage: X = A.subscheme([y - x^2, z - x^3]) sage: X.projective_embedding() Scheme morphism: From: Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: -x^2 + y, -x^3 + z To: Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: x0^2 - x1*x3, x0*x1 - x2*x3, x1^2 - x0*x2 Defn: Defined on coordinates by sending (x, y, z) to (x : y : z : 1)
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme_affine_toric
(toric_variety, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme_toric
Construct an algebraic subscheme of an affine toric variety.
Warning
You should not create objects of this class directly. The preferred method to construct such subschemes is to use
subscheme()
method oftoric varieties
.INPUT:
toric_variety
– ambientaffine toric variety
;polynomials
– single polynomial, list, or ideal of defining polynomials in the coordinate ring oftoric_variety
.
OUTPUT:
A
algebraic subscheme of an affine toric variety
.TESTS:
sage: P1xP1 = toric_varieties.P1xP1() sage: P1xP1.inject_variables() Defining s, t, x, y sage: import sage.schemes.generic.algebraic_scheme as SCM sage: X = SCM.AlgebraicScheme_subscheme_toric( ... P1xP1, [x*s + y*t, x^3+y^3]) sage: X Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: s*x + t*y, x^3 + y^3
A better way to construct the same scheme as above:
sage: P1xP1.subscheme([x*s + y*t, x^3+y^3]) Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: s*x + t*y, x^3 + y^3
-
dimension
()¶ Return the dimension of
self
.OUTPUT:
- integer.
EXAMPLES:
sage: P1xP1.<s0,s1,t0,t1> = toric_varieties.P1xP1() sage: P1 = P1xP1.subscheme(s0-s1) sage: P1.dimension() 1
A more complicated example where the ambient toric variety is not smooth:
sage: X.<x,y> = toric_varieties.A2_Z2() sage: X.is_smooth() False sage: Y = X.subscheme([x*y, x^2]) sage: Y Closed subscheme of 2-d affine toric variety defined by: x*y, x^2 sage: Y.dimension() 1
-
is_smooth
(point=None)¶ Test whether the algebraic subscheme is smooth.
INPUT:
point
– A point orNone
(default). The point to test smoothness at.
OUTPUT:
Boolean. If no point was specified, returns whether the algebraic subscheme is smooth everywhere. Otherwise, smoothness at the specified point is tested.
EXAMPLES:
sage: A2.<x,y> = toric_varieties.A2() sage: cuspidal_curve = A2.subscheme([y^2-x^3]) sage: cuspidal_curve Closed subscheme of 2-d affine toric variety defined by: -x^3 + y^2 sage: cuspidal_curve.is_smooth([1,1]) True sage: cuspidal_curve.is_smooth([0,0]) False sage: cuspidal_curve.is_smooth() False sage: circle = A2.subscheme(x^2+y^2-1) sage: circle.is_smooth([1,0]) True sage: circle.is_smooth() True
A more complicated example where the ambient toric variety is not smooth:
sage: X.<x,y> = toric_varieties.A2_Z2() # 2-d affine space mod Z/2 sage: X.is_smooth() False sage: Y = X.subscheme([x*y, x^2]) # (twice the x=0 curve) mod Z/2 sage: Y Closed subscheme of 2-d affine toric variety defined by: x*y, x^2 sage: Y.dimension() # Y is a Weil divisor but not Cartier 1 sage: Y.is_smooth() True sage: Y.is_smooth([0,0]) True
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme_product_projective
(A, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme_projective
See
AlgebraicScheme_subscheme
for documentation.TESTS:
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme sage: P.<x, y, z> = ProjectiveSpace(2, QQ) sage: P.subscheme([x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z sage: AlgebraicScheme_subscheme(P, [x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z
-
affine_patch
(I, return_embedding=False)¶ Return the \(I^{th}\) affine patch of this projective scheme where ‘I’ is a multi-index.
INPUT:
I
– a list or tuple of positive integersreturn_embedding
– Boolean, if true the projective embedding is also returned
OUTPUT:
- An affine algebraic scheme
- An embedding into a product of projective space (optional)
EXAMPLES:
sage: PP.<x,y,z,w,u,v> = ProductProjectiveSpaces([3,1],QQ) sage: W = PP.subscheme([y^2*z-x^3,z^2-w^2,u^3-v^3]) sage: W.affine_patch([0,1],True) (Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: x0^2*x1 - 1, x1^2 - x2^2, x3^3 - 1, Scheme morphism: From: Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: x0^2*x1 - 1, x1^2 - x2^2, x3^3 - 1 To: Closed subscheme of Product of projective spaces P^3 x P^1 over Rational Field defined by: -x^3 + y^2*z, z^2 - w^2, u^3 - v^3 Defn: Defined on coordinates by sending (x0, x1, x2, x3) to (1 : x0 : x1 : x2 , x3 : 1))
-
dimension
()¶ Return the dimension of the algebraic subscheme.
OUTPUT:
Integer.
EXAMPLES:
sage: X.<x,y,z,w,u,v> = ProductProjectiveSpaces([2,2],QQ) sage: L = (-w - v)*x + (-w*y - u*z) sage: Q = (-u*w - v^2)*x^2 + ((-w^2 - u*w + (-u*v - u^2))*y + (-w^2 - u*v)*z)*x + \ ((-w^2 - u*w - u^2)*y^2 + (-u*w - v^2)*z*y + (-w^2 + (-v - u)*w)*z^2) sage: W = X.subscheme([L,Q]) sage: W.dimension() 2
sage: PP.<x,y,z,u,v,s,t> = ProductProjectiveSpaces([2,1,1], QQ) sage: X = PP.subscheme([x^3, x^5+y^5, z^6, x*u-v*y, s^2-t^2]) sage: X.dimension() -1
sage: PP = ProductProjectiveSpaces([2,1,3], CC, 't') sage: PP.subscheme([]).dimension() 6
sage: PP = ProductProjectiveSpaces([1,3,1], ZZ, 't') sage: PP.subscheme([]).dimension() 5
sage: PP.<x,y,u,v,s,t> = ProductProjectiveSpaces([1,1,1], CC) sage: X = PP.subscheme([x^2-y^2, u-v, s^2-t^2]) sage: X.dimension() 0
-
intersection_multiplicity
(X, P)¶ Return the intersection multiplicity of this subscheme and the subscheme
X
at the pointP
.This uses the intersection_multiplicity function for affine subschemes on affine patches of this subscheme and
X
that containP
.INPUT:
X
– subscheme in the same ambient space as this subscheme.P
– a point in the intersection of this subscheme withX
.
OUTPUT: An integer.
EXAMPLES:
Multiplicity of a fixed point of the map \(z^2 + \frac{1}{4}\):
sage: PP.<x,y,u,v> = ProductProjectiveSpaces(QQ, [1,1]) sage: G = PP.subscheme([(x^2 + 1/4*y^2)*v - y^2*u]) sage: D = PP.subscheme([x*v - y*u]) sage: G.intersection(D).rational_points() [(1 : 0 , 1 : 0), (1/2 : 1 , 1/2 : 1)] sage: Q = PP([1/2,1,1/2,1]) sage: G.intersection_multiplicity(D, Q) 2
sage: F.<a> = GF(4) sage: PP.<x,y,z,u,v,w> = ProductProjectiveSpaces(F, [2,2]) sage: X = PP.subscheme([z^5 + 3*x*y^4 + 8*y^5, u^2 - v^2]) sage: Y = PP.subscheme([x^6 + z^6, w*z - v*y]) sage: Q = PP([a,a+1,1,a,a,1]) sage: X.intersection_multiplicity(Y, Q) 16
sage: PP.<x,y,z,u,v,w> = ProductProjectiveSpaces(QQ, [2,2]) sage: X = PP.subscheme([x^2*u^3 + y*z*u*v^2, x - y]) sage: Y = PP.subscheme([u^3 - w^3, x*v - y*w, z^3*w^2 - y^3*u*v]) sage: Q = PP([0,0,1,0,1,0]) sage: X.intersection_multiplicity(Y, Q) Traceback (most recent call last): ... TypeError: the intersection of this subscheme and (=Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: x2^3 - x3^3, -x1*x3 + x0, -x1^3*x2 + x3^2) must be proper and finite
-
is_smooth
(point=None)¶ Test whether the algebraic subscheme is smooth.
EXAMPLES:
sage: X.<x,y,z,w,u,v> = ProductProjectiveSpaces([2,2],QQ) sage: L = (-w - v)*x + (-w*y - u*z) sage: Q = (-u*w - v^2)*x^2 + ((-w^2 - u*w + (-u*v - u^2))*y + (-w^2 - u*v)*z)*x + \ ((-w^2 - u*w - u^2)*y^2 + (-u*w - v^2)*z*y + (-w^2 + (-v - u)*w)*z^2) sage: W = X.subscheme([L,Q]) sage: W.is_smooth() Traceback (most recent call last): ... NotImplementedError: Not Implemented
-
multiplicity
(P)¶ Return the multiplicity of
P
on this subscheme.This is computed as the multiplicity of the corresponding point on an affine patch of this subscheme that contains
P
. This subscheme must be defined over a field. An error is returned ifP
not a point on this subscheme.INPUT:
P
– a point on this subscheme.
OUTPUT: an integer.
EXAMPLES:
sage: PP.<x,y,z,w> = ProductProjectiveSpaces(QQ, [1,1]) sage: X = PP.subscheme([x^4*z^3 - y^4*w^3]) sage: Q1 = PP([1,1,1,1]) sage: X.multiplicity(Q1) 1 sage: Q2 = PP([0,1,1,0]) sage: X.multiplicity(Q2) 3
sage: PP.<x,y,z,w,u> = ProductProjectiveSpaces(GF(11), [1,2]) sage: X = PP.subscheme([x^7*u - y^7*z, u^6*x^2 - w^3*z^3*x*y - w^6*y^2]) sage: Q1 = PP([1,0,10,1,0]) sage: X.multiplicity(Q1) 1 sage: Q2 = PP([1,0,1,0,0]) sage: X.multiplicity(Q2) 4
-
segre_embedding
(PP=None)¶ Return the Segre embedding of this subscheme into the appropriate projective space.
INPUT:
PP
– (default:None
) ambient image projective space; this is constructed if it is not given.
OUTPUT:
Hom from this subscheme to the appropriate subscheme of projective space
EXAMPLES:
sage: X.<x,y,z,w,u,v> = ProductProjectiveSpaces([2,2], QQ) sage: P = ProjectiveSpace(QQ,8,'t') sage: L = (-w - v)*x + (-w*y - u*z) sage: Q = (-u*w - v^2)*x^2 + ((-w^2 - u*w + (-u*v - u^2))*y + (-w^2 - u*v)*z)*x + \ ((-w^2 - u*w - u^2)*y^2 + (-u*w - v^2)*z*y + (-w^2 + (-v - u)*w)*z^2) sage: W = X.subscheme([L,Q]) sage: phi = W.segre_embedding(P) sage: phi.codomain().ambient_space() == P True
sage: PP.<x,y,u,v,s,t> = ProductProjectiveSpaces([1,1,1], CC) sage: PP.subscheme([]).segre_embedding() Scheme morphism: From: Closed subscheme of Product of projective spaces P^1 x P^1 x P^1 over Complex Field with 53 bits of precision defined by: (no polynomials) To: Closed subscheme of Projective Space of dimension 7 over Complex Field with 53 bits of precision defined by: -u5*u6 + u4*u7, -u3*u6 + u2*u7, -u3*u4 + u2*u5, -u3*u5 + u1*u7, -u3*u4 + u1*u6, -u3*u4 + u0*u7, -u2*u4 + u0*u6, -u1*u4 + u0*u5, -u1*u2 + u0*u3 Defn: Defined by sending (x : y , u : v , s : t) to (x*u*s : x*u*t : x*v*s : x*v*t : y*u*s : y*u*t : y*v*s : y*v*t).
sage: PP.<x,y,z,u,v,s,t> = ProductProjectiveSpaces([2,1,1], ZZ) sage: PP.subscheme([x^3, u-v, s^2-t^2]).segre_embedding() Scheme morphism: From: Closed subscheme of Product of projective spaces P^2 x P^1 x P^1 over Integer Ring defined by: x^3, u - v, s^2 - t^2 To: Closed subscheme of Projective Space of dimension 11 over Integer Ring defined by: u10^2 - u11^2, u9 - u11, u8 - u10, -u7*u10 + u6*u11, u6*u10 - u7*u11, u6^2 - u7^2, u5 - u7, u4 - u6, u3^3, -u3*u10 + u2*u11, u2*u10 - u3*u11, -u3*u6 + u2*u7, u2*u6 - u3*u7, u2*u3^2, u2^2 - u3^2, u1 - u3, u0 - u2 Defn: Defined by sending (x : y : z , u : v , s : t) to (x*u*s : x*u*t : x*v*s : x*v*t : y*u*s : y*u*t : y*v*s : y*v*t : z*u*s : z*u*t : z*v*s : z*v*t).
-
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme_projective
(A, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme
Construct an algebraic subscheme of projective space.
Warning
You should not create objects of this class directly. The preferred method to construct such subschemes is to use
subscheme()
method ofprojective space
.INPUT:
A
– ambientprojective space
.polynomials
– single polynomial, ideal or iterable of defining homogeneous polynomials.
EXAMPLES:
sage: P.<x, y, z> = ProjectiveSpace(2, QQ) sage: P.subscheme([x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z
TESTS:
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme_projective sage: AlgebraicScheme_subscheme_projective(P, [x^2-y*z]) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^2 - y*z
-
Chow_form
()¶ Returns the Chow form associated to this subscheme.
For a \(k\)-dimensional subvariety of \(\mathbb{P}^N\) of degree \(D\). The \((N-k-1)\)-dimensional projective linear subspaces of \(\mathbb{P}^N\) meeting \(X\) form a hypersurface in the Grassmannian \(G(N-k-1,N)\). The homogeneous form of degree \(D\) defining this hypersurface in Plucker coordinates is called the Chow form of \(X\).
The base ring needs to be a number field, finite field, or \(\QQbar\).
ALGORITHM:
For a \(k\)-dimension subscheme \(X\) consider the \(k+1\) linear forms \(l_i = u_{i0}x_0 + \cdots + u_{in}x_n\). Let \(J\) be the ideal in the polynomial ring \(K[x_i,u_{ij}]\) defined by the equations of \(X\) and the \(l_i\). Let \(J'\) be the saturation of \(J\) with respect to the irrelevant ideal of the ambient projective space of \(X\). The elimination ideal \(I = J' \cap K[u_{ij}]\) is a principal ideal, let \(R\) be its generator. The Chow form is obtained by writing \(R\) as a polynomial in Plucker coordinates (i.e. bracket polynomials). [DalbecSturmfels].
OUTPUT: a homogeneous polynomial.
REFERENCES:
[DalbecSturmfels] J. Dalbec and B. Sturmfels. Invariant methods in discrete and computational geometry, chapter Introduction to Chow forms, pages 37-58. Springer Netherlands, 1994. EXAMPLES:
sage: P.<x0,x1,x2,x3> = ProjectiveSpace(GF(17), 3) sage: X = P.subscheme([x3+x1,x2-x0,x2-x3]) sage: X.Chow_form() t0 - t1 + t2 + t3
sage: P.<x0,x1,x2,x3> = ProjectiveSpace(QQ,3) sage: X = P.subscheme([x3^2 -101*x1^2 - 3*x2*x0]) sage: X.Chow_form() t0^2 - 101*t2^2 - 3*t1*t3
sage: P.<x0,x1,x2,x3>=ProjectiveSpace(QQ,3) sage: X = P.subscheme([x0*x2-x1^2, x0*x3-x1*x2, x1*x3-x2^2]) sage: Ch = X.Chow_form(); Ch t2^3 + 2*t2^2*t3 + t2*t3^2 - 3*t1*t2*t4 - t1*t3*t4 + t0*t4^2 + t1^2*t5 sage: Y = P.subscheme_from_Chow_form(Ch, 1); Y Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: x2^2*x3 - x1*x3^2, -x2^3 + x0*x3^2, -x2^2*x3 + x1*x3^2, x1*x2*x3 - x0*x3^2, 3*x1*x2^2 - 3*x0*x2*x3, -2*x1^2*x3 + 2*x0*x2*x3, -3*x1^2*x2 + 3*x0*x1*x3, x1^3 - x0^2*x3, x2^3 - x1*x2*x3, -3*x1*x2^2 + 2*x1^2*x3 + x0*x2*x3, 2*x0*x2^2 - 2*x0*x1*x3, 3*x1^2*x2 - 2*x0*x2^2 - x0*x1*x3, -x0*x1*x2 + x0^2*x3, -x0*x1^2 + x0^2*x2, -x1^3 + x0*x1*x2, x0*x1^2 - x0^2*x2 sage: I = Y.defining_ideal() sage: I.saturation(I.ring().ideal(list(I.ring().gens())))[0] Ideal (x2^2 - x1*x3, x1*x2 - x0*x3, x1^2 - x0*x2) of Multivariate Polynomial Ring in x0, x1, x2, x3 over Rational Field
-
affine_patch
(i, AA=None)¶ Return the \(i^{th}\) affine patch of this projective scheme. This is the intersection with this \(i^{th}\) affine patch of its ambient space.
INPUT:
i
– integer between 0 and dimension of self, inclusive.AA
– (default: None) ambient affine space, this is constructed- if it is not given.
OUTPUT:
An affine algebraic scheme with fixed
embedding_morphism()
equal to the defaultprojective_embedding()
map`.EXAMPLES:
sage: PP = ProjectiveSpace(2, QQ, names='X,Y,Z') sage: X,Y,Z = PP.gens() sage: C = PP.subscheme(X^3*Y + Y^3*Z + Z^3*X) sage: U = C.affine_patch(0) sage: U Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x0^3*x1 + x1^3 + x0 sage: U.embedding_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x0^3*x1 + x1^3 + x0 To: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: X^3*Y + Y^3*Z + X*Z^3 Defn: Defined on coordinates by sending (x0, x1) to (1 : x0 : x1) sage: U.projective_embedding() is U.embedding_morphism() True
sage: A.<x,y,z> = AffineSpace(QQ,3) sage: X = A.subscheme([x-y*z]) sage: Y = X.projective_embedding(1).codomain() sage: Y.affine_patch(1,A).ambient_space() == A True
sage: P.<u,v,w> = ProjectiveSpace(2,ZZ) sage: S = P.subscheme([u^2-v*w]) sage: A.<x, y> = AffineSpace(2, ZZ) sage: S.affine_patch(1, A) Closed subscheme of Affine Space of dimension 2 over Integer Ring defined by: x^2 - y
-
degree
()¶ Return the degree of this projective subscheme.
If \(P(t) = a_{m}t^m + \ldots + a_{0}\) is the the Hilbert polynomial of this subscheme, then the degree is \(a_{m}m!\).
OUTPUT: Integer.
EXAMPLES:
sage: P.<x,y,z,w,t,u> = ProjectiveSpace(QQ, 5) sage: X = P.subscheme([x^7 + x*y*z*t^4 - u^7]) sage: X.degree() 7
sage: P.<x,y,z,w> = ProjectiveSpace(GF(13), 3) sage: X = P.subscheme([y^3 - w^3, x + 7*z]) sage: X.degree() 3
sage: P.<x,y,z,w,u> = ProjectiveSpace(QQ, 4) sage: C = P.curve([x^7 - y*z^3*w^2*u, w*x^2 - y*u^2, z^3 + y^3]) sage: C.degree() 63
-
dimension
()¶ Return the dimension of the projective algebraic subscheme.
OUTPUT:
Integer.
EXAMPLES:
sage: P2.<x,y,z> = ProjectiveSpace(2, QQ) sage: P2.subscheme([]).dimension() 2 sage: P2.subscheme([x]).dimension() 1 sage: P2.subscheme([x^5]).dimension() 1 sage: P2.subscheme([x^2 + y^2 - z^2]).dimension() 1 sage: P2.subscheme([x*(x-z), y*(y-z)]).dimension() 0
Something less obvious:
sage: P3.<x,y,z,w,t> = ProjectiveSpace(4, QQ) sage: X = P3.subscheme([x^2, x^2*y^2 + z^2*t^2, z^2 - w^2, 10*x^2 + w^2 - z^2]) sage: X Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: x^2, x^2*y^2 + z^2*t^2, z^2 - w^2, 10*x^2 - z^2 + w^2 sage: X.dimension() 1
-
dual
()¶ Return the projective dual of the given subscheme of projective space.
INPUT:
X
– A subscheme of projective space. At present,X
is required to be an irreducible and reduced hypersurface defined over \(\QQ\) or a finite field.
OUTPUT:
- The dual of
X
as a subscheme of the dual projective space.
EXAMPLES:
The dual of a smooth conic in the plane is also a smooth conic:
sage: R.<x, y, z> = QQ[] sage: P.<x, y, z> = ProjectiveSpace(2, QQ) sage: I = R.ideal(x^2 + y^2 + z^2) sage: X = P.subscheme(I) sage: X.dual() Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: y0^2 + y1^2 + y2^2
The dual of the twisted cubic curve in projective 3-space is a singular quartic surface. In the following example, we compute the dual of this surface, which by double duality is equal to the twisted cubic itself. The output is the twisted cubic as an intersection of three quadrics:
sage: R.<x, y, z, w> = QQ[] sage: P.<x, y, z, w> = ProjectiveSpace(3, QQ) sage: I = R.ideal(y^2*z^2 - 4*x*z^3 - 4*y^3*w + 18*x*y*z*w - 27*x^2*w^2) sage: X = P.subscheme(I) sage: X.dual() Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: y2^2 - y1*y3, y1*y2 - y0*y3, y1^2 - y0*y2
The singular locus of the quartic surface in the last example is itself supported on a twisted cubic:
sage: X.Jacobian().radical() Ideal (z^2 - 3*y*w, y*z - 9*x*w, y^2 - 3*x*z) of Multivariate Polynomial Ring in x, y, z, w over Rational Field
An example over a finite field:
sage: R = PolynomialRing(GF(61), 'a,b,c') sage: P.<a, b, c> = ProjectiveSpace(2, R.base_ring()) sage: X = P.subscheme(R.ideal(a*a+2*b*b+3*c*c)) sage: X.dual() Closed subscheme of Projective Space of dimension 2 over Finite Field of size 61 defined by: y0^2 - 30*y1^2 - 20*y2^2
TESTS:
sage: R = PolynomialRing(Qp(3), 'a,b,c') sage: P.<a, b, c> = ProjectiveSpace(2, R.base_ring()) sage: X = P.subscheme(R.ideal(a*a+2*b*b+3*c*c)) sage: X.dual() Traceback (most recent call last): ... NotImplementedError: base ring must be QQ or a finite field
-
intersection_multiplicity
(X, P)¶ Return the intersection multiplicity of this subscheme and the subscheme
X
at the pointP
.This uses the intersection_multiplicity function for affine subschemes on affine patches of this subscheme and
X
that containP
.INPUT:
X
– subscheme in the same ambient space as this subscheme.P
– a point in the intersection of this subscheme withX
.
OUTPUT: An integer.
EXAMPLES:
sage: P.<x,y,z> = ProjectiveSpace(GF(5), 2) sage: C = Curve([x^4 - z^2*y^2], P) sage: D = Curve([y^4*z - x^5 - x^3*z^2], P) sage: Q1 = P([0,1,0]) sage: C.intersection_multiplicity(D, Q1) 4 sage: Q2 = P([0,0,1]) sage: C.intersection_multiplicity(D, Q2) 6
sage: R.<a> = QQ[] sage: K.<b> = NumberField(a^4 + 1) sage: P.<x,y,z,w> = ProjectiveSpace(K, 3) sage: X = P.subscheme([x^2 + y^2 - z*w]) sage: Y = P.subscheme([y*z - x*w, z - w]) sage: Q1 = P([b^2,1,0,0]) sage: X.intersection_multiplicity(Y, Q1) 1 sage: Q2 = P([1/2*b^3-1/2*b,1/2*b^3-1/2*b,1,1]) sage: X.intersection_multiplicity(Y, Q2) 1
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3) sage: X = P.subscheme([x^2 - z^2, y^3 - w*x^2]) sage: Y = P.subscheme([w^2 - 2*x*y + z^2, y^2 - w^2]) sage: Q = P([1,1,-1,1]) sage: X.intersection_multiplicity(Y, Q) Traceback (most recent call last): ... TypeError: the intersection of this subscheme and (=Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x1^2 + x2^2 - 2*x0, x0^2 - x2^2) must be proper and finite
-
is_smooth
(point=None)¶ Test whether the algebraic subscheme is smooth.
INPUT:
point
– A point orNone
(default). The point to test smoothness at.
OUTPUT:
Boolean. If no point was specified, returns whether the algebraic subscheme is smooth everywhere. Otherwise, smoothness at the specified point is tested.
EXAMPLES:
sage: P2.<x,y,z> = ProjectiveSpace(2,QQ) sage: cuspidal_curve = P2.subscheme([y^2*z-x^3]) sage: cuspidal_curve Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: -x^3 + y^2*z sage: cuspidal_curve.is_smooth([1,1,1]) True sage: cuspidal_curve.is_smooth([0,0,1]) False sage: cuspidal_curve.is_smooth() False sage: P2.subscheme([y^2*z-x^3+z^3+1/10*x*y*z]).is_smooth() True
TESTS:
sage: H = P2.subscheme(x) sage: H.is_smooth() # one of the few cases where the cone over the subvariety is smooth True
-
multiplicity
(P)¶ Return the multiplicity of
P
on this subscheme.This is computed as the multiplicity of the corresponding point on an affine patch of this subscheme that contains
P
. This subscheme must be defined over a field. An error is returned ifP
not a point on this subscheme.INPUT:
P
– a point on this subscheme.
OUTPUT:
An integer.
EXAMPLES:
sage: P.<x,y,z,w,t> = ProjectiveSpace(QQ, 4) sage: X = P.subscheme([y^2 - x*t, w^7 - t*w*x^5 - z^7]) sage: Q1 = P([0,0,1,1,1]) sage: X.multiplicity(Q1) 1 sage: Q2 = P([1,0,0,0,0]) sage: X.multiplicity(Q2) 3 sage: Q3 = P([0,0,0,0,1]) sage: X.multiplicity(Q3) 7
sage: P.<x,y,z,w> = ProjectiveSpace(CC, 3) sage: X = P.subscheme([z^5*x^2*w - y^8]) sage: Q = P([2,0,0,1]) sage: X.multiplicity(Q) 5
sage: P.<x,y,z,w> = ProjectiveSpace(GF(29), 3) sage: C = Curve([y^17 - x^5*w^4*z^8, x*y - z^2], P) sage: Q = P([3,0,0,1]) sage: C.multiplicity(Q) 8
-
neighborhood
(point)¶ Return an affine algebraic subscheme isomorphic to a neighborhood of the
point
.INPUT:
point
– a point of the projective subscheme.
OUTPUT:
An affine algebraic scheme (polynomial equations in affine space)
result
such thatembedding_morphism
is an isomorphism to a neighborhood ofpoint
embedding_center
is mapped topoint
.
EXAMPLES:
sage: P.<x,y,z>= ProjectiveSpace(QQ,2) sage: S = P.subscheme(x+2*y+3*z) sage: s = S.point([0,-3,2]); s (0 : -3/2 : 1) sage: patch = S.neighborhood(s); patch Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x0 + 3*x1 sage: patch.embedding_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x0 + 3*x1 To: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x + 2*y + 3*z Defn: Defined on coordinates by sending (x0, x1) to (x0 : -3/2 : x1 + 1) sage: patch.embedding_center() (0, 0) sage: patch.embedding_morphism()([0,0]) (0 : -3/2 : 1) sage: patch.embedding_morphism()(patch.embedding_center()) (0 : -3/2 : 1)
-
nth_iterate
(f, n)¶ The nth forward image of this scheme by the map
f
.INPUT:
f
– a SchmemMorphism_polynomial withself
inf.domain()
n
– a positive integer.
OUTPUT:
- A subscheme in
f.codomain()
EXAMPLES:
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3) sage: H = End(P) sage: f = H([y^2, z^2, x^2, w^2]) sage: f.nth_iterate(P.subscheme([x-w,y-z]), 3) Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: y - z, x - w
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: H = End(PS) sage: f = H([x^2, y^2, z^2]) sage: X = PS.subscheme([x-y]) sage: X.nth_iterate(f,-2) Traceback (most recent call last): ... TypeError: must be a forward orbit
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: P2.<u,v,w>=ProjectiveSpace(QQ, 2) sage: H = Hom(PS, P2) sage: f = H([x^2, y^2, z^2]) sage: X = PS.subscheme([x-y]) sage: X.nth_iterate(f,2) Traceback (most recent call last): ... TypeError: map must be an endomorphism for iteration
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2) sage: H = End(PS) sage: f = H([x^2, y^2, z^2]) sage: X = PS.subscheme([x-y]) sage: X.nth_iterate(f,2.5) Traceback (most recent call last): ... TypeError: Attempt to coerce non-integral RealNumber to Integer
-
orbit
(f, N)¶ Returns the orbit of this scheme by
f
.If \(N\) is an integer it returns \([self,f(self),\ldots,f^N(self)]\). If \(N\) is a list or tuple \(N=[m,k]\) it returns \([f^m(self),\ldots,f^k(self)\)].
INPUT:
f
– aSchemeMorphism_polynomial
withself
inf.domain()
N
– a non-negative integer or list or tuple of two non-negative integers
OUTPUT:
- a list of projective subschemes
EXAMPLES:
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3) sage: H = End(P) sage: f = H([(x-2*y)^2,(x-2*z)^2,(x-2*w)^2,x^2]) sage: f.orbit(P.subscheme([x]),5) [Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: x, Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: w, Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: z - w, Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: y - z, Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: x - y, Closed subscheme of Projective Space of dimension 3 over Rational Field defined by: x - w]
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2) sage: P1.<u,v> = ProjectiveSpace(QQ, 1) sage: H = Hom(PS, P1) sage: f = H([x^2, y^2]) sage: X = PS.subscheme([x-y]) sage: X.orbit(f,2) Traceback (most recent call last): ... TypeError: map must be an endomorphism for iteration
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2) sage: H = End(PS) sage: f = H([x^2, y^2, z^2]) sage: X = PS.subscheme([x-y]) sage: X.orbit(f,[-1,2]) Traceback (most recent call last): ... TypeError: orbit bounds must be non-negative
-
preimage
(f, k=1, check=True)¶ The subscheme that maps to this scheme by the map \(f^k\).
In particular, \(f^{-k}(V(h_1,\ldots,h_t)) = V(h_1 \circ f^k, \ldots, h_t \circ f^k)\). Map must be a morphism and also must be an endomorphism for \(k > 1\).
INPUT:
f
- a map whose codomain contains this schemek
- a positive integercheck
– Boolean, ifFalse
no input checking is done
OUTPUT:
- a subscheme in the domain of
f
.
Examples:
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: H = End(PS) sage: f = H([y^2, x^2, z^2]) sage: X = PS.subscheme([x-y]) sage: X.preimage(f) Closed subscheme of Projective Space of dimension 2 over Integer Ring defined by: -x^2 + y^2
sage: P.<x,y,z,w,t> = ProjectiveSpace(QQ, 4) sage: H = End(P) sage: f = H([x^2-y^2, y^2, z^2, w^2, t^2+w^2]) sage: f.rational_preimages(P.subscheme([x-z, t^2, w-t])) Closed subscheme of Projective Space of dimension 4 over Rational Field defined by: x^2 - y^2 - z^2, w^4 + 2*w^2*t^2 + t^4, -t^2
sage: P1.<x,y> = ProjectiveSpace(QQ, 1) sage: P3.<u,v,w,t> = ProjectiveSpace(QQ, 3) sage: H = Hom(P1, P3) sage: X = P3.subscheme([u-v, 2*u-w, u+t]) sage: f = H([x^2,y^2, x^2+y^2, x*y]) sage: X.preimage(f) Closed subscheme of Projective Space of dimension 1 over Rational Field defined by: x^2 - y^2, x^2 - y^2, x^2 + x*y
sage: P1.<x,y> = ProjectiveSpace(QQ, 1) sage: P3.<u,v,w,t> = ProjectiveSpace(QQ, 3) sage: H = Hom(P3, P1) sage: X = P1.subscheme([x-y]) sage: f = H([u^2, v^2]) sage: X.preimage(f) Traceback (most recent call last): ... TypeError: map must be a morphism
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: H = End(PS) sage: f = H([x^2, x^2, x^2]) sage: X = PS.subscheme([x-y]) sage: X.preimage(f) Traceback (most recent call last): ... TypeError: map must be a morphism
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: P1.<u,v> = ProjectiveSpace(ZZ, 1) sage: Y = P1.subscheme([u^2-v^2]) sage: H = End(PS) sage: f = H([x^2, y^2, z^2]) sage: Y.preimage(f) Traceback (most recent call last): ... TypeError: subscheme must be in ambient space of codomain
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2) sage: Y = P.subscheme([x-y]) sage: H = End(P) sage: f = H([x^2, y^2, z^2]) sage: Y.preimage(f, k=2) Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: x^4 - y^4
-
class
sage.schemes.generic.algebraic_scheme.
AlgebraicScheme_subscheme_toric
(toric_variety, polynomials)¶ Bases:
sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme
Construct an algebraic subscheme of a toric variety.
Warning
You should not create objects of this class directly. The preferred method to construct such subschemes is to use
subscheme()
method oftoric varieties
.INPUT:
toric_variety
– ambienttoric variety
;polynomials
– single polynomial, list, or ideal of defining polynomials in the coordinate ring oftoric_variety
.
OUTPUT:
TESTS:
sage: P1xP1 = toric_varieties.P1xP1() sage: P1xP1.inject_variables() Defining s, t, x, y sage: import sage.schemes.generic.algebraic_scheme as SCM sage: X = SCM.AlgebraicScheme_subscheme_toric( ... P1xP1, [x*s + y*t, x^3+y^3]) sage: X Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: s*x + t*y, x^3 + y^3
A better way to construct the same scheme as above:
sage: P1xP1.subscheme([x*s + y*t, x^3+y^3]) Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by: s*x + t*y, x^3 + y^3
-
affine_algebraic_patch
(cone=None, names=None)¶ Return the affine patch corresponding to
cone
as an affine algebraic scheme.INPUT:
cone
– aCone
\(\sigma\) of the fan. It can be omitted for an affine toric variety, in which case the single generating cone is used.
OUTPUT:
An
affine algebraic subscheme
corresponding to the patch \(\mathop{Spec}(\sigma^\vee \cap M)\) associated to the cone \(\sigma\).See also
affine_patch()
, which expresses the patches as subvarieties of affine toric varieties instead.REFERENCES:
David A. Cox, “The Homogeneous Coordinate Ring of a Toric Variety”, Lemma 2.2. http://www.arxiv.org/abs/alg-geom/9210008v2EXAMPLES:
sage: P2.<x,y,z> = toric_varieties.P2() sage: cone = P2.fan().generating_cone(0) sage: V = P2.subscheme(x^3+y^3+z^3) sage: V.affine_algebraic_patch(cone) Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: z0^3 + z1^3 + 1 sage: cone = Cone([(0,1),(2,1)]) sage: A2Z2.<x,y> = AffineToricVariety(cone) sage: A2Z2.affine_algebraic_patch() Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: -z0*z1 + z2^2 sage: V = A2Z2.subscheme(x^2+y^2-1) sage: patch = V.affine_algebraic_patch(); patch Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: -z0*z1 + z2^2, z0 + z1 - 1 sage: nbhd_patch = V.neighborhood([1,0]).affine_algebraic_patch(); nbhd_patch Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: -z0*z1 + z2^2, z0 + z1 - 1 sage: nbhd_patch.embedding_center() (0, 1, 0)
Here we got two defining equations. The first one describes the singularity of the ambient space and the second is the pull-back of \(x^2+y^2-1\)
sage: lp = LatticePolytope([(1,0,0),(1,1,0),(1,1,1),(1,0,1),(-2,-1,-1)], ... lattice=ToricLattice(3)) sage: X.<x,y,u,v,t> = CPRFanoToricVariety(Delta_polar=lp) sage: Y = X.subscheme(x*v+y*u+t) sage: cone = Cone([(1,0,0),(1,1,0),(1,1,1),(1,0,1)]) sage: Y.affine_algebraic_patch(cone) Closed subscheme of Affine Space of dimension 4 over Rational Field defined by: z0*z2 - z1*z3, z1 + z3 + 1
-
affine_patch
(i)¶ Return the
i
-th affine patch ofself
as an affine toric algebraic scheme.INPUT:
i
– integer, index of a generating cone of the fan of the ambient space ofself
.
OUTPUT:
- subscheme of an affine
toric variety
corresponding to the pull-back ofself
by the embedding morphism of thei
-thaffine patch of the ambient space
ofself
.
The result is cached, so the
i
-th patch is always the same object in memory.EXAMPLES:
sage: P1xP1 = toric_varieties.P1xP1() sage: patch1 = P1xP1.affine_patch(1) sage: patch1.embedding_morphism() Scheme morphism: From: 2-d affine toric variety To: 2-d CPR-Fano toric variety covered by 4 affine patches Defn: Defined on coordinates by sending [t : x] to [1 : t : x : 1] sage: P1xP1.inject_variables() Defining s, t, x, y sage: P1 = P1xP1.subscheme(x-y) sage: subpatch = P1.affine_patch(1) sage: subpatch Closed subscheme of 2-d affine toric variety defined by: x - 1
-
dimension
()¶ Return the dimension of
self
.OUTPUT:
Integer. If
self
is empty, \(-1\) is returned.EXAMPLES:
sage: P1xP1 = toric_varieties.P1xP1() sage: P1xP1.inject_variables() Defining s, t, x, y sage: P1 = P1xP1.subscheme(s-t) sage: P1.dimension() 1 sage: P1xP1.subscheme([s-t, (s-t)^2]).dimension() 1 sage: P1xP1.subscheme([s, t]).dimension() -1
-
fan
()¶ Return the fan of the ambient space.
OUTPUT:
A fan.
EXAMPLES:
sage: P2.<x,y,z> = toric_varieties.P(2) sage: E = P2.subscheme([x^2+y^2+z^2]) sage: E.fan() Rational polyhedral fan in 2-d lattice N
-
is_smooth
(point=None)¶ Test whether the algebraic subscheme is smooth.
INPUT:
point
– A point orNone
(default). The point to test smoothness at.
OUTPUT:
Boolean. If no point was specified, returns whether the algebraic subscheme is smooth everywhere. Otherwise, smoothness at the specified point is tested.
EXAMPLES:
sage: P2.<x,y,z> = toric_varieties.P2() sage: cuspidal_curve = P2.subscheme([y^2*z-x^3]) sage: cuspidal_curve Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: -x^3 + y^2*z sage: cuspidal_curve.is_smooth([1,1,1]) True sage: cuspidal_curve.is_smooth([0,0,1]) False sage: cuspidal_curve.is_smooth() False
Any sufficiently generic cubic hypersurface is smooth:
sage: P2.subscheme([y^2*z-x^3+z^3+1/10*x*y*z]).is_smooth() True
A more complicated example:
sage: dP6.<x0,x1,x2,x3,x4,x5> = toric_varieties.dP6() sage: disjointP1s = dP6.subscheme(x0*x3) sage: disjointP1s.is_smooth() True sage: intersectingP1s = dP6.subscheme(x0*x1) sage: intersectingP1s.is_smooth() False
A smooth hypersurface in a compact singular toric variety:
sage: lp = LatticePolytope([(1,0,0),(1,1,0),(1,1,1),(1,0,1),(-2,-1,-1)], ... lattice=ToricLattice(3)) sage: X.<x,y,u,v,t> = CPRFanoToricVariety(Delta_polar=lp) sage: Y = X.subscheme(x*v+y*u+t) sage: cone = Cone([(1,0,0),(1,1,0),(1,1,1),(1,0,1)]) sage: Y.is_smooth() True
-
neighborhood
(point)¶ Return an toric algebraic scheme isomorphic to neighborhood of the
point
.INPUT:
point
– a point of the toric algebraic scheme.
OUTPUT:
An affine toric algebraic scheme (polynomial equations in an affine toric variety) with fixed
embedding_morphism()
andembedding_center()
.EXAMPLES:
sage: P.<x,y,z>= toric_varieties.P2() sage: S = P.subscheme(x+2*y+3*z) sage: s = S.point([0,-3,2]); s [0 : -3 : 2] sage: patch = S.neighborhood(s); patch Closed subscheme of 2-d affine toric variety defined by: x + 2*y + 6 sage: patch.embedding_morphism() Scheme morphism: From: Closed subscheme of 2-d affine toric variety defined by: x + 2*y + 6 To: Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: x + 2*y + 3*z Defn: Defined on coordinates by sending [x : y] to [-2*y - 6 : y : 2] sage: patch.embedding_center() [0 : -3] sage: patch.embedding_morphism()(patch.embedding_center()) [0 : -3 : 2]
A more complicated example:
sage: dP6.<x0,x1,x2,x3,x4,x5> = toric_varieties.dP6() sage: twoP1 = dP6.subscheme(x0*x3) sage: patch = twoP1.neighborhood([0,1,2, 3,4,5]); patch Closed subscheme of 2-d affine toric variety defined by: 3*x0 sage: patch.embedding_morphism() Scheme morphism: From: Closed subscheme of 2-d affine toric variety defined by: 3*x0 To: Closed subscheme of 2-d CPR-Fano toric variety covered by 6 affine patches defined by: x0*x3 Defn: Defined on coordinates by sending [x0 : x1] to [0 : x1 : 2 : 3 : 4 : 5] sage: patch.embedding_center() [0 : 1] sage: patch.embedding_morphism()(patch.embedding_center()) [0 : 1 : 2 : 3 : 4 : 5]
-
sage.schemes.generic.algebraic_scheme.
is_AlgebraicScheme
(x)¶ Test whether
x
is an algebraic scheme.INPUT:
x
– anything.
OUTPUT:
Boolean. Whether
x
is an an algebraic scheme, that is, a subscheme of an ambient space over a ring defined by polynomial equations.EXAMPLES:
sage: A2 = AffineSpace(2, QQ, 'x, y') sage: A2.coordinate_ring().inject_variables() Defining x, y sage: V = A2.subscheme([x^2+y^2]); V Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x^2 + y^2 sage: from sage.schemes.generic.algebraic_scheme import is_AlgebraicScheme sage: is_AlgebraicScheme(V) True
Affine space is itself not an algebraic scheme, though the closed subscheme defined by no equations is:
sage: from sage.schemes.generic.algebraic_scheme import is_AlgebraicScheme sage: is_AlgebraicScheme(AffineSpace(10, QQ)) False sage: V = AffineSpace(10, QQ).subscheme([]); V Closed subscheme of Affine Space of dimension 10 over Rational Field defined by: (no polynomials) sage: is_AlgebraicScheme(V) True
We create a more complicated closed subscheme:
sage: A,x = AffineSpace(10, QQ).objgens() sage: X = A.subscheme([sum(x)]); X Closed subscheme of Affine Space of dimension 10 over Rational Field defined by: x0 + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 sage: is_AlgebraicScheme(X) True
sage: is_AlgebraicScheme(QQ) False sage: S = Spec(QQ) sage: is_AlgebraicScheme(S) False