Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
27900: remove deprecated dynamics code from schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
bhutz committed May 31, 2019
1 parent 716fb69 commit e20ee18
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 1,810 deletions.
130 changes: 0 additions & 130 deletions src/sage/schemes/affine/affine_morphism.py
Expand Up @@ -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.<x> = 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.<x,y> = 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.<x,y> = 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.<x,y> = 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
Expand Down Expand Up @@ -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.<x,y> = 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
Expand Down Expand Up @@ -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.<x,y> = 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.<x,y> = 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``.
Expand Down
138 changes: 0 additions & 138 deletions src/sage/schemes/affine/affine_point.py
Expand Up @@ -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.<x,y> = 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.<x,y>=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.
Expand Down Expand Up @@ -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.<x,y,z> = 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.<x,y,z> = 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.<x,y> = 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.<x,y> = 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")
59 changes: 0 additions & 59 deletions src/sage/schemes/product_projective/morphism.py
Expand Up @@ -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.<a,b,x,y,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.<a,b,x,y,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.<a,b,x,y,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
Expand Down

0 comments on commit e20ee18

Please sign in to comment.