Morphisms on projective varieties

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

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 (2013-03) iteration functionality and new directory structure for affine/projective, height functionality
  • Brian Stout, Ben Hutz (Nov 2013) - added minimal model functionality
  • Dillon Rose (2014-01): Speed enhancements
  • Ben Hutz (2015-11): iteration of subschemes
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
automorphism_group(**kwds)

Calculates the subgroup of \(PGL2\) that is the automorphism group of this map.

The automorphism group is the set of \(PGL(2)\) elements that fix this map under conjugation.

INPUT:

keywords:

  • starting_prime – The first prime to use for CRT. default: 5.(optional)
  • algorithm– Choose CRT-Chinese Remainder Theorem- or fixed_points algorithm.
    default: depends on this map. (optional)
  • return_functions– Boolean - True returns elements as linear fractional transformations.
    False returns elements as \(PGL2\) matrices. default: False. (optional)
  • iso_type – Boolean - True returns the isomorphism type of the automorphism group.
    default: False (optional)

OUTPUT:

  • list - elements of automorphism group.

AUTHORS:

  • Original algorithm written by Xander Faber, Michelle Manes, Bianca Viray
  • Modified by Joao Alberto de Faria, Ben Hutz, Bianca Thompson

REFERENCES:

[FMV](1, 2, 3, 4, 5) Xander Faber, Michelle Manes, and Bianca Viray. Computing Conjugating Sets and Automorphism Groups of Rational Functions. Journal of Algebra, 423 (2014), 1161-1190.

EXAMPLES:

sage: R.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(R)
sage: f = H([x^2-y^2, x*y])
sage: f.automorphism_group(return_functions=True)
[x, -x]
sage: R.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(R)
sage: f = H([x^2 + 5*x*y + 5*y^2, 5*x^2 + 5*x*y + y^2])
sage: f.automorphism_group()
[
[1 0]  [0 2]
[0 1], [2 0]
]
sage: R.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(R)
sage: f=H([x^2-2*x*y-2*y^2, -2*x^2-2*x*y+y^2])
sage: f.automorphism_group(return_functions=True)
[x, 2/(2*x), -x - 1, -2*x/(2*x + 2), (-x - 1)/x, -1/(x + 1)]
sage: R.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(R)
sage: f = H([3*x^2*y - y^3, x^3 - 3*x*y^2])
sage: f.automorphism_group(algorithm='CRT', return_functions=True, iso_type=True)
([x, (x + 1)/(x - 1), (-x + 1)/(x + 1), -x, 1/x, -1/x,
(x - 1)/(x + 1), (-x - 1)/(x - 1)], 'Dihedral of order 8')
sage: A.<z> = AffineSpace(QQ,1)
sage: H = End(A)
sage: f = H([1/z^3])
sage: F = f.homogenize(1)
sage: F.automorphism_group()
[
[1 0]  [0 2]  [-1  0]  [ 0 -2]
[0 1], [2 0], [ 0  1], [ 2  0]
]
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x**2 + x*z, y**2, z**2])
sage: f.automorphism_group() # long test
[
[1 0 0]
[0 1 0]
[0 0 1]
]
sage: K.<w> = CyclotomicField(3)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: H = End(P)
sage: D6 = H([y^2,x^2])
sage: D6.automorphism_group()
[
[1 0]  [0 w]  [0 1]  [w 0]  [-w - 1      0]  [     0 -w - 1]
[0 1], [1 0], [1 0], [0 1], [     0      1], [     1      0]
]
canonical_height(P, **kwds)

Evaluates the (absolute) canonical height of P with respect to this map.

Must be over number field or order of a number field. Specify either the number of terms of the series to evaluate or the error bound required.

ALGORITHM:

The sum of the Green’s function at the archimedean places and the places of bad reduction.

INPUT:

  • P – a projective point.

kwds:

  • badprimes - a list of primes of bad reduction (optional).
  • N - positive integer. number of terms of the series to use in the local green functions (optional - default: 10).
  • prec - positive integer, float point or p-adic precision, default: 100.
  • error_bound - a positive real number (optional).

OUTPUT:

  • a real number

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, 2*x*y]);
sage: f.canonical_height(P.point([5,4]), error_bound=0.001)
2.1970553519503404898926835324
sage: f.canonical_height(P.point([2,1]), error_bound=0.001)
1.0984430632822307984974382955

Notice that preperiodic points may not be exactly 0:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2-29/16*y^2, y^2]);
sage: f.canonical_height(P.point([1,4]), error_bound=0.000001)
2.9868196689972114460185071428e-7
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: X = P.subscheme(x^2-y^2);
sage: H = Hom(X,X)
sage: f = H([x^2,y^2, 4*z^2]);
sage: Q = X([4,4,1])
sage: f.canonical_height(Q, badprimes=[2])
0.0013538030870311431824555314882
conjugate(M)

Conjugates this map by M, i.e. \(M^{-1} \circ f \circ M\).

If possible the new map will be defined over the same space as this map. Otherwise, will try to coerce to the base ring of M.

INPUT:

  • M – a square invertible matrix.

OUTPUT:

  • a map from the domain to the codomain of this map.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.conjugate(matrix([[1,2], [0,1]]))
Scheme endomorphism of Projective Space of dimension 1 over Integer Ring
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 + 4*x*y + 3*y^2 : y^2)
sage: R.<x> = PolynomialRing(QQ)
sage: K.<i> = NumberField(x^2+1)
sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^3+y^3, y^3])
sage: f.conjugate(matrix([[i,0], [0,-i]]))
Scheme endomorphism of Projective Space of dimension 1 over Integer Ring
  Defn: Defined on coordinates by sending (x : y) to
        (-x^3 + y^3 : -y^3)
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2 ,y^2, y*z])
sage: f.conjugate(matrix([[1,2,3], [0,1,2], [0,0,1]]))
Scheme endomorphism of Projective Space of dimension 2 over Integer Ring
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^2 + 4*x*y + 3*y^2 + 6*x*z + 9*y*z + 7*z^2 : y^2 + 2*y*z : y*z + 2*z^2)
sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.conjugate(matrix([[2,0], [0,1/2]]))
Scheme endomorphism of Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (2*x^2 + 1/8*y^2 : 1/2*y^2)
sage: R.<x> = PolynomialRing(QQ)
sage: K.<i> = NumberField(x^2+1)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([1/3*x^2+1/2*y^2, y^2])
sage: f.conjugate(matrix([[i,0], [0,-i]]))
Scheme endomorphism of Projective Space of dimension 1 over Number Field in i with defining polynomial x^2 + 1
  Defn: Defined on coordinates by sending (x : y) to
        ((1/3*i)*x^2 + (1/2*i)*y^2 : (-i)*y^2)
critical_height(**kwds)

Compute the critical height of this map.

The critical height is defined by J. Silverman as the sum of the canonical heights of the critical points. This must be dimension 1 and defined over a number field or number field order.

INPUT:

kwds:

  • badprimes - a list of primes of bad reduction. (optional)
  • N - positive integer. number of terms of the series to use in the local green functions. (optional - Default: 10)
  • prec - positive integer, float point or p-adic precision, Default: 100.
  • error_bound - a positive real number. (optional)
  • embedding - the embedding of the base field to \(\QQbar\) (optional)

OUTPUT: Real number

Examples:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^3+7*y^3, 11*y^3])
sage: f.critical_height()
1.1989273321156851418802151128
sage: K.<w> = QuadraticField(2)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([x^2+w*y^2, y^2])
sage: f.critical_height()
0.16090842452312941163719755472

Postcritically finite maps have critical height 0:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^3-3/4*x*y^2 + 3/4*y^3, y^3])
sage: f.critical_height(error_bound=0.0001)
0.000011738508366948556443245983996
critical_point_portrait(check=True, embedding=None)

If this map is post-critically finite, return its critical point portrait.

This is the directed graph of iterates starting with the critical points. Must be dimension 1. If check is True, then the map is first checked to see if it is postcritically finite.

INPUT:

  • check - Boolean.
  • embedding - embedding of base ring into \(\QQbar\)

OUTPUT: a digraph.

Examples:

sage: R.<z> = QQ[]
sage: K.<v> = NumberField(z^6 + 2*z^5 + 2*z^4 + 2*z^3 + z^2 + 1)
sage: PS.<x,y> = ProjectiveSpace(K,1)
sage: H = End(PS)
sage: f = H([x^2+v*y^2, y^2])
sage: f.critical_point_portrait(check=False, embedding=K.embeddings(QQbar)[0]) # long time
Looped digraph on 6 vertices
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^5 + 5/4*x*y^4, y^5])
sage: f.critical_point_portrait(check=False)
Looped digraph on 5 vertices
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 + 2*y^2, y^2])
sage: f.critical_point_portrait()
Traceback (most recent call last):
...
TypeError: map be be post-critically finite
critical_points(R=None)

Returns the critical points of this endomorphism defined over the ring R or the base ring of this map.

Must be dimension 1.

INPUT:

  • R - a ring (optional).

OUTPUT: a list of projective space points defined over R.

Examples:

sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^3-2*x*y^2 + 2*y^3, y^3])
sage: f.critical_points()
[(1 : 0)]
sage: K.<w> = QuadraticField(6)
sage: f.critical_points(K)
[(-1/3*w : 1), (1/3*w : 1), (1 : 0)]
sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([2*x^2-y^2, x*y])
sage: f.critical_points(QQbar)
[(-0.7071067811865475?*I : 1), (0.7071067811865475?*I : 1)]
critical_subscheme()

Returns the critical subscheme of this endomorphism defined over the base ring of this map.

OUTPUT: the critical subscheme of the endomorphism.

Examples:

sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^3-2*x*y^2 + 2*y^3, y^3])
sage: f.critical_subscheme()
Closed subscheme of Projective Space of dimension 1 over Rational Field
defined by:
9*x^2*y^2 - 6*y^4
sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([2*x^2-y^2, x*y])
sage: f.critical_subscheme()
Closed subscheme of Projective Space of dimension 1 over Rational Field
defined by:
4*x^2 + 2*y^2
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([2*x^2-y^2, x*y, z^2])
sage: f.critical_subscheme()
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
8*x^2*z + 4*y^2*z
sage: P.<x,y,z,w> = ProjectiveSpace(GF(81),3)
sage: H = End(P)
sage: g = H([x^3+y^3, y^3+z^3, z^3+x^3, w^3])
sage: g.critical_subscheme()
Closed subscheme of Projective Space of dimension 3 over Finite Field in
z4 of size 3^4 defined by:
  0
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2,x*y])
sage: f.critical_subscheme()
Traceback (most recent call last):
...
TypeError: the function is not a morphism
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 (x) to
        (x^2/(x^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 endomorphism of Affine Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x) to
        ((-x^2 + 1)/x^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 (x0, x1) to
        (1/2*x0^2 + 1/2*x1^2, 1/2*x1^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 (x0, x1) to
        (1/t*x0^2 + x1^2, x1^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:
  x0^2 - x1^2
  Defn: Defined on coordinates by sending (x0, x1) to
        (x0, x1^2/x0)
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
dynatomic_polynomial(period)

For a map \(f:\mathbb{P}^1 \to \mathbb{P}^1\) this function computes the dynatomic polynomial.

The dynatomic polynomial is the analog of the cyclotomic polynomial and its roots are the points of formal period \(period\). If possible the division is done in the coordinate ring of this map and a polynomial is returned. In rings where that is not possible, a FractionField element will be returned. In certain cases, when the conversion back to a polynomial fails, a SymbolRing element will be returned.

ALGORITHM:

For a positive integer \(n\), let \([F_n,G_n]\) be the coordinates of the \(nth\) iterate of \(f\). Then construct

\[\Phi^{\ast}_n(f)(x,y) = \sum_{d \mid n} (yF_d(x,y) - xG_d(x,y))^{\mu(n/d)}\]

where \(\mu\) is the Möbius function.

For a pair \([m,n]\), let \(f^m = [F_m,G_m]\). Compute

\[\Phi^{\ast}_{m,n}(f)(x,y) = \Phi^{\ast}_n(f)(F_m,G_m)/\Phi^{\ast}_n(f)(F_{m-1},G_{m-1})\]

REFERENCES:

[Hutz](1, 2) B. Hutz. Determination of all rational preperiodic points for morphisms of PN. Mathematics of Computation, 84:291 (2015), 289-308.
[MoPa]P. Morton and P. Patel. The Galois theory of periodic points of polynomial maps. Proc. London Math. Soc., 68 (1994), 225-263.

INPUT:

  • period – a positive integer or a list/tuple \([m,n]\) where \(m\) is the preperiod and \(n\) is the period.

OUTPUT:

  • If possible, a two variable polynomial in the coordinate ring of this map. Otherwise a fraction field element of the coordinate ring of this map. Or, a Symbolic Ring element.

Todo

  • Do the division when the base ring is p-adic so that the output is a polynomial.
  • Convert back to a polynomial when the base ring is a function field (not over \(\QQ\) or \(F_p\))

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.dynatomic_polynomial(2)
x^2 + x*y + 2*y^2
sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, x*y])
sage: f.dynatomic_polynomial(4)
2*x^12 + 18*x^10*y^2 + 57*x^8*y^4 + 79*x^6*y^6 + 48*x^4*y^8 + 12*x^2*y^10 + y^12
sage: P.<x,y> = ProjectiveSpace(CC,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, 3*x*y])
sage: f.dynatomic_polynomial(3)
13.0000000000000*x^6 + 117.000000000000*x^4*y^2 +
78.0000000000000*x^2*y^4 + y^6
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2-10/9*y^2, y^2])
sage: f.dynatomic_polynomial([2,1])
x^4*y^2 - 11/9*x^2*y^4 - 80/81*y^6
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2-29/16*y^2, y^2])
sage: f.dynatomic_polynomial([2,3])
x^12 - 95/8*x^10*y^2 + 13799/256*x^8*y^4 - 119953/1024*x^6*y^6 +
8198847/65536*x^4*y^8 - 31492431/524288*x^2*y^10 +
172692729/16777216*y^12
sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2-y^2, y^2])
sage: f.dynatomic_polynomial([1,2])
x^2 - x*y
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^3-y^3, 3*x*y^2])
sage: f.dynatomic_polynomial([0,4])==f.dynatomic_polynomial(4)
True
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, x*y, z^2])
sage: f.dynatomic_polynomial(2)
Traceback (most recent call last):
...
TypeError: does not make sense in dimension >1
sage: P.<x,y> = ProjectiveSpace(Qp(5),1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.dynatomic_polynomial(2)
(x^4*y + (2 + O(5^20))*x^2*y^3 - x*y^4 + (2 + O(5^20))*y^5)/(x^2*y -
x*y^2 + y^3)
sage: L.<t> = PolynomialRing(QQ)
sage: P.<x,y> = ProjectiveSpace(L,1)
sage: H = Hom(P,P)
sage: f = H([x^2+t*y^2, y^2])
sage: f.dynatomic_polynomial(2)
x^2 + x*y + (t + 1)*y^2
sage: K.<c> = PolynomialRing(ZZ)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([x^2+ c*y^2, y^2])
sage: f.dynatomic_polynomial([1, 2])
x^2 - x*y + (c + 1)*y^2
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.dynatomic_polynomial(2)
x^2 + x*y + 2*y^2
sage: R.<X> = PolynomialRing(QQ)
sage: K.<c> = NumberField(X^2 + X + 2)
sage: PP = P.change_ring(K)
sage: ff = f.change_ring(K)
sage: p = PP((c, 1))
sage: ff(ff(p)) == p
True
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, x*y])
sage: f.dynatomic_polynomial([2, 2])
x^4 + 4*x^2*y^2 + y^4
sage: R.<X> = PolynomialRing(QQ)
sage: K.<c> = NumberField(X^4 + 4*X^2 + 1)
sage: PP = P.change_ring(K)
sage: ff = f.change_ring(K)
sage: p = PP((c, 1))
sage: ff.nth_iterate(p, 4) == ff.nth_iterate(p, 2)
True
sage: P.<x,y> = ProjectiveSpace(CC, 1)
sage: H = Hom(P,P)
sage: f = H([x^2-CC.0/3*y^2, y^2])
sage: f.dynatomic_polynomial(2)
0.666666666666667*x^2 + 0.333333333333333*y^2
sage: L.<t> = PolynomialRing(QuadraticField(2).maximal_order())
sage: P.<x, y> = ProjectiveSpace(L.fraction_field() , 1)
sage: H = Hom(P,P)
sage: f = H([x^2 + (t^2 + 1)*y^2 , y^2])
sage: f.dynatomic_polynomial(2)
x^2 + x*y + (t^2 + 2)*y^2

TESTS:

We check that the dynatomic polynomial has the right parent (see trac ticket #18409):

sage: P.<x,y> = ProjectiveSpace(QQbar,1)
sage: H = End(P)
sage: R = P.coordinate_ring()
sage: f = H([x^2-1/3*y^2, y^2])
sage: f.dynatomic_polynomial(2).parent()
Multivariate Polynomial Ring in x, y over Algebraic Field
sage: T.<v> = QuadraticField(33)
sage: S.<t> = PolynomialRing(T)
sage: P.<x,y> = ProjectiveSpace(FractionField(S),1)
sage: H = End(P)
sage: f = H([t*x^2-1/t*y^2, y^2])
sage: f.dynatomic_polynomial([1, 2]).parent()
Multivariate Polynomial Ring in x, y over Fraction Field of Univariate Polynomial
Ring in t over Number Field in v with defining polynomial x^2 - 33
sage: P.<x, y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^3-y^3*2, y^3])
sage: f.dynatomic_polynomial(1).parent()
Multivariate Polynomial Ring in x, y over Rational Field
sage: P.<x, y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2 + y^2, y^2])
sage: f.dynatomic_polynomial(0)
0
sage: f.dynatomic_polynomial([0,0])
0

Some rings still return Symoblic Ring elements:

sage: S.<t> = FunctionField(CC)
sage: P.<x,y> = ProjectiveSpace(S,1)
sage: H = End(P)
sage: R = P.coordinate_ring()
sage: f = H([t*x^2-1*y^2, t*y^2])
sage: f.dynatomic_polynomial([1, 2]).parent()
Symbolic Ring
sage: R.<x,y> = PolynomialRing(QQ)
sage: S = R.quo(R.ideal(y^2-x+1))
sage: P.<u,v> = ProjectiveSpace(FractionField(S),1)
sage: H = End(P)
sage: f = H([u^2 + S(x^2)*v^2, v^2])
sage: dyn = f.dynatomic_polynomial([1,1]); dyn
v^3*xbar^2 + u^2*v + u*v^2
sage: dyn.parent()
Symbolic Ring
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
green_function(P, v, **kwds)

Evaluates the local Green’s function at the place v for P with N terms of the series or to within a given error bound.

Must be over a number field or order of a number field. Note that this is the absolute local Green’s function so is scaled by the degree of the base field.

Use v=0 for the archimedean place over \(\QQ\) or field embedding. Non-archimedean places are prime ideals for number fields or primes over \(\QQ\).

ALGORITHM:

See Exercise 5.29 and Figure 5.6 of [Silverman-ADS].

REFERENCES:

[Silverman-ADS]Joseph H. Silverman. The Arithmetic of Dynamics Systems. Springer, GTM 241, 2007.

INPUT:

  • P - a projective point.
  • v - non-negative integer. a place, use v=0 for the archimedean place.

kwds:

  • N - positive integer. number of terms of the series to use, (optional - default: 10).
  • prec - positive integer, float point or p-adic precision, default: 100.
  • error_bound - a positive real number (optional).

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, x*y])
sage: f.green_function(P.point([5,2], False), 0, N=30)
1.7315451844777407992085512000
sage: f.green_function(P.point([2,1], False), 0, N=30)
0.86577259223181088325226209926
sage: f.green_function(P.point([1,1], False), 0, N=30)
0.43288629610862338612700146098
height_difference_bound(prec=None)

Return an upper bound on the different between the canonical height of a point with respect to this map and the absolute height of the point.

This map must be a morphism.

ALGORITHM:

Uses a Nullstellensatz argument to compute the constant. For details: see [Hutz].

INPUT:

  • prec - positive integer, float point, default: RealField default.

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2+y^2, x*y]);
sage: f.height_difference_bound()
1.38629436111989

This function does not automatically normalize.

sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = End(P)
sage: f = H([4*x^2+100*y^2, 210*x*y, 10000*z^2]);
sage: f.height_difference_bound()
11.0020998412042
sage: f.normalize_coordinates()
sage: f.height_difference_bound()
10.3089526606443

A number field example:

    sage: R.<x> = QQ[]
    sage: K.<c> = NumberField(x^3 - 2)
    sage: P.<x,y,z> = ProjectiveSpace(K,2)
    sage: H = End(P)
    sage: f = H([1/(c+1)*x^2+c*y^2, 210*x*y, 10000*z^2])
    sage: f.height_difference_bound()
    11.0020998412042

::

    sage: P.<x,y,z> = ProjectiveSpace(QQbar,2)
    sage: H = End(P)
    sage: f = H([x^2, QQbar(sqrt(-1))*y^2, QQbar(sqrt(3))*z^2])
    sage: f.height_difference_bound()
    3.43967790223022
is_PGL_minimal(prime_list=None)

Checks if this map is a minimal model in its conjugacy class.

See [Bruin-Molnar] and [Molnar] for a description of the algorithm.

INPUT:

  • prime_list – list of primes to check minimality, if None, check all places.

OUTPUT:

  • Boolean - True if this map is minimal, False otherwise.

EXAMPLES:

sage: PS.<X,Y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([X^2+3*Y^2, X*Y])
sage: f.is_PGL_minimal()
True
sage: PS.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([6*x^2+12*x*y+7*y^2, 12*x*y])
sage: f.is_PGL_minimal()
False
sage: PS.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([6*x^2+12*x*y+7*y^2, y^2])
sage: f.is_PGL_minimal()
Traceback (most recent call last):
...
TypeError: affine minimality is only considered for maps not of the form
f or 1/f for a polynomial f
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
is_postcritically_finite(err=0.01, embedding=None)

Determine if this map is post-critically finite.

Only for endomorphisms of \(\mathbb{P}^1\). It checks if each critical point is preperiodic. The optional parameter err is passed into is_preperiodic() as part of the preperiodic check.

INPUT:

  • err - positive real number (optional, Default: 0.01).
  • embedding - embedding of base ring into \(\QQbar\)

OUTPUT: Boolean

Examples:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - y^2, y^2])
sage: f.is_postcritically_finite()
True
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^3- y^3, y^3])
sage: f.is_postcritically_finite()
False
sage: R.<z> = QQ[]
sage: K.<v> = NumberField(z^8 + 3*z^6 + 3*z^4 + z^2 + 1)
sage: PS.<x,y> = ProjectiveSpace(K,1)
sage: H = End(PS)
sage: f = H([x^3+v*y^3, y^3])
sage: f.is_postcritically_finite(embedding=K.embeddings(QQbar)[0]) # long time
True
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([6*x^2+16*x*y+16*y^2, -3*x^2-4*x*y-4*y^2])
sage: f.is_postcritically_finite()
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
minimal_model(return_transformation=False, prime_list=None)

Determine if this morphisms is minimal.

This map must be defined over the projective line over the rationals. In particular, determine if this map is affine minimal, which is enough to decide if it is minimal or not. See Proposition 2.10 in [Bruin-Molnar].

REFERENCES:

[Bruin-Molnar], [Molnar]

INPUT:

  • return_transformation – a boolean value, default value True. This
    signals a return of the \(PGL_2\) transformation to conjugate this map to the calculated minimal model. default: False.
  • prime_list – a list of primes, in case one only wants to determine minimality
    at those specific primes.

OUTPUT:

  • a scheme morphism on the projective line which is a minimal model of this map.
  • a \(PGL(2,\QQ)\) element which conjugates this map to a minimal model.

EXAMPLES:

sage: PS.<X,Y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([X^2+3*Y^2, X*Y])
sage: f.minimal_model(return_transformation=True)
(
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (X : Y) to
        (X^2 + 3*Y^2 : X*Y)
,
[1 0]
[0 1]
)
sage: PS.<X,Y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([7365/2*X^4 + 6282*X^3*Y + 4023*X^2*Y^2 + 1146*X*Y^3 + 245/2*Y^4,\
 -12329/2*X^4 - 10506*X^3*Y - 6723*X^2*Y^2 - 1914*X*Y^3 - 409/2*Y^4])
sage: f.minimal_model(return_transformation=True)
(
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (X : Y) to
        (22176*X^4 + 151956*X^3*Y + 390474*X^2*Y^2 + 445956*X*Y^3 +
190999*Y^4 : -12329*X^4 - 84480*X^3*Y - 217080*X^2*Y^2 - 247920*X*Y^3 -
106180*Y^4),
[2 3]
[0 1]
)
sage: PS.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([6*x^2+12*x*y+7*y^2, 12*x*y])
sage: f.minimal_model()
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 + 12*x*y + 42*y^2 : 2*x*y)
sage: PS.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = End(PS)
sage: f = H([6*x^2+12*x*y+7*y^2, 12*x*y + 42*y^2])
sage: g,M=f.minimal_model(return_transformation=True)
sage: f.conjugate(M) == g
True
sage: PS.<X,Y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([X+Y, X-3*Y])
sage: f.minimal_model()
Traceback (most recent call last):
...
NotImplementedError: minimality is only for degree 2 or higher
sage: PS.<X,Y> = ProjectiveSpace(QQ,1)
sage: H = End(PS)
sage: f = H([X^2-Y^2, X^2+X*Y])
sage: f.minimal_model()
Traceback (most recent call last):
...
TypeError: the function is not a morphism
multiplier(P, n, check=True)

Returns the multiplier of the point P of period n with respect to this map.

This map must have same domain and codomain.

INPUT:

  • P - a point on domain of this map.
  • n - a positive integer, the period of P.
  • check – verify that P has period n, Default:True.

OUTPUT:

  • a square matrix of size self.codomain().dimension_relative() in the base_ring of this map.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x^2,y^2, 4*z^2]);
sage: Q = P.point([4,4,1], False);
sage: f.multiplier(Q,1)
[2 0]
[0 2]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([7*x^2 - 28*y^2, 24*x*y])
sage: f.multiplier(P(2,5), 4)
[231361/20736]
sage: P.<x,y> = ProjectiveSpace(CC,1)
sage: H = End(P)
sage: f = H([x^3 - 25*x*y^2 + 12*y^3, 12*y^3])
sage: f.multiplier(P(1,1), 5)
[0.389017489711935]
sage: P.<x,y> = ProjectiveSpace(RR,1)
sage: H = End(P)
sage: f = H([x^2-2*y^2, y^2])
sage: f.multiplier(P(2,1), 1)
[4.00000000000000]
sage: P.<x,y> = ProjectiveSpace(Qp(13),1)
sage: H = End(P)
sage: f = H([x^2-29/16*y^2, y^2])
sage: f.multiplier(P(5,4), 3)
[6 + 8*13 + 13^2 + 8*13^3 + 13^4 + 8*13^5 + 13^6 + 8*13^7 + 13^8 +
8*13^9 + 13^10 + 8*13^11 + 13^12 + 8*13^13 + 13^14 + 8*13^15 + 13^16 +
8*13^17 + 13^18 + 8*13^19 + O(13^20)]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2-y^2, y^2])
sage: f.multiplier(P(0,1), 1)
Traceback (most recent call last):
...
ValueError: (0 : 1) is not periodic of period 1
multiplier_spectra(n, formal=True, embedding=None)

Computes the formal n multiplier spectra of this map.

This is the set of multipliers of the periodic points of formal period n included with the appropriate multiplicity. User can also specify to compute the n multiplier spectra instead which includes the multipliers of all periodic points of period n.The map must be defined over projective space of dimension 1 over a number field.

INPUT:

  • n - a positive integer, the period.
  • formal - a Boolean. True specifies to find the formal n multiplier spectra
    of this map. False specifies to find the n multiplier spectra of this map. Default: True
  • embedding - embedding of the base field into \(\QQbar\)

OUTPUT:

  • a list of \(\QQbar\) elements.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([4608*x^10 - 2910096*x^9*y + 325988068*x^8*y^2 + 31825198932*x^7*y^3 - 4139806626613*x^6*y^4\
- 44439736715486*x^5*y^5 + 2317935971590902*x^4*y^6 - 15344764859590852*x^3*y^7 + 2561851642765275*x^2*y^8\
+ 113578270285012470*x*y^9 - 150049940203963800*y^10, 4608*y^10])
sage: f.multiplier_spectra(1)
[0, -7198147681176255644585/256, 848446157556848459363/19683, -3323781962860268721722583135/35184372088832,
529278480109921/256, -4290991994944936653/2097152, 1061953534167447403/19683, -3086380435599991/9,
82911372672808161930567/8192, -119820502365680843999, 3553497751559301575157261317/8192]
sage: set_verbose(None)
sage: z = QQ['z'].0
sage: K.<w> = NumberField(z^4 - 4*z^2 + 1,'z')
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2 - w/4*y^2, y^2])
sage: f.multiplier_spectra(2, False, embedding=K.embeddings(QQbar)[0])
[0,
 5.931851652578137? + 0.?e-49*I,
 0.0681483474218635? - 1.930649271699173?*I,
 0.0681483474218635? + 1.930649271699173?*I]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - 3/4*y^2, y^2])
sage: f.multiplier_spectra(2)
[1]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - 7/4*y^2, y^2])
sage: f.multiplier_spectra(3)
[1, 1]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 + y^2, x*y])
sage: f.sigma_invariants(1)
[3, 3, 1]
normalize_coordinates()

Scales by 1/gcd of the coordinate functions.

Also, scales to clear any denominators from the coefficients. This is done in place.

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)

Note

gcd raises an error if the base_ring does not support gcds.

nth_iterate(P, n, **kwds)

Returns the n-th iterate of the point P by this map.

If normalize is True, then the coordinates are automatically normalized.

Todo

Is there a more efficient way to do this?

INPUT:

  • P – a point in this map’s domain.
  • n – a positive integer.

kwds:

  • normalize - Boolean (optional Default: False).

OUTPUT:

  • A point in this map’s codomain.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, 2*y^2])
sage: Q = P(1,1)
sage: f.nth_iterate(Q,4)
(32768 : 32768)
sage: P.<x,y> = ProjectiveSpace(ZZ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, 2*y^2])
sage: Q = P(1,1)
sage: f.nth_iterate(Q, 4, normalize=True)
(1 : 1)
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([x^2, 2*y^2, z^2-x^2])
sage: Q = P(2,7,1)
sage: f.nth_iterate(Q,2)
(-16/7 : -2744 : 1)
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: Q = P(2+t,7,t)
sage: f.nth_iterate(Q,2)
(t^4 + 2507*t^3 - 6787*t^2 + 10028*t + 16 : -2401*t^3 + 14406*t^2 -
28812*t + 19208 : t^4)
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.nth_iterate(X(2,2,3), 3)
(256 : 256 : 6561)
sage: K.<c> = FunctionField(QQ)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([x^3 - 2*x*y^2 - c*y^3, x*y^2])
sage: f.nth_iterate(P(c,1), 2)
((c^6 - 9*c^4 + 25*c^2 - c - 21)/(c^2 - 3) : 1)
nth_iterate_map(n)

Returns the n-th iterate of this map as a new map.

ALGORITHM:

Uses a form of successive squaring to reducing computations.

Todo

This could be improved.

INPUT:

  • n – a positive integer.

OUTPUT:

  • A map between projective spaces.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.nth_iterate_map(2)
Scheme endomorphism of Projective Space of dimension 1 over Rational
Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^4 + 2*x^2*y^2 + 2*y^4 : y^4)
sage: P.<x,y> = ProjectiveSpace(CC,1)
sage: H = Hom(P,P)
sage: f = H([x^2-y^2, x*y])
sage: f.nth_iterate_map(3)
Scheme endomorphism of Projective Space of dimension 1 over Complex
Field with 53 bits of precision
  Defn: Defined on coordinates by sending (x : y) to
        (x^8 + (-7.00000000000000)*x^6*y^2 + 13.0000000000000*x^4*y^4 +
(-7.00000000000000)*x^2*y^6 + y^8 : x^7*y + (-4.00000000000000)*x^5*y^3
+ 4.00000000000000*x^3*y^5 - x*y^7)
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([x^2-y^2, x*y, z^2+x^2])
sage: f.nth_iterate_map(2)
Scheme endomorphism of Projective Space of dimension 2 over Integer Ring
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^4 - 3*x^2*y^2 + y^4 : x^3*y - x*y^3 : 2*x^4 - 2*x^2*y^2 + y^4
+ 2*x^2*z^2 + z^4)
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: X = P.subscheme(x*z-y^2)
sage: H = Hom(X,X)
sage: f = H([x^2, x*z, z^2])
sage: f.nth_iterate_map(2)
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Rational Field defined by:
  -y^2 + x*z
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^4 : x^2*z^2 : z^4)
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.nth_iterate_map(1)
Scheme morphism:
  From: Projective Space of dimension 1 over Rational Field
  To:   Projective Space of dimension 2 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (x^2 : y^2 : x^2 - y^2)
orbit(P, N, **kwds)

Return the orbit of the point P by this map.

If N is an integer it returns \([P,self(P),\ldots,self^N(P)]\). If N is a list or tuple \(N=[m,k]\) it returns \([self^m(P),\ldots,self^k(P)]\). Automatically normalize the points if normalize=True. Perform the checks on point initialize if check=True

INPUT:

  • P – a point in this map’s domain.
  • n – a non-negative integer or list or tuple of two non-negative integers.

kwds:

  • check – boolean (optional - default: True).
  • normalize – boolean (optional - default: False).

OUTPUT:

  • a list of points in this map’s codomain.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2-z^2, 2*z^2])
sage: f.orbit(P(1,2,1), 3)
[(1 : 2 : 1), (5 : 3 : 2), (34 : 5 : 8), (1181 : -39 : 128)]
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2-z^2, 2*z^2])
sage: f.orbit(P(1,2,1), [2,4])
[(34 : 5 : 8), (1181 : -39 : 128), (1396282 : -14863 : 32768)]
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.orbit(X(2,2,3), 3, normalize=True)
[(2 : 2 : 3), (2 : 2 : 3), (2 : 2 : 3), (2 : 2 : 3)]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2])
sage: f.orbit(P.point([1,2],False), 4, check=False)
[(1 : 2), (5 : 4), (41 : 16), (1937 : 256), (3817505 : 65536)]
sage: K.<c> = FunctionField(QQ)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([x^2+c*y^2, y^2])
sage: f.orbit(P(0,1), 3)
[(0 : 1), (c : 1), (c^2 + c : 1), (c^4 + 2*c^3 + c^2 + c : 1)]
periodic_points(n, minimal=True, R=None, algorithm='variety')

Computes the periodic points of period n of this map defined over the ring R or the base ring of the map.

This can be done either by finding the rational points on the variety defining the points of period n, or, for finite fields, finding the cycle of appropriate length in the cyclegraph. For small cardinality fields, the cyclegraph algorithm is effective for any map and length cycle, but is slow when the cyclegraph is large. The variety algorithm is good for small period, degree, and dimension, but is slow as the defining equations of the variety get more complicated.

The map must be a projective morphism.

INPUT:

  • n - a positive integer.
  • minimal - Boolean. True specifies to find only the periodic points of minimal period n.
    False specifies to find all periodic points of period n. Default: True.
  • R a commutative ring.
  • algorithm - a string. Either variety to find the rational points on the appropriate variety or cyclegraph to find the cycles from the cycle graph. Default: variety.

OUTPUT:

  • a list of periodic points of this map.

EXAMPLES:

sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQbar,1)
sage: H = Hom(P,P)
sage: f = H([x^2-x*y+y^2, x^2-y^2+x*y])
sage: f.periodic_points(1)
[(-0.500000000000000? - 0.866025403784439?*I : 1), (-0.500000000000000? + 0.866025403784439?*I : 1),
(1 : 1)]
sage: P.<x,y,z> = ProjectiveSpace(QuadraticField(5,'t'),2)
sage: H = Hom(P,P)
sage: f = H([x^2 - 21/16*z^2, y^2-z^2, z^2])
sage: f.periodic_points(2)
[(-5/4 : -1 : 1), (-5/4 : -1/2*t + 1/2 : 1), (-5/4 : 0 : 1), (-5/4 : 1/2*t + 1/2 : 1), (-3/4 : -1 : 1),
(-3/4 : 0 : 1), (1/4 : -1 : 1), (1/4 : -1/2*t + 1/2 : 1), (1/4 : 0 : 1), (1/4 : 1/2*t + 1/2 : 1),
(7/4 : -1 : 1), (7/4 : 0 : 1)]
sage: w = QQ['w'].0
sage: K = NumberField(w^6 - 3*w^5 + 5*w^4 - 5*w^3 + 5*w^2 - 3*w + 1,'s')
sage: P.<x,y,z> = ProjectiveSpace(K,2)
sage: H = Hom(P,P)
sage: f = H([x^2+z^2, y^2+x^2, z^2+y^2])
sage: f.periodic_points(1)
[(-2*s^5 + 4*s^4 - 5*s^3 + 3*s^2 - 4*s : -2*s^5 + 5*s^4 - 7*s^3 + 6*s^2 - 7*s + 3 : 1),
(-s^5 + 3*s^4 - 4*s^3 + 4*s^2 - 4*s + 2 : -s^5 + 2*s^4 - 2*s^3 + s^2 - s : 1),
(2*s^5 - 6*s^4 + 9*s^3 - 8*s^2 + 7*s - 4 : 2*s^5 - 5*s^4 + 7*s^3 - 5*s^2 + 6*s - 2 : 1),
(s^5 - 2*s^4 + 2*s^3 + s : s^5 - 3*s^4 + 4*s^3 - 3*s^2 + 2*s - 1 : 1),
(s^5 - 2*s^4 + 3*s^3 - 3*s^2 + 3*s - 1 : -s^5 + 3*s^4 - 5*s^3 + 4*s^2 - 4*s + 2 : 1), (1 : 1 : 1),
(-s^5 + 3*s^4 - 5*s^3 + 4*s^2 - 3*s + 1 : s^5 - 2*s^4 + 3*s^3 - 3*s^2 + 4*s - 1 : 1)]
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([x^2 - 21/16*z^2, y^2-2*z^2, z^2])
sage: f.periodic_points(2, False)
[(-5/4 : -1 : 1), (-5/4 : 2 : 1), (-3/4 : -1 : 1), (-3/4 : 2 : 1), (0 : 1 : 0), (1/4 : -1 : 1),
(1/4 : 2 : 1), (1 : 0 : 0), (1 : 1 : 0), (7/4 : -1 : 1), (7/4 : 2 : 1)]
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: f = H([x^2 - 21/16*z^2, y^2-2*z^2, z^2])
sage: f.periodic_points(2)
[(-5/4 : -1 : 1), (-5/4 : 2 : 1), (1/4 : -1 : 1), (1/4 : 2 : 1)]
sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(ZZ, 1)
sage: H = End(P)
sage: f = H([x^2+y^2,y^2])
sage: f.periodic_points(2, R=QQbar, minimal=False)
[(-0.500000000000000? - 1.322875655532296?*I : 1),
 (-0.500000000000000? + 1.322875655532296?*I : 1),
 (0.500000000000000? - 0.866025403784439?*I : 1),
 (0.500000000000000? + 0.866025403784439?*I : 1),
 (1 : 0)]
sage: P.<x,y> = ProjectiveSpace(GF(307), 1)
sage: H = End(P)
sage: f = H([x^10+y^10, y^10])
sage: f.periodic_points(16, minimal=True, algorithm='cyclegraph')
[(69 : 1), (185 : 1), (120 : 1), (136 : 1), (97 : 1), (183 : 1),
 (170 : 1), (105 : 1), (274 : 1), (275 : 1), (154 : 1), (156 : 1),
 (87 : 1), (95 : 1), (161 : 1), (128 : 1)]
sage: P.<x,y> = ProjectiveSpace(GF(13^2,'t'),1)
sage: H = End(P)
sage: f = H([x^3 + 3*y^3, x^2*y])
sage: f.periodic_points(30, minimal=True, algorithm='cyclegraph')
[(t + 3 : 1), (6*t + 6 : 1), (7*t + 1 : 1), (2*t + 8 : 1),
 (3*t + 4 : 1), (10*t + 12 : 1), (8*t + 10 : 1), (5*t + 11 : 1),
 (7*t + 4 : 1), (4*t + 8 : 1), (9*t + 1 : 1), (2*t + 2 : 1),
 (11*t + 9 : 1), (5*t + 7 : 1), (t + 10 : 1), (12*t + 4 : 1),
 (7*t + 12 : 1), (6*t + 8 : 1), (11*t + 10 : 1), (10*t + 7 : 1),
 (3*t + 9 : 1), (5*t + 5 : 1), (8*t + 3 : 1), (6*t + 11 : 1),
 (9*t + 12 : 1), (4*t + 10 : 1), (11*t + 4 : 1), (2*t + 7 : 1),
 (8*t + 12 : 1), (12*t + 11 : 1)]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([3*x^2+5*y^2,y^2])
sage: f.periodic_points(2, R=GF(3), minimal=False)
Traceback (most recent call last):
...
NotImplementedError: must be a projective morphism
possible_periods(**kwds)

Returns the set of possible periods for rational periodic points of this map.

Must be defined over \(\ZZ\) or \(\QQ\).

ALGORITHM:
Calls self.possible_periods() modulo all primes of good reduction in range prime_bound. Returns the intersection of those lists.

INPUT:

kwds:

  • prime_bound - a list or tuple of two positive integers. Or an integer for the upper bound. (optional)
    default: [1,20].
  • bad_primes - a list or tuple of integer primes, the primes of bad reduction. (optional)
  • ncpus - number of cpus to use in parallel. (optional)
    default: all available cpus.

OUTPUT:

  • a list of positive integers.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2-29/16*y^2, y^2])
sage: f.possible_periods(ncpus=1)
[1, 3]
sage: PS.<x,y> = ProjectiveSpace(1,QQ)
sage: H = End(PS)
sage: f = H([5*x^3 - 53*x*y^2 + 24*y^3, 24*y^3])
sage: f.possible_periods(prime_bound=[1,5])
Traceback (most recent call last):
...
ValueError: no primes of good reduction in that range
sage: f.possible_periods(prime_bound=[1,10])
[1, 4, 12]
sage: f.possible_periods(prime_bound=[1,20])
[1, 4]
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = End(P)
sage: f = H([2*x^3 - 50*x*z^2 + 24*z^3, 5*y^3 - 53*y*z^2 + 24*z^3, 24*z^3])
sage: f.possible_periods(prime_bound=10)
[1, 2, 6, 20, 42, 60, 140, 420]
sage: f.possible_periods(prime_bound=20) # long time
[1, 20]
primes_of_bad_reduction(check=True)

Determines the primes of bad reduction for an endomorphism defined over number fields.

If check is True, each prime is verified to be of bad reduction.

ALGORITHM:

\(p\) is a prime of bad reduction if and only if the defining polynomials of self have a common zero. Or stated another way, \(p\) is a prime of bad reducion if and only if the radical of the ideal defined by the defining polynomials of self is not \((x_0,x_1,\ldots,x_N)\). This happens if and only if some power of each \(x_i\) is not in the ideal defined by the defining polynomials of self. This last condition is what is checked. The lcm of the coefficients of the monomials \(x_i\) in a Groebner basis is computed. This may return extra primes.

INPUT:

  • check – Boolean (optional - default: True).

OUTPUT:

  • a list of integer primes.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([1/3*x^2+1/2*y^2, y^2])
sage: f.primes_of_bad_reduction()
[2, 3]
sage: P.<x,y,z,w> = ProjectiveSpace(QQ,3)
sage: H = Hom(P,P)
sage: f = H([12*x*z-7*y^2, 31*x^2-y^2, 26*z^2, 3*w^2-z*w])
sage: f.primes_of_bad_reduction()
[2, 3, 7, 13, 31]

A number field example

sage: R.<z> = QQ[]
sage: K.<a> = NumberField(z^2 - 2)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = Hom(P,P)
sage: f = H([1/3*x^2+1/a*y^2, y^2])
sage: f.primes_of_bad_reduction()
[Fractional ideal (a), Fractional ideal (3)]

This is an example where check = False returns extra primes:

sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: H = Hom(P,P)
sage: f = H([3*x*y^2 + 7*y^3 - 4*y^2*z + 5*z^3, -5*x^3 + x^2*y + y^3 + 2*x^2*z,\
    -2*x^2*y + x*y^2 + y^3 - 4*y^2*z + x*z^2])
sage: f.primes_of_bad_reduction(False)
[2, 5, 37, 2239, 304432717]
sage: f.primes_of_bad_reduction()
[5, 37, 2239, 304432717]
resultant(normalize=False)

Computes the resultant of the defining polynomials of this map.

If normalize is True, then first normalize the coordinate functions with normalize_coordinates().

INPUT:

  • normalize – Boolean (optional - default: False).

OUTPUT:

  • an element of the base ring of this map.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, 6*y^2])
sage: f.resultant()
36
sage: R.<t> = PolynomialRing(GF(17))
sage: P.<x,y> = ProjectiveSpace(R,1)
sage: H = Hom(P,P)
sage: f = H([t*x^2+t*y^2, 6*y^2])
sage: f.resultant()
2*t^2
sage: R.<t> = PolynomialRing(GF(17))
sage: P.<x,y,z> = ProjectiveSpace(R,2)
sage: H = Hom(P,P)
sage: f = H([t*x^2+t*y^2, 6*y^2, 2*t*z^2])
sage: f.resultant()
13*t^8
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = Hom(P,P)
sage: F = H([x^2+y^2,6*y^2,10*x*z+z^2+y^2])
sage: F.resultant()
1296
sage: R.<t>=PolynomialRing(QQ)
sage: s = (t^3+t+1).roots(QQbar)[0][0]
sage: P.<x,y>=ProjectiveSpace(QQbar,1)
sage: H = Hom(P,P)
sage: f = H([s*x^3-13*y^3, y^3-15*y^3])
sage: f.resultant()
871.6925062959149?
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)
sigma_invariants(n, formal=True, embedding=None)

Computes the values of the elementary symmetric polynomials of the formal n multilpier spectra of this map.

Can specify to instead compute the values corresponding to the elementary symmetric polynomials of the n multiplier spectra, which includes the multipliers of all periodic points of period n. The map must be defined over projective space of dimension 1 over a number field.

INPUT:

  • n - a positive integer, the period.
  • formal - a Boolean. True specifies to find the values of the elementary symmetric polynomials
    corresponding to the formal n multiplier spectra of this map. False specifies to instead find the values corresponding to the n multiplier spectra of this map, which includes the multipliers of all periodic points of period n of this map. Default: True
  • embedding - embedding of the base field into \(\QQbar\)

OUTPUT: a list of elements in the base ring.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([512*x^5 - 378128*x^4*y + 76594292*x^3*y^2 - 4570550136*x^2*y^3 - 2630045017*x*y^4\
+ 28193217129*y^5, 512*y^5])
sage: f.sigma_invariants(1)
[19575526074450617/1048576, -9078122048145044298567432325/2147483648,
-2622661114909099878224381377917540931367/1099511627776,
-2622661107937102104196133701280271632423/549755813888,
338523204830161116503153209450763500631714178825448006778305/72057594037927936, 0]
sage: set_verbose(None)
sage: z = QQ['z'].0
sage: K = NumberField(z^4 - 4*z^2 + 1,'z')
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2 - 5/4*y^2, y^2])
sage: f.sigma_invariants(2, False, embedding=K.embeddings(QQbar)[0])
[13, 11, -25, 0]
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: H = End(P)
sage: f = H([x^2, y^2, z^2])
sage: f.sigma_invariants(1)
Traceback (most recent call last):
...
NotImplementedError: only implemented for dimension 1
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

The Python constructor.

See SchemeMorphism_polynomial for details.

EXAMPLES:

sage: P1.<x,y> = ProjectiveSpace(QQ,1)
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)
sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y,z> = ProjectiveSpace(R, 2)
sage: X = P.subscheme([x])
sage: H = End(X)
sage: H([x^2, t*y^2, x*z])
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Univariate Polynomial Ring in t over Rational Field defined by:
  x
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^2 : t*y^2 : x*z)

When elements of the quotient ring is used, they are reduced:

sage: P.<x,y,z> = ProjectiveSpace(CC, 2)
sage: X = P.subscheme([x-y])
sage: u,v,w = X.coordinate_ring().gens()
sage: H = End(X)
sage: H([u^2, v^2, w*u])
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Complex Field with 53 bits of precision defined by:
  x - y
  Defn: Defined on coordinates by sending (x : y : z) to
        (y^2 : y^2 : y*z)
all_rational_preimages(points)

Given a set of rational points in the domain of this map, return all the rational preimages of those points.

In others words, all the rational points which have some iterate in the set points. This function repeatedly calls rational_preimages. If the degree is at least two, by Northocott, this is always a finite set. The map must be defined over number fields and be an endomorphism.

INPUT:

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

OUTPUT:

  • a list of rational points 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: sorted(f.all_rational_preimages([P(-1,4)]))
[(-7/4 : 1), (-5/4 : 1), (-3/4 : 1), (-1/4 : 1), (1/4 : 1), (3/4 : 1),
(5/4 : 1), (7/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: sorted(f.all_rational_preimages([P(-9,-4,1)]))
[(-9 : -4 : 1), (0 : -1 : 1), (0 : 0 : 1), (0 : 1 : 1), (0 : 4 : 1), (1
: 0 : 1), (1 : 1 : 1), (1 : 2 : 1), (1 : 3 : 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: sorted(f.all_rational_preimages([P(17,15)]))
[(1/3 : 1), (3/5 : 1), (5/3 : 1), (3 : 1)]

A number field example.:

sage: z = QQ['z'].0
sage: K.<w> = NumberField(z^3 + (z^2)/4 - (41/16)*z + 23/64);
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([16*x^2 - 29*y^2, 16*y^2])
sage: f.all_rational_preimages([P(16*w^2 - 29,16)])
[(w^2 + w - 25/16 : 1), (-w - 1/2 : 1), (w^2 - 29/16 : 1), (-w : 1), (w + 1/2 : 1), (w^2 - 21/16 : 1),
(w : 1), (-w^2 + 21/16 : 1), (-w^2 - w + 25/16 : 1), (w^2 + w - 33/16 : 1), (-w^2 + 29/16 : 1),
(-w^2 - w + 33/16 : 1)]
sage: K.<w> = QuadraticField(3)
sage: P.<u,v> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([u^2+v^2, v^2])
sage: f.all_rational_preimages(P(4))
[(-w : 1), (w : 1)]
conjugating_set(other)

Returns the set of elements in PGL that conjugates one map to the other.

Given two nonconstant rational functions of equal degree determine to see if there is an element of PGL that conjugates one rational function to another. It does this by taking the fixed points of one map and mapping them to all unique permutations of the fixed points of the other map. If there are not enough fixed points the function compares the mapping between rational preimages of fixed points and the rational preimages of the preimages of fixed points until there are enough points; such that there are \(n+2\) points with all \(n+1\) subsets linearly independent.

ALGORITHM:

Implementing invariant set algorithim from the paper [FMV]. Given that the set of \(n\) th preimages of fixed points is invariant under conjugation find all elements of PGL that take one set to another.

INPUT: Two nonconstant rational functions of same degree.

OUTPUT: Set of conjugating \(n+1\) by \(n+1\) matrices.

AUTHORS:

  • Original algorithm written by Xander Faber, Michelle Manes, Bianca Viray [FMV].
  • Implimented by Rebecca Lauren Miller, as part of GSOC 2016.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - 2*y^2, y^2])
sage: m = matrix(QQbar, 2, 2, [-1, 3, 2, 1])
sage: g = f.conjugate(m)
sage: f.conjugating_set(g)
[
[-1  3]
[ 2  1]
]
sage: K.<w> = QuadraticField(-1)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2 + y^2, x*y])
sage: m = matrix(K, 2, 2, [1, 1, 2, 1])
sage: g = f.conjugate(m)
sage: f.conjugating_set(g) # long test
[
[1 1]  [-1 -1]
[2 1], [ 2  1]
]
sage: K.<i> = QuadraticField(-1)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: D8 = H([y^3, x^3])
sage: D8.conjugating_set(D8) # long test
[
[1 0]  [0 1]  [ 0 -i]  [i 0]  [ 0 -1]  [-1  0]  [-i  0]  [0 i]
[0 1], [1 0], [ 1  0], [0 1], [ 1  0], [ 0  1], [ 0  1], [1 0]
]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: D8 = H([y^2, x^2])
sage: D8.conjugating_set(D8)
Traceback (most recent call last):
...
ValueError: not enough rational preimages
sage: P.<x,y> = ProjectiveSpace(GF(7),1)
sage: H = End(P)
sage: D6 = H([y^2, x^2])
sage: D6.conjugating_set(D6)
[
[1 0]  [0 1]  [0 2]  [4 0]  [2 0]  [0 4]
[0 1], [1 0], [1 0], [0 1], [0 1], [1 0]
]
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([x^2 + x*z, y^2, z^2])
sage: f.conjugating_set(f) # long test
[
[1 0 0]
[0 1 0]
[0 0 1]
]
connected_rational_component(P, n=0)

Computes the connected component of a rational preperiodic point P by this map.

Will work for non-preperiodic points if n is positive. Otherwise this will not terminate.

INPUT:

  • P - A rational preperiodic point of this map.
  • n - Maximum distance from P to branch out. A value of 0 indicates no bound. Default: 0

OUTPUT:

  • a list of points connected to P up to the specified distance.

Examples:

sage: R.<x> = PolynomialRing(QQ)
sage: K.<w> = NumberField(x^3+1/4*x^2-41/16*x+23/64)
sage: PS.<x,y> = ProjectiveSpace(1,K)
sage: H = End(PS)
sage: f = H([x^2 - 29/16*y^2, y^2])
sage: P = PS([w,1])
sage: f.connected_rational_component(P)
[(w : 1),
 (w^2 - 29/16 : 1),
 (w^2 + w - 25/16 : 1),
 (-w^2 - w + 25/16 : 1),
 (-w : 1),
 (w + 1/2 : 1),
 (-w - 1/2 : 1),
 (-w^2 + 29/16 : 1),
 (-w^2 + 21/16 : 1),
 (w^2 - 21/16 : 1),
 (w^2 + w - 33/16 : 1),
 (-w^2 - w + 33/16 : 1)]
sage: PS.<x,y,z> = ProjectiveSpace(2,QQ)
sage: H = End(PS)
sage: f = H([x^2 - 21/16*z^2, y^2-2*z^2, z^2])
sage: P = PS([17/16,7/4,1])
sage: f.connected_rational_component(P,3)
[(17/16 : 7/4 : 1),
 (-47/256 : 17/16 : 1),
 (-83807/65536 : -223/256 : 1),
 (-17/16 : -7/4 : 1),
 (-17/16 : 7/4 : 1),
 (17/16 : -7/4 : 1),
 (1386468673/4294967296 : -81343/65536 : 1),
 (-47/256 : -17/16 : 1),
 (47/256 : -17/16 : 1),
 (47/256 : 17/16 : 1),
 (-1/2 : -1/2 : 1),
 (-1/2 : 1/2 : 1),
 (1/2 : -1/2 : 1),
 (1/2 : 1/2 : 1)]
indeterminacy_locus()

Return the indeterminacy locus of this map.

Only for rational maps on projective space defined over a field. The indeterminacy locus is the set of points in projective space at which all of the defining polynomials of the rational map simultaneously vanish.

OUTPUT:

  • subscheme of the domain of the map. The empty subscheme is returned as the vanishing of the coordinate functions of the domain.

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_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.indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
    x,
    y,
    z
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.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.indeterminacy_locus()
Closed subscheme of Projective Space of dimension 2 over Rational Field
defined by:
  x^3,
  x*y^2,
  x*z^2
indeterminacy_points(F=None)

Return the indeterminacy locus of this map defined over F.

Only for rational maps on projective space. Returns the set of points in projective space at which all of the defining polynomials of the rational map simultaneously vanish.

INPUT:

  • F - a field (optional).

OUTPUT:

  • indeterminacy points of the map defined over F, provided the indeterminacy scheme is 0-dimensional.

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()
[(-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: h.indeterminacy_points()
[]
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()
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)
[(-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()
[(-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()
[(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))]
is_conjugate(other)

Returns whether or not two maps are conjugate.

ALGORITHM:

Implementing invariant set algorithim from the paper [FMV]. Given that the set of \(n\) th preimages is invariant under conjugation this function finds whether two maps are conjugate.

INPUT: Two nonconstant rational functions of same degree.

OUTPUT: Boolean.

AUTHORS:

  • Original algorithm written by Xander Faber, Michelle Manes, Bianca Viray [FMV].
  • Implimented by Rebecca Lauren Miller as part of GSOC 2016.

EXAMPLES:

sage: K.<w> = CyclotomicField(3)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: D8 = H([y^2, x^2])
sage: D8.is_conjugate(D8)
True
sage: set_verbose(None)
sage: P.<x,y> = ProjectiveSpace(QQbar,1)
sage: H = End(P)
sage: f = H([x^2 + x*y,y^2])
sage: m = matrix(QQbar, 2, 2, [1, 1, 2, 1])
sage: g = f.conjugate(m)
sage: f.is_conjugate(g) # long test
True
sage: P.<x,y> = ProjectiveSpace(GF(5),1)
sage: H = End(P)
sage: f = H([x^3 + x*y^2,y^3])
sage: m = matrix(GF(5), 2, 2, [1, 3, 2, 9])
sage: g = f.conjugate(m)
sage: f.is_conjugate(g)
True
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 + x*y,y^2])
sage: g = H([x^3 + x^2*y, y^3])
sage: f.is_conjugate(g) 
False
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 + x*y, y^2])
sage: g = H([x^2 - 2*y^2, y^2])
sage: f.is_conjugate(g)
False
is_polynomial()

Checks to see if the function has a totally ramified fixed point.

The function must be defined over an absolute number field or a finite field.

OUTPUT: Boolean

EXAMPLES:

sage: R.<x> = QQ[]
sage: K.<w> = QuadraticField(7)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: H = End(P)
sage: f = H([x**2 + 2*x*y - 5*y**2, 2*x*y])
sage: f.is_polynomial()
False
sage: R.<x> = QQ[]
sage: K.<w> = QuadraticField(7)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: H = End(P)
sage: f = H([x**2 - 7*x*y, 2*y**2])
sage: m = matrix(K, 2, 2, [w, 1, 0, 1])
sage: f = f.conjugate(m)
sage: f.is_polynomial()
True
sage: K.<w> = QuadraticField(4/27)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: S = P.coordinate_ring()
sage: f = H([x**3 + w*y^3,x*y**2])
sage: f.is_polynomial()
False
sage: K = GF(3**2, prefix='w')
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x**2 + K.gen()*y**2, x*y])
sage: f.is_polynomial()
False
sage: PS.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(PS)
sage: f = H([6*x^2+12*x*y+7*y^2, 12*x*y + 42*y^2])
sage: f.is_polynomial()
False
lift_to_rational_periodic(points_modp, B=None)

Given a list of points in projective space over \(GF(p)\), determine if they lift to \(\QQ\)-rational periodic points.

The map must be an endomorphism of projective space defined over \(\QQ\)

ALGORITHM:

Use Hensel lifting to find a \(p\)-adic approximation for that rational point. The accuracy needed is determined by the height bound B. Then apply the LLL algorithm to determine if the lift corresponds to a rational point.

If the point is a point of high multiplicity (multiplier 1) then procedure can be very slow.

INPUT:

  • points_modp - a list or tuple of pairs containing a point in projective space over \(GF(p)\) and the possible period.
  • B - a positive integer - the height bound for a rational preperiodic point. (optional)

OUTPUT:

  • a list of projective points.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2 - y^2, y^2])
sage: f.lift_to_rational_periodic([[P(0,1).change_ring(GF(7)), 4]])
[[(0 : 1), 2]]
There may be multiple points in the lift.
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([-5*x^2 + 4*y^2, 4*x*y])
sage: f.lift_to_rational_periodic([[P(1,0).change_ring(GF(3)), 1]]) # long time
[[(1 : 0), 1], [(2/3 : 1), 1], [(-2/3 : 1), 1]]
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.lift_to_rational_periodic([[P(3,1).change_ring(GF(13)), 3]])
[[(-1/4 : 1), 3]]
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.lift_to_rational_periodic([[P(14,19,1).change_ring(GF(23)), 9]]) # long time
[[(-9 : -4 : 1), 9]]
normal_form(return_conjugation=False)

Returns a normal form for the map in the moduli space of dynamical systems.

Currently implemented only for polynomials. The totally ramified fixed point is moved to infinity and the map is conjugated to the form \(x^n + a_{n-2}x^{n-2} + \cdots + a_{0}\). Note that for finite fields we can only remove the \((n-1)\)-st term when the characteristic does not divide \(n\).

INPUT:

  • return_conjugation – Boolean - True returns conjugatation element of PGL. along with the embedding into the new field. Default: False. (optional)

OUTPUT:

  • SchemeMorphism_polynomial
  • Element of PGL as a matrix. (optional)
  • Field embedding. (option)

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: H = End(P)
sage: f = H([x^2 + 2*x*y - 5*x^2, 2*x*y])
sage: f.normal_form()
Traceback (most recent call last):
...
NotImplementedError: map is not a polynomial
sage: R.<x> = QQ[]
sage: K.<w> = NumberField(x^2 - 5)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2 + w*x*y, y^2])
sage: g,m,psi = f.normal_form(return_conjugation = True);m
[     1 -1/2*w]
[     0      1]
sage: f.change_ring(psi).conjugate(m) == g
True
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([13*x^2 + 4*x*y + 3*y^2, 5*y^2])
sage: f.normal_form()
Scheme endomorphism of Projective Space of dimension 1 over Rational Field
  Defn: Defined on coordinates by sending (x : y) to
        (5*x^2 + 9*y^2 : 5*y^2)
sage: K = GF(3^3, prefix = 'w')
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^3 + 2*x^2*y + 2*x*y^2 + K.gen()*y^3, y^3])
sage: f.normal_form()
Scheme endomorphism of Projective Space of dimension 1 over Finite Field
in w3 of size 3^3
  Defn: Defined on coordinates by sending (x : y) to
        (x^3 + x^2*y + x*y^2 + (-w3)*y^3 : y^3)
rational_periodic_points(**kwds)

Determine the set of rational periodic points for an endomorphism of projective space.

The map must be defined over \(\QQ\) and be an endomorphism of projective space. If the map is a polynomial endomorphism of \(\mathbb{P}^1\), i.e. has a totally ramified fixed point, then the base ring can be an absolute number field. This is done by passing to the Weil restriction.

The default parameter values are typically good choices for \(\mathbb{P}^1\). If you are having trouble getting a particular map to finish, try first computing the possible periods, then try various different lifting_prime values.

ALGORITHM:

Modulo each prime of good reduction \(p\) determine the set of periodic points modulo \(p\). For each cycle modulo \(p\) compute the set of possible periods (\(mrp^e\)). Take the intersection of the list of possible periods modulo several primes of good reduction to get a possible list of minimal periods of rational periodic points. Take each point modulo \(p\) associated to each of these possible periods and try to lift it to a rational point with a combination of \(p\)-adic approximation and the LLL basis reducion algorithm.

See [Hutz].

INPUT:

kwds:

  • prime_bound - a pair (list or tuple) of positive integers that represent the
    limits of primes to use in the reduction step. Or an integer that represents the upper bound. (optional) default: [1,20]
  • lifting_prime - a prime integer. (optional) argument that specifies modulo which prime to try and perform the
    lifting. default: 23
  • periods - a list of positive integers which is the list of possible periods. (optional)
  • bad_primes - a list or tuple of integer primes, the primes of bad reduction. (optional)
  • ncpus - number of cpus to use in parallel. (optional)
    default: all available cpus.

OUTPUT:

  • a list of rational points in projective space.

Examples:

sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([x^2-3/4*y^2, y^2])
sage: sorted(f.rational_periodic_points(prime_bound=20, lifting_prime=7)) # long time
[(-1/2 : 1), (1 : 0), (3/2 : 1)]
sage: P.<x,y,z> = ProjectiveSpace(QQ,2)
sage: H = End(P)
sage: f = H([2*x^3 - 50*x*z^2 + 24*z^3, 5*y^3 - 53*y*z^2 + 24*z^3, 24*z^3])
sage: sorted(f.rational_periodic_points(prime_bound=[1,20])) # long time
[(-3 : -1 : 1), (-3 : 0 : 1), (-3 : 1 : 1), (-3 : 3 : 1), (-1 : -1 : 1),
(-1 : 0 : 1), (-1 : 1 : 1), (-1 : 3 : 1), (0 : 1 : 0), (1 : -1 : 1), (1
: 0 : 0), (1 : 0 : 1), (1 : 1 : 1), (1 : 3 : 1), (3 : -1 : 1), (3 : 0 :
1), (3 : 1 : 1), (3 : 3 : 1), (5 : -1 : 1), (5 : 0 : 1), (5 : 1 : 1), (5
: 3 : 1)]
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: H = End(P)
sage: f = H([-5*x^2 + 4*y^2, 4*x*y])
sage: sorted(f.rational_periodic_points()) # long time
[(-2 : 1), (-2/3 : 1), (2/3 : 1), (1 : 0), (2 : 1)]
sage: R.<x> = QQ[]
sage: K.<w> = NumberField(x^2-x+1)
sage: P.<u,v> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([u^2 + v^2,v^2])
sage: f.rational_periodic_points()
[(w : 1), (1 : 0), (-w + 1 : 1)]
sage: R.<x> = QQ[]
sage: K.<w> = NumberField(x^2-x+1)
sage: P.<u,v> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([u^2+v^2,u*v])
sage: f.rational_periodic_points()
Traceback (most recent call last):
...
NotImplementedError: rational periodic points for number fields only implemented for polynomials
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]))
Traceback (most recent call last):
...
NotImplementedError: subschemes as preimages not implemented
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)]
rational_preperiodic_graph(**kwds)

Determine the directed graph of the rational preperiodic points for this map.

The map must be defined over \(\QQ\) and be an endomorphism of projective space. If this map is a polynomial endomorphism of \(\mathbb{P}^1\), i.e. has a totally ramified fixed point, then the base ring can be an absolute number field. This is done by passing to the Weil restriction.

ALGORITHM: - Determines the list of possible periods.

  • Determines the rational periodic points from the possible periods.
  • Determines the rational preperiodic points from the rational periodic points by determining rational preimages.

INPUT:

kwds:

  • prime_bound - a pair (list or tuple) of positive integers that represent the
    limits of primes to use in the reduction step. Or an integer that represents the upper bound. (optional) default: [1,20]
  • lifting_prime - a prime integer. (optional) argument that specifies modulo which prime to try and perform the
    lifting. default: 23
  • periods - a list of positive integers which is the list of possible periods. (optional)
  • bad_primes - a list or tuple of integer primes, the primes of bad reduction. (optional)
  • ncpus - number of cpus to use in parallel. (optional)
    default: all available cpus.

OUTPUT:

  • a digraph representing the orbits of the rational preperiodic points in projective space.

Examples:

sage: PS.<x,y> = ProjectiveSpace(1,QQ)
sage: H = End(PS)
sage: f = H([7*x^2 - 28*y^2, 24*x*y])
sage: f.rational_preperiodic_graph()
Looped digraph on 12 vertices
sage: PS.<x,y> = ProjectiveSpace(1,QQ)
sage: H = End(PS)
sage: f = H([-3/2*x^3 +19/6*x*y^2, y^3])
sage: f.rational_preperiodic_graph(prime_bound=[1,8])
Looped digraph on 12 vertices
sage: PS.<x,y,z> = ProjectiveSpace(2,QQ)
sage: H = End(PS)
sage: f = H([2*x^3 - 50*x*z^2 + 24*z^3, 5*y^3 - 53*y*z^2 + 24*z^3, 24*z^3])
sage: f.rational_preperiodic_graph(prime_bound=[1,11], lifting_prime=13) # long time
Looped digraph on 30 vertices
sage: K.<w> = QuadraticField(-3)
sage: P.<x,y> = ProjectiveSpace(K,1)
sage: H = End(P)
sage: f = H([x^2+y^2, y^2])
sage: f.rational_preperiodic_graph() # long time
Looped digraph on 5 vertices
rational_preperiodic_points(**kwds)

Determine the set of rational preperiodic points for this map.

The map must be defined over \(\QQ\) and be an endomorphism of projective space. If the map is a polynomial endomorphism of \(\mathbb{P}^1\), i.e. has a totally ramified fixed point, then the base ring can be an absolute number field. This is done by passing to the Weil restriction.

The default parameter values are typically good choices for \(\mathbb{P}^1\). If you are having trouble getting a particular map to finish, try first computing the possible periods, then try various different values for lifting_prime.

ALGORITHM:

  • Determines the list of possible periods.
  • Determines the rational periodic points from the possible periods.
  • Determines the rational preperiodic points from the rational periodic points by determining rational preimages.

INPUT:

kwds:

  • prime_bound - a pair (list or tuple) of positive integers that represent the limits of primes to use in the reduction step. Or an integer that represents the upper bound. (optional) default: [1,20]
  • lifting_prime - a prime integer. (optional) argument that specifies modulo which prime to try and perform the lifting. default: 23
  • periods - a list of positive integers which is the list of possible periods. (optional)
  • bad_primes - a list or tuple of integer primes, the primes of bad reduction. (optional)
  • ncpus - number of cpus to use in parallel. (optional)
    default: all available cpus.

OUTPUT:

  • a list of rational points in projective space.

Examples:

sage: PS.<x,y> = ProjectiveSpace(1,QQ)
sage: H = End(PS)
sage: f = H([x^2 -y^2, 3*x*y])
sage: sorted(f.rational_preperiodic_points())
[(-2 : 1), (-1 : 1), (-1/2 : 1), (0 : 1), (1/2 : 1), (1 : 0), (1 : 1),
(2 : 1)]
sage: PS.<x,y> = ProjectiveSpace(1,QQ)
sage: H = End(PS)
sage: f = H([5*x^3 - 53*x*y^2 + 24*y^3, 24*y^3])
sage: sorted(f.rational_preperiodic_points(prime_bound=10))
[(-1 : 1), (0 : 1), (1 : 0), (1 : 1), (3 : 1)]
sage: PS.<x,y,z> = ProjectiveSpace(2,QQ)
sage: H = End(PS)
sage: f = H([x^2 - 21/16*z^2, y^2-2*z^2, z^2])
sage: sorted(f.rational_preperiodic_points(prime_bound=[1,8], lifting_prime=7, periods=[2])) # long time
[(-5/4 : -2 : 1), (-5/4 : -1 : 1), (-5/4 : 0 : 1), (-5/4 : 1 : 1), (-5/4
: 2 : 1), (-1/4 : -2 : 1), (-1/4 : -1 : 1), (-1/4 : 0 : 1), (-1/4 : 1 :
1), (-1/4 : 2 : 1), (1/4 : -2 : 1), (1/4 : -1 : 1), (1/4 : 0 : 1), (1/4
: 1 : 1), (1/4 : 2 : 1), (5/4 : -2 : 1), (5/4 : -1 : 1), (5/4 : 0 : 1),
(5/4 : 1 : 1), (5/4 : 2 : 1)]
sage: K.<w> = QuadraticField(33)
sage: PS.<x,y> = ProjectiveSpace(K,1)
sage: H = End(PS)
sage: f = H([x^2-71/48*y^2, y^2])
sage: sorted(f.rational_preperiodic_points()) # long time
[(-1/12*w - 1 : 1),
 (-1/6*w - 1/4 : 1),
 (-1/12*w - 1/2 : 1),
 (-1/6*w + 1/4 : 1),
 (1/12*w - 1 : 1),
 (1/12*w - 1/2 : 1),
 (-1/12*w + 1/2 : 1),
 (-1/12*w + 1 : 1),
 (1/6*w - 1/4 : 1),
 (1/12*w + 1/2 : 1),
 (1 : 0),
 (1/6*w + 1/4 : 1),
 (1/12*w + 1 : 1)]
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

The Python constructor.

See SchemeMorphism_polynomial for details.

EXAMPLES:

sage: P1.<x,y> = ProjectiveSpace(QQ,1)
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)
sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y,z> = ProjectiveSpace(R, 2)
sage: X = P.subscheme([x])
sage: H = End(X)
sage: H([x^2, t*y^2, x*z])
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Univariate Polynomial Ring in t over Rational Field defined by:
  x
  Defn: Defined on coordinates by sending (x : y : z) to
        (x^2 : t*y^2 : x*z)

When elements of the quotient ring is used, they are reduced:

sage: P.<x,y,z> = ProjectiveSpace(CC, 2)
sage: X = P.subscheme([x-y])
sage: u,v,w = X.coordinate_ring().gens()
sage: H = End(X)
sage: H([u^2, v^2, w*u])
Scheme endomorphism of Closed subscheme of Projective Space of dimension
2 over Complex Field with 53 bits of precision defined by:
  x - y
  Defn: Defined on coordinates by sending (x : y : z) to
        (y^2 : y^2 : y*z)
automorphism_group(**kwds)

Return the subgroup of \(PGL2\) that is the automorphism group of this map.

Only for dimension 1. The automorphism group is the set of \(PGL2\) elements that fixed the map under conjugation. See [FMV] for the algorithm.

INPUT:

keywords:

  • absolute– Boolean - True returns the absolute automorphism group and a field of definition. default: False (optional)
  • iso_type – Boolean - True returns the isomorphism type of the automorphism group. default: False (optional)
  • return_functions– Boolean - True returns elements as linear fractional transformations.
    False returns elements as \(PGL2\) matrices. default: False. (optional)

OUTPUT:

  • list - elements of automorphism group.

AUTHORS:

  • Original algorithm written by Xander Faber, Michelle Manes, Bianca Viray
  • Modified by Joao Alberto de Faria, Ben Hutz, Bianca Thompson

EXAMPLES:

sage: R.<x,y> = ProjectiveSpace(GF(7^3,'t'),1)
sage: H = End(R)
sage: f = H([x^2-y^2, x*y])
sage: f.automorphism_group()
[
[1 0]  [6 0]
[0 1], [0 1]
]
sage: R.<x,y> = ProjectiveSpace(GF(3^2,'t'),1)
sage: H = End(R)
sage: f = H([x^3,y^3])
sage: f.automorphism_group(return_functions=True, iso_type=True) # long time
([x, x/(x + 1), x/(2*x + 1), 2/(x + 2), (2*x + 1)/(2*x), (2*x + 2)/x,
1/(2*x + 2), x + 1, x + 2, x/(x + 2), 2*x/(x + 1), 2*x, 1/x, 2*x + 1,
2*x + 2, ((t + 2)*x + t + 2)/((2*t + 1)*x + t + 2), (t*x + 2*t)/(t*x +
t), 2/x, (x + 1)/(x + 2), (2*t*x + t)/(t*x), (2*t + 1)/((2*t + 1)*x +
2*t + 1), ((2*t + 1)*x + 2*t + 1)/((2*t + 1)*x), t/(t*x + 2*t), (2*x +
1)/(x + 1)], 'PGL(2,3)')
sage: R.<x,y> = ProjectiveSpace(GF(2^5,'t'),1)
sage: H = End(R)
sage: f=H([x^5,y^5])
sage: f.automorphism_group(return_functions=True, iso_type=True)
([x, 1/x], 'Cyclic of order 2')

::

sage: R.<x,y> = ProjectiveSpace(GF(3^4,'t'),1)
sage: H = End(R)
sage: f=H([x^2+25*x*y+y^2, x*y+3*y^2])
sage: f.automorphism_group(absolute=True)
[Univariate Polynomial Ring in w over Finite Field in b of size 3^4,
 [
[1 0]
[0 1]
]]
cyclegraph()

Return the digraph of all orbits of this map.

Over a finite field this is a finite graph. For subscheme domains, only points on the subscheme whose image are also on the subscheme are in the digraph.

OUTPUT:

  • a digraph

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(GF(13),1)
sage: H = Hom(P,P)
sage: f = H([x^2-y^2, y^2])
sage: f.cyclegraph()
Looped digraph on 14 vertices
sage: P.<x,y,z> = ProjectiveSpace(GF(5^2,'t'),2)
sage: H = Hom(P,P)
sage: f = H([x^2+y^2, y^2, z^2+y*z])
sage: f.cyclegraph()
Looped digraph on 651 vertices
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.cyclegraph()
Looped digraph on 15 vertices
orbit_structure(P)

Return the pair \([m,n]\) where \(m\) is the preperiod and \(n\) is the period of the point P by this map.

Every point is preperiodic over a finite field so every point will be preperiodic.

INPUT:

  • P – a point in the domain of this map.

OUTPUT:

  • a list \([m,n]\) of integers.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(GF(5),2)
sage: H = Hom(P,P)
sage: f = H([x^2 + y^2,y^2, z^2 + y*z])
sage: f.orbit_structure(P(2,1,2))
[0, 6]
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.orbit_structure(X(1,1,2))
[0, 2]
sage: P.<x,y> = ProjectiveSpace(GF(13),1)
sage: H = Hom(P,P)
sage: f = H([x^2 - y^2, y^2])
sage: f.orbit_structure(P(3,4))
[2, 3]
possible_periods(return_points=False)

Returns the list of possible minimal periods of a periodic point over \(\QQ\) and (optionally) a point in each cycle.

REFERENCES:

[Hutz-gr]B. Hutz. Good reduction of periodic points, Illinois Journal of Mathematics 53 (Winter 2009), no. 4, 1109-1126.

ALGORITHM:

See [Hutz-gr].

INPUT:

  • return_points - Boolean (optional) - a value of True returns the points as well as the possible periods.

OUTPUT:

  • a list of positive integers, or a list of pairs of projective points and periods if flag is 1.

Examples:

sage: P.<x,y> = ProjectiveSpace(GF(23),1)
sage: H = End(P)
sage: f = H([x^2-2*y^2, y^2])
sage: f.possible_periods()
[1, 5, 11, 22, 110]
sage: P.<x,y> = ProjectiveSpace(GF(13),1)
sage: H = End(P)
sage: f = H([x^2-y^2, y^2])
sage: sorted(f.possible_periods(True))
[[(0 : 1), 2], [(1 : 0), 1], [(3 : 1), 3], [(3 : 1), 36]]
sage: PS.<x,y,z> = ProjectiveSpace(2,GF(7))
sage: H = End(PS)
sage: f = H([-360*x^3 + 760*x*z^2, y^3 - 604*y*z^2 + 240*z^3, 240*z^3])
sage: f.possible_periods()
[1, 2, 4, 6, 12, 14, 28, 42, 84]

Todo

  • do not return duplicate points
  • improve hash to reduce memory of pointtable