From e20ee18b673727f2728f2dd885244b39794ad5eb Mon Sep 17 00:00:00 2001 From: Ben Hutz Date: Thu, 30 May 2019 20:32:50 -0500 Subject: [PATCH] 27900: remove deprecated dynamics code from schemes --- src/sage/schemes/affine/affine_morphism.py | 130 --- src/sage/schemes/affine/affine_point.py | 138 --- .../schemes/product_projective/morphism.py | 59 -- src/sage/schemes/product_projective/point.py | 78 -- .../schemes/projective/projective_morphism.py | 928 +----------------- .../schemes/projective/projective_point.py | 478 --------- 6 files changed, 1 insertion(+), 1810 deletions(-) diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py index 2a4b241c061..5090801fe0c 100644 --- a/src/sage/schemes/affine/affine_morphism.py +++ b/src/sage/schemes/affine/affine_morphism.py @@ -621,81 +621,6 @@ def as_dynamical_system(self): return DynamicalSystem_affine_finite_field(list(self), self.domain()) return DynamicalSystem_affine_field(list(self), self.domain()) - def dynatomic_polynomial(self, period): - """ - Return the dynatomic polynomial. - - EXAMPLES:: - - sage: A. = AffineSpace(QQ, 1) - sage: H = End(A) - sage: f = H([x^2-10/9]) - sage: f.dynatomic_polynomial([2, 1]) - doctest:warning - ... - 531441*x^4 - 649539*x^2 - 524880 - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.dynatomic_polynomial instead") - return self.as_dynamical_system().dynatomic_polynomial(period) - - def nth_iterate_map(self, n): - """ - Return the symbolic nth iterate. - - EXAMPLES:: - - sage: A. = AffineSpace(ZZ, 2) - sage: H = End(A) - sage: f = H([(x^2-2)/(2*y), y^2-3*x]) - sage: f.nth_iterate_map(2) - doctest:warning - ... - Dynamical System of Affine Space of dimension 2 over Integer Ring - Defn: Defined on coordinates by sending (x, y) to - ((x^4 - 4*x^2 - 8*y^2 + 4)/(8*y^4 - 24*x*y^2), (2*y^5 - 12*x*y^3 - + 18*x^2*y - 3*x^2 + 6)/(2*y)) - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.nth_iterate_map instead") - return self.as_dynamical_system().nth_iterate_map(n) - - def nth_iterate(self, P, n): - """ - Return the nth iterate of the point. - - EXAMPLES:: - - sage: A. = AffineSpace(QQ, 2) - sage: H = End(A) - sage: f = H([(x-2*y^2)/x, 3*x*y]) - sage: f.nth_iterate(A(9, 3), 3) - doctest:warning - ... - (-104975/13123, -9566667) - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.nth_iterate instead") - return self.as_dynamical_system().nth_iterate(P, n) - - def orbit(self, P, n): - """ - Return the orbit of the point. - - EXAMPLES:: - - sage: A. = AffineSpace(QQ, 2) - sage: H = End(A) - sage: f = H([(x-2*y^2)/x, 3*x*y]) - sage: f.orbit(A(9, 3), 3) - doctest:warning - ... - [(9, 3), (-1, 81), (13123, -243), (-104975/13123, -9566667)] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.orbit instead") - return self.as_dynamical_system().orbit(P, n) - def global_height(self, prec=None): r""" Returns the maximum of the heights of the coefficients in any @@ -788,25 +713,6 @@ def jacobian(self): self.__jacobian = jacobian(list(self),self.domain().ambient_space().gens()) return self.__jacobian - def multiplier(self, P, n, check=True): - """ - Return the multiplier of the point. - - EXAMPLES:: - - sage: A. = AffineSpace(QQ, 2) - sage: H = End(A) - sage: f = H([x^2, y^2]) - sage: f.multiplier(A([1, 1]), 1) - doctest:warning - ... - [2 0] - [0 2] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.multiplier instead") - return self.as_dynamical_system().multiplier(P, n, check) - class SchemeMorphism_polynomial_affine_space_field(SchemeMorphism_polynomial_affine_space): @cached_method @@ -867,42 +773,6 @@ def weil_restriction(self): class SchemeMorphism_polynomial_affine_space_finite_field(SchemeMorphism_polynomial_affine_space_field): - def orbit_structure(self, P): - """ - Return the tail and period of the point. - - EXAMPLES:: - - sage: A. = AffineSpace(GF(13), 2) - sage: H = End(A) - sage: f = H([x^2 - 1, y^2]) - sage: f.orbit_structure(A(2, 3)) - doctest:warning - ... - [1, 6] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.orbit_structures instead") - return self.as_dynamical_system().orbit_structure(P) - - def cyclegraph(self): - """ - Return the directed graph of the map. - - EXAMPLES:: - - sage: A. = AffineSpace(GF(5), 2) - sage: H = End(A) - sage: f = H([x^2-y, x*y+1]) - sage: f.cyclegraph() - doctest:warning - ... - Looped digraph on 25 vertices - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.affine_ds.cyclegraph instead") - return self.as_dynamical_system().cyclegraph() - def _fast_eval(self, x): """ Evaluate affine morphism at point described by ``x``. diff --git a/src/sage/schemes/affine/affine_point.py b/src/sage/schemes/affine/affine_point.py index 10668b2b881..ff48a609c9f 100644 --- a/src/sage/schemes/affine/affine_point.py +++ b/src/sage/schemes/affine/affine_point.py @@ -118,87 +118,6 @@ def __hash__(self): """ return hash(tuple(self)) - def nth_iterate(self, f, n): - r""" - Returns the point `f^n(self)` - - INPUT: - - - ``f`` -- a :class:`SchemeMorphism_polynomial` with ``self`` if ``f.domain()``. - - - ``n`` -- a positive integer. - - OUTPUT: - - - a point in ``f.codomain()``. - - EXAMPLES:: - - sage: A. = AffineSpace(QQ, 2) - sage: H = Hom(A, A) - sage: f = H([(x-2*y^2)/x,3*x*y]) - sage: A(9,3).nth_iterate(f, 3) - doctest:warning - ... - (-104975/13123, -9566667) - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.nth_iterate(P, n) instead") - if self.codomain() != f.domain(): - raise TypeError("point is not defined over domain of function") - if f.domain() != f.codomain(): - raise TypeError("domain and codomain of function not equal") - if n == 0: - return(self) - else: - Q = f(self) - for i in range(2, n+1): - Q = f(Q) - return(Q) - - def orbit(self, f, N): - r""" - Returns the orbit of the point by `f`. - - If `n` is an integer it returns `[self,f(self), \ldots, f^{n}(self)]`. - - If `n` is a list or tuple `n=[m, k]` it returns `[f^{m}(self), \ldots, f^{k}(self)]`. - - INPUT: - - - ``f`` -- a :class:`SchemeMorphism_polynomial` with the point in ``f.domain()``. - - - ``N`` -- a non-negative integer or list or tuple of two non-negative integers. - - OUTPUT: - - - a list of points in ``f.codomain()``. - - EXAMPLES:: - - sage: A.=AffineSpace(QQ, 2) - sage: H = Hom(A, A) - sage: f = H([(x-2*y^2)/x, 3*x*y]) - sage: A(9, 3).orbit(f, 3) - doctest:warning - ... - [(9, 3), (-1, 81), (13123, -243), (-104975/13123, -9566667)] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.orbit(P, n) instead") - Q = self - if isinstance(N, list) or isinstance(N, tuple): - Bounds = list(N) - else: - Bounds = [0,N] - for i in range(1, Bounds[0]+1): - Q = f(Q) - Orb = [Q] - for i in range(Bounds[0]+1, Bounds[1]+1): - Q = f(Q) - Orb.append(Q) - return(Orb) - def global_height(self, prec=None): r""" Returns the logarithmic height of the point. @@ -480,60 +399,3 @@ def __hash__(self): p = self.codomain().base_ring().order() N = self.codomain().ambient_space().dimension_relative() return int(sum(hash(self[i])*p**i for i in range(N))) - - def orbit_structure(self, f): - r""" - This function returns the pair `[m, n]` where `m` is the - preperiod and `n` is the period of the point by ``f``. - - Every point is preperiodic over a finite field. - - - INPUT: - - - ``f`` -- a :class:`ScemeMorphism_polynomial` with the point in ``f.domain()``. - - OUTPUT: - - - a list `[m, n]` of integers. - - EXAMPLES:: - - sage: P. = AffineSpace(GF(5), 3) - sage: f = DynamicalSystem_affine([x^2 + y^2, y^2, z^2 + y*z], domain=P) - sage: f.orbit_structure(P(1, 1, 1)) - [0, 6] - - :: - - sage: P. = AffineSpace(GF(7), 3) - sage: X = P.subscheme(x^2 - y^2) - sage: f = DynamicalSystem_affine([x^2, y^2, z^2], domain=X) - sage: f.orbit_structure(X(1, 1, 2)) - [0, 2] - - :: - - sage: P. = AffineSpace(GF(13), 2) - sage: f = DynamicalSystem_affine([x^2 - y^2, y^2], domain=P) - sage: P(3, 4).orbit_structure(f) - doctest:warning - ... - [2, 6] - - :: - - sage: P. = AffineSpace(GF(13), 2) - sage: H = End(P) - sage: f = H([x^2 - y^2, y^2]) - sage: f.orbit_structure(P(3, 4)) - doctest:warning - ... - [2, 6] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.orbit_structure(P, n) instead") - try: - return f.orbit_structure(self) - except AttributeError: - raise TypeError("map must be a dynamical system") diff --git a/src/sage/schemes/product_projective/morphism.py b/src/sage/schemes/product_projective/morphism.py index 919c7945d75..88d5ee84466 100644 --- a/src/sage/schemes/product_projective/morphism.py +++ b/src/sage/schemes/product_projective/morphism.py @@ -419,65 +419,6 @@ def as_dynamical_system(self): from sage.dynamics.arithmetic_dynamics.product_projective_ds import DynamicalSystem_product_projective return DynamicalSystem_product_projective(list(self), self.domain()) - def nth_iterate(self, P, n, normalize=False): - """ - Return the nth iterate of the point. - - EXAMPLES:: - - sage: Z. = ProductProjectiveSpaces([1, 2], QQ) - sage: H = End(Z) - sage: f = H([a^3, b^3 + a*b^2, x^2, y^2 - z^2, z*y]) - sage: P = Z([1, 1, 1, 1, 1]) - sage: f.nth_iterate(P, 3) - doctest:warning - ... - (1/1872 : 1 , 1 : 1 : 0) - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.projective_ds.green_function instead") - return self.as_dynamical_system().nth_iterate(P, n, normalize) - - def orbit(self, P, N, **kwds): - """ - Return the orbit of this point. - - EXAMPLES:: - - sage: Z. = ProductProjectiveSpaces([1, 2], QQ) - sage: H = End(Z) - sage: f = H([a^3, b^3 + a*b^2, x^2, y^2 - z^2, z*y]) - sage: P = Z([1, 1, 1, 1, 1]) - sage: f.orbit(P, 3) - doctest:warning - ... - [(1 : 1 , 1 : 1 : 1), (1/2 : 1 , 1 : 0 : 1), (1/12 : 1 , -1 : 1 : 0), (1/1872 : 1 , 1 : 1 : 0)] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.projective_ds.green_function instead") - return self.as_dynamical_system().orbit(P, N, **kwds) - - def nth_iterate_map(self, n): - """ - Return the nth iterate of this map. - - EXAMPLES:: - - sage: Z. = ProductProjectiveSpaces([1 , 2], QQ) - sage: H = End(Z) - sage: f = H([a^3, b^3, x^2, y^2, z^2]) - sage: f.nth_iterate_map(3) - doctest:warning - ... - Dynamical System of Product of projective spaces P^1 x P^2 over - Rational Field - Defn: Defined by sending (a : b , x : y : z) to - (a^27 : b^27 , x^8 : y^8 : z^8). - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use sage.dynamics.arithmetic_dynamics.projective_ds.green_function instead") - return self.as_dynamical_system().nth_iterate_map(n) - def global_height(self, prec=None): r""" Returns the maximum of the absolute logarithmic heights of the coefficients diff --git a/src/sage/schemes/product_projective/point.py b/src/sage/schemes/product_projective/point.py index 5dedc7a17a6..f77caa27f29 100644 --- a/src/sage/schemes/product_projective/point.py +++ b/src/sage/schemes/product_projective/point.py @@ -424,84 +424,6 @@ def change_ring(self, R, **kwds): Q = [P.change_ring(R, **kwds) for P in self._points] return S.point(Q, check) - def nth_iterate(self, f, n, normalize=False): - r""" - For a map of this point and a point `P` in ``self.domain()`` - this function returns the nth iterate of `P` by this point. - - If ``normalize == True``, - then the coordinates are automatically normalized. - - INPUT: - - - ``f`` -- a ProductProjectiveSpaces_morphism_ring with ``self`` in ``f.domain()``. - - - ``n`` -- a positive integer. - - - ``normalize`` -- Boolean (optional Default: ``False``). - - OUTPUT: - - - A point in ``self.codomain()`` - - EXAMPLES:: - - sage: Z. = ProductProjectiveSpaces([1, 1], ZZ) - sage: f = DynamicalSystem_projective([a*b, b^2, x^3 - y^3, y^2*x], domain=Z) - sage: P = Z([2, 6, 2, 4]) - sage: P.nth_iterate(f, 2, normalize = True) - doctest:warning - ... - (1 : 3 , 407 : 112) - - .. TODO:: Is there a more efficient way to do this? - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use f.nth_iterate(P, n, normalize) instead") - return f.nth_iterate(self, n, normalize) - - def orbit(self, f, N, **kwds): - r""" - Return the orbit this point by ``f``. - - 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 initialization if - ``check==True`` - - INPUT: - - - ``f`` -- a :class:`ProductProjectiveSpaces_morphism_ring` with the orbit of `P` in ``f.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 ``self.codomain()``. - - EXAMPLES:: - - sage: Z. = ProductProjectiveSpaces([1, 1], ZZ) - sage: f = DynamicalSystem_projective([a*b, b^2, x^3 - y^3, y^2*x], domain=Z) - sage: P = Z([2, 6, 2, 4]) - sage: P.orbit(f, 3, normalize = True) - doctest:warning - ... - [(1 : 3 , 1 : 2), (1 : 3 , -7 : 4), (1 : 3 , 407 : 112), (1 : 3 , 66014215 : 5105408)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use f.orbit(P, N, **kwds) instead") - return f.orbit(self, N, **kwds) - def global_height(self, prec=None): r""" Return the absolute logarithmic height of the point. diff --git a/src/sage/schemes/projective/projective_morphism.py b/src/sage/schemes/projective/projective_morphism.py index be805c6734b..7d4ba4aa2fe 100644 --- a/src/sage/schemes/projective/projective_morphism.py +++ b/src/sage/schemes/projective/projective_morphism.py @@ -705,65 +705,6 @@ def normalize_coordinates(self): if GCD != 1: self.scale_by(1 / GCD) - def dynatomic_polynomial(self, period): - """ - Return the dynatomic polynomial. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2 + y^2, y^2]) - sage: f.dynatomic_polynomial(2) - doctest:warning - ... - x^2 + x*y + 2*y^2 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.dynatomic_polynomial instead") - return self.as_dynamical_system().dynatomic_polynomial(period) - - def nth_iterate_map(self, n, normalize=False): - """ - Return the nth iterate of the map. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, y^2]) - sage: f.nth_iterate_map(2) - doctest:warning - ... - Dynamical System 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) - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.nth_iterate_map instead") - return self.as_dynamical_system().nth_iterate_map(n, normalize) - - def nth_iterate(self, P, n, **kwds): - """ - Return the nth iterate of the point. - - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, 2*y^2]) - sage: Q = P(1,1) - sage: f.nth_iterate(Q,4) - doctest:warning - ... - (32768 : 32768) - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.nth_iterate instead") - return self.as_dynamical_system().nth_iterate(P, n, **kwds) - def degree(self): r""" Return the degree of this map. @@ -811,42 +752,6 @@ def degree(self): """ return(self._polys[0].degree()) - def degree_sequence(self, iterates=2): - """ - Return the sequence of degrees of iterates. - - EXAMPLES:: - - sage: P2. = ProjectiveSpace(QQ, 2) - sage: H = End(P2) - sage: f = H([Z^2, X*Y, Y^2]) - sage: f.degree_sequence(15) - doctest:warning - ... - [2, 3, 5, 8, 11, 17, 24, 31, 45, 56, 68, 91, 93, 184, 275] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.degree_sequence instead") - return self.as_dynamical_system().degree_sequence(iterates) - - def dynamical_degree(self, N=3, prec=53): - """ - Return the dynamical degree. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ, 1) - sage: H = End(P) - sage: f = H([x^2 + (x*y), y^2]) - sage: f.dynamical_degree() - doctest:warning - ... - 2.00000000000000 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.dynamical_degree instead") - return self.as_dynamical_system().dynamical_degree(N, prec) - def dehomogenize(self, n): r""" Returns the standard dehomogenization at the ``n[0]`` coordinate for the domain @@ -978,24 +883,6 @@ def dehomogenize(self, n): self.__dehomogenization[n]=H(F) return self.__dehomogenization[n] - def orbit(self, P, N, **kwds): - """ - Return the orbit of the point. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ,2) - sage: H = End(P) - sage: f = H([x^2+y^2, y^2-z^2, 2*z^2]) - sage: f.orbit(P(1,2,1), 3) - doctest:warning - ... - [(1 : 2 : 1), (5 : 3 : 2), (34 : 5 : 8), (1181 : -39 : 128)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.orbit instead") - return self.as_dynamical_system().orbit(P, N, **kwds) - @cached_method def is_morphism(self): r""" @@ -1059,122 +946,6 @@ def is_morphism(self): else: return True - def resultant(self, normalize=False): - r""" - Computes the resultant of the defining polynomials of this dynamical system. - - If ``normalize`` is ``True``, then first normalize the coordinate - functions with :meth:`normalize_coordinates`. Map must be an - endomorphism - - INPUT: - - - ``normalize`` -- Boolean (optional - default: ``False``). - - OUTPUT: an element of the base ring of this map. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, 6*y^2]) - sage: f.resultant() - doctest:warning - ... - 36 - - :: - - sage: P2. = ProjectiveSpace(QQ,2) - sage: P1. = ProjectiveSpace(QQ,1) - sage: H = Hom(P2,P1) - sage: f = H([x,y]) - sage: f.resultant() - Traceback (most recent call last): - ... - ValueError: must be an endomorphism - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.primes_of_bad_reduction instead") - if self.is_endomorphism(): - return self.as_dynamical_system().resultant(normalize) - raise ValueError("must be an endomorphism") - - def primes_of_bad_reduction(self, check=True): - """ - Return the primes of bad reduction. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([1/3*x^2+1/2*y^2, y^2]) - sage: f.primes_of_bad_reduction() - doctest:warning - ... - [2, 3] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.primes_of_bad_reduction instead") - return self.as_dynamical_system().primes_of_bad_reduction(check) - - def conjugate(self, M): - """ - Return the conjugate of this map. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, y^2]) - sage: f.conjugate(matrix([[1,2], [0,1]])) - doctest:warning - ... - Dynamical System 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) - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.conjugate instead") - return self.as_dynamical_system().conjugate(M) - - def green_function(self, P, v, **kwds): - """ - Return the value of the Green's function at the point. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, x*y]); - sage: Q = P(5, 1) - sage: f.green_function(Q, 0, N=30) - doctest:warning - ... - 1.6460930159932946233759277576 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.green_function instead") - return self.as_dynamical_system().green_function(P, v, **kwds) - - def canonical_height(self, P, **kwds): - """ - Return the canonical height of the point. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, 2*x*y]); - sage: f.canonical_height(P.point([5,4]), error_bound=0.001) - doctest:warning - ... - 2.1970553519503404898926835324 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.canonical_height instead") - return self.as_dynamical_system().canonical_height(P, **kwds) - def global_height(self, prec=None): r""" Returns the maximum of the absolute logarithmic heights of the coefficients @@ -1334,161 +1105,6 @@ def local_height_arch(self, i, prec=None): else: return max([K(c).local_height_arch(i, prec=prec) for f in self for c in f.coefficients()]) - def height_difference_bound(self, prec=None): - """ - Return the bound on the difference of the height and canonical height. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2+y^2, x*y]) - sage: f.height_difference_bound() - doctest:warning - ... - 1.38629436111989 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.height_difference_bound instead") - return self.as_dynamical_system().height_difference_bound(prec) - - def multiplier(self, P, n, check=True): - """ - Return the multiplier at the point. - - EXAMPLES:: - - sage: P. = 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) - doctest:warning - ... - [2 0] - [0 2] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.multiplier instead") - return self.as_dynamical_system().multiplier(P, n, check) - - def _multipliermod(self, P, n, p, k): - """ - Compute the multiplier mod p. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2-29/16*y^2, y^2]) - sage: f._multipliermod(P(5,4), 3, 11, 1) - doctest:warning - ... - [3] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds._multipliermod instead") - return self.as_dynamical_system()._multipliermod(P, n, p, k) - - def possible_periods(self, **kwds): - """ - Return the possible periods of a rational periodic point. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2-29/16*y^2, y^2]) - sage: f.possible_periods(ncpus=1) - doctest:warning - ... - [1, 3] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.possible_periods instead") - return self.as_dynamical_system().possible_periods(**kwds) - - def _preperiodic_points_to_cyclegraph(self, preper): - """ - Return the directed graph of the given preperiodic points. - - Examples:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2-2*y^2, y^2]) - sage: preper = [P(-2, 1), P(1, 0), P(0, 1), P(1, 1), P(2, 1), P(-1, 1)] - sage: f._preperiodic_points_to_cyclegraph(preper) - doctest:warning - ... - Looped digraph on 6 vertices - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds._preperiodic_points_to_cyclegraph instead") - return self.as_dynamical_system()._preperiodic_points_to_cyclegraph(preper) - - def is_PGL_minimal(self, prime_list=None): - """ - Return whether the representation is PGL minimal. - - EXAMPLES:: - - sage: PS. = ProjectiveSpace(QQ,1) - sage: H = End(PS) - sage: f = H([X^2+3*Y^2, X*Y]) - sage: f.is_PGL_minimal() - doctest:warning - ... - True - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.is_PGL_minimal instead") - return self.as_dynamical_system().is_PGL_minimal(prime_list) - - def minimal_model(self, return_transformation=False, prime_list=None): - """ - Return the minimal model. - - EXAMPLES:: - - sage: PS. = ProjectiveSpace(QQ,1) - sage: H = End(PS) - sage: f = H([X^2+3*Y^2, X*Y]) - sage: f.minimal_model(return_transformation=True) - doctest:warning - ... - ( - Dynamical System 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] - ) - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.minimal_model instead") - return self.as_dynamical_system().minimal_model(return_transformation, prime_list) - - def automorphism_group(self, **kwds): - """ - Return the automorphism group. - - EXAMPLES:: - - sage: R. = ProjectiveSpace(QQ,1) - sage: H = End(R) - sage: f = H([x^2-y^2, x*y]) - sage: f.automorphism_group(return_functions=True) - doctest:warning - ... - [x, -x] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.automorphism_group instead") - return self.as_dynamical_system().automorphism_group(**kwds) - def wronskian_ideal(self): r""" Returns the ideal generated by the critical point locus. @@ -1528,260 +1144,9 @@ def wronskian_ideal(self): J = jacobian(self.defining_polynomials(),dom.gens()) return(R.ideal(J.minors(N))) - def critical_subscheme(self): - """ - Return the critical subscheme. - - Examples:: - - sage: set_verbose(None) - sage: P. = 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() - doctest:warning - ... - Closed subscheme of Projective Space of dimension 1 over Rational Field - defined by: - 9*x^2*y^2 - 6*y^4 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.critical_points instead") - return self.as_dynamical_system().critical_subscheme() - - def critical_points(self, R=None): - """ - Return the critical points. - - Examples:: - - sage: set_verbose(None) - sage: P. = 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() - doctest:warning - ... - [(1 : 0)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.critical_subscheme instead") - return self.as_dynamical_system().critical_points() - - def is_postcritically_finite(self, err=0.01, embedding=None): - """ - Return whether the map is postcritically finite. - - Examples:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([x^2 - y^2, y^2]) - sage: f.is_postcritically_finite() - doctest:warning - ... - True - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.is_postcritically_finite instead") - return self.as_dynamical_system().is_postcritically_finite(err, embedding) - - def critical_point_portrait(self, check=True, embedding=None): - """ - Return the directed graph of critical point portrait. - - EXAMPLES:: - - sage: R. = QQ[] - sage: K. = NumberField(z^6 + 2*z^5 + 2*z^4 + 2*z^3 + z^2 + 1) - sage: PS. = 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 - doctest:warning - ... - Looped digraph on 6 vertices - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.critical_point_portrait instead") - return self.as_dynamical_system().critical_point_portrait(check, embedding) - - def critical_height(self, **kwds): - """ - Return the critical height. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f =H([x^3+7*y^3, 11*y^3]) - sage: f.critical_height() - doctest:warning - ... - 1.1989273321156851418802151128 - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.critical_height instead") - return self.as_dynamical_system().critical_height(*kwds) - - def periodic_points(self, n, minimal=True, R=None, algorithm='variety', return_scheme=False): - """ - Return the periodic points. - - EXAMPLES:: - - sage: set_verbose(None) - sage: P. = ProjectiveSpace(QQbar,1) - sage: H = End(P) - sage: f = H([x^2-x*y+y^2, x^2-y^2+x*y]) - sage: f.periodic_points(1) - doctest:warning - ... - [(-0.500000000000000? - 0.866025403784439?*I : 1), (-0.500000000000000? + 0.866025403784439?*I : 1), - (1 : 1)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.periodic_points instead") - return self.as_dynamical_system().periodic_points(n, minimal, R, algorithm, return_scheme) - - def multiplier_spectra(self, n, formal=False, embedding=None, type='point'): - r""" - 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. - - The parameter ``type`` determines if the multipliers are computed one per cycle - (with multiplicity) or one per point (with multiplicity). Note that in the - ``cycle`` case, a map with a cycle which collapses into multiple smaller cycles - will have more multipliers than one that does not. - - 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: False. - - - ``embedding`` - embedding of the base field into `\QQbar`. - - - ``type`` - string - either ``point`` or ``cycle`` depending on whether you - compute one multiplier per point or one per cycle. Default : ``point``. - - OUTPUT: - - - a list of `\QQbar` elements. - - EXAMPLES:: - - sage: P. = 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) - doctest:warning - ... - [0, -7198147681176255644585/256, 848446157556848459363/19683, -3323781962860268721722583135/35184372088832, - 529278480109921/256, -4290991994944936653/2097152, 1061953534167447403/19683, -3086380435599991/9, - 82911372672808161930567/8192, -119820502365680843999, 3553497751559301575157261317/8192] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.multiplier_spectra instead") - return self.as_dynamical_system().multiplier_spectra(n, formal, embedding) - - def sigma_invariants(self, n, formal=False, embedding=None, type='point'): - r""" - Computes the values of the elementary symmetric polynomials of the ``n`` - multiplier spectra of this dynamical system. - - EXAMPLES:: - - sage: P. = 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) - doctest:warning - ... - [19575526074450617/1048576, -9078122048145044298567432325/2147483648, - -2622661114909099878224381377917540931367/1099511627776, - -2622661107937102104196133701280271632423/549755813888, - 338523204830161116503153209450763500631714178825448006778305/72057594037927936, 0] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.sigma_invariants instead") - return self.as_dynamical_system().sigma_invariants(n, formal, embedding) - - def reduced_form(self, prec=300, return_conjugation=True, error_limit=0.000001): - """ - Return the reduced form of the map. - - EXAMPLES:: - - sage: PS. = ProjectiveSpace(QQ, 1) - sage: H = End(PS) - sage: f = H([x^3, 10794303*x^3 + 146526*x^2*y + 663*x*y^2 + y^3]) - sage: f.reduced_form() - doctest:warning - ... - ( - Dynamical System of Projective Space of dimension 1 over Rational Field - Defn: Defined on coordinates by sending (x : y) to - (x^3 + 3*x*y^2 : y^3) , - - [ 0 -1] - [ 1 221] - ) - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.reduced_form instead") - return self.as_dynamical_system().reduced_form(prec=prec,\ - return_conjugation=return_conjugation, error_limit=error_limit) - class SchemeMorphism_polynomial_projective_space_field(SchemeMorphism_polynomial_projective_space): - def lift_to_rational_periodic(self, points_modp, B=None): - """ - Return the rational lift of the modp periodic points. - - EXAMPLES:: - - sage: P. = 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]]) - doctest:warning - ... - [[(0 : 1), 2]] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.lift_to_rational_periodic instead") - return self.as_dynamical_system().lift_to_rational_periodic(points_modp, B) - - def rational_periodic_points(self, **kwds): - """ - Return the list of all rational periodic points. - - EXAMPLES:: - - sage: P. = 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 - doctest:warning - ... - [(-1/2 : 1), (1 : 0), (3/2 : 1)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.rational_periodic_points instead") - return self.as_dynamical_system().rational_periodic_points(**kwds) - def rational_preimages(self, Q, k=1): r""" Determine all of the rational `k`-th preimages of ``Q`` by this map. @@ -1943,141 +1308,6 @@ def rational_preimages(self, Q, k=1): L = L2 return L - def all_rational_preimages(self, points): - """ - Return the list of all rational preimages. - - EXAMPLES:: - - sage: P. = 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)])) - doctest:warning - ... - [(-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. = 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. = 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. = NumberField(z^3 + (z^2)/4 - (41/16)*z + 23/64); - sage: P. = ProjectiveSpace(K,1) - sage: H = End(P) - sage: f = H([16*x^2 - 29*y^2, 16*y^2]) - sage: sorted(f.all_rational_preimages([P(16*w^2 - 29,16)]),key=str) - [(-w - 1/2 : 1), - (-w : 1), - (-w^2 + 21/16 : 1), - (-w^2 + 29/16 : 1), - (-w^2 - w + 25/16 : 1), - (-w^2 - w + 33/16 : 1), - (w + 1/2 : 1), - (w : 1), - (w^2 + w - 25/16 : 1), - (w^2 + w - 33/16 : 1), - (w^2 - 21/16 : 1), - (w^2 - 29/16 : 1)] - - :: - - sage: K. = QuadraticField(3) - sage: P. = 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)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.all_rational_preimages instead") - return self.as_dynamical_system().all_rational_preimages(points) - - def rational_preperiodic_points(self, **kwds): - """ - Return the list of all rational preperiodic points. - - EXAMPLES:: - - sage: PS. = ProjectiveSpace(1,QQ) - sage: H = End(PS) - sage: f = H([x^2 -y^2, 3*x*y]) - sage: sorted(f.rational_preperiodic_points()) - doctest:warning - ... - [(-2 : 1), (-1 : 1), (-1/2 : 1), (0 : 1), (1/2 : 1), (1 : 0), (1 : 1), - (2 : 1)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.rational_preperiodic_points instead") - return self.as_dynamical_system().rational_preperiodic_points(**kwds) - - def rational_preperiodic_graph(self, **kwds): - """ - Return the digraph of rational preperiodic points. - - EXAMPLES:: - - sage: PS. = ProjectiveSpace(1,QQ) - sage: H = End(PS) - sage: f = H([7*x^2 - 28*y^2, 24*x*y]) - sage: f.rational_preperiodic_graph() - doctest:warning - ... - Looped digraph on 12 vertices - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.rational_preperiodic_graph instead") - return self.as_dynamical_system().rational_preperiodic_graph(**kwds) - - def connected_rational_component(self, P, n=0): - """ - Return the component of all rational preimage and forward images. - - EXAMPLES:: - - sage: R. = PolynomialRing(QQ) - sage: K. = NumberField(x^3+1/4*x^2-41/16*x+23/64) - sage: PS. = 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) - doctest:warning - ... - [(w : 1), - (w^2 - 29/16 : 1), - (-w^2 - w + 25/16 : 1), - (w^2 + w - 25/16 : 1), - (-w : 1), - (-w^2 + 29/16 : 1), - (w + 1/2 : 1), - (-w - 1/2 : 1), - (-w^2 + 21/16 : 1), - (w^2 - 21/16 : 1), - (w^2 + w - 33/16 : 1), - (-w^2 - w + 33/16 : 1)] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.connected_rational_component instead") - return self.as_dynamical_system().connected_rational_component(P, n) - def _number_field_from_algebraics(self): r""" Given a projective map defined over `\QQbar`, return the same map, but defined @@ -2166,87 +1396,6 @@ def _number_field_from_algebraics(self): F.append(G) return(H(F)) - def conjugating_set(self, other): - """ - Return the set of PGL element that conjugate this map to ``other``. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(GF(7),1) - sage: H = End(P) - sage: D6 = H([y^2, x^2]) - sage: D6.conjugating_set(D6) - doctest:warning - ... - [ - [1 0] [0 1] [0 2] [4 0] [2 0] [0 4] - [0 1], [1 0], [1 0], [0 1], [0 1], [1 0] - ] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.conjugating_set instead") - return self.as_dynamical_system().conjugating_set(other) - - def is_conjugate(self, other): - """ - Return if this map and ``other`` are conjugate. - - EXAMPLES:: - - sage: K. = CyclotomicField(3) - sage: P. = ProjectiveSpace(K,1) - sage: H = End(P) - sage: D8 = H([y^2, x^2]) - sage: D8.is_conjugate(D8) - doctest:warning - ... - True - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.is_conjugate instead") - return self.as_dynamical_system().is_conjugate(other) - - def is_polynomial(self): - """ - Return if this map is a polynomial. - - EXAMPLES:: - - sage: R. = QQ[] - sage: K. = QuadraticField(7) - sage: P. = 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() - doctest:warning - ... - False - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.is_polynomial instead") - return self.as_dynamical_system().is_polynomial() - - def normal_form(self, return_conjugation=False): - """ - Return a normal form conjugate to this map. - - EXAMPLES:: - - sage: R. = QQ[] - sage: K. = NumberField(x^2 - 5) - sage: P. = 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 - doctest:warning - ... - [ 1 -1/2*w] - [ 0 1] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.normal_form instead") - return self.as_dynamical_system().normal_form(return_conjugation) - def indeterminacy_locus(self): r""" Return the indeterminacy locus of this map. @@ -2355,6 +1504,7 @@ def indeterminacy_points(self, F=None): sage: P2. = ProjectiveSpace(RR,3) sage: H = Hom(P1,P2) sage: h = H([x+y, y, z+y, y]) + sage: set_verbose(None) sage: h.indeterminacy_points() [] sage: g = H([y^3*z^3, x^3*z^3, y^3*z^3, x^2*y^2*z^2]) @@ -2444,79 +1594,3 @@ def _fast_eval(self, x): else: P = [f(*x) for f in self._fastpolys] return P - - def orbit_structure(self, P): - """ - Return the tail and period of the point. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(GF(5),2) - sage: H = End(P) - sage: f = H([x^2 + y^2,y^2, z^2 + y*z]) - sage: f.orbit_structure(P(2,1,2)) - doctest:warning - ... - [0, 6] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.orbit_structure instead") - return self.as_dynamical_system().orbit_structure(P) - - def cyclegraph(self): - """ - Return the digraph of the map. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(GF(13),1) - sage: H = End(P) - sage: f = H([x^2-y^2, y^2]) - sage: f.cyclegraph() - doctest:warning - ... - Looped digraph on 14 vertices - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.cyclegraph instead") - return self.as_dynamical_system().cyclegraph() - - def possible_periods(self, return_points=False): - """ - Return the possible periods of a periodic point of this map. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(GF(23),1) - sage: H = End(P) - sage: f = H([x^2-2*y^2, y^2]) - sage: f.possible_periods() - doctest:warning - ... - [1, 5, 11, 22, 110] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.possible_periods instead") - return self.as_dynamical_system().possible_periods(return_points) - - def automorphism_group(self, **kwds): - """ - return the automorphism group of this map. - - EXAMPLES:: - - sage: R. = ProjectiveSpace(GF(7^3,'t'),1) - sage: H = End(R) - sage: f = H([x^2-y^2, x*y]) - sage: f.automorphism_group() - doctest:warning - ... - [ - [1 0] [6 0] - [0 1], [0 1] - ] - """ - from sage.misc.superseded import deprecation - deprecation(23497, "use sage.dynamics.arithmetic_dynamics.projective_ds.automorphism_group instead") - return self.as_dynamical_system().automorphism_group(**kwds) - diff --git a/src/sage/schemes/projective/projective_point.py b/src/sage/schemes/projective/projective_point.py index 83ee7e150bf..cbf9860ca5b 100644 --- a/src/sage/schemes/projective/projective_point.py +++ b/src/sage/schemes/projective/projective_point.py @@ -616,456 +616,6 @@ def dehomogenize(self,n): Q.append(self[i]/self[n]) return(A.point(Q)) - def nth_iterate(self, f, n, **kwds): - r""" - Return the ``n``-th iterate of this point for the map ``f``. - - If ``normalize==True``, then the coordinates are automatically - normalized. If ``check==True``, then the initialization checks - are performed on the new point. - - INPUT: - - - ``f`` -- a SchmemMorphism_polynomial with the points in its domain. - - - ``n`` -- a positive integer. - - kwds: - - - ``check`` -- Boolean (optional - default: ``True``). - - - ``normalize`` -- Boolean (optional Default: ``False``). - - OUTPUT: - - - A point in the domain of ``f``.` - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ, 1) - sage: f = DynamicalSystem_projective([x^2+y^2, 2*y^2], domain=P) - sage: P(1, 1).nth_iterate(f, 4) - doctest:warning - ... - (32768 : 32768) - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.nth_iterate(P, n, **kwds) instead") - n = ZZ(n) - if n < 0: - raise TypeError("must be a forward orbit") - return self.orbit(f, [n,n+1], **kwds)[0] - - def orbit(self, f, N, **kwds): - r""" - Returns the orbit of this point by the map ``f``. - - 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 initialization if - ``check=True`` - - INPUT: - - - ``f`` -- a :class:`SchemeMorphism_polynomial` with this point in the domain of ``f``. - - - ``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 the domain of ``f``. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(ZZ,2) - sage: f = DynamicalSystem_projective([x^2+y^2, y^2-z^2, 2*z^2], domain=P) - sage: P(1, 2, 1).orbit(f, 3) - doctest:warning - ... - [(1 : 2 : 1), (5 : 3 : 2), (34 : 5 : 8), (1181 : -39 : 128)] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.orbit(P, N, **kwds) instead") - if not f.is_endomorphism(): - raise TypeError("map must be an endomorphism for iteration") - if not isinstance(N,(list,tuple)): - N = [0,N] - N[0] = ZZ(N[0]) - N[1] = ZZ(N[1]) - if N[0] < 0 or N[1] < 0: - raise TypeError("orbit bounds must be non-negative") - if N[0] > N[1]: - return([]) - - Q = self - check = kwds.pop("check",True) - normalize = kwds.pop("normalize",False) - - if normalize: - Q.normalize_coordinates() - for i in range(1, N[0]+1): - Q = f(Q, check) - if normalize: - Q.normalize_coordinates() - Orb = [Q] - for i in range(N[0]+1, N[1]+1): - Q = f(Q, check) - if normalize: - Q.normalize_coordinates() - Orb.append(Q) - return(Orb) - - def green_function(self, G, v, **kwds): - r""" - Evaluates the local Green's function with respect to the morphism ``G`` - at the place ``v`` for this point 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 [Sil2007]_. - - INPUT: - - - ``G`` - a projective morphism whose local Green's function we are computing. - - - ``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, default: 10. - - - ``prec`` - positive integer, float point or p-adic precision, default: 100. - - - ``error_bound`` - a positive real number. - - OUTPUT: - - - a real number. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ,1) - sage: H = Hom(P,P) - sage: f = H([x^2+y^2, x*y]); - sage: Q = P(5, 1) - sage: Q.green_function(f, 0, N=200, prec=200) - doctest:warning - ... - 1.6460930160038721802875250367738355497198064992657997569827 - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use G.green_function(P, N, **kwds) instead") - N = kwds.get('N', 10) #Get number of iterates (if entered) - err = kwds.get('error_bound', None) #Get error bound (if entered) - prec = kwds.get('prec', 100) #Get precision (if entered) - R = RealField(prec) - localht = R(0) - BR = FractionField(self.codomain().base_ring()) - GBR = G.change_ring(BR) #so the heights work - - if not BR in NumberFields(): - raise NotImplementedError("must be over a number field or a number field order") - if not BR.is_absolute(): - raise TypeError("must be an absolute field") - - #For QQ the 'flip-trick' works better over RR or Qp - if isinstance(v, (NumberFieldFractionalIdeal, RingHomomorphism_im_gens)): - K = BR - elif is_prime(v): - K = Qp(v, prec) - elif v == 0: - K = R - v = BR.places(prec=prec)[0] - else: - raise ValueError("invalid valuation (=%s) entered"%v) - - #Coerce all polynomials in F into polynomials with coefficients in K - F = G.change_ring(K, check = False) - d = F.degree() - dim = F.codomain().ambient_space().dimension_relative() - P = self.change_ring(K, check = False) - - if err is not None: - err = R(err) - if not err>0: - raise ValueError("error bound (=%s) must be positive"%err) - if not G.is_endomorphism(): - raise NotImplementedError("error bounds only for endomorphisms") - - #if doing error estimates, compute needed number of iterates - D = (dim + 1) * (d - 1) + 1 - #compute upper bound - if isinstance(v, RingHomomorphism_im_gens): #archimedean - vindex = BR.places(prec=prec).index(v) - U = GBR.local_height_arch(vindex, prec=prec) + R(binomial(dim + d, d)).log() - else: #non-archimedean - U = GBR.local_height(v, prec=prec) - - #compute lower bound - from explicit polynomials of Nullstellensatz - CR = GBR.codomain().ambient_space().coordinate_ring() #.lift() only works over fields - I = CR.ideal(GBR.defining_polynomials()) - maxh = 0 - Res = 1 - for k in range(dim + 1): - CoeffPolys = (CR.gen(k) ** D).lift(I) - h = 1 - for poly in CoeffPolys: - if poly != 0: - for c in poly.coefficients(): - Res = lcm(Res, c.denominator()) - for poly in CoeffPolys: - if poly != 0: - if isinstance(v, RingHomomorphism_im_gens): #archimedean - if BR == QQ: - h = max([(Res*c).local_height_arch(prec=prec) for c in poly.coefficients()]) - else: - h = max([(Res*c).local_height_arch(vindex, prec=prec) for c in poly.coefficients()]) - else: #non-archimedean - h = max([c.local_height(v, prec=prec) for c in poly.coefficients()]) - if h > maxh: - maxh=h - if maxh == 0: - maxh = 1 #avoid division by 0 - if isinstance(v, RingHomomorphism_im_gens): #archimedean - L = R(Res / ((dim + 1) * binomial(dim + D - d, D - d) * maxh)).log().abs() - else: #non-archimedean - L = R(Res / maxh).log().abs() - C = max([U, L]) - if C != 0: - N = R(C/(err*(d-1))).log(d).abs().ceil() - else: #we just need log||P||_v - N=1 - - #START GREEN FUNCTION CALCULATION - if isinstance(v, RingHomomorphism_im_gens): #embedding for archimedean local height - for i in range(N+1): - Pv = [ (v(t).abs()) for t in P ] - m = -1 - #compute the maximum absolute value of entries of a, and where it occurs - for n in range(dim + 1): - if Pv[n] > m: - j = n - m = Pv[n] - # add to sum for the Green's function - localht += ((1/R(d))**R(i)) * (R(m).log()) - #get the next iterate - if i < N: - P.scale_by(1/P[j]) - P = F(P, False) - return (1/BR.absolute_degree()) * localht - - #else - prime or prime ideal for non-archimedean - for i in range(N + 1): - if BR == QQ: - Pv = [ R(K(t).abs()) for t in P ] - else: - Pv = [ R(t.abs_non_arch(v)) for t in P ] - m = -1 - #compute the maximum absolute value of entries of a, and where it occurs - for n in range(dim + 1): - if Pv[n] > m: - j = n - m = Pv[n] - # add to sum for the Green's function - localht += ((1/R(d))**R(i)) * (R(m).log()) - #get the next iterate - if i < N: - P.scale_by(1/P[j]) - P = F(P, False) - return (1/BR.absolute_degree()) * localht - - def canonical_height(self, F, **kwds): - r""" - Evaluates the (absolute) canonical height of this point with respect to the map ``F``. - - Must be over number field or order of a number field or ``QQbar``. - 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. - - If function is defined over ``QQ`` uses Wells' Algorithm, which allows us to - not have to factor the resultant. - - INPUT: - - - ``F`` - a projective morphism. - - 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. - - AUTHORS: - - - Original algorithm written by Elliot Wells [WELLS]_ - - - Wells' Algorithm implemented as part of GSOC 2017 by Rebecca Lauren Miller and Paul Fili - - - EXAMPLES:: - - sage: P. = ProjectiveSpace(QQ, 1) - sage: f = DynamicalSystem_projective([1000*x^2-29*y^2, 1000*y^2], domain=P) - sage: Q = P(-1/4, 1) - sage: Q.canonical_height(f, error_bound=0.01) - doctest:warning - ... - 3.7996079979254623065837411853 - - :: - - sage: RSA768 = 123018668453011775513049495838496272077285356959533479219732245215\ - 1726400507263657518745202199786469389956474942774063845925192557326303453731548\ - 2685079170261221429134616704292143116022212404792747377940806653514195974598569\ - 02143413 - sage: P. = ProjectiveSpace(QQ,1) - sage: H = End(P) - sage: f = H([RSA768*x^2 + y^2, x*y]) - sage: Q = P(RSA768,1) - sage: Q.canonical_height(f, error_bound=0.00000000000000001) - doctest:warning - ... - 931.18256422718241278672729195 - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use F.canonical_height(P, **kwds) instead") - bad_primes = kwds.get("badprimes", None) - prec = kwds.get("prec", 100) - error_bound = kwds.get("error_bound", None) - K = FractionField(self.codomain().base_ring()) - - #Wells' Algorithm - if K is QQ and F.codomain().ambient_space().dimension_relative() == 1: - # write our point with coordinates whose gcd is 1 - self.normalize_coordinates() - if self.parent().value_ring() is QQ: - self.clear_denominators() - #assures integer coefficients - coeffs = F[0].coefficients() + F[1].coefficients() - t = 1 - for c in coeffs: - t = lcm(t, c.denominator()) - A = t*F[0] - B = t*F[1] - Res = F.resultant(normalize=True) - H = 0 - x_i = self[0] - y_i = self[1] - d = F.degree() - R = RealField(prec) - N = kwds.get('N', 10) - err = kwds.get('error_bound', None) - #computes the error bound as defined in Algorithm 3.1 of [WELLS] - if Res > 1: - if not err is None: - err = err/2 - N = ceil((R(Res.abs()).log().log() - R(d-1).log() - R(err).log())/(R(d).log())) - if N < 1: - N = 1 - kwds.update({'error_bound': err}) - kwds.update({'N': N}) - for n in range(N): - x = A(x_i,y_i) % Res**(N-n) - y = B(x_i,y_i) % Res**(N-n) - g = gcd([x, y, Res]) - H = H + R(g).abs().log()/(d**(n+1)) - x_i = x/g - y_i = y/g - # this looks different than Wells' Algorithm because of the difference between what Wells' calls H_infty, - # and what Green's Function returns for the infinite place - return self.green_function(F, 0 , **kwds) - H + R(t).log() - - if not K in _NumberFields: - if not K is QQbar: - raise NotImplementedError("must be over a number field or a number field order or QQbar") - else: - #since this an absolute hieght, we can compute the height of a QQbar point - #by choosing any number field it is defined over. - P = self._number_field_from_algebraics() - K = P.codomain().base_ring() - f = F._number_field_from_algebraics() - if K == QQ: - K = f.base_ring() - P = P.change_ring(K) - elif f.base_ring() == QQ: - f = f.change_ring(K) - else: - K, phi, psi, b = K.composite_fields(f.base_ring(), both_maps=True)[0] - P = P.change_ring(K, embedding=phi) - f = f.change_ring(K, embedding=psi) - else: - if not K.is_absolute(): - raise TypeError("must be an absolute field") - P = self - f = F - - if bad_primes is None: - bad_primes = [] - for b in P: - if K == QQ: - bad_primes += b.denominator().prime_factors() - else: - bad_primes += b.denominator_ideal().prime_factors() - bad_primes += K(f.resultant(normalize=True)).support() - bad_primes = list(set(bad_primes)) - - emb = K.places(prec=prec) - num_places = len(emb) + len(bad_primes) - if not error_bound is None: - error_bound /= num_places - R = RealField(prec) - h = R(0) - - ##update the keyword dictionary for use in green_function - kwds.update({"badprimes": bad_primes}) - kwds.update({"error_bound": error_bound}) - - # Archimedean local heights - # :: WARNING: If places is fed the default Sage precision of 53 bits, - # it uses Real or Complex Double Field in place of RealField(prec) or ComplexField(prec) - # the function is_RealField does not identify RDF as real, so we test for that ourselves. - for v in emb: - if is_RealField(v.codomain()) or v.codomain() is RDF: - dv = R(1) - else: - dv = R(2) - h += dv*P.green_function(f, v, **kwds) #arch Green function - - # Non-Archimedean local heights - for v in bad_primes: - if K == QQ: - dv = R(1) - else: - dv = R(v.residue_class_degree() * v.absolute_ramification_index()) - h += dv * P.green_function(f, v, **kwds) #non-arch Green functions - return h - def global_height(self, prec=None): r""" Returns the absolute logarithmic height of the point. @@ -1725,34 +1275,6 @@ def __hash__(self): N = self.codomain().ambient_space().dimension_relative() return hash(sum(hash(self[i]) * p**i for i in range(N + 1))) - def orbit_structure(self, f): - r""" - This function returns the pair `[m,n]` where `m` is the - preperiod and `n` is the period of the point by the map ``f``. - - Every point is preperiodic over a finite field so this is always possible. - - INPUT: - - - ``f`` -- a :class:`ScemeMorphism_polynomial` with this point in ``f.domain()``. - - OUTPUT: - - - a list `[m,n]` of integers. - - EXAMPLES:: - - sage: P. = ProjectiveSpace(GF(5),2) - sage: f = DynamicalSystem_projective([x^2 + y^2, y^2, z^2 + y*z], domain=P) - sage: P(1, 0, 1).orbit_structure(f) - doctest:warning - ... - [0, 1] - """ - from sage.misc.superseded import deprecation - deprecation(23479, "use f.orbit_structure(P) instead") - return f.orbit_structure(self) - #******************************************************************* # Abelian varieties #*******************************************************************