Points on projective varieties#

This module implements scheme morphism for points on projective varieties.

AUTHORS:

  • David Kohel, William Stein (2006): 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 (2012-06): added support for projective ring

  • Ben Hutz (2013-03): added iteration functionality and new directory structure for affine/projective, height functionality

class sage.schemes.projective.projective_point.SchemeMorphism_point_abelian_variety_field(X, v, check=True)[source]#

Bases: AdditiveGroupElement, SchemeMorphism_point_projective_field

A rational point of an abelian variety over a field.

EXAMPLES:

sage: # needs sage.schemes
sage: E = EllipticCurve([0,0,1,-1,0])
sage: origin = E(0)
sage: origin.domain()
Spectrum of Rational Field
sage: origin.codomain()
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> from sage.all import *
>>> # needs sage.schemes
>>> E = EllipticCurve([Integer(0),Integer(0),Integer(1),-Integer(1),Integer(0)])
>>> origin = E(Integer(0))
>>> origin.domain()
Spectrum of Rational Field
>>> origin.codomain()
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
class sage.schemes.projective.projective_point.SchemeMorphism_point_projective_field(X, v, check=True)[source]#

Bases: SchemeMorphism_point_projective_ring

A rational point of projective space over a field.

INPUT:

  • X – a homset of a subscheme of an ambient projective space over a field \(K\).

  • v – a list or tuple of coordinates in \(K\).

  • check – boolean (default:True). Whether to check the input for consistency.

EXAMPLES:

sage: # needs sage.rings.real_mpfr
sage: P = ProjectiveSpace(3, RR)
sage: P(2, 3, 4, 5)
(0.400000000000000 : 0.600000000000000 : 0.800000000000000 : 1.00000000000000)
>>> from sage.all import *
>>> # needs sage.rings.real_mpfr
>>> P = ProjectiveSpace(Integer(3), RR)
>>> P(Integer(2), Integer(3), Integer(4), Integer(5))
(0.400000000000000 : 0.600000000000000 : 0.800000000000000 : 1.00000000000000)
as_subscheme()[source]#

Return the subscheme associated with this rational point.

EXAMPLES:

sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: p1 = P2.point([0,0,1]).as_subscheme(); p1
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x, y
sage: p2 = P2.point([1,1,1]).as_subscheme(); p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x - z, y - z
sage: p1 + p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x - y, y^2 - y*z
>>> from sage.all import *
>>> P2 = ProjectiveSpace(QQ,Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P2._first_ngens(3)
>>> p1 = P2.point([Integer(0),Integer(0),Integer(1)]).as_subscheme(); p1
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x, y
>>> p2 = P2.point([Integer(1),Integer(1),Integer(1)]).as_subscheme(); p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x - z, y - z
>>> p1 + p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x - y, y^2 - y*z
clear_denominators()[source]#

scales by the least common multiple of the denominators.

OUTPUT: None.

EXAMPLES:

sage: R.<t> = PolynomialRing(QQ)
sage: P.<x,y,z> = ProjectiveSpace(FractionField(R), 2)
sage: Q = P([t, 3/t^2, 1])
sage: Q.clear_denominators(); Q
(t^3 : 3 : t^2)
>>> from sage.all import *
>>> R = PolynomialRing(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> P = ProjectiveSpace(FractionField(R), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P([t, Integer(3)/t**Integer(2), Integer(1)])
>>> Q.clear_denominators(); Q
(t^3 : 3 : t^2)
sage: # needs sage.rings.number_field
sage: R.<x> = PolynomialRing(QQ)
sage: K.<w> = NumberField(x^2 - 3)
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
sage: Q = P([1/w, 3, 0])
sage: Q.clear_denominators(); Q
(w : 9 : 0)
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1)
>>> K = NumberField(x**Integer(2) - Integer(3), names=('w',)); (w,) = K._first_ngens(1)
>>> P = ProjectiveSpace(K, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P([Integer(1)/w, Integer(3), Integer(0)])
>>> Q.clear_denominators(); Q
(w : 9 : 0)
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme(x^2 - y^2)
sage: Q = X([1/2, 1/2, 1])
sage: Q.clear_denominators(); Q
(1 : 1 : 2)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> X = P.subscheme(x**Integer(2) - y**Integer(2))
>>> Q = X([Integer(1)/Integer(2), Integer(1)/Integer(2), Integer(1)])
>>> Q.clear_denominators(); Q
(1 : 1 : 2)
sage: PS.<x,y> = ProjectiveSpace(QQ, 1)
sage: Q = PS.point([1, 2/3], False); Q
(1 : 2/3)
sage: Q.clear_denominators(); Q
(3 : 2)
>>> from sage.all import *
>>> PS = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = PS._first_ngens(2)
>>> Q = PS.point([Integer(1), Integer(2)/Integer(3)], False); Q
(1 : 2/3)
>>> Q.clear_denominators(); Q
(3 : 2)
intersection_multiplicity(X)[source]#

Return the intersection multiplicity of the codomain of this point and X at this point.

This uses the intersection_multiplicity implementations for projective/affine subschemes. This point must be a point of a projective subscheme.

INPUT:

  • X – a subscheme in the same ambient space as that of the codomain of this point.

OUTPUT: Integer.

EXAMPLES:

sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: X = P.subscheme([x*z - y^2])
sage: Y = P.subscheme([x^3 - y*w^2 + z*w^2, x*y - z*w])
sage: Q1 = X([1/2, 1/4, 1/8, 1])
sage: Q1.intersection_multiplicity(Y)                                       # needs sage.libs.singular
1
sage: Q2 = X([0,0,0,1])
sage: Q2.intersection_multiplicity(Y)                                       # needs sage.libs.singular
5
sage: Q3 = X([0,0,1,0])
sage: Q3.intersection_multiplicity(Y)                                       # needs sage.libs.singular
6
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(3), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = P._first_ngens(4)
>>> X = P.subscheme([x*z - y**Integer(2)])
>>> Y = P.subscheme([x**Integer(3) - y*w**Integer(2) + z*w**Integer(2), x*y - z*w])
>>> Q1 = X([Integer(1)/Integer(2), Integer(1)/Integer(4), Integer(1)/Integer(8), Integer(1)])
>>> Q1.intersection_multiplicity(Y)                                       # needs sage.libs.singular
1
>>> Q2 = X([Integer(0),Integer(0),Integer(0),Integer(1)])
>>> Q2.intersection_multiplicity(Y)                                       # needs sage.libs.singular
5
>>> Q3 = X([Integer(0),Integer(0),Integer(1),Integer(0)])
>>> Q3.intersection_multiplicity(Y)                                       # needs sage.libs.singular
6
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: X = P.subscheme([x^2 - y^2])
sage: Q = P([1,1,1,0])
sage: Q.intersection_multiplicity(X)
Traceback (most recent call last):
...
TypeError: this point must be a point on a projective subscheme
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(3), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = P._first_ngens(4)
>>> X = P.subscheme([x**Integer(2) - y**Integer(2)])
>>> Q = P([Integer(1),Integer(1),Integer(1),Integer(0)])
>>> Q.intersection_multiplicity(X)
Traceback (most recent call last):
...
TypeError: this point must be a point on a projective subscheme
multiplicity()[source]#

Return the multiplicity of this point on its codomain.

Uses the subscheme multiplicity implementation. This point must be a point on a projective subscheme.

OUTPUT: an integer.

EXAMPLES:

sage: P.<x,y,z,w,t> = ProjectiveSpace(QQ, 4)
sage: X = P.subscheme([y^6 - x^3*w^2*t + t^5*w, x^2 - t^2])
sage: Q1 = X([1,0,2,1,1])
sage: Q1.multiplicity()                                                     # needs sage.libs.singular
1
sage: Q2 = X([0,0,-2,1,0])
sage: Q2.multiplicity()                                                     # needs sage.libs.singular
8
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(4), names=('x', 'y', 'z', 'w', 't',)); (x, y, z, w, t,) = P._first_ngens(5)
>>> X = P.subscheme([y**Integer(6) - x**Integer(3)*w**Integer(2)*t + t**Integer(5)*w, x**Integer(2) - t**Integer(2)])
>>> Q1 = X([Integer(1),Integer(0),Integer(2),Integer(1),Integer(1)])
>>> Q1.multiplicity()                                                     # needs sage.libs.singular
1
>>> Q2 = X([Integer(0),Integer(0),-Integer(2),Integer(1),Integer(0)])
>>> Q2.multiplicity()                                                     # needs sage.libs.singular
8
normalize_coordinates()[source]#

Normalizes the point so that the last non-zero coordinate is \(1\).

OUTPUT: None.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(GF(5), 2)
sage: Q = P.point([GF(5)(1), GF(5)(3), GF(5)(0)], False); Q
(1 : 3 : 0)
sage: Q.normalize_coordinates(); Q
(2 : 1 : 0)
>>> from sage.all import *
>>> P = ProjectiveSpace(GF(Integer(5)), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([GF(Integer(5))(Integer(1)), GF(Integer(5))(Integer(3)), GF(Integer(5))(Integer(0))], False); Q
(1 : 3 : 0)
>>> Q.normalize_coordinates(); Q
(2 : 1 : 0)
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme(x^2 - y^2);
sage: Q = X.point([23, 23, 46], False); Q
(23 : 23 : 46)
sage: Q.normalize_coordinates(); Q
(1/2 : 1/2 : 1)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> X = P.subscheme(x**Integer(2) - y**Integer(2));
>>> Q = X.point([Integer(23), Integer(23), Integer(46)], False); Q
(23 : 23 : 46)
>>> Q.normalize_coordinates(); Q
(1/2 : 1/2 : 1)
class sage.schemes.projective.projective_point.SchemeMorphism_point_projective_finite_field(X, v, check=True)[source]#

Bases: SchemeMorphism_point_projective_field

class sage.schemes.projective.projective_point.SchemeMorphism_point_projective_ring(X, v, check=True)[source]#

Bases: SchemeMorphism_point

A rational point of projective space over a ring.

INPUT:

  • X – a homset of a subscheme of an ambient projective space over a ring \(K\).

  • v – a list or tuple of coordinates in \(K\).

  • check – boolean (default:True). Whether to check the input for consistency.

EXAMPLES:

sage: P = ProjectiveSpace(2, ZZ)
sage: P(2,3,4)
(2 : 3 : 4)
>>> from sage.all import *
>>> P = ProjectiveSpace(Integer(2), ZZ)
>>> P(Integer(2),Integer(3),Integer(4))
(2 : 3 : 4)
dehomogenize(n)[source]#

Dehomogenizes at the \(n\)-th coordinate.

INPUT:

  • n – non-negative integer.

OUTPUT:

  • SchemeMorphism_point_affine.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme(x^2 - y^2)
sage: Q = X(23, 23, 46)
sage: Q.dehomogenize(2)                                                     # needs sage.libs.singular
(1/2, 1/2)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> X = P.subscheme(x**Integer(2) - y**Integer(2))
>>> Q = X(Integer(23), Integer(23), Integer(46))
>>> Q.dehomogenize(Integer(2))                                                     # needs sage.libs.singular
(1/2, 1/2)
sage: # needs sage.libs.pari
sage: R.<t> = PolynomialRing(QQ)
sage: S = R.quo(R.ideal(t^3))
sage: P.<x,y,z> = ProjectiveSpace(S, 2)
sage: Q = P(t, 1, 1)
sage: Q.dehomogenize(1)
(tbar, 1)
>>> from sage.all import *
>>> # needs sage.libs.pari
>>> R = PolynomialRing(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> S = R.quo(R.ideal(t**Integer(3)))
>>> P = ProjectiveSpace(S, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P(t, Integer(1), Integer(1))
>>> Q.dehomogenize(Integer(1))
(tbar, 1)
sage: P.<x,y,z> = ProjectiveSpace(GF(5), 2)
sage: Q = P(1, 3, 1)
sage: Q.dehomogenize(0)
(3, 1)
>>> from sage.all import *
>>> P = ProjectiveSpace(GF(Integer(5)), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P(Integer(1), Integer(3), Integer(1))
>>> Q.dehomogenize(Integer(0))
(3, 1)
sage: P.<x,y,z> = ProjectiveSpace(GF(5), 2)
sage: Q = P(1, 3, 0)
sage: Q.dehomogenize(2)
Traceback (most recent call last):
...
ValueError: can...t dehomogenize at 0 coordinate
>>> from sage.all import *
>>> P = ProjectiveSpace(GF(Integer(5)), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P(Integer(1), Integer(3), Integer(0))
>>> Q.dehomogenize(Integer(2))
Traceback (most recent call last):
...
ValueError: can...t dehomogenize at 0 coordinate
global_height(prec=None)[source]#

Return the absolute logarithmic height of the point.

INPUT:

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

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: Q = P.point([4, 4, 1/30])
sage: Q.global_height()                                                     # needs sage.symbolic
4.78749174278205
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([Integer(4), Integer(4), Integer(1)/Integer(30)])
>>> Q.global_height()                                                     # needs sage.symbolic
4.78749174278205
sage: P.<x,y,z> = ProjectiveSpace(ZZ, 2)
sage: Q = P([4, 1, 30])
sage: Q.global_height()                                                     # needs sage.symbolic
3.40119738166216
>>> from sage.all import *
>>> P = ProjectiveSpace(ZZ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P([Integer(4), Integer(1), Integer(30)])
>>> Q.global_height()                                                     # needs sage.symbolic
3.40119738166216
sage: R.<x> = PolynomialRing(QQ)
sage: k.<w> = NumberField(x^2 + 5)                                          # needs sage.rings.number_field
sage: A = ProjectiveSpace(k, 2, 'z')                                        # needs sage.rings.number_field
sage: A([3, 5*w + 1, 1]).global_height(prec=100)                            # needs sage.rings.number_field
2.4181409534757389986565376694
>>> from sage.all import *
>>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1)
>>> k = NumberField(x**Integer(2) + Integer(5), names=('w',)); (w,) = k._first_ngens(1)# needs sage.rings.number_field
>>> A = ProjectiveSpace(k, Integer(2), 'z')                                        # needs sage.rings.number_field
>>> A([Integer(3), Integer(5)*w + Integer(1), Integer(1)]).global_height(prec=Integer(100))                            # needs sage.rings.number_field
2.4181409534757389986565376694
sage: P.<x,y,z> = ProjectiveSpace(QQbar, 2)                                 # needs sage.rings.number_field
sage: Q = P([QQbar(sqrt(3)), QQbar(sqrt(-2)), 1])                           # needs sage.rings.number_field sage.symbolic
sage: Q.global_height()                                                     # needs sage.rings.number_field sage.symbolic
0.549306144334055
>>> from sage.all import *
>>> P = ProjectiveSpace(QQbar, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)# needs sage.rings.number_field
>>> Q = P([QQbar(sqrt(Integer(3))), QQbar(sqrt(-Integer(2))), Integer(1)])                           # needs sage.rings.number_field sage.symbolic
>>> Q.global_height()                                                     # needs sage.rings.number_field sage.symbolic
0.549306144334055
sage: # needs sage.rings.number_field
sage: K = UniversalCyclotomicField()
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
sage: Q = P.point([K(4/3), K.gen(7), K.gen(5)])
sage: Q.global_height()
1.38629436111989
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> K = UniversalCyclotomicField()
>>> P = ProjectiveSpace(K, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([K(Integer(4)/Integer(3)), K.gen(Integer(7)), K.gen(Integer(5))])
>>> Q.global_height()
1.38629436111989
is_preperiodic(f, err=0.1, return_period=False)[source]#

Determine if the point is preperiodic with respect to the map f.

This is implemented for both projective space and subschemes. There are two optional keyword arguments: error_bound sets the error_bound used in the canonical height computation and return_period a boolean which controls if the period is returned if the point is preperiodic. If return_period is True and this point is not preperiodic, then \((0,0)\) is returned for the period.

ALGORITHM:

We know that a point is preperiodic if and only if it has canonical height zero. However, we can only compute the canonical height up to numerical precision. This function first computes the canonical height of the point to the given error bound. If it is larger than that error bound, then it must not be preperiodic. If it is less than the error bound, then we expect preperiodic. In this case we begin computing the orbit stopping if either we determine the orbit is finite, or the height of the point is large enough that it must be wandering. We can determine the height cutoff by computing the height difference constant, i.e., the bound between the height and the canonical height of a point (which depends only on the map and not the point itself). If the height of the point is larger than the difference bound, then the canonical height cannot be zero so the point cannot be preperiodic.

INPUT:

  • f – an endomorphism of this point’s codomain.

kwds:

  • err – a positive real number (default: 0.1).

  • return_period – boolean (default: False).

OUTPUT:

  • boolean – True if preperiodic.

  • if return_period is True, then (0,0) if wandering, and (m,n) if preperiod m and period n.

EXAMPLES:

sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: f = DynamicalSystem_projective([x^3 - 3*x*y^2, y^3], domain=P)        # needs sage.schemes
sage: Q = P(-1, 1)
sage: Q.is_preperiodic(f)                                                   # needs sage.libs.singular sage.schemes
True
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> f = DynamicalSystem_projective([x**Integer(3) - Integer(3)*x*y**Integer(2), y**Integer(3)], domain=P)        # needs sage.schemes
>>> Q = P(-Integer(1), Integer(1))
>>> Q.is_preperiodic(f)                                                   # needs sage.libs.singular sage.schemes
True
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: X = P.subscheme(z)
sage: f = DynamicalSystem([x^2 - y^2, y^2, z^2], domain=X)                  # needs sage.schemes
sage: p = X((-1, 1, 0))
sage: p.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 2)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> X = P.subscheme(z)
>>> f = DynamicalSystem([x**Integer(2) - y**Integer(2), y**Integer(2), z**Integer(2)], domain=X)                  # needs sage.schemes
>>> p = X((-Integer(1), Integer(1), Integer(0)))
>>> p.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 2)
sage: P.<x,y> = ProjectiveSpace(QQ,1)
sage: f = DynamicalSystem_projective([x^2 - 29/16*y^2, y^2], domain=P)      # needs sage.schemes
sage: Q = P(1, 4)
sage: Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(1, 3)
sage: Q = P(1, 1)
sage: Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 0)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ,Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> f = DynamicalSystem_projective([x**Integer(2) - Integer(29)/Integer(16)*y**Integer(2), y**Integer(2)], domain=P)      # needs sage.schemes
>>> Q = P(Integer(1), Integer(4))
>>> Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(1, 3)
>>> Q = P(Integer(1), Integer(1))
>>> Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 0)
sage: # needs sage.rings.number_field
sage: R.<x> = PolynomialRing(QQ)
sage: K.<a> = NumberField(x^2 + 1)
sage: P.<x,y> = ProjectiveSpace(K, 1)
sage: f = DynamicalSystem_projective([x^5 + 5/4*x*y^4, y^5], domain=P)      # needs sage.schemes
sage: Q = P([-1/2*a + 1/2, 1])
sage: Q.is_preperiodic(f)                                                   # needs sage.schemes
True
sage: Q = P([a, 1])
sage: Q.is_preperiodic(f)                                                   # needs sage.schemes
False
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1)
>>> K = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> P = ProjectiveSpace(K, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> f = DynamicalSystem_projective([x**Integer(5) + Integer(5)/Integer(4)*x*y**Integer(4), y**Integer(5)], domain=P)      # needs sage.schemes
>>> Q = P([-Integer(1)/Integer(2)*a + Integer(1)/Integer(2), Integer(1)])
>>> Q.is_preperiodic(f)                                                   # needs sage.schemes
True
>>> Q = P([a, Integer(1)])
>>> Q.is_preperiodic(f)                                                   # needs sage.schemes
False
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: f = DynamicalSystem_projective([                                      # needs sage.schemes
....:         -38/45*x^2 + (2*y - 7/45*z)*x + (-1/2*y^2 - 1/2*y*z + z^2),
....:         -67/90*x^2 + (2*y + z*157/90)*x - y*z,
....:         z^2
....:     ], domain=P)
sage: Q = P([1, 3, 1])
sage: Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 9)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> f = DynamicalSystem_projective([                                      # needs sage.schemes
...         -Integer(38)/Integer(45)*x**Integer(2) + (Integer(2)*y - Integer(7)/Integer(45)*z)*x + (-Integer(1)/Integer(2)*y**Integer(2) - Integer(1)/Integer(2)*y*z + z**Integer(2)),
...         -Integer(67)/Integer(90)*x**Integer(2) + (Integer(2)*y + z*Integer(157)/Integer(90))*x - y*z,
...         z**Integer(2)
...     ], domain=P)
>>> Q = P([Integer(1), Integer(3), Integer(1)])
>>> Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(0, 9)
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: f = DynamicalSystem_projective([                                      # needs sage.schemes
....:         (-y - w)*x + (-13/30*y^2 + 13/30*w*y + w^2),
....:         -1/2*x^2 + (-y + 3/2*w)*x + (-1/3*y^2 + 4/3*w*y),
....:         -3/2*z^2 + 5/2*z*w + w^2,
....:         w^2
....:     ], domain=P)
sage: Q = P([3,0,4/3,1])
sage: Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(2, 24)
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(3), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = P._first_ngens(4)
>>> f = DynamicalSystem_projective([                                      # needs sage.schemes
...         (-y - w)*x + (-Integer(13)/Integer(30)*y**Integer(2) + Integer(13)/Integer(30)*w*y + w**Integer(2)),
...         -Integer(1)/Integer(2)*x**Integer(2) + (-y + Integer(3)/Integer(2)*w)*x + (-Integer(1)/Integer(3)*y**Integer(2) + Integer(4)/Integer(3)*w*y),
...         -Integer(3)/Integer(2)*z**Integer(2) + Integer(5)/Integer(2)*z*w + w**Integer(2),
...         w**Integer(2)
...     ], domain=P)
>>> Q = P([Integer(3),Integer(0),Integer(4)/Integer(3),Integer(1)])
>>> Q.is_preperiodic(f, return_period=True)                               # needs sage.libs.singular sage.schemes
(2, 24)
sage: # needs sage.rings.number_field sage.schemes sage.symbolic
sage: from sage.misc.verbose import set_verbose
sage: set_verbose(-1)
sage: P.<x,y,z> = ProjectiveSpace(QQbar, 2)
sage: f = DynamicalSystem_projective([x^2, QQbar(sqrt(-1))*y^2, z^2],
....:                                domain=P)
sage: Q = P([1, 1, 1])
sage: Q.is_preperiodic(f)
True
>>> from sage.all import *
>>> # needs sage.rings.number_field sage.schemes sage.symbolic
>>> from sage.misc.verbose import set_verbose
>>> set_verbose(-Integer(1))
>>> P = ProjectiveSpace(QQbar, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> f = DynamicalSystem_projective([x**Integer(2), QQbar(sqrt(-Integer(1)))*y**Integer(2), z**Integer(2)],
...                                domain=P)
>>> Q = P([Integer(1), Integer(1), Integer(1)])
>>> Q.is_preperiodic(f)
True
sage: # needs sage.rings.number_field sage.schemes sage.symbolic
sage: set_verbose(-1)
sage: P.<x,y,z> = ProjectiveSpace(QQbar, 2)
sage: f = DynamicalSystem_projective([x^2, y^2, z^2], domain=P)
sage: Q = P([QQbar(sqrt(-1)), 1, 1])
sage: Q.is_preperiodic(f)
True
>>> from sage.all import *
>>> # needs sage.rings.number_field sage.schemes sage.symbolic
>>> set_verbose(-Integer(1))
>>> P = ProjectiveSpace(QQbar, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> f = DynamicalSystem_projective([x**Integer(2), y**Integer(2), z**Integer(2)], domain=P)
>>> Q = P([QQbar(sqrt(-Integer(1))), Integer(1), Integer(1)])
>>> Q.is_preperiodic(f)
True
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
sage: f = DynamicalSystem_projective([16*x^2 - 29*y^2, 16*y^2], domain=P)   # needs sage.schemes
sage: Q = P(-1,4)
sage: Q.is_preperiodic(f)                                                   # needs sage.libs.singular sage.schemes
True
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> f = DynamicalSystem_projective([Integer(16)*x**Integer(2) - Integer(29)*y**Integer(2), Integer(16)*y**Integer(2)], domain=P)   # needs sage.schemes
>>> Q = P(-Integer(1),Integer(4))
>>> Q.is_preperiodic(f)                                                   # needs sage.libs.singular sage.schemes
True
sage: P.<x,y,z> = ProjectiveSpace(GF(3), 2)
sage: F = DynamicalSystem([x^2 - 2*y^2, y^2, z^2])                          # needs sage.schemes
sage: Q = P(1, 1, 1)
sage: Q.is_preperiodic(F, return_period=True)                               # needs sage.schemes
(1, 1)
>>> from sage.all import *
>>> P = ProjectiveSpace(GF(Integer(3)), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> F = DynamicalSystem([x**Integer(2) - Integer(2)*y**Integer(2), y**Integer(2), z**Integer(2)])                          # needs sage.schemes
>>> Q = P(Integer(1), Integer(1), Integer(1))
>>> Q.is_preperiodic(F, return_period=True)                               # needs sage.schemes
(1, 1)
local_height(v, prec=None)[source]#

Returns the maximum of the local height of the coordinates of this point.

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,z> = ProjectiveSpace(QQ, 2)
sage: Q = P.point([4, 4, 1/150], False)
sage: Q.local_height(5)                                                     # needs sage.rings.real_mpfr
3.21887582486820
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([Integer(4), Integer(4), Integer(1)/Integer(150)], False)
>>> Q.local_height(Integer(5))                                                     # needs sage.rings.real_mpfr
3.21887582486820
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: Q = P([4, 1, 30])
sage: Q.local_height(2)                                                     # needs sage.rings.real_mpfr
0.693147180559945
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P([Integer(4), Integer(1), Integer(30)])
>>> Q.local_height(Integer(2))                                                     # needs sage.rings.real_mpfr
0.693147180559945
local_height_arch(i, prec=None)[source]#

Returns the maximum of the local heights at the i-th infinite place of this point.

INPUT:

  • i – an integer.

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

OUTPUT:

  • a real number.

EXAMPLES:

sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: Q = P.point([4, 4, 1/150], False)
sage: Q.local_height_arch(0)                                                # needs sage.rings.real_mpfr
1.38629436111989
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([Integer(4), Integer(4), Integer(1)/Integer(150)], False)
>>> Q.local_height_arch(Integer(0))                                                # needs sage.rings.real_mpfr
1.38629436111989
sage: # needs sage.rings.number_field
sage: P.<x,y,z> = ProjectiveSpace(QuadraticField(5, 'w'), 2)
sage: Q = P.point([4, 1, 30], False)
sage: Q.local_height_arch(1)
3.401197381662155375413236691607
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> P = ProjectiveSpace(QuadraticField(Integer(5), 'w'), Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P.point([Integer(4), Integer(1), Integer(30)], False)
>>> Q.local_height_arch(Integer(1))
3.401197381662155375413236691607
multiplier(f, n, check=True)[source]#

Returns the multiplier of this point of period n by the function f.

f must be an endomorphism of projective space.

INPUT:

  • f – a endomorphism of this point’s codomain.

  • n – a positive integer, the period of this point.

  • check – check if P is periodic of period n, Default:True.

OUTPUT:

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

EXAMPLES:

sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
sage: f = DynamicalSystem_projective([x^2, y^2, 4*w^2, 4*z^2], domain=P)    # needs sage.schemes
sage: Q = P.point([4, 4, 1, 1], False)
sage: Q.multiplier(f, 1)                                                    # needs sage.schemes
[ 2  0 -8]
[ 0  2 -8]
[ 0  0 -2]
>>> from sage.all import *
>>> P = ProjectiveSpace(QQ, Integer(3), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = P._first_ngens(4)
>>> f = DynamicalSystem_projective([x**Integer(2), y**Integer(2), Integer(4)*w**Integer(2), Integer(4)*z**Integer(2)], domain=P)    # needs sage.schemes
>>> Q = P.point([Integer(4), Integer(4), Integer(1), Integer(1)], False)
>>> Q.multiplier(f, Integer(1))                                                    # needs sage.schemes
[ 2  0 -8]
[ 0  2 -8]
[ 0  0 -2]
normalize_coordinates()[source]#

Removes the gcd from the coordinates of this point (including \(-1\)).

Warning

The gcd will depend on the base ring.

OUTPUT: None.

EXAMPLES:

sage: P = ProjectiveSpace(ZZ, 2, 'x')
sage: p = P([-5, -15, -20])
sage: p.normalize_coordinates(); p
(1 : 3 : 4)
>>> from sage.all import *
>>> P = ProjectiveSpace(ZZ, Integer(2), 'x')
>>> p = P([-Integer(5), -Integer(15), -Integer(20)])
>>> p.normalize_coordinates(); p
(1 : 3 : 4)
sage: # needs sage.rings.padics
sage: P = ProjectiveSpace(Zp(7), 2, 'x')
sage: p = P([-5, -15, -2])
sage: p.normalize_coordinates(); p
(5 + O(7^20) : 1 + 2*7 + O(7^20) : 2 + O(7^20))
>>> from sage.all import *
>>> # needs sage.rings.padics
>>> P = ProjectiveSpace(Zp(Integer(7)), Integer(2), 'x')
>>> p = P([-Integer(5), -Integer(15), -Integer(2)])
>>> p.normalize_coordinates(); p
(5 + O(7^20) : 1 + 2*7 + O(7^20) : 2 + O(7^20))
sage: R.<t> = PolynomialRing(QQ)
sage: P = ProjectiveSpace(R, 2, 'x')
sage: p = P([3/5*t^3, 6*t, t])
sage: p.normalize_coordinates(); p
(3/5*t^2 : 6 : 1)
>>> from sage.all import *
>>> R = PolynomialRing(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> P = ProjectiveSpace(R, Integer(2), 'x')
>>> p = P([Integer(3)/Integer(5)*t**Integer(3), Integer(6)*t, t])
>>> p.normalize_coordinates(); p
(3/5*t^2 : 6 : 1)
sage: P.<x,y> = ProjectiveSpace(Zmod(20), 1)
sage: Q = P(3, 6)
sage: Q.normalize_coordinates()
sage: Q
(1 : 2)
>>> from sage.all import *
>>> P = ProjectiveSpace(Zmod(Integer(20)), Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> Q = P(Integer(3), Integer(6))
>>> Q.normalize_coordinates()
>>> Q
(1 : 2)

Since the base ring is a polynomial ring over a field, only the gcd \(c\) is removed.

sage: R.<c> = PolynomialRing(QQ)
sage: P = ProjectiveSpace(R, 1)
sage: Q = P(2*c, 4*c)
sage: Q.normalize_coordinates();Q
(2 : 4)
>>> from sage.all import *
>>> R = PolynomialRing(QQ, names=('c',)); (c,) = R._first_ngens(1)
>>> P = ProjectiveSpace(R, Integer(1))
>>> Q = P(Integer(2)*c, Integer(4)*c)
>>> Q.normalize_coordinates();Q
(2 : 4)

A polynomial ring over a ring gives the more intuitive result.

sage: R.<c> = PolynomialRing(ZZ)
sage: P = ProjectiveSpace(R, 1)
sage: Q = P(2*c, 4*c)
sage: Q.normalize_coordinates();Q
(1 : 2)
>>> from sage.all import *
>>> R = PolynomialRing(ZZ, names=('c',)); (c,) = R._first_ngens(1)
>>> P = ProjectiveSpace(R, Integer(1))
>>> Q = P(Integer(2)*c, Integer(4)*c)
>>> Q.normalize_coordinates();Q
(1 : 2)
sage: # needs sage.libs.singular
sage: R.<t> = QQ[]
sage: S = R.quotient_ring(R.ideal(t^3))
sage: P.<x,y> = ProjectiveSpace(S, 1)
sage: Q = P(t + 1, t^2 + t)
sage: Q.normalize_coordinates()
sage: Q
(1 : tbar)
>>> from sage.all import *
>>> # needs sage.libs.singular
>>> R = QQ['t']; (t,) = R._first_ngens(1)
>>> S = R.quotient_ring(R.ideal(t**Integer(3)))
>>> P = ProjectiveSpace(S, Integer(1), names=('x', 'y',)); (x, y,) = P._first_ngens(2)
>>> Q = P(t + Integer(1), t**Integer(2) + t)
>>> Q.normalize_coordinates()
>>> Q
(1 : tbar)
scale_by(t)[source]#

Scale the coordinates of the point by t.

A TypeError occurs if the point is not in the base_ring of the codomain after scaling.

INPUT:

  • t – a ring element.

OUTPUT: None.

EXAMPLES:

sage: R.<t> = PolynomialRing(QQ)
sage: P = ProjectiveSpace(R, 2, 'x')
sage: p = P([3/5*t^3, 6*t, t])
sage: p.scale_by(1/t); p
(3/5*t^2 : 6 : 1)
>>> from sage.all import *
>>> R = PolynomialRing(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> P = ProjectiveSpace(R, Integer(2), 'x')
>>> p = P([Integer(3)/Integer(5)*t**Integer(3), Integer(6)*t, t])
>>> p.scale_by(Integer(1)/t); p
(3/5*t^2 : 6 : 1)
sage: # needs sage.libs.pari
sage: R.<t> = PolynomialRing(QQ)
sage: S = R.quo(R.ideal(t^3))
sage: P.<x,y,z> = ProjectiveSpace(S, 2)
sage: Q = P(t, 1, 1)
sage: Q.scale_by(t);Q
(tbar^2 : tbar : tbar)
>>> from sage.all import *
>>> # needs sage.libs.pari
>>> R = PolynomialRing(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> S = R.quo(R.ideal(t**Integer(3)))
>>> P = ProjectiveSpace(S, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P(t, Integer(1), Integer(1))
>>> Q.scale_by(t);Q
(tbar^2 : tbar : tbar)
sage: P.<x,y,z> = ProjectiveSpace(ZZ,2)
sage: Q = P(2, 2, 2)
sage: Q.scale_by(1/2);Q
(1 : 1 : 1)
>>> from sage.all import *
>>> P = ProjectiveSpace(ZZ,Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> Q = P(Integer(2), Integer(2), Integer(2))
>>> Q.scale_by(Integer(1)/Integer(2));Q
(1 : 1 : 1)