Scheme morphism¶
Note
You should never create the morphisms directly. Instead, use the
hom()
and
Hom()
methods that are inherited by
all schemes.
If you want to extend the Sage library with some new kind of scheme,
your new class (say, MyScheme
) should provide a method
MyScheme._morphism(*args, **kwds)
returning a morphism between two schemes in your category, usually defined via polynomials. Your morphism class should derive fromSchemeMorphism_polynomial
. These morphisms will usually be elements of the Hom-setSchemeHomset_generic
.
Optionally, you can also provide a special Hom-set class for your subcategory of schemes. If you want to do this, you should also provide a method
MyScheme._homset(*args, **kwds)
returning a Hom-set, which must be an element of a derived class ofSchemeHomset_generic
. If your new Hom-set class does not useMyScheme._morphism
then you do not have to provide it.
Note that points on schemes are morphisms \(\mathrm{Spec}(K)\to X\), too. But we typically use a different notation, so they are implemented in a different derived class. For this, you should implement a method
MyScheme._point(*args, **kwds)
returning a point, that is, a morphism \(\mathrm{Spec}(K)\to X\). Your point class should derive fromSchemeMorphism_point
.
Optionally, you can also provide a special Hom-set for the points, for example the point Hom-set can provide a method to enumerate all points. If you want to do this, you should also provide a method
MyScheme._point_homset(*args, **kwds)
returning thehomset
of points. The Hom-sets of points are implemented in classes namedSchemeHomset_points_...
. If your new Hom-set class does not useMyScheme._point
then you do not have to provide it.
AUTHORS:
David Kohel, William Stein
William Stein (2006-02-11): fixed bug where P(0,0,0) was allowed as a projective point.
Volker Braun (2011-08-08): Renamed classes, more documentation, misc cleanups.
Ben Hutz (June 2012): added support for projective ring
Simon King (2013-10): copy the changes of
Morphism
that have been introduced in Issue #14711.
- class sage.schemes.generic.morphism.SchemeMorphism(parent, codomain=None)[source]¶
Bases:
Element
Base class for scheme morphisms.
INPUT:
parent
– the parent of the morphism
Todo
For historical reasons,
SchemeMorphism
copies code fromMap
rather than inheriting from it. Proper inheritance should be used instead. See Issue #14711.EXAMPLES:
sage: X = Spec(ZZ) sage: Hom = X.Hom(X) sage: from sage.schemes.generic.morphism import SchemeMorphism sage: f = SchemeMorphism(Hom) sage: type(f) <class 'sage.schemes.generic.morphism.SchemeMorphism'>
>>> from sage.all import * >>> X = Spec(ZZ) >>> Hom = X.Hom(X) >>> from sage.schemes.generic.morphism import SchemeMorphism >>> f = SchemeMorphism(Hom) >>> type(f) <class 'sage.schemes.generic.morphism.SchemeMorphism'>
- base_ring()[source]¶
Return the base ring of
self
, that is, the ring over which the defining polynomials ofself
are defined.OUTPUT: ring
EXAMPLES:
sage: P.<x,y> = ProjectiveSpace(QQ, 1) sage: H = Hom(P, P) sage: f = H([3/5*x^2, 6*y^2]) sage: f.base_ring() Rational Field
>>> from sage.all import * >>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = Hom(P, P) >>> f = H([Integer(3)/Integer(5)*x**Integer(2), Integer(6)*y**Integer(2)]) >>> f.base_ring() Rational Field
sage: R.<t> = PolynomialRing(ZZ, 1) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: H = Hom(P, P) sage: f = H([3*x^2, y^2]) sage: f.base_ring() Multivariate Polynomial Ring in t over Integer Ring
>>> from sage.all import * >>> R = PolynomialRing(ZZ, Integer(1), names=('t',)); (t,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = Hom(P, P) >>> f = H([Integer(3)*x**Integer(2), y**Integer(2)]) >>> f.base_ring() Multivariate Polynomial Ring in t over Integer Ring
Points have correct base rings too (Issue #34336):
sage: x = P(t, 5); x (t : 5) sage: x.base_ring() Multivariate Polynomial Ring in t over Integer Ring
>>> from sage.all import * >>> x = P(t, Integer(5)); x (t : 5) >>> x.base_ring() Multivariate Polynomial Ring in t over Integer Ring
sage: # needs sage.rings.finite_rings sage.schemes sage: E = EllipticCurve(GF((17,2)), [1,2,3,4,5]) sage: P = E.random_point() sage: P.base_ring() Finite Field in z2 of size 17^2
>>> from sage.all import * >>> # needs sage.rings.finite_rings sage.schemes >>> E = EllipticCurve(GF((Integer(17),Integer(2))), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5)]) >>> P = E.random_point() >>> P.base_ring() Finite Field in z2 of size 17^2
- category()[source]¶
Return the category of the Hom-set.
OUTPUT: a category
EXAMPLES:
sage: A2 = AffineSpace(QQ, 2) sage: A2.structure_morphism().category() Category of homsets of schemes
>>> from sage.all import * >>> A2 = AffineSpace(QQ, Integer(2)) >>> A2.structure_morphism().category() Category of homsets of schemes
- category_for()[source]¶
Return the category which this morphism belongs to.
EXAMPLES:
sage: A2 = AffineSpace(QQ, 2) sage: A2.structure_morphism().category_for() Category of schemes
>>> from sage.all import * >>> A2 = AffineSpace(QQ, Integer(2)) >>> A2.structure_morphism().category_for() Category of schemes
- codomain()[source]¶
The constant function from the codomain.
EXAMPLES:
sage: A.<x,y> = AffineSpace(QQ['x,y']) sage: H = A.Hom(A) sage: f = H([y, x^2 + y]) sage: f.codomain() is A True
>>> from sage.all import * >>> A = AffineSpace(QQ['x,y'], names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = A.Hom(A) >>> f = H([y, x**Integer(2) + y]) >>> f.codomain() is A True
- domain()[source]¶
The constant function from the domain.
EXAMPLES:
sage: A.<x,y> = AffineSpace(QQ['x,y']) sage: H = A.Hom(A) sage: f = H([y, x^2 + y]) sage: f.domain() is A True
>>> from sage.all import * >>> A = AffineSpace(QQ['x,y'], names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = A.Hom(A) >>> f = H([y, x**Integer(2) + y]) >>> f.domain() is A True
- glue_along_domains(other)[source]¶
Glue two morphisms.
INPUT:
other
– a scheme morphism with the same domain
OUTPUT:
Assuming that
self
andother
are open immersions with the same domain, return scheme obtained by gluing along the images.EXAMPLES:
We construct a scheme isomorphic to the projective line over \(\mathrm{Spec}(\QQ)\) by gluing two copies of \(\mathbb{A}^1\) minus a point:
sage: # needs sage.libs.singular sage: R.<x,y> = PolynomialRing(QQ, 2) sage: S.<xbar, ybar> = R.quotient(x*y - 1) sage: Rx = PolynomialRing(QQ, 'x') sage: i1 = Rx.hom([xbar]) sage: Ry = PolynomialRing(QQ, 'y') sage: i2 = Ry.hom([ybar]) sage: Sch = Schemes() sage: f1 = Sch(i1) sage: f2 = Sch(i2)
>>> from sage.all import * >>> # needs sage.libs.singular >>> R = PolynomialRing(QQ, Integer(2), names=('x', 'y',)); (x, y,) = R._first_ngens(2) >>> S = R.quotient(x*y - Integer(1), names=('xbar', 'ybar',)); (xbar, ybar,) = S._first_ngens(2) >>> Rx = PolynomialRing(QQ, 'x') >>> i1 = Rx.hom([xbar]) >>> Ry = PolynomialRing(QQ, 'y') >>> i2 = Ry.hom([ybar]) >>> Sch = Schemes() >>> f1 = Sch(i1) >>> f2 = Sch(i2)
Now f1 and f2 have the same domain, which is a \(\mathbb{A}^1\) minus a point. We glue along the domain:
sage: # needs sage.libs.singular sage: P1 = f1.glue_along_domains(f2); P1 Scheme obtained by gluing X and Y along U, where X: Spectrum of Univariate Polynomial Ring in x over Rational Field Y: Spectrum of Univariate Polynomial Ring in y over Rational Field U: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) sage: a, b = P1.gluing_maps() sage: a Affine Scheme morphism: From: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) To: Spectrum of Univariate Polynomial Ring in x over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) Defn: x |--> xbar sage: b Affine Scheme morphism: From: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) To: Spectrum of Univariate Polynomial Ring in y over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in y over Rational Field To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) Defn: y |--> ybar
>>> from sage.all import * >>> # needs sage.libs.singular >>> P1 = f1.glue_along_domains(f2); P1 Scheme obtained by gluing X and Y along U, where X: Spectrum of Univariate Polynomial Ring in x over Rational Field Y: Spectrum of Univariate Polynomial Ring in y over Rational Field U: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) >>> a, b = P1.gluing_maps() >>> a Affine Scheme morphism: From: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) To: Spectrum of Univariate Polynomial Ring in x over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) Defn: x |--> xbar >>> b Affine Scheme morphism: From: Spectrum of Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) To: Spectrum of Univariate Polynomial Ring in y over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in y over Rational Field To: Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x*y - 1) Defn: y |--> ybar
- is_endomorphism()[source]¶
Return whether the morphism is an endomorphism.
OUTPUT: boolean; whether the domain and codomain are identical
EXAMPLES:
sage: X = AffineSpace(QQ, 2) sage: X.structure_morphism().is_endomorphism() False sage: X.identity_morphism().is_endomorphism() True
>>> from sage.all import * >>> X = AffineSpace(QQ, Integer(2)) >>> X.structure_morphism().is_endomorphism() False >>> X.identity_morphism().is_endomorphism() True
- class sage.schemes.generic.morphism.SchemeMorphism_id(X)[source]¶
Bases:
SchemeMorphism
Return the identity morphism from \(X\) to itself.
INPUT:
X
– the scheme
EXAMPLES:
sage: X = Spec(ZZ) sage: X.identity_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Identity map
>>> from sage.all import * >>> X = Spec(ZZ) >>> X.identity_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Identity map
- class sage.schemes.generic.morphism.SchemeMorphism_point(parent, codomain=None)[source]¶
Bases:
SchemeMorphism
Base class for rational points on schemes.
Recall that the \(K\)-rational points of a scheme \(X\) over \(k\) can be identified with the set of morphisms \(\mathrm{Spec}(K) \to X\). In Sage, the rational points are implemented by such scheme morphisms.
EXAMPLES:
sage: from sage.schemes.generic.morphism import SchemeMorphism sage: f = SchemeMorphism(Spec(ZZ).Hom(Spec(ZZ))) sage: type(f) <class 'sage.schemes.generic.morphism.SchemeMorphism'>
>>> from sage.all import * >>> from sage.schemes.generic.morphism import SchemeMorphism >>> f = SchemeMorphism(Spec(ZZ).Hom(Spec(ZZ))) >>> type(f) <class 'sage.schemes.generic.morphism.SchemeMorphism'>
- change_ring(R, check=True)[source]¶
Return a new
SchemeMorphism_point
which is this point coerced toR
.If
check
is true, then the initialization checks are performed.INPUT:
R
– ring or morphismcheck
– boolean
OUTPUT:
SchemeMorphism_point
EXAMPLES:
sage: P.<x,y,z> = ProjectiveSpace(ZZ, 2) sage: X = P.subscheme(x^2 - y^2) sage: X(23,23,1).change_ring(GF(13)) (10 : 10 : 1)
>>> from sage.all import * >>> P = ProjectiveSpace(ZZ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> X = P.subscheme(x**Integer(2) - y**Integer(2)) >>> X(Integer(23),Integer(23),Integer(1)).change_ring(GF(Integer(13))) (10 : 10 : 1)
sage: P.<x,y> = ProjectiveSpace(QQ, 1) sage: P(-2/3,1).change_ring(CC) # needs sage.rings.real_mpfr (-0.666666666666667 : 1.00000000000000)
>>> from sage.all import * >>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> P(-Integer(2)/Integer(3),Integer(1)).change_ring(CC) # needs sage.rings.real_mpfr (-0.666666666666667 : 1.00000000000000)
sage: P.<x,y> = ProjectiveSpace(ZZ, 1) sage: P(152,113).change_ring(Zp(5)) # needs sage.rings.padics (2 + 5^2 + 5^3 + O(5^20) : 3 + 2*5 + 4*5^2 + O(5^20))
>>> from sage.all import * >>> P = ProjectiveSpace(ZZ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> P(Integer(152),Integer(113)).change_ring(Zp(Integer(5))) # needs sage.rings.padics (2 + 5^2 + 5^3 + O(5^20) : 3 + 2*5 + 4*5^2 + O(5^20))
sage: # needs sage.rings.number_field sage: K.<v> = QuadraticField(-7) sage: O = K.maximal_order() sage: P.<x,y> = ProjectiveSpace(O, 1) sage: H = End(P) sage: F = H([x^2 + O(v)*y^2, y^2]) sage: F.change_ring(K).change_ring(K.embeddings(QQbar)[0]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (-2.645751311064591?*I)*y^2 : y^2)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> K = QuadraticField(-Integer(7), names=('v',)); (v,) = K._first_ngens(1) >>> O = K.maximal_order() >>> P = ProjectiveSpace(O, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> F = H([x**Integer(2) + O(v)*y**Integer(2), y**Integer(2)]) >>> F.change_ring(K).change_ring(K.embeddings(QQbar)[Integer(0)]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (-2.645751311064591?*I)*y^2 : y^2)
sage: # needs sage.rings.number_field sage: R.<x> = PolynomialRing(QQ) sage: K.<a> = NumberField(x^2 - x + 1) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: Q = P([a + 1, 1]) sage: emb = K.embeddings(QQbar) sage: Q.change_ring(emb[0]) (1.5000000000000000? - 0.866025403784439?*I : 1) sage: Q.change_ring(emb[1]) (1.5000000000000000? + 0.866025403784439?*I : 1)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1) >>> K = NumberField(x**Integer(2) - x + Integer(1), names=('a',)); (a,) = K._first_ngens(1) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> Q = P([a + Integer(1), Integer(1)]) >>> emb = K.embeddings(QQbar) >>> Q.change_ring(emb[Integer(0)]) (1.5000000000000000? - 0.866025403784439?*I : 1) >>> Q.change_ring(emb[Integer(1)]) (1.5000000000000000? + 0.866025403784439?*I : 1)
sage: # needs sage.rings.number_field sage: K.<v> = QuadraticField(2) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: Q = P([v,1]) sage: Q.change_ring(K.embeddings(QQbar)[0]) (-1.414213562373095? : 1)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> K = QuadraticField(Integer(2), names=('v',)); (v,) = K._first_ngens(1) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> Q = P([v,Integer(1)]) >>> Q.change_ring(K.embeddings(QQbar)[Integer(0)]) (-1.414213562373095? : 1)
sage: # needs sage.rings.number_field sage: R.<x> = QQ[] sage: f = x^6 - 2 sage: L.<b> = NumberField(f, embedding=f.roots(QQbar)[1][0]) sage: A.<x,y> = AffineSpace(L, 2) sage: P = A([b,1]) sage: P.change_ring(QQbar) (1.122462048309373?, 1)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> f = x**Integer(6) - Integer(2) >>> L = NumberField(f, embedding=f.roots(QQbar)[Integer(1)][Integer(0)], names=('b',)); (b,) = L._first_ngens(1) >>> A = AffineSpace(L, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> P = A([b,Integer(1)]) >>> P.change_ring(QQbar) (1.122462048309373?, 1)
- scheme()[source]¶
Return the scheme whose point is represented.
OUTPUT: a scheme
EXAMPLES:
sage: A = AffineSpace(2, QQ) sage: a = A(1,2) sage: a.scheme() Affine Space of dimension 2 over Rational Field
>>> from sage.all import * >>> A = AffineSpace(Integer(2), QQ) >>> a = A(Integer(1),Integer(2)) >>> a.scheme() Affine Space of dimension 2 over Rational Field
- specialization(D=None, phi=None, ambient=None)[source]¶
Specialization of this point.
Given a family of points defined over a polynomial ring. A specialization is a particular member of that family. The specialization can be specified either by a dictionary or a
SpecializationMorphism
.INPUT:
D
– dictionary (optional)phi
– SpecializationMorphism (optional)ambient
– ambient space of specialized point (optional)
OUTPUT:
SchemeMorphism_polynomial
EXAMPLES:
sage: R.<c> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: Q = P([c,1]) sage: Q.specialization({c: 1}) (1 : 1)
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('c',)); (c,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> Q = P([c,Integer(1)]) >>> Q.specialization({c: Integer(1)}) (1 : 1)
sage: R.<a,b> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: Q = P([a^2 + 2*a*b + 34, 1]) sage: from sage.rings.polynomial.flatten import SpecializationMorphism sage: phi = SpecializationMorphism(P.coordinate_ring(), {a: 2, b: -1}) sage: T = Q.specialization(phi=phi); T (34 : 1) sage: Q2 = P([a,1]) sage: T2 = Q2.specialization(phi=phi) sage: T2.codomain() is T.codomain() True sage: T3 = Q2.specialization(phi=phi, ambient=T.codomain()) sage: T3.codomain() is T.codomain() True
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('a', 'b',)); (a, b,) = R._first_ngens(2) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> Q = P([a**Integer(2) + Integer(2)*a*b + Integer(34), Integer(1)]) >>> from sage.rings.polynomial.flatten import SpecializationMorphism >>> phi = SpecializationMorphism(P.coordinate_ring(), {a: Integer(2), b: -Integer(1)}) >>> T = Q.specialization(phi=phi); T (34 : 1) >>> Q2 = P([a,Integer(1)]) >>> T2 = Q2.specialization(phi=phi) >>> T2.codomain() is T.codomain() True >>> T3 = Q2.specialization(phi=phi, ambient=T.codomain()) >>> T3.codomain() is T.codomain() True
sage: R.<c> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: X = P.subscheme([x - c*y]) sage: Q = X([c, 1]) sage: Q2 = Q.specialization({c:2}); Q2 (2 : 1) sage: Q2.codomain() Closed subscheme of Projective Space of dimension 1 over Rational Field defined by: x - 2*y
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('c',)); (c,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> X = P.subscheme([x - c*y]) >>> Q = X([c, Integer(1)]) >>> Q2 = Q.specialization({c:Integer(2)}); Q2 (2 : 1) >>> Q2.codomain() Closed subscheme of Projective Space of dimension 1 over Rational Field defined by: x - 2*y
sage: R.<l> = PolynomialRing(QQ) sage: S.<k,j> = PolynomialRing(R) sage: K.<a,b,c,d> = S[] sage: P.<x,y> = ProjectiveSpace(K, 1) sage: H = End(P) sage: Q = P([a^2, b^2]) sage: Q.specialization({a: 2}) (4 : b^2)
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('l',)); (l,) = R._first_ngens(1) >>> S = PolynomialRing(R, names=('k', 'j',)); (k, j,) = S._first_ngens(2) >>> K = S['a, b, c, d']; (a, b, c, d,) = K._first_ngens(4) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> Q = P([a**Integer(2), b**Integer(2)]) >>> Q.specialization({a: Integer(2)}) (4 : b^2)
- class sage.schemes.generic.morphism.SchemeMorphism_polynomial(parent, polys, check=True)[source]¶
Bases:
SchemeMorphism
A morphism of schemes determined by polynomials that define what the morphism does on points in the ambient space.
INPUT:
parent
– Hom-set whose domain and codomain are affine or projective schemespolys
– list/tuple/iterable of polynomials defining the scheme morphismcheck
– boolean (default:True
); whether to check the input for consistency
EXAMPLES:
An example involving the affine plane:
sage: R.<x,y> = QQ[] sage: A2 = AffineSpace(R) sage: H = A2.Hom(A2) sage: f = H([x - y, x*y]) sage: f([0, 1]) (-1, 0)
>>> from sage.all import * >>> R = QQ['x, y']; (x, y,) = R._first_ngens(2) >>> A2 = AffineSpace(R) >>> H = A2.Hom(A2) >>> f = H([x - y, x*y]) >>> f([Integer(0), Integer(1)]) (-1, 0)
An example involving the projective line:
sage: R.<x,y> = QQ[] sage: P1 = ProjectiveSpace(R) sage: H = P1.Hom(P1) sage: f = H([x^2 + y^2, x*y]) sage: f([0, 1]) (1 : 0)
>>> from sage.all import * >>> R = QQ['x, y']; (x, y,) = R._first_ngens(2) >>> P1 = ProjectiveSpace(R) >>> H = P1.Hom(P1) >>> f = H([x**Integer(2) + y**Integer(2), x*y]) >>> f([Integer(0), Integer(1)]) (1 : 0)
Some checks are performed to make sure the given polynomials define a morphism:
sage: f = H([exp(x),exp(y)]) # needs sage.symbolic Traceback (most recent call last): ... TypeError: polys (=[e^x, e^y]) must be elements of Multivariate Polynomial Ring in x, y over Rational Field
>>> from sage.all import * >>> f = H([exp(x),exp(y)]) # needs sage.symbolic Traceback (most recent call last): ... TypeError: polys (=[e^x, e^y]) must be elements of Multivariate Polynomial Ring in x, y over Rational Field
- change_ring(R, check=True)[source]¶
Return a new
SchemeMorphism_polynomial
which is this map coerced toR
.If
check
isTrue
, then the initialization checks are performed.INPUT:
R
– ring or morphismcheck
– boolean
OUTPUT: a new
SchemeMorphism_polynomial
which is this map coerced toR
EXAMPLES:
sage: P.<x,y> = ProjectiveSpace(ZZ, 1) sage: H = Hom(P, P) sage: f = H([3*x^2, y^2]) sage: f.change_ring(GF(3)) Scheme endomorphism of Projective Space of dimension 1 over Finite Field of size 3 Defn: Defined on coordinates by sending (x : y) to (0 : y^2)
>>> from sage.all import * >>> P = ProjectiveSpace(ZZ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = Hom(P, P) >>> f = H([Integer(3)*x**Integer(2), y**Integer(2)]) >>> f.change_ring(GF(Integer(3))) Scheme endomorphism of Projective Space of dimension 1 over Finite Field of size 3 Defn: Defined on coordinates by sending (x : y) to (0 : y^2)
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2) sage: H = Hom(P, P) sage: f = H([5/2*x^3 + 3*x*y^2 - y^3, 3*z^3 + y*x^2, x^3 - z^3]) sage: f.change_ring(GF(3)) Scheme endomorphism of Projective Space of dimension 2 over Finite Field of size 3 Defn: Defined on coordinates by sending (x : y : z) to (x^3 - y^3 : x^2*y : x^3 - z^3)
>>> from sage.all import * >>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> H = Hom(P, P) >>> f = H([Integer(5)/Integer(2)*x**Integer(3) + Integer(3)*x*y**Integer(2) - y**Integer(3), Integer(3)*z**Integer(3) + y*x**Integer(2), x**Integer(3) - z**Integer(3)]) >>> f.change_ring(GF(Integer(3))) Scheme endomorphism of Projective Space of dimension 2 over Finite Field of size 3 Defn: Defined on coordinates by sending (x : y : z) to (x^3 - y^3 : x^2*y : x^3 - z^3)
sage: P.<x,y> = ProjectiveSpace(QQ, 1) sage: X = P.subscheme([5*x^2 - y^2]) sage: H = Hom(X, X) sage: f = H([x, y]) sage: f.change_ring(GF(3)) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Finite Field of size 3 defined by: -x^2 - y^2 Defn: Defined on coordinates by sending (x : y) to (x : y)
>>> from sage.all import * >>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> X = P.subscheme([Integer(5)*x**Integer(2) - y**Integer(2)]) >>> H = Hom(X, X) >>> f = H([x, y]) >>> f.change_ring(GF(Integer(3))) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Finite Field of size 3 defined by: -x^2 - y^2 Defn: Defined on coordinates by sending (x : y) to (x : y)
Check that Issue #16834 is fixed:
sage: # needs sage.rings.real_mpfr sage: A.<x,y,z> = AffineSpace(RR, 3) sage: h = Hom(A, A) sage: f = h([x^2 + 1.5, y^3, z^5 - 2.0]) sage: f.change_ring(CC) Scheme endomorphism of Affine Space of dimension 3 over Complex Field with 53 bits of precision Defn: Defined on coordinates by sending (x, y, z) to (x^2 + 1.50000000000000, y^3, z^5 - 2.00000000000000)
>>> from sage.all import * >>> # needs sage.rings.real_mpfr >>> A = AffineSpace(RR, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> h = Hom(A, A) >>> f = h([x**Integer(2) + RealNumber('1.5'), y**Integer(3), z**Integer(5) - RealNumber('2.0')]) >>> f.change_ring(CC) Scheme endomorphism of Affine Space of dimension 3 over Complex Field with 53 bits of precision Defn: Defined on coordinates by sending (x, y, z) to (x^2 + 1.50000000000000, y^3, z^5 - 2.00000000000000)
sage: A.<x,y> = AffineSpace(ZZ, 2) sage: B.<u,v> = ProjectiveSpace(QQ, 1) sage: h = Hom(A,B) sage: f = h([x^2, y^2]) sage: f.change_ring(QQ) Scheme morphism: From: Affine Space of dimension 2 over Rational Field To: Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x, y) to (x^2 : y^2)
>>> from sage.all import * >>> A = AffineSpace(ZZ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> B = ProjectiveSpace(QQ, Integer(1), names=('u', 'v',)); (u, v,) = B._first_ngens(2) >>> h = Hom(A,B) >>> f = h([x**Integer(2), y**Integer(2)]) >>> f.change_ring(QQ) Scheme morphism: From: Affine Space of dimension 2 over Rational Field To: Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x, y) to (x^2 : y^2)
sage: A.<x,y> = AffineSpace(QQ, 2) sage: H = Hom(A, A) sage: f = H([3*x^2/y, y^2/x]) sage: f.change_ring(RR) # needs sage.rings.real_mpfr Scheme endomorphism of Affine Space of dimension 2 over Real Field with 53 bits of precision Defn: Defined on coordinates by sending (x, y) to (3.00000000000000*x^2/y, y^2/x)
>>> from sage.all import * >>> A = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = Hom(A, A) >>> f = H([Integer(3)*x**Integer(2)/y, y**Integer(2)/x]) >>> f.change_ring(RR) # needs sage.rings.real_mpfr Scheme endomorphism of Affine Space of dimension 2 over Real Field with 53 bits of precision Defn: Defined on coordinates by sending (x, y) to (3.00000000000000*x^2/y, y^2/x)
sage: # needs sage.rings.number_field sage: R.<x> = PolynomialRing(QQ) sage: K.<a> = NumberField(x^3 - x + 1) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: H = End(P) sage: f = H([x^2 + a*x*y + a^2*y^2, y^2]) sage: emb = K.embeddings(QQbar) sage: f.change_ring(emb[0]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (-1.324717957244746?)*x*y + 1.754877666246693?*y^2 : y^2) sage: f.change_ring(emb[1]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (0.6623589786223730? - 0.5622795120623013?*I)*x*y + (0.1225611668766537? - 0.744861766619745?*I)*y^2 : y^2)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1) >>> K = NumberField(x**Integer(3) - x + Integer(1), names=('a',)); (a,) = K._first_ngens(1) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> f = H([x**Integer(2) + a*x*y + a**Integer(2)*y**Integer(2), y**Integer(2)]) >>> emb = K.embeddings(QQbar) >>> f.change_ring(emb[Integer(0)]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (-1.324717957244746?)*x*y + 1.754877666246693?*y^2 : y^2) >>> f.change_ring(emb[Integer(1)]) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + (0.6623589786223730? - 0.5622795120623013?*I)*x*y + (0.1225611668766537? - 0.744861766619745?*I)*y^2 : y^2)
sage: # needs sage.rings.number_field sage.symbolic sage: K.<v> = QuadraticField(2, embedding=QQbar(sqrt(2))) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: H = End(P) sage: f = H([x^2 + v*y^2, y^2]) sage: f.change_ring(QQbar) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + 1.414213562373095?*y^2 : y^2)
>>> from sage.all import * >>> # needs sage.rings.number_field sage.symbolic >>> K = QuadraticField(Integer(2), embedding=QQbar(sqrt(Integer(2))), names=('v',)); (v,) = K._first_ngens(1) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> f = H([x**Integer(2) + v*y**Integer(2), y**Integer(2)]) >>> f.change_ring(QQbar) Scheme endomorphism of Projective Space of dimension 1 over Algebraic Field Defn: Defined on coordinates by sending (x : y) to (x^2 + 1.414213562373095?*y^2 : y^2)
sage: # needs sage.rings.number_field sage.symbolic sage: from sage.misc.verbose import set_verbose sage: set_verbose(-1) sage: K.<w> = QuadraticField(2, embedding=QQbar(-sqrt(2))) sage: P.<x,y> = ProjectiveSpace(K, 1) sage: X = P.subscheme(x - y) sage: H = End(X) sage: f = H([6*x^2 + 2*x*y + 16*y^2, -w*x^2 - 4*x*y - 4*y^2]) sage: f.change_ring(QQbar) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Algebraic Field defined by: x - y Defn: Defined on coordinates by sending (x : y) to (6*x^2 + 2*x*y + 16*y^2 : 1.414213562373095?*x^2 + (-4)*x*y + (-4)*y^2)
>>> from sage.all import * >>> # needs sage.rings.number_field sage.symbolic >>> from sage.misc.verbose import set_verbose >>> set_verbose(-Integer(1)) >>> K = QuadraticField(Integer(2), embedding=QQbar(-sqrt(Integer(2))), names=('w',)); (w,) = K._first_ngens(1) >>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> X = P.subscheme(x - y) >>> H = End(X) >>> f = H([Integer(6)*x**Integer(2) + Integer(2)*x*y + Integer(16)*y**Integer(2), -w*x**Integer(2) - Integer(4)*x*y - Integer(4)*y**Integer(2)]) >>> f.change_ring(QQbar) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Algebraic Field defined by: x - y Defn: Defined on coordinates by sending (x : y) to (6*x^2 + 2*x*y + 16*y^2 : 1.414213562373095?*x^2 + (-4)*x*y + (-4)*y^2)
sage: # needs sage.rings.number_field sage: R.<x> = QQ[] sage: f = x^6 - 2 sage: L.<b> = NumberField(f, embedding=f.roots(QQbar)[1][0]) sage: A.<x,y> = AffineSpace(L, 2) sage: H = Hom(A, A) sage: F = H([b*x/y, 1 + y]) sage: F.change_ring(QQbar) Scheme endomorphism of Affine Space of dimension 2 over Algebraic Field Defn: Defined on coordinates by sending (x, y) to (1.122462048309373?*x/y, y + 1)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> f = x**Integer(6) - Integer(2) >>> L = NumberField(f, embedding=f.roots(QQbar)[Integer(1)][Integer(0)], names=('b',)); (b,) = L._first_ngens(1) >>> A = AffineSpace(L, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = Hom(A, A) >>> F = H([b*x/y, Integer(1) + y]) >>> F.change_ring(QQbar) Scheme endomorphism of Affine Space of dimension 2 over Algebraic Field Defn: Defined on coordinates by sending (x, y) to (1.122462048309373?*x/y, y + 1)
sage: # needs sage.rings.number_field sage: K.<a> = QuadraticField(-1) sage: A.<x,y> = AffineSpace(K, 2) sage: H = End(A) sage: phi = H([x/y, y]) sage: emb = K.embeddings(QQbar)[0] sage: phi.change_ring(emb) Scheme endomorphism of Affine Space of dimension 2 over Algebraic Field Defn: Defined on coordinates by sending (x, y) to (x/y, y)
>>> from sage.all import * >>> # needs sage.rings.number_field >>> K = QuadraticField(-Integer(1), names=('a',)); (a,) = K._first_ngens(1) >>> A = AffineSpace(K, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = End(A) >>> phi = H([x/y, y]) >>> emb = K.embeddings(QQbar)[Integer(0)] >>> phi.change_ring(emb) Scheme endomorphism of Affine Space of dimension 2 over Algebraic Field Defn: Defined on coordinates by sending (x, y) to (x/y, y)
- coordinate_ring()[source]¶
Return the coordinate ring of the ambient projective space.
OUTPUT: a multivariable polynomial ring over the base ring
EXAMPLES:
sage: P.<x,y> = ProjectiveSpace(QQ, 1) sage: H = Hom(P, P) sage: f = H([3/5*x^2, 6*y^2]) sage: f.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field
>>> from sage.all import * >>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = Hom(P, P) >>> f = H([Integer(3)/Integer(5)*x**Integer(2), Integer(6)*y**Integer(2)]) >>> f.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field
sage: R.<t> = PolynomialRing(ZZ, 1) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: H = Hom(P, P) sage: f = H([3*x^2, y^2]) sage: f.coordinate_ring() Multivariate Polynomial Ring in x, y over Multivariate Polynomial Ring in t over Integer Ring
>>> from sage.all import * >>> R = PolynomialRing(ZZ, Integer(1), names=('t',)); (t,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = Hom(P, P) >>> f = H([Integer(3)*x**Integer(2), y**Integer(2)]) >>> f.coordinate_ring() Multivariate Polynomial Ring in x, y over Multivariate Polynomial Ring in t over Integer Ring
- defining_polynomials()[source]¶
Return the defining polynomials.
OUTPUT:
An immutable sequence of polynomials that defines this scheme morphism.
EXAMPLES:
sage: R.<x,y> = QQ[] sage: A.<x,y> = AffineSpace(R) sage: H = A.Hom(A) sage: H([x^3 + y, 1 - x - y]).defining_polynomials() (x^3 + y, -x - y + 1)
>>> from sage.all import * >>> R = QQ['x, y']; (x, y,) = R._first_ngens(2) >>> A = AffineSpace(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> H = A.Hom(A) >>> H([x**Integer(3) + y, Integer(1) - x - y]).defining_polynomials() (x^3 + y, -x - y + 1)
- specialization(D=None, phi=None, homset=None)[source]¶
Specialization of this map.
Given a family of maps defined over a polynomial ring. A specialization is a particular member of that family. The specialization can be specified either by a dictionary or a
SpecializationMorphism
.INPUT:
D
– dictionary (optional)phi
– SpecializationMorphism (optional)homset
– homset of specialized map (optional)
OUTPUT:
SchemeMorphism_polynomial
EXAMPLES:
sage: R.<c> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: H = End(P) sage: f = H([x^2 + c*y^2, y^2]) sage: f.specialization({c: 1}) Scheme endomorphism of Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x : y) to (x^2 + y^2 : y^2)
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('c',)); (c,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> f = H([x**Integer(2) + c*y**Integer(2), y**Integer(2)]) >>> f.specialization({c: Integer(1)}) Scheme endomorphism of Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x : y) to (x^2 + y^2 : y^2)
sage: R.<a,b> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: H = End(P) sage: f = H([x^3 + a*x*y^2 + b*y^3, y^3]) sage: from sage.rings.polynomial.flatten import SpecializationMorphism sage: phi = SpecializationMorphism(P.coordinate_ring(), {a: 2, b: -1}) sage: F = f.specialization(phi=phi); F Scheme endomorphism of Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x : y) to (x^3 + 2*x*y^2 - y^3 : y^3) sage: g = H([x^2 + a*y^2, y^2]) sage: G = g.specialization(phi=phi) sage: G.parent() is F.parent() True sage: G = g.specialization(phi=phi, homset=F.parent()) sage: G.parent() is F.parent() True
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('a', 'b',)); (a, b,) = R._first_ngens(2) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> H = End(P) >>> f = H([x**Integer(3) + a*x*y**Integer(2) + b*y**Integer(3), y**Integer(3)]) >>> from sage.rings.polynomial.flatten import SpecializationMorphism >>> phi = SpecializationMorphism(P.coordinate_ring(), {a: Integer(2), b: -Integer(1)}) >>> F = f.specialization(phi=phi); F Scheme endomorphism of Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x : y) to (x^3 + 2*x*y^2 - y^3 : y^3) >>> g = H([x**Integer(2) + a*y**Integer(2), y**Integer(2)]) >>> G = g.specialization(phi=phi) >>> G.parent() is F.parent() True >>> G = g.specialization(phi=phi, homset=F.parent()) >>> G.parent() is F.parent() True
sage: R.<c> = PolynomialRing(QQ) sage: P.<x,y> = ProjectiveSpace(R, 1) sage: X = P.subscheme([x - c*y]) sage: H = End(X) sage: f = H([x^2, c*y^2]) sage: f.specialization({c: 2}) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Rational Field defined by: x - 2*y Defn: Defined on coordinates by sending (x : y) to (x^2 : 2*y^2)
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('c',)); (c,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> X = P.subscheme([x - c*y]) >>> H = End(X) >>> f = H([x**Integer(2), c*y**Integer(2)]) >>> f.specialization({c: Integer(2)}) Scheme endomorphism of Closed subscheme of Projective Space of dimension 1 over Rational Field defined by: x - 2*y Defn: Defined on coordinates by sending (x : y) to (x^2 : 2*y^2)
sage: R.<c> = QQ[] sage: P.<x,y> = ProjectiveSpace(R, 1) sage: f = DynamicalSystem_projective([x^2 + c*y^2, y^2], domain=P) sage: F = f.dynatomic_polynomial(3) # needs sage.libs.pari sage: g = F.specialization({c: 1}); g x^6 + x^5*y + 4*x^4*y^2 + 3*x^3*y^3 + 7*x^2*y^4 + 4*x*y^5 + 5*y^6 sage: g == f.specialization({c:1}).dynatomic_polynomial(3) # needs sage.libs.pari True
>>> from sage.all import * >>> R = QQ['c']; (c,) = R._first_ngens(1) >>> P = ProjectiveSpace(R, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> f = DynamicalSystem_projective([x**Integer(2) + c*y**Integer(2), y**Integer(2)], domain=P) >>> F = f.dynatomic_polynomial(Integer(3)) # needs sage.libs.pari >>> g = F.specialization({c: Integer(1)}); g x^6 + x^5*y + 4*x^4*y^2 + 3*x^3*y^3 + 7*x^2*y^4 + 4*x*y^5 + 5*y^6 >>> g == f.specialization({c:Integer(1)}).dynatomic_polynomial(Integer(3)) # needs sage.libs.pari True
sage: R1.<alpha, beta> = QQ[] sage: A.<x> = AffineSpace(Frac(R1), 1) sage: f = DynamicalSystem_affine([alpha/(x^2 + 1/alpha)/(x - 1/beta^2)]) sage: f.specialization({alpha: 5, beta: 10}) Dynamical System of Affine Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x) to (5/(x^3 - 1/100*x^2 + 1/5*x - 1/500)) sage: f_5_10 = f.specialization({alpha: 5}).specialization({beta: 10}) sage: f_5_10 == f.specialization({alpha: 5, beta: 10}) True
>>> from sage.all import * >>> R1 = QQ['alpha, beta']; (alpha, beta,) = R1._first_ngens(2) >>> A = AffineSpace(Frac(R1), Integer(1), names=('x',)); (x,) = A._first_ngens(1) >>> f = DynamicalSystem_affine([alpha/(x**Integer(2) + Integer(1)/alpha)/(x - Integer(1)/beta**Integer(2))]) >>> f.specialization({alpha: Integer(5), beta: Integer(10)}) Dynamical System of Affine Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x) to (5/(x^3 - 1/100*x^2 + 1/5*x - 1/500)) >>> f_5_10 = f.specialization({alpha: Integer(5)}).specialization({beta: Integer(10)}) >>> f_5_10 == f.specialization({alpha: Integer(5), beta: Integer(10)}) True
- class sage.schemes.generic.morphism.SchemeMorphism_polynomial_id(X)[source]¶
Bases:
SchemeMorphism_id
,SchemeMorphism_polynomial
Return the identity morphism from \(X\) to itself.
INPUT:
X
– an affine or projective scheme
EXAMPLES:
sage: X = Spec(ZZ) sage: X.identity_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Identity map
>>> from sage.all import * >>> X = Spec(ZZ) >>> X.identity_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Identity map
- class sage.schemes.generic.morphism.SchemeMorphism_spec(parent, phi, check=True)[source]¶
Bases:
SchemeMorphism
Morphism of spectra of rings.
INPUT:
parent
– Hom-set whose domain and codomain are affine schemesphi
– a ring morphism with matching domain and codomaincheck
– boolean (default:True
); whether to check the input for consistency
EXAMPLES:
sage: R.<x> = PolynomialRing(QQ) sage: phi = R.hom([QQ(7)]); phi Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7 sage: X = Spec(QQ); Y = Spec(R) sage: f = X.hom(phi); f Affine Scheme morphism: From: Spectrum of Rational Field To: Spectrum of Univariate Polynomial Ring in x over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7 sage: f.ring_homomorphism() Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1) >>> phi = R.hom([QQ(Integer(7))]); phi Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7 >>> X = Spec(QQ); Y = Spec(R) >>> f = X.hom(phi); f Affine Scheme morphism: From: Spectrum of Rational Field To: Spectrum of Univariate Polynomial Ring in x over Rational Field Defn: Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7 >>> f.ring_homomorphism() Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7
- ring_homomorphism()[source]¶
Return the underlying ring homomorphism.
OUTPUT: a ring homomorphism
EXAMPLES:
sage: R.<x> = PolynomialRing(QQ) sage: phi = R.hom([QQ(7)]) sage: X = Spec(QQ); Y = Spec(R) sage: f = X.hom(phi) sage: f.ring_homomorphism() Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1) >>> phi = R.hom([QQ(Integer(7))]) >>> X = Spec(QQ); Y = Spec(R) >>> f = X.hom(phi) >>> f.ring_homomorphism() Ring morphism: From: Univariate Polynomial Ring in x over Rational Field To: Rational Field Defn: x |--> 7
- class sage.schemes.generic.morphism.SchemeMorphism_structure_map(parent, codomain=None)[source]¶
Bases:
SchemeMorphism
The structure morphism.
INPUT:
parent
– Hom-set with codomain equal to the base scheme of the domain
EXAMPLES:
sage: Spec(ZZ).structure_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Structure map
>>> from sage.all import * >>> Spec(ZZ).structure_morphism() # indirect doctest Scheme endomorphism of Spectrum of Integer Ring Defn: Structure map
- sage.schemes.generic.morphism.is_SchemeMorphism(f)[source]¶
Test whether
f
is a scheme morphism.INPUT:
f
– anything
OUTPUT:
boolean; return
True
iff
is a scheme morphism or a point on an elliptic curve.EXAMPLES:
sage: A.<x,y> = AffineSpace(QQ, 2); H = A.Hom(A) sage: f = H([y, x^2 + y]); f Scheme endomorphism of Affine Space of dimension 2 over Rational Field Defn: Defined on coordinates by sending (x, y) to (y, x^2 + y) sage: from sage.schemes.generic.morphism import is_SchemeMorphism sage: is_SchemeMorphism(f) doctest:warning... DeprecationWarning: The function is_SchemeMorphism is deprecated; use 'isinstance(..., SchemeMorphism)' instead. See https://github.com/sagemath/sage/issues/38296 for details. True
>>> from sage.all import * >>> A = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2); H = A.Hom(A) >>> f = H([y, x**Integer(2) + y]); f Scheme endomorphism of Affine Space of dimension 2 over Rational Field Defn: Defined on coordinates by sending (x, y) to (y, x^2 + y) >>> from sage.schemes.generic.morphism import is_SchemeMorphism >>> is_SchemeMorphism(f) doctest:warning... DeprecationWarning: The function is_SchemeMorphism is deprecated; use 'isinstance(..., SchemeMorphism)' instead. See https://github.com/sagemath/sage/issues/38296 for details. True