Morphisms on projective schemes

This module defines morphisms from projective schemes. A morphism from a projective scheme to a projective scheme is defined by homogeneous polynomials of the same degree that define what the morphism does on points in the ambient projective space. A morphism from a projective scheme to an affine scheme is determined by rational function, that is, quotients of homogeneous polynomials of the same degree.

EXAMPLES:

sage: P2.<x0,x1,x2> = ProjectiveSpace(QQ, 2)
sage: A2.<x,y> = AffineSpace(QQ, 2)
sage: P2.hom([x0, x1, x1 + x2], P2)
Scheme endomorphism of Projective Space of dimension 2 over Rational Field
  Defn: Defined on coordinates by sending (x0 : x1 : x2) to
        (x0 : x1 : x1 + x2)
sage: P2.hom([x1/x0, (x1 + x2)/x0], A2)
Scheme morphism:
  From: Projective Space of dimension 2 over Rational Field
  To:   Affine Space of dimension 2 over Rational Field
  Defn: Defined on coordinates by sending (x0 : x1 : x2) to
        (x1/x0, (x1 + x2)/x0)

AUTHORS:

  • David Kohel, William Stein: initial version

  • 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 (2013-03): iteration functionality and new directory structure for affine/projective, height functionality

  • Brian Stout, Ben Hutz (2013-11): added minimal model functionality

  • Dillon Rose (2014-01): speed enhancements

  • Ben Hutz (2015-11): iteration of subschemes

  • Kwankyu Lee (2020-02): added indeterminacy_locus() and image()

class sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space(parent, polys, check=True)

Bases: sage.schemes.generic.morphism.SchemeMorphism_polynomial

A morphism of schemes determined by rational functions that define what the morphism does on points in the ambient projective space.

EXAMPLES:

sage: R.<x,y> = QQ[]
sage: P1 = ProjectiveSpace(R)
sage: H = P1.Hom(P1)
sage: H([y,2*x])
Scheme endomorphism of Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (y : 2*x)

An example of a morphism between projective plane curves (see trac ticket #10297):

sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: f = x^3+y^3+60*z^3
sage: g = y^2*z-( x^3 - 6400*z^3/3)
sage: C = Curve(f)
sage: E = Curve(g)
sage: xbar,ybar,zbar = C.coordinate_ring().gens()
sage: H = C.Hom(E)
sage: H([zbar,xbar-ybar,-(xbar+ybar)/80])
Scheme morphism:
  From: Projective Plane Curve over Rational Field defined by x^3 + y^3 + 60*z^3
  To:   Projective Plane Curve over Rational Field defined by -x^3 + y^2*z + 6400/3*z^3
  Defn: Defined on coordinates by sending (x : y : z) to
        (z : x - y : -1/80*x - 1/80*y)

A more complicated example:

sage: P2.<x,y,z> = ProjectiveSpace(2, QQ)
sage: P1 = P2.subscheme(x-y)
sage: H12 = P1.Hom(P2)
sage: H12([x^2, x*z, z^2])
Scheme morphism:
  From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x - y
  To:   Projective Space of dimension 2 over Rational Field
  Defn: Defined on coordinates by sending (x : y : z) to
      (x^2 : x*z : z^2)

We illustrate some error checking:

sage: R.<x,y> = QQ[]
sage: P1 = ProjectiveSpace(R)
sage: H = P1.Hom(P1)
sage: f = H([x-y, x*y])
Traceback (most recent call last):
...
ValueError: polys (=[x - y, x*y]) must be of the same degree

sage: H([x-1, x*y+x])
Traceback (most recent call last):
...
ValueError: polys (=[x - 1, x*y + x]) must be homogeneous

sage: H([exp(x),exp(y)])
Traceback (most recent call last):
...
TypeError: polys (=[e^x, e^y]) must be elements of
Multivariate Polynomial Ring in x, y over Rational Field

We can also compute the forward image of subschemes through elimination. In particular, let \(X = V(h_1,\ldots, h_t)\) and define the ideal \(I = (h_1,\ldots,h_t,y_0-f_0(\bar{x}), \ldots, y_n-f_n(\bar{x}))\). Then the elimination ideal \(I_{n+1} = I \cap K[y_0,\ldots,y_n]\) is a homogeneous ideal and \(f(X) = V(I_{n+1})\):

sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: H = End(P)
sage: f = H([(x-2*y)^2, (x-2*z)^2, x^2])
sage: X = P.subscheme(y-z)
sage: f(f(f(X)))
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
  y - z
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(P.subscheme([x,y,z]))
Closed subscheme of Projective Space of dimension 3 over Rational Field
defined by:
  w,
  y,
  x
as_dynamical_system()

Return this endomorphism as a DynamicalSystem_projective.

OUTPUT:

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(ZZ, 2)
sage: H = End(P)
sage: f = H([x^2, y^2, z^2])
sage: type(f.as_dynamical_system())
<class 'sage.dynamics.arithmetic_dynamics.projective_ds.DynamicalSystem_projective'>
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2-y^2, y^2])
sage: type(f.as_dynamical_system())
<class 'sage.dynamics.arithmetic_dynamics.projective_ds.DynamicalSystem_projective_field'>
sage: P.<x,y> = ProjectiveSpace(GF(5), 1)
sage: H = End(P)
sage: f = H([x^2, y^2])
sage: type(f.as_dynamical_system())
<class 'sage.dynamics.arithmetic_dynamics.projective_ds.DynamicalSystem_projective_finite_field'>
sage: P.<x,y> = ProjectiveSpace(RR, 1)
sage: f = DynamicalSystem([x^2 + y^2, y^2], P)
sage: g = f.as_dynamical_system()
sage: g is f
True
degree()

Return the degree of this map.

The degree is defined as the degree of the homogeneous polynomials that are the coordinates of this map.

OUTPUT:

  • A positive integer

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.degree()
2
sage: P.<x,y,z> = ProjectiveSpace(CC,2)
sage: H = Hom(P,P)
sage: f = H([x^3+y^3, y^2*z, z*x*y])
sage: f.degree()
3
sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y,z> = ProjectiveSpace(R,2)
sage: H = Hom(P,P)
sage: f = H([x^2+t*y^2, (2-t)*y^2, z^2])
sage: f.degree()
2
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: X = P.subscheme(x^2-y^2)
sage: H = Hom(X,X)
sage: f = H([x^2, y^2, z^2])
sage: f.degree()
2
dehomogenize(n)

Returns the standard dehomogenization at the n[0] coordinate for the domain and the n[1] coordinate for the codomain.

Note that the new function is defined over the fraction field of the base ring of this map.

INPUT:

  • n – a tuple of nonnegative integers. If n is an integer, then the two values of

    the tuple are assumed to be the same.

OUTPUT:

  • SchemeMorphism_polynomial_affine_space.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.dehomogenize(0)
Scheme endomorphism of Affine Space of dimension 1 over Integer Ring
  Defn: Defined on coordinates by sending (y) to
        (y^2/(y^2 + 1))
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2-y^2, y^2])
sage: f.dehomogenize((0,1))
Scheme morphism:
  From: Affine Space of dimension 1 over Rational Field
  To:   Affine Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (y) to
        ((-y^2 + 1)/y^2)
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2-z^2, 2*z^2])
sage: f.dehomogenize(2)
Scheme endomorphism of Affine Space of dimension 2 over Rational Field
  Defn: Defined on coordinates by sending (x, y) to
        (1/2*x^2 + 1/2*y^2, 1/2*y^2 - 1/2)
sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y,z> = ProjectiveSpace(FractionField(R),2)
sage: H = Hom(P,P)
sage: f = H([x^2+t*y^2, t*y^2-z^2, t*z^2])
sage: f.dehomogenize(2)
Scheme endomorphism of Affine Space of dimension 2 over Fraction Field
of Univariate Polynomial Ring in t over Rational Field
  Defn: Defined on coordinates by sending (x, y) to
        (1/t*x^2 + y^2, y^2 - 1/t)
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: X = P.subscheme(x^2-y^2)
sage: H = Hom(X,X)
sage: f = H([x^2, y^2, x*z])
sage: f.dehomogenize(2)
Scheme endomorphism of Closed subscheme of Affine Space of dimension 2 over Integer Ring defined by:
  x^2 - y^2
  Defn: Defined on coordinates by sending (x, y) to
        (x, y^2/x)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - 2*x*y, y^2])
sage: f.dehomogenize(0).homogenize(0) == f
True
sage: K.<w> = QuadraticField(3)
sage: O = K.ring_of_integers()
sage: P.<x,y> = ProjectiveSpace(O,1)
sage: H = End(P)
sage: f = H([x^2 - O(w)*y^2,y^2])
sage: f.dehomogenize(1)
Scheme endomorphism of Affine Space of dimension 1 over Maximal Order in Number Field in w with defining polynomial x^2 - 3 with w = 1.732050807568878?
  Defn: Defined on coordinates by sending (x) to
        (x^2 - w)
sage: P1.<x,y> = ProjectiveSpace(QQ,1)
sage: P2.<u,v,w> = ProjectiveSpace(QQ,2)
sage: H = Hom(P2,P1)
sage: f = H([u*w,v^2 + w^2])
sage: f.dehomogenize((2,1))
Scheme morphism:
  From: Affine Space of dimension 2 over Rational Field
  To:   Affine Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (u, v) to
      (u/(v^2 + 1))
global_height(prec=None)

Returns the maximum of the absolute logarithmic heights of the coefficients in any of the coordinate functions of this map.

INPUT:

  • prec – desired floating point precision (default: default RealField precision).

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([1/1331*x^2+1/4000*y^2, 210*x*y]);
sage: f.global_height()
8.29404964010203

This function does not automatically normalize:

sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([4*x^2+100*y^2, 210*x*y, 10000*z^2]);
sage: f.global_height()
9.21034037197618
sage: f.normalize_coordinates()
sage: f.global_height()
8.51719319141624
sage: R.<z> = PolynomialRing(QQ)
sage: K.<w> = NumberField(z^2-2)
sage: O = K.maximal_order()
sage: P.<x,y> = ProjectiveSpace(O,1)
sage: H = Hom(P,P)
sage: f = H([2*x^2 + 3*O(w)*y^2, O(w)*y^2])
sage: f.global_height()
1.44518587894808
sage: P.<x,y> = ProjectiveSpace(QQbar,1)
sage: P2.<u,v,w> = ProjectiveSpace(QQbar,2)
sage: H = Hom(P,P2)
sage: f = H([x^2 + QQbar(I)*x*y + 3*y^2, y^2, QQbar(sqrt(5))*x*y])
sage: f.global_height()
1.09861228866811
is_morphism()

returns True if this map is a morphism.

The map is a morphism if and only if the ideal generated by the defining polynomials is the unit ideal (no common zeros of the defining polynomials).

OUTPUT:

  • Boolean

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.is_morphism()
True
sage: P.<x,y,z> = ProjectiveSpace(RR,2)
sage: H = Hom(P,P)
sage: f = H([x*z-y*z, x^2-y^2, z^2])
sage: f.is_morphism()
False
sage: R.<t> = PolynomialRing(GF(5))
sage: P.<x,y,z> = ProjectiveSpace(R,2)
sage: H = Hom(P,P)
sage: f = H([x*z-t*y^2, x^2-y^2, t*z^2])
sage: f.is_morphism()
True

Map that is not morphism on projective space, but is over a subscheme:

sage: P.<x,y,z> = ProjectiveSpace(RR,2)
sage: X = P.subscheme([x*y + y*z])
sage: H = Hom(X,X)
sage: f = H([x*z-y*z, x^2-y^2, z^2])
sage: f.is_morphism()
True
local_height(v, prec=None)

Returns the maximum of the local height of the coefficients in any of the coordinate functions of this map.

INPUT:

  • v – a prime or prime ideal of the base ring.

  • prec – desired floating point precision (default: default RealField precision).

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([1/1331*x^2+1/4000*y^2, 210*x*y]);
sage: f.local_height(1331)
7.19368581839511

This function does not automatically normalize:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([4*x^2+3/100*y^2, 8/210*x*y, 1/10000*z^2]);
sage: f.local_height(2)
2.77258872223978
sage: f.normalize_coordinates()
sage: f.local_height(2)
0.000000000000000
sage: R.<z> = PolynomialRing(QQ)
sage: K.<w> = NumberField(z^2-2)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([2*x^2 + w/3*y^2, 1/w*y^2])
sage: f.local_height(K.ideal(3))
1.09861228866811
local_height_arch(i, prec=None)

Returns the maximum of the local height at the i-th infinite place of the coefficients in any of the coordinate functions of this map.

INPUT:

  • i – an integer.

  • prec – desired floating point precision (default: default RealField precision).

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([1/1331*x^2+1/4000*y^2, 210*x*y]);
sage: f.local_height_arch(0)
5.34710753071747
sage: R.<z> = PolynomialRing(QQ)
sage: K.<w> = NumberField(z^2-2)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([2*x^2 + w/3*y^2, 1/w*y^2])
sage: f.local_height_arch(1)
0.6931471805599453094172321214582
normalize_coordinates(**kwds)

Ensures that this morphism has integral coefficients, and, if the coordinate ring has a GCD, then it ensures that the coefficients have no common factor.

Also, makes the leading coefficients of the first polynomial positive (if positive has meaning in the coordinate ring). This is done in place.

When ideal or valuation is specified, normalization occurs with respect to the absolute value defined by the ideal or valuation. That is, the coefficients are scaled such that one coefficient has absolute value 1 while the others have absolute value less than or equal to 1. Only supported when the base ring is a number field.

INPUT:

keywords:

  • ideal – (optional) a prime ideal of the base ring of this morphism.

  • valuation – (optional) a valuation of the base ring of this morphism.

OUTPUT:

  • None.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = Hom(P, P)
sage: f = H([5/4*x^3, 5*x*y^2])
sage: f.normalize_coordinates(); f
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 : 4*y^2)
sage: P.<x,y,z> = ProjectiveSpace(GF(7), 2)
sage: X = P.subscheme(x^2 - y^2)
sage: H = Hom(X, X)
sage: f = H([x^3 + x*y^2, x*y^2, x*z^2])
sage: f.normalize_coordinates(); f
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Finite Field of size 7 defined by:
  x^2 - y^2
  Defn: Defined on coordinates by sending (x : y : z) to
        (2*y^2 : y^2 : z^2)
sage: R.<a,b> = QQ[]
sage: P.<x,y,z> = ProjectiveSpace(R, 2)
sage: H = End(P)
sage: f = H([a*(x*z + y^2)*x^2, a*b*(x*z + y^2)*y^2, a*(x*z + y^2)*z^2])
sage: f.normalize_coordinates(); f
Scheme endomorphism of Projective Space of dimension 2 over Multivariate
Polynomial Ring in a, b over Rational Field
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^2 : b*y^2 : z^2)
sage: K.<w> = QuadraticField(5)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: f = DynamicalSystem([w*x^2 + (1/5*w)*y^2, w*y^2])
sage: f.normalize_coordinates(); f
Dynamical System of Projective Space of dimension 1 over Number Field in
w with defining polynomial x^2 - 5 with w = 2.236067977499790?
  Defn: Defined on coordinates by sending (x : y) to
        (5*x^2 + y^2 : 5*y^2)
sage: R.<t> = PolynomialRing(ZZ)
sage: K.<b> = NumberField(t^3 - 11)
sage: a = 7/(b - 1)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: f = DynamicalSystem_projective([a*y^2 - (a*y - x)^2, y^2])
sage: f.normalize_coordinates(); f
Dynamical System of Projective Space of dimension 1 over Number Field in b with defining polynomial t^3 - 11
Defn: Defined on coordinates by sending (x : y) to
        (-100*x^2 + (140*b^2 + 140*b + 140)*x*y + (-77*b^2 - 567*b - 1057)*y^2 : 100*y^2)

We can used ideal to scale with respect to a norm defined by an ideal:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: f = DynamicalSystem_projective([2*x^3, 2*x^2*y + 4*x*y^2])
sage: f.normalize_coordinates(ideal=2); f
Dynamical System of Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^3 : x^2*y + 2*x*y^2)
sage: R.<w> = QQ[]
sage: A.<a> = NumberField(w^2 + 1)
sage: P.<x,y,z> = ProjectiveSpace(A, 2)
sage: X = P.subscheme(x^2-y^2)
sage: H = Hom(X,X)
sage: f = H([(a+1)*x^3 + 2*x*y^2, 4*x*y^2, 8*x*z^2])
sage: f.normalize_coordinates(ideal=A.prime_above(2)); f
Scheme endomorphism of Closed subscheme of Projective Space of dimension 2 over
Number Field in a with defining polynomial w^2 + 1 defined by:
  x^2 - y^2
  Defn: Defined on coordinates by sending (x : y : z) to
        ((-a + 2)*x*y^2 : (-2*a + 2)*x*y^2 : (-4*a + 4)*x*z^2)

We can pass in a valuation to valuation:

sage: g = H([(a+1)*x^3 + 2*x*y^2, 4*x*y^2, 8*x*z^2])
sage: g.normalize_coordinates(valuation=A.valuation(A.prime_above(2)))
sage: g == f
True
sage: P.<x,y> = ProjectiveSpace(Qp(3), 1)
sage: f = DynamicalSystem_projective([3*x^2+6*y^2, 9*x*y])
sage: f.normalize_coordinates(); f
Dynamical System of Projective Space of dimension 1 over 3-adic Field with capped relative precision 20
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 + (2 + O(3^20))*y^2 : (3 + O(3^21))*x*y)
scale_by(t)

Scales each coordinate by a factor of t.

A TypeError occurs if the point is not in the coordinate_ring of the parent after scaling.

INPUT:

  • t – a ring element.

OUTPUT:

  • None.

EXAMPLES:

sage: A.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(A,A)
sage: f = H([x^3-2*x*y^2,x^2*y])
sage: f.scale_by(1/x)
sage: f
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 - 2*y^2 : x*y)
sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y> = ProjectiveSpace(R,1)
sage: H = Hom(P,P)
sage: f = H([3/5*x^2,6*y^2])
sage: f.scale_by(5/3*t); f
Scheme endomorphism of Projective Space of dimension 1 over Univariate
Polynomial Ring in t over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (t*x^2 : 10*t*y^2)
sage: P.<x,y,z> = ProjectiveSpace(GF(7),2)
sage: X = P.subscheme(x^2-y^2)
sage: H = Hom(X,X)
sage: f = H([x^2,y^2,z^2])
sage: f.scale_by(x-y);f
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Finite Field of size 7 defined by:
  x^2 - y^2
  Defn: Defined on coordinates by sending (x : y : z) to
        (x*y^2 - y^3 : x*y^2 - y^3 : x*z^2 - y*z^2)
wronskian_ideal()

Returns the ideal generated by the critical point locus.

This is the vanishing of the maximal minors of the Jacobian matrix. Not implemented for subvarieties.

OUTPUT: an ideal in the coordinate ring of the domain of this map.

EXAMPLES:

sage: R.<x> = PolynomialRing(QQ)
sage: K.<w> = NumberField(x^2+11)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2-w*y^2, w*y^2])
sage: f.wronskian_ideal()
Ideal ((4*w)*x*y) of Multivariate Polynomial Ring in x, y over Number
Field in w with defining polynomial x^2 + 11
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: P2.<u,v,t> = ProjectiveSpace(K,2)
sage: H = Hom(P,P2)
sage: f = H([x^2-2*y^2, y^2, x*y])
sage: f.wronskian_ideal()
Ideal (4*x*y, 2*x^2 + 4*y^2, -2*y^2) of Multivariate Polynomial Ring in
x, y over Rational Field
class sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space_field(parent, polys, check=True)

Bases: sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space

base_indeterminacy_locus()

Return the base indeterminacy locus of this map.

The base indeterminacy locus is the set of points in projective space at which all of the defining polynomials of the rational map simultaneously vanish.

OUTPUT: a subscheme of the domain of the map

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x*z-y*z, x^2-y^2, z^2])
sage: f.base_indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
    x*z - y*z,
    x^2 - y^2,
    z^2
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x^2, y^2, z^2])
sage: f.base_indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
    x^2,
    y^2,
    z^2
sage: P1.<x,y,z> = ProjectiveSpace(RR,2)
sage: P2.<t,u,v,w> = ProjectiveSpace(RR,3)
sage: H = Hom(P1,P2)
sage: h = H([y^3*z^3, x^3*z^3, y^3*z^3, x^2*y^2*z^2])
sage: h.base_indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Real Field with
53 bits of precision defined by:
  y^3*z^3,
  x^3*z^3,
  y^3*z^3,
  x^2*y^2*z^2

If defining polynomials are not normalized, output scheme will not be normalized:

sage: P.<x,y,z>=ProjectiveSpace(QQ,2)
sage: H=End(P)
sage: f=H([x*x^2,x*y^2,x*z^2])
sage: f.base_indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
  x^3,
  x*y^2,
  x*z^2
image()

Return the scheme-theoretic image of the morphism.

OUTPUT: a subscheme of the ambient space of the codomain

EXAMPLES:

sage: P2.<x0,x1,x2> = ProjectiveSpace(QQ, 2)
sage: f = P2.hom([x0^3, x0^2*x1, x0*x1^2], P2)
sage: f.image()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x1^2 - x0*x2
sage: f = P2.hom([x0 - x1, x0 - x2, x1 - x2], P2)
sage: f.image()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x0 - x1 + x2
sage: P2.<x0,x1,x2> = ProjectiveSpace(QQ, 2)
sage: A2.<x,y> = AffineSpace(QQ, 2)
sage: f = P2.hom([1,x0/x1], A2)
sage: f.image()
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
  -x + 1
indeterminacy_locus()

Return the indeterminacy locus of this map as a rational map on the domain.

The indeterminacy locus is the intersection of all the base indeterminacy locuses of maps that define the same rational map as by this map.

OUTPUT: a subscheme of the domain of the map

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x^2, y^2, z^2])
sage: f.indeterminacy_locus()
... DeprecationWarning: The meaning of indeterminacy_locus() has changed. Read the docstring.
See https://trac.sagemath.org/29145 for details.
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  z,
  y,
  x
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x*z - y*z, x^2 - y^2, z^2])
sage: f.indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  z,
  x^2 - y^2

There is related base_indeterminacy_locus() method. This computes the indeterminacy locus only from the defining polynomials of the map:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x*z - y*z, x^2 - y^2, z^2])
sage: f.base_indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x*z - y*z,
  x^2 - y^2,
  z^2
indeterminacy_points(F=None, base=False)

Return the points in the indeterminacy locus of this map.

If the dimension of the indeterminacy locus is not zero, an error is raised.

INPUT:

  • F – a field; if not given, the base ring of the domain is assumed

  • base – if True, the base indeterminacy locus is used

OUTPUT: indeterminacy points of the map defined over F

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x*z-y*z, x^2-y^2, z^2])
sage: f.indeterminacy_points()
... DeprecationWarning: The meaning of indeterminacy_locus() has changed. Read the docstring.
See https://trac.sagemath.org/29145 for details.
[(-1 : 1 : 0), (1 : 1 : 0)]
sage: P1.<x,y,z> = ProjectiveSpace(RR,2)
sage: P2.<t,u,v,w> = ProjectiveSpace(RR,3)
sage: H = Hom(P1,P2)
sage: h = H([x+y, y, z+y, y])
sage: set_verbose(None)
sage: h.indeterminacy_points(base=True)
[]
sage: g = H([y^3*z^3, x^3*z^3, y^3*z^3, x^2*y^2*z^2])
sage: g.indeterminacy_points(base=True)
Traceback (most recent call last):
...
ValueError: indeterminacy scheme is not dimension 0
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x^2+y^2, x*z, x^2+y^2])
sage: f.indeterminacy_points()
[(0 : 0 : 1)]
sage: R.<t> = QQ[]
sage: K.<a> = NumberField(t^2+1)
sage: f.indeterminacy_points(F=K)
[(-a : 1 : 0), (0 : 0 : 1), (a : 1 : 0)]
sage: set_verbose(None)
sage: f.indeterminacy_points(F=QQbar, base=True)
[(-1*I : 1 : 0), (0 : 0 : 1), (1*I : 1 : 0)]
sage: set_verbose(None)
sage: K.<t> = FunctionField(QQ)
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
sage: H = End(P)
sage: f = H([x^2 - t^2*y^2, y^2 - z^2, x^2 - t^2*z^2])
sage: f.indeterminacy_points(base=True)
[(-t : -1 : 1), (-t : 1 : 1), (t : -1 : 1), (t : 1 : 1)]
sage: set_verbose(None)
sage: P.<x,y,z> = ProjectiveSpace(Qp(3), 2)
sage: H = End(P)
sage: f = H([x^2 - 7*y^2, y^2 - z^2, x^2 - 7*z^2])
sage: f.indeterminacy_points(base=True)
[(2 + 3 + 3^2 + 2*3^3 + 2*3^5 + 2*3^6 + 3^8 + 3^9 + 2*3^11 + 3^15 +
2*3^16 + 3^18 + O(3^20) : 1 + O(3^20) : 1 + O(3^20)),
(2 + 3 + 3^2 + 2*3^3 + 2*3^5 + 2*3^6 + 3^8 + 3^9 + 2*3^11 + 3^15 +
2*3^16 + 3^18 + O(3^20) : 2 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 +
2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 +
2*3^14 + 2*3^15 + 2*3^16 + 2*3^17 + 2*3^18 + 2*3^19 + O(3^20) : 1 +
O(3^20)),
 (1 + 3 + 3^2 + 2*3^4 + 2*3^7 + 3^8 + 3^9 + 2*3^10 + 2*3^12 + 2*3^13 +
2*3^14 + 3^15 + 2*3^17 + 3^18 + 2*3^19 + O(3^20) : 1 + O(3^20) : 1 +
O(3^20)),
 (1 + 3 + 3^2 + 2*3^4 + 2*3^7 + 3^8 + 3^9 + 2*3^10 + 2*3^12 + 2*3^13 +
2*3^14 + 3^15 + 2*3^17 + 3^18 + 2*3^19 + O(3^20) : 2 + 2*3 + 2*3^2 +
2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 2*3^11
+ 2*3^12 + 2*3^13 + 2*3^14 + 2*3^15 + 2*3^16 + 2*3^17 + 2*3^18 + 2*3^19
+ O(3^20) : 1 + O(3^20))]
rational_preimages(Q, k=1)

Determine all of the rational \(k\)-th preimages of Q by this map.

Given a rational point Q in the domain of this map, return all the rational points P in the domain with \(f^k(P)==Q\). In other words, the set of \(k\)-th preimages of Q. The map must be defined over a number field and be an endomorphism for \(k > 1\).

If Q is a subscheme, then return the subscheme that maps to Q by this map. In particular, \(f^{-k}(V(h_1,\ldots,h_t)) = V(h_1 \circ f^k, \ldots, h_t \circ f^k)\).

INPUT:

  • Q - a rational point or subscheme in the domain of this map.

  • k - positive integer.

OUTPUT:

  • a list of rational points or a subscheme in the domain of this map.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([16*x^2 - 29*y^2, 16*y^2])
sage: f.rational_preimages(P(-1, 4))
[(-5/4 : 1), (5/4 : 1)]
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: H = End(P)
sage: f = H([76*x^2 - 180*x*y + 45*y^2 + 14*x*z + 45*y*z\
- 90*z^2, 67*x^2 - 180*x*y - 157*x*z + 90*y*z, -90*z^2])
sage: f.rational_preimages(P(-9, -4, 1))
[(0 : 4 : 1)]

A non-periodic example

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2 + y^2, 2*x*y])
sage: f.rational_preimages(P(17, 15))
[(3/5 : 1), (5/3 : 1)]
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: H = End(P)
sage: f = H([x^2 - 2*y*w - 3*w^2, -2*x^2 + y^2 - 2*x*z\
+ 4*y*w + 3*w^2, x^2 - y^2 + 2*x*z + z^2 - 2*y*w - w^2, w^2])
sage: f.rational_preimages(P(0, -1, 0, 1))
[]
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2 + y^2, 2*x*y])
sage: f.rational_preimages([CC.0, 1])
Traceback (most recent call last):
...
TypeError: point must be in codomain of self

A number field example

sage: z = QQ['z'].0
sage: K.<a> = NumberField(z^2 - 2);
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: H = End(P)
sage: f = H([x^2 + y^2, y^2])
sage: f.rational_preimages(P(3, 1))
[(-a : 1), (a : 1)]
sage: z = QQ['z'].0
sage: K.<a> = NumberField(z^2 - 2);
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
sage: X = P.subscheme([x^2 - z^2])
sage: H = End(X)
sage: f= H([x^2 - z^2, a*y^2, z^2 - x^2])
sage: f.rational_preimages(X([1, 2, -1]))
[]
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme([x^2 - z^2])
sage: H = End(X)
sage: f = H([x^2-z^2, y^2, z^2-x^2])
sage: f.rational_preimages(X([0, 1, 0]))
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
x^2 - z^2,
-x^2 + z^2,
0,
-x^2 + z^2
sage: P.<x, y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2-y^2, y^2])
sage: f.rational_preimages(P.subscheme([x]))
Closed subscheme of Projective Space of dimension 1 over Rational Field
defined by:
  x^2 - y^2
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2 - 29/16*y^2, y^2])
sage: f.rational_preimages(P(5/4, 1), k=4)
[(-3/4 : 1), (3/4 : 1), (-7/4 : 1), (7/4 : 1)]
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: P2.<u,v,w> = ProjectiveSpace(QQ, 2)
sage: H = Hom(P, P2)
sage: f = H([x^2, y^2, x^2-y^2])
sage: f.rational_preimages(P2(1, 1, 0))
[(-1 : 1), (1 : 1)]
reduce_base_field()

Return this map defined over the field of definition of the coefficients.

The base field of the map could be strictly larger than the field where all of the coefficients are defined. This function reduces the base field to the minimal possible. This can be done when the base ring is a number field, QQbar, a finite field, or algebraic closure of a finite field.

OUTPUT: A scheme morphism.

EXAMPLES:

sage: K.<t> = GF(3^4)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: P2.<a,b,c> = ProjectiveSpace(K, 2)
sage: H = End(P)
sage: H2 = Hom(P,P2)
sage: H3 = Hom(P2,P)
sage: f = H([x^2 + (2*t^3 + 2*t^2 + 1)*y^2, y^2])
sage: f.reduce_base_field()
Scheme endomorphism of Projective Space of dimension 1 over Finite Field in t2 of size 3^2
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 + (t2)*y^2 : y^2)
sage: f2 = H2([x^2 + 5*y^2,y^2, 2*x*y])
sage: f2.reduce_base_field()
Scheme morphism:
  From: Projective Space of dimension 1 over Finite Field of size 3
  To:   Projective Space of dimension 2 over Finite Field of size 3
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 - y^2 : y^2 : -x*y)
sage: f3 = H3([a^2 + t*b^2, c^2])
sage: f3.reduce_base_field()
Scheme morphism:
  From: Projective Space of dimension 2 over Finite Field in t of size 3^4
  To:   Projective Space of dimension 1 over Finite Field in t of size 3^4
  Defn: Defined on coordinates by sending (a : b : c) to
        (a^2 + (t)*b^2 : c^2)
sage: K.<v> = CyclotomicField(4)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: H = End(P)
sage: f = H([x^2 + 2*y^2, y^2])
sage: f.reduce_base_field()
Scheme endomorphism of Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 + 2*y^2 : y^2)
sage: K.<v> = GF(5)
sage: L = K.algebraic_closure()
sage: P.<x,y> = ProjectiveSpace(L, 1)
sage: H = End(P)
sage: f = H([(L.gen(2))*x^2 + L.gen(4)*y^2, x*y])
sage: f.reduce_base_field()
Scheme endomorphism of Projective Space of dimension 1 over Finite Field in z4 of size 5^4
  Defn: Defined on coordinates by sending (x : y) to
        ((z4^3 + z4^2 + z4 - 2)*x^2 + (z4)*y^2 : x*y)
sage: f=DynamicalSystem_projective([L.gen(3)*x^2 + L.gen(2)*y^2, x*y])
sage: f.reduce_base_field()
Dynamical System of Projective Space of dimension 1 over Finite Field in z6 of size 5^6
  Defn: Defined on coordinates by sending (x : y) to
        ((-z6^5 + z6^4 - z6^3 - z6^2 - 2*z6 - 2)*x^2 + (z6^5 - 2*z6^4 + z6^2 - z6 + 1)*y^2 : x*y)
class sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space_finite_field(parent, polys, check=True)

Bases: sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space_field

class sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_subscheme_field(parent, polys, check=True)

Bases: sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space_field

Morphisms from subschemes of projective spaces defined over fields.

image()

Return the scheme-theoretic image of the morphism.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: P2.<x0,x1,x2> = ProjectiveSpace(QQ, 2)
sage: X = P2.subscheme(0)
sage: f = X.hom([x1,x0], P)
sage: f.image()
Closed subscheme of Projective Space of dimension 1 over Rational Field defined by:
  (no polynomials)
sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: X = P2.subscheme([z^3 - x*y^2 + y^3])
sage: f = X.hom([x*z, x*y, x^2 + y*z], P2)
sage: f.image()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x^6 + 2*x^3*y^3 + x*y^5 + y^6 - x^3*y^2*z - y^5*z
indeterminacy_locus()

Return the indeterminacy locus of this map.

The map defines a rational map on the domain. The output is the subscheme of the domain on which the rational map is not defined by any representative of the rational map. See representatives().

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: P2.<x0,x1,x2> = ProjectiveSpace(QQ, 2)
sage: X = P2.subscheme(0)
sage: f = X.hom([x1,x0], P)
sage: L = f.indeterminacy_locus()
sage: L.rational_points()
[(0 : 0 : 1)]
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: P1.<a,b> = ProjectiveSpace(QQ,1)
sage: X = P2.subscheme([x^2 - y^2 - y*z])
sage: f = X.hom([x,y], P1)
sage: f.indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  z,
  y,
  x
sage: P3.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: P2.<a,b,c> = ProjectiveSpace(QQ, 2)
sage: X = P3.subscheme(x^2 - w*y - x*z)
sage: f = X.hom([x*y, y*z, z*x], P2)
sage: L = f.indeterminacy_locus()
sage: L.dimension()
0
sage: L.degree()
2
sage: L.rational_points()
[(0 : 0 : 0 : 1), (0 : 1 : 0 : 0)]
sage: P3.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: A2.<a,b> = AffineSpace(QQ, 2)
sage: X = P3.subscheme(x^2 - w*y - x*z)
sage: f = X.hom([x/z, y/x], A2)
sage: L = f.indeterminacy_locus()
sage: L.rational_points()
[(0 : 0 : 0 : 1), (0 : 1 : 0 : 0)]
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme(x - y)
sage: H = End(X)
sage: f = H([x^2 - 4*y^2, y^2 - z^2, 4*z^2 - x^2])
sage: Z = f.indeterminacy_locus(); Z
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  z,
  y,
  x
is_morphism()

Return True if the map is defined everywhere on the domain.

EXAMPLES:

sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: P1.<a,b> = ProjectiveSpace(QQ,1)
sage: X = P2.subscheme([x^2 - y^2 - y*z])
sage: f = X.hom([x,y], P1)
sage: f.is_morphism()
True
representatives()

Return all maps representing the same rational map as by this map.

EXAMPLES:

sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: X = P2.subscheme(0)
sage: f = X.hom([x^2*y, x^2*z, x*y*z], P2)
sage: f.representatives()
[Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   0
   To:   Projective Space of dimension 2 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (x*y : x*z : y*z)]
sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: P1.<a,b> = ProjectiveSpace(QQ,1)
sage: X = P2.subscheme([x^2 - y^2 - y*z])
sage: f = X.hom([x, y], P1)
sage: f.representatives()
[Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Projective Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (y + z : x),
Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Projective Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (x : y)]
sage: g = _[0]
sage: g.representatives()
[Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Projective Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (y + z : x),
Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Projective Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (x : y)]
sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: X = P2.subscheme([x^2 - y^2 - y*z])
sage: A1.<a> = AffineSpace(QQ,1)
sage: g = X.hom([y/x], A1)
sage: g.representatives()
[Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Affine Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (x/(y + z)),
Scheme morphism:
   From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
   x^2 - y^2 - y*z
   To:   Affine Space of dimension 1 over Rational Field
   Defn: Defined on coordinates by sending (x : y : z) to
         (y/x)]
sage: g0, g1 = _
sage: emb = A1.projective_embedding(0)
sage: emb*g0
Scheme morphism:
  From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x^2 - y^2 - y*z
  To:   Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y : z) to
        (y + z : x)
sage: emb*g1
Scheme morphism:
  From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x^2 - y^2 - y*z
  To:   Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y : z) to
        (x : y)

ALGORITHM:

The algorithm is from Proposition 1.1 in [Sim2004].