passagemath-schemes 10.6.40__cp314-cp314-macosx_13_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-schemes might be problematic. Click here for more details.
- passagemath_schemes/.dylibs/libflint.22.0.dylib +0 -0
- passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
- passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
- passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
- passagemath_schemes/__init__.py +3 -0
- passagemath_schemes-10.6.40.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.40.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.40.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.40.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.40.dist-info/top_level.txt +3 -0
- sage/all__sagemath_schemes.py +23 -0
- sage/databases/all__sagemath_schemes.py +7 -0
- sage/databases/cremona.py +1723 -0
- sage/dynamics/all__sagemath_schemes.py +2 -0
- sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
- sage/dynamics/arithmetic_dynamics/all.py +14 -0
- sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
- sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
- sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
- sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
- sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
- sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
- sage/dynamics/arithmetic_dynamics/projective_ds.py +9558 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-314-darwin.so +0 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
- sage/dynamics/arithmetic_dynamics/wehlerK3.py +2576 -0
- sage/lfunctions/all.py +18 -0
- sage/lfunctions/dokchitser.py +745 -0
- sage/lfunctions/pari.py +818 -0
- sage/lfunctions/zero_sums.cpython-314-darwin.so +0 -0
- sage/lfunctions/zero_sums.pyx +1847 -0
- sage/modular/abvar/abvar.py +5135 -0
- sage/modular/abvar/abvar_ambient_jacobian.py +413 -0
- sage/modular/abvar/abvar_newform.py +244 -0
- sage/modular/abvar/all.py +8 -0
- sage/modular/abvar/constructor.py +186 -0
- sage/modular/abvar/cuspidal_subgroup.py +371 -0
- sage/modular/abvar/finite_subgroup.py +896 -0
- sage/modular/abvar/homology.py +720 -0
- sage/modular/abvar/homspace.py +998 -0
- sage/modular/abvar/lseries.py +415 -0
- sage/modular/abvar/morphism.py +935 -0
- sage/modular/abvar/torsion_point.py +274 -0
- sage/modular/abvar/torsion_subgroup.py +740 -0
- sage/modular/all.py +43 -0
- sage/modular/arithgroup/all.py +20 -0
- sage/modular/arithgroup/arithgroup_element.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/arithgroup_element.pyx +474 -0
- sage/modular/arithgroup/arithgroup_generic.py +1402 -0
- sage/modular/arithgroup/arithgroup_perm.py +2692 -0
- sage/modular/arithgroup/congroup.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/congroup.pyx +334 -0
- sage/modular/arithgroup/congroup_gamma.py +363 -0
- sage/modular/arithgroup/congroup_gamma0.py +692 -0
- sage/modular/arithgroup/congroup_gamma1.py +653 -0
- sage/modular/arithgroup/congroup_gammaH.py +1469 -0
- sage/modular/arithgroup/congroup_generic.py +628 -0
- sage/modular/arithgroup/congroup_sl2z.py +267 -0
- sage/modular/arithgroup/farey_symbol.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1066 -0
- sage/modular/arithgroup/tests.py +418 -0
- sage/modular/btquotients/all.py +4 -0
- sage/modular/btquotients/btquotient.py +3753 -0
- sage/modular/btquotients/pautomorphicform.py +2570 -0
- sage/modular/buzzard.py +100 -0
- sage/modular/congroup.py +29 -0
- sage/modular/congroup_element.py +13 -0
- sage/modular/cusps.py +1109 -0
- sage/modular/cusps_nf.py +1270 -0
- sage/modular/dims.py +569 -0
- sage/modular/dirichlet.py +3310 -0
- sage/modular/drinfeld_modform/all.py +2 -0
- sage/modular/drinfeld_modform/element.py +446 -0
- sage/modular/drinfeld_modform/ring.py +773 -0
- sage/modular/drinfeld_modform/tutorial.py +236 -0
- sage/modular/etaproducts.py +1065 -0
- sage/modular/hecke/algebra.py +746 -0
- sage/modular/hecke/all.py +20 -0
- sage/modular/hecke/ambient_module.py +1019 -0
- sage/modular/hecke/degenmap.py +119 -0
- sage/modular/hecke/element.py +325 -0
- sage/modular/hecke/hecke_operator.py +780 -0
- sage/modular/hecke/homspace.py +206 -0
- sage/modular/hecke/module.py +1767 -0
- sage/modular/hecke/morphism.py +174 -0
- sage/modular/hecke/submodule.py +989 -0
- sage/modular/hypergeometric_misc.cpython-314-darwin.so +0 -0
- sage/modular/hypergeometric_misc.pxd +4 -0
- sage/modular/hypergeometric_misc.pyx +166 -0
- sage/modular/hypergeometric_motive.py +2017 -0
- sage/modular/local_comp/all.py +2 -0
- sage/modular/local_comp/liftings.py +292 -0
- sage/modular/local_comp/local_comp.py +1071 -0
- sage/modular/local_comp/smoothchar.py +1825 -0
- sage/modular/local_comp/type_space.py +748 -0
- sage/modular/modform/all.py +30 -0
- sage/modular/modform/ambient.py +815 -0
- sage/modular/modform/ambient_R.py +177 -0
- sage/modular/modform/ambient_eps.py +306 -0
- sage/modular/modform/ambient_g0.py +124 -0
- sage/modular/modform/ambient_g1.py +204 -0
- sage/modular/modform/constructor.py +545 -0
- sage/modular/modform/cuspidal_submodule.py +708 -0
- sage/modular/modform/defaults.py +14 -0
- sage/modular/modform/eis_series.py +505 -0
- sage/modular/modform/eisenstein_submodule.py +663 -0
- sage/modular/modform/element.py +4131 -0
- sage/modular/modform/find_generators.py +59 -0
- sage/modular/modform/half_integral.py +154 -0
- sage/modular/modform/hecke_operator_on_qexp.py +247 -0
- sage/modular/modform/j_invariant.py +47 -0
- sage/modular/modform/l_series_gross_zagier.py +133 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314-darwin.so +0 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
- sage/modular/modform/notes.py +45 -0
- sage/modular/modform/numerical.py +514 -0
- sage/modular/modform/periods.py +14 -0
- sage/modular/modform/ring.py +1257 -0
- sage/modular/modform/space.py +1860 -0
- sage/modular/modform/submodule.py +118 -0
- sage/modular/modform/tests.py +64 -0
- sage/modular/modform/theta.py +110 -0
- sage/modular/modform/vm_basis.py +381 -0
- sage/modular/modform/weight1.py +220 -0
- sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
- sage/modular/modform_hecketriangle/abstract_space.py +2528 -0
- sage/modular/modform_hecketriangle/all.py +30 -0
- sage/modular/modform_hecketriangle/analytic_type.py +590 -0
- sage/modular/modform_hecketriangle/constructor.py +416 -0
- sage/modular/modform_hecketriangle/element.py +351 -0
- sage/modular/modform_hecketriangle/functors.py +752 -0
- sage/modular/modform_hecketriangle/graded_ring.py +541 -0
- sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
- sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3352 -0
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1432 -0
- sage/modular/modform_hecketriangle/readme.py +1214 -0
- sage/modular/modform_hecketriangle/series_constructor.py +580 -0
- sage/modular/modform_hecketriangle/space.py +1037 -0
- sage/modular/modform_hecketriangle/subspace.py +423 -0
- sage/modular/modsym/all.py +17 -0
- sage/modular/modsym/ambient.py +3846 -0
- sage/modular/modsym/boundary.py +1420 -0
- sage/modular/modsym/element.py +336 -0
- sage/modular/modsym/g1list.py +178 -0
- sage/modular/modsym/ghlist.py +182 -0
- sage/modular/modsym/hecke_operator.py +73 -0
- sage/modular/modsym/manin_symbol.cpython-314-darwin.so +0 -0
- sage/modular/modsym/manin_symbol.pxd +5 -0
- sage/modular/modsym/manin_symbol.pyx +497 -0
- sage/modular/modsym/manin_symbol_list.py +1295 -0
- sage/modular/modsym/modsym.py +400 -0
- sage/modular/modsym/modular_symbols.py +384 -0
- sage/modular/modsym/p1list.cpython-314-darwin.so +0 -0
- sage/modular/modsym/p1list.pxd +29 -0
- sage/modular/modsym/p1list.pyx +1372 -0
- sage/modular/modsym/p1list_nf.py +1241 -0
- sage/modular/modsym/relation_matrix.py +591 -0
- sage/modular/modsym/relation_matrix_pyx.cpython-314-darwin.so +0 -0
- sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
- sage/modular/modsym/space.py +2468 -0
- sage/modular/modsym/subspace.py +455 -0
- sage/modular/modsym/tests.py +375 -0
- sage/modular/multiple_zeta.py +2632 -0
- sage/modular/multiple_zeta_F_algebra.py +786 -0
- sage/modular/overconvergent/all.py +6 -0
- sage/modular/overconvergent/genus0.py +1878 -0
- sage/modular/overconvergent/hecke_series.py +1187 -0
- sage/modular/overconvergent/weightspace.py +778 -0
- sage/modular/pollack_stevens/all.py +4 -0
- sage/modular/pollack_stevens/distributions.py +874 -0
- sage/modular/pollack_stevens/fund_domain.py +1572 -0
- sage/modular/pollack_stevens/manin_map.py +859 -0
- sage/modular/pollack_stevens/modsym.py +1593 -0
- sage/modular/pollack_stevens/padic_lseries.py +417 -0
- sage/modular/pollack_stevens/sigma0.py +534 -0
- sage/modular/pollack_stevens/space.py +1076 -0
- sage/modular/quasimodform/all.py +3 -0
- sage/modular/quasimodform/element.py +845 -0
- sage/modular/quasimodform/ring.py +828 -0
- sage/modular/quatalg/all.py +3 -0
- sage/modular/quatalg/brandt.py +1642 -0
- sage/modular/ssmod/all.py +8 -0
- sage/modular/ssmod/ssmod.py +827 -0
- sage/rings/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/binary_form_reduce.py +585 -0
- sage/schemes/all.py +41 -0
- sage/schemes/berkovich/all.py +6 -0
- sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
- sage/schemes/berkovich/berkovich_space.py +748 -0
- sage/schemes/curves/affine_curve.py +2928 -0
- sage/schemes/curves/all.py +33 -0
- sage/schemes/curves/closed_point.py +434 -0
- sage/schemes/curves/constructor.py +381 -0
- sage/schemes/curves/curve.py +542 -0
- sage/schemes/curves/plane_curve_arrangement.py +1283 -0
- sage/schemes/curves/point.py +463 -0
- sage/schemes/curves/projective_curve.py +3026 -0
- sage/schemes/curves/zariski_vankampen.py +1932 -0
- sage/schemes/cyclic_covers/all.py +2 -0
- sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
- sage/schemes/cyclic_covers/constructor.py +137 -0
- sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
- sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
- sage/schemes/elliptic_curves/BSD.py +1036 -0
- sage/schemes/elliptic_curves/Qcurves.py +592 -0
- sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
- sage/schemes/elliptic_curves/all.py +49 -0
- sage/schemes/elliptic_curves/cardinality.py +609 -0
- sage/schemes/elliptic_curves/cm.py +1102 -0
- sage/schemes/elliptic_curves/constructor.py +1552 -0
- sage/schemes/elliptic_curves/ec_database.py +175 -0
- sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
- sage/schemes/elliptic_curves/ell_egros.py +459 -0
- sage/schemes/elliptic_curves/ell_field.py +2836 -0
- sage/schemes/elliptic_curves/ell_finite_field.py +3359 -0
- sage/schemes/elliptic_curves/ell_generic.py +3760 -0
- sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
- sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
- sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
- sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
- sage/schemes/elliptic_curves/ell_point.py +4787 -0
- sage/schemes/elliptic_curves/ell_rational_field.py +7368 -0
- sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
- sage/schemes/elliptic_curves/ell_torsion.py +436 -0
- sage/schemes/elliptic_curves/ell_wp.py +352 -0
- sage/schemes/elliptic_curves/formal_group.py +760 -0
- sage/schemes/elliptic_curves/gal_reps.py +1459 -0
- sage/schemes/elliptic_curves/gal_reps_number_field.py +1669 -0
- sage/schemes/elliptic_curves/gp_simon.py +152 -0
- sage/schemes/elliptic_curves/heegner.py +7335 -0
- sage/schemes/elliptic_curves/height.py +2109 -0
- sage/schemes/elliptic_curves/hom.py +1406 -0
- sage/schemes/elliptic_curves/hom_composite.py +934 -0
- sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
- sage/schemes/elliptic_curves/hom_scalar.py +531 -0
- sage/schemes/elliptic_curves/hom_sum.py +682 -0
- sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
- sage/schemes/elliptic_curves/homset.py +271 -0
- sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
- sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
- sage/schemes/elliptic_curves/jacobian.py +237 -0
- sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
- sage/schemes/elliptic_curves/kraus.py +1014 -0
- sage/schemes/elliptic_curves/lseries_ell.py +943 -0
- sage/schemes/elliptic_curves/mod5family.py +105 -0
- sage/schemes/elliptic_curves/mod_poly.py +197 -0
- sage/schemes/elliptic_curves/mod_sym_num.cpython-314-darwin.so +0 -0
- sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
- sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
- sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
- sage/schemes/elliptic_curves/padics.py +1816 -0
- sage/schemes/elliptic_curves/period_lattice.py +2234 -0
- sage/schemes/elliptic_curves/period_lattice_region.cpython-314-darwin.so +0 -0
- sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
- sage/schemes/elliptic_curves/saturation.py +715 -0
- sage/schemes/elliptic_curves/sha_tate.py +1158 -0
- sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
- sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
- sage/schemes/hyperelliptic_curves/all.py +6 -0
- sage/schemes/hyperelliptic_curves/constructor.py +291 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
- sage/schemes/hyperelliptic_curves/invariants.py +410 -0
- sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
- sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
- sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
- sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
- sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
- sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
- sage/schemes/hyperelliptic_curves/mestre.py +302 -0
- sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
- sage/schemes/jacobians/abstract_jacobian.py +277 -0
- sage/schemes/jacobians/all.py +2 -0
- sage/schemes/overview.py +161 -0
- sage/schemes/plane_conics/all.py +22 -0
- sage/schemes/plane_conics/con_field.py +1296 -0
- sage/schemes/plane_conics/con_finite_field.py +158 -0
- sage/schemes/plane_conics/con_number_field.py +456 -0
- sage/schemes/plane_conics/con_rational_field.py +406 -0
- sage/schemes/plane_conics/con_rational_function_field.py +580 -0
- sage/schemes/plane_conics/constructor.py +249 -0
- sage/schemes/plane_quartics/all.py +2 -0
- sage/schemes/plane_quartics/quartic_constructor.py +71 -0
- sage/schemes/plane_quartics/quartic_generic.py +73 -0
- sage/schemes/riemann_surfaces/all.py +1 -0
- sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
- sage_wheels/share/cremona/cremona_mini.db +0 -0
- sage_wheels/share/ellcurves/rank0 +30427 -0
- sage_wheels/share/ellcurves/rank1 +31871 -0
- sage_wheels/share/ellcurves/rank10 +6 -0
- sage_wheels/share/ellcurves/rank11 +6 -0
- sage_wheels/share/ellcurves/rank12 +1 -0
- sage_wheels/share/ellcurves/rank14 +1 -0
- sage_wheels/share/ellcurves/rank15 +1 -0
- sage_wheels/share/ellcurves/rank17 +1 -0
- sage_wheels/share/ellcurves/rank19 +1 -0
- sage_wheels/share/ellcurves/rank2 +2388 -0
- sage_wheels/share/ellcurves/rank20 +1 -0
- sage_wheels/share/ellcurves/rank21 +1 -0
- sage_wheels/share/ellcurves/rank22 +1 -0
- sage_wheels/share/ellcurves/rank23 +1 -0
- sage_wheels/share/ellcurves/rank24 +1 -0
- sage_wheels/share/ellcurves/rank28 +1 -0
- sage_wheels/share/ellcurves/rank3 +836 -0
- sage_wheels/share/ellcurves/rank4 +10 -0
- sage_wheels/share/ellcurves/rank5 +5 -0
- sage_wheels/share/ellcurves/rank6 +5 -0
- sage_wheels/share/ellcurves/rank7 +5 -0
- sage_wheels/share/ellcurves/rank8 +6 -0
- sage_wheels/share/ellcurves/rank9 +7 -0
|
@@ -0,0 +1,1083 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
r"""
|
|
3
|
+
Dynamical systems on affine schemes
|
|
4
|
+
|
|
5
|
+
An endomorphism of an affine scheme or subscheme determined by polynomials
|
|
6
|
+
or rational functions.
|
|
7
|
+
|
|
8
|
+
The main constructor function is given by ``DynamicalSystem_affine``.
|
|
9
|
+
The constructor function can take polynomials, rational functions, or
|
|
10
|
+
morphisms from which to construct a dynamical system. If the domain is
|
|
11
|
+
not specified, it is constructed. However, if you plan on working with
|
|
12
|
+
points or subvarieties in the domain, it recommended to specify the
|
|
13
|
+
domain.
|
|
14
|
+
|
|
15
|
+
The initialization checks are always performed by the constructor functions.
|
|
16
|
+
It is possible, but not recommended, to skip these checks by calling the
|
|
17
|
+
class initialization directly.
|
|
18
|
+
|
|
19
|
+
AUTHORS:
|
|
20
|
+
|
|
21
|
+
- David Kohel, William Stein
|
|
22
|
+
|
|
23
|
+
- Volker Braun (2011-08-08): Renamed classes, more documentation, misc
|
|
24
|
+
cleanups.
|
|
25
|
+
|
|
26
|
+
- Ben Hutz (2017) relocate code and create new class
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
# ****************************************************************************
|
|
30
|
+
# Copyright (C) 2011 Volker Braun <vbraun.name@gmail.com>
|
|
31
|
+
# Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu.au>
|
|
32
|
+
# Copyright (C) 2006 William Stein <wstein@gmail.com>
|
|
33
|
+
#
|
|
34
|
+
# This program is free software: you can redistribute it and/or modify
|
|
35
|
+
# it under the terms of the GNU General Public License as published by
|
|
36
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
37
|
+
# (at your option) any later version.
|
|
38
|
+
# https://www.gnu.org/licenses/
|
|
39
|
+
# ****************************************************************************
|
|
40
|
+
|
|
41
|
+
from sage.categories.fields import Fields
|
|
42
|
+
from sage.dynamics.arithmetic_dynamics.generic_ds import DynamicalSystem
|
|
43
|
+
from sage.matrix.constructor import identity_matrix
|
|
44
|
+
from sage.misc.cachefunc import cached_method
|
|
45
|
+
from sage.misc.classcall_metaclass import typecall
|
|
46
|
+
from sage.rings.integer import Integer
|
|
47
|
+
from sage.rings.finite_rings.finite_field_base import FiniteField
|
|
48
|
+
from sage.rings.fraction_field import FractionField
|
|
49
|
+
from sage.rings.fraction_field import FractionField_generic
|
|
50
|
+
from sage.rings.quotient_ring import QuotientRing_nc
|
|
51
|
+
from sage.schemes.affine.affine_morphism import SchemeMorphism_polynomial_affine_space
|
|
52
|
+
from sage.schemes.affine.affine_morphism import SchemeMorphism_polynomial_affine_space_field
|
|
53
|
+
from sage.schemes.affine.affine_morphism import SchemeMorphism_polynomial_affine_space_finite_field
|
|
54
|
+
from sage.schemes.affine.affine_space import AffineSpace_generic
|
|
55
|
+
from sage.schemes.affine.affine_space import AffineSpace
|
|
56
|
+
from sage.schemes.affine.affine_subscheme import AlgebraicScheme_subscheme_affine
|
|
57
|
+
from sage.schemes.generic.morphism import SchemeMorphism_polynomial
|
|
58
|
+
from sage.structure.element import get_coercion_model
|
|
59
|
+
|
|
60
|
+
import sage.rings.abc
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class DynamicalSystem_affine(SchemeMorphism_polynomial_affine_space,
|
|
64
|
+
DynamicalSystem):
|
|
65
|
+
r"""
|
|
66
|
+
An endomorphism of affine schemes determined by rational functions.
|
|
67
|
+
|
|
68
|
+
.. WARNING::
|
|
69
|
+
|
|
70
|
+
You should not create objects of this class directly because
|
|
71
|
+
no type or consistency checking is performed. The preferred
|
|
72
|
+
method to construct such dynamical systems is to use
|
|
73
|
+
:func:`~sage.dynamics.arithmetic_dynamics.generic_ds.DynamicalSystem_affine`
|
|
74
|
+
function.
|
|
75
|
+
|
|
76
|
+
INPUT:
|
|
77
|
+
|
|
78
|
+
- ``morphism_or_polys`` -- a SchemeMorphism, a polynomial, a
|
|
79
|
+
rational function, or a list or tuple of polynomials or rational
|
|
80
|
+
functions
|
|
81
|
+
|
|
82
|
+
- ``domain`` -- (optional) affine space or subscheme of such;
|
|
83
|
+
the following combinations of ``morphism_or_polys`` and
|
|
84
|
+
``domain`` are meaningful:
|
|
85
|
+
|
|
86
|
+
* ``morphism_or_polys`` is a SchemeMorphism; ``domain`` is
|
|
87
|
+
ignored in this case
|
|
88
|
+
|
|
89
|
+
* ``morphism_or_polys`` is a list of polynomials or rational
|
|
90
|
+
functions that define a rational endomorphism of ``domain``
|
|
91
|
+
|
|
92
|
+
* ``morphism_or_polys`` is a list of polynomials or rational
|
|
93
|
+
functions and ``domain`` is unspecified; ``domain`` is then
|
|
94
|
+
taken to be the affine space of appropriate dimension over the
|
|
95
|
+
common base ring, if one exists, of the elements of ``morphism_or_polys``
|
|
96
|
+
|
|
97
|
+
* ``morphism_or_polys`` is a single polynomial or rational
|
|
98
|
+
function; ``domain`` is ignored and assumed to be the
|
|
99
|
+
1-dimensional affine space over the base ring of
|
|
100
|
+
``morphism_or_polys``
|
|
101
|
+
|
|
102
|
+
OUTPUT: :class:`DynamicalSystem_affine`
|
|
103
|
+
|
|
104
|
+
EXAMPLES::
|
|
105
|
+
|
|
106
|
+
sage: A3.<x,y,z> = AffineSpace(QQ, 3)
|
|
107
|
+
sage: DynamicalSystem_affine([x, y, 1])
|
|
108
|
+
Dynamical System of Affine Space of dimension 3 over Rational Field
|
|
109
|
+
Defn: Defined on coordinates by sending (x, y, z) to
|
|
110
|
+
(x, y, 1)
|
|
111
|
+
|
|
112
|
+
::
|
|
113
|
+
|
|
114
|
+
sage: R.<x,y> = QQ[]
|
|
115
|
+
sage: DynamicalSystem_affine([x/y, y^2 + 1])
|
|
116
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
117
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
118
|
+
(x/y, y^2 + 1)
|
|
119
|
+
|
|
120
|
+
::
|
|
121
|
+
|
|
122
|
+
sage: R.<t> = ZZ[]
|
|
123
|
+
sage: DynamicalSystem_affine(t^2 - 1)
|
|
124
|
+
Dynamical System of Affine Space of dimension 1 over Integer Ring
|
|
125
|
+
Defn: Defined on coordinates by sending (t) to
|
|
126
|
+
(t^2 - 1)
|
|
127
|
+
|
|
128
|
+
::
|
|
129
|
+
|
|
130
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
131
|
+
sage: X = A.subscheme([x-y^2])
|
|
132
|
+
sage: DynamicalSystem_affine([9/4*x^2, 3/2*y], domain=X)
|
|
133
|
+
Dynamical System of Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
134
|
+
-y^2 + x
|
|
135
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
136
|
+
(9/4*x^2, 3/2*y)
|
|
137
|
+
|
|
138
|
+
::
|
|
139
|
+
|
|
140
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
141
|
+
sage: H = End(A)
|
|
142
|
+
sage: f = H([x^2, y^2])
|
|
143
|
+
sage: DynamicalSystem_affine(f)
|
|
144
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
145
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
146
|
+
(x^2, y^2)
|
|
147
|
+
|
|
148
|
+
Notice that `ZZ` becomes `QQ` since the function is rational::
|
|
149
|
+
|
|
150
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
151
|
+
sage: DynamicalSystem_affine([3*x^2/(5*y), y^2/(2*x^2)])
|
|
152
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
153
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
154
|
+
(3*x^2/(5*y), y^2/(2*x^2))
|
|
155
|
+
|
|
156
|
+
::
|
|
157
|
+
|
|
158
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
159
|
+
sage: DynamicalSystem_affine([3/2*x^2, y^2])
|
|
160
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
161
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
162
|
+
(3/2*x^2, y^2)
|
|
163
|
+
|
|
164
|
+
If you pass in quotient ring elements, they are reduced::
|
|
165
|
+
|
|
166
|
+
sage: # needs sage.libs.singular
|
|
167
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
168
|
+
sage: X = A.subscheme([x - y])
|
|
169
|
+
sage: u,v,w = X.coordinate_ring().gens()
|
|
170
|
+
sage: DynamicalSystem_affine([u, v, u+v], domain=X)
|
|
171
|
+
Dynamical System of Closed subscheme of Affine Space of dimension 3
|
|
172
|
+
over Rational Field defined by:
|
|
173
|
+
x - y
|
|
174
|
+
Defn: Defined on coordinates by sending (x, y, z) to
|
|
175
|
+
(y, y, 2*y)
|
|
176
|
+
|
|
177
|
+
::
|
|
178
|
+
|
|
179
|
+
sage: # needs sage.libs.singular
|
|
180
|
+
sage: R.<t> = PolynomialRing(QQ)
|
|
181
|
+
sage: A.<x,y,z> = AffineSpace(R, 3)
|
|
182
|
+
sage: X = A.subscheme(x^2 - y^2)
|
|
183
|
+
sage: H = End(X)
|
|
184
|
+
sage: f = H([x^2/(t*y), t*y^2, x*z])
|
|
185
|
+
sage: DynamicalSystem_affine(f)
|
|
186
|
+
Dynamical System of Closed subscheme of Affine Space of dimension 3
|
|
187
|
+
over Univariate Polynomial Ring in t over Rational Field defined by:
|
|
188
|
+
x^2 - y^2
|
|
189
|
+
Defn: Defined on coordinates by sending (x, y, z) to
|
|
190
|
+
(x^2/(t*y), t*y^2, x*z)
|
|
191
|
+
|
|
192
|
+
::
|
|
193
|
+
|
|
194
|
+
sage: x = var('x') # needs sage.symbolic
|
|
195
|
+
sage: DynamicalSystem_affine(x^2 + 1) # needs sage.symbolic
|
|
196
|
+
Traceback (most recent call last):
|
|
197
|
+
...
|
|
198
|
+
TypeError: symbolic ring cannot be the base ring
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
@staticmethod
|
|
202
|
+
def __classcall_private__(cls, morphism_or_polys, domain=None):
|
|
203
|
+
r"""
|
|
204
|
+
Return the appropriate dynamical system on an affine scheme.
|
|
205
|
+
|
|
206
|
+
TESTS::
|
|
207
|
+
|
|
208
|
+
sage: A.<x> = AffineSpace(ZZ,1)
|
|
209
|
+
sage: A1.<z> = AffineSpace(CC,1)
|
|
210
|
+
sage: H = End(A1)
|
|
211
|
+
sage: f2 = H([z^2+1])
|
|
212
|
+
sage: f = DynamicalSystem_affine(f2, A)
|
|
213
|
+
sage: f.domain() is A
|
|
214
|
+
False
|
|
215
|
+
|
|
216
|
+
::
|
|
217
|
+
|
|
218
|
+
sage: P1.<x,y> = ProjectiveSpace(QQ,1)
|
|
219
|
+
sage: DynamicalSystem_affine([y, 2*x], domain=P1)
|
|
220
|
+
Traceback (most recent call last):
|
|
221
|
+
...
|
|
222
|
+
ValueError: "domain" must be an affine scheme
|
|
223
|
+
sage: H = End(P1)
|
|
224
|
+
sage: DynamicalSystem_affine(H([y, 2*x]))
|
|
225
|
+
Traceback (most recent call last):
|
|
226
|
+
...
|
|
227
|
+
ValueError: "domain" must be an affine scheme
|
|
228
|
+
|
|
229
|
+
::
|
|
230
|
+
|
|
231
|
+
sage: R.<x,y,z> = QQ[]
|
|
232
|
+
sage: f = DynamicalSystem_affine([x+y+z, y*z])
|
|
233
|
+
Traceback (most recent call last):
|
|
234
|
+
...
|
|
235
|
+
ValueError: number of polys does not match dimension of Affine Space of dimension 3 over Rational Field
|
|
236
|
+
|
|
237
|
+
::
|
|
238
|
+
|
|
239
|
+
sage: A.<x,y> = AffineSpace(QQ,2)
|
|
240
|
+
sage: f = DynamicalSystem_affine([CC.0*x^2, y^2], domain=A)
|
|
241
|
+
Traceback (most recent call last):
|
|
242
|
+
...
|
|
243
|
+
TypeError: coefficients of polynomial not in Rational Field
|
|
244
|
+
"""
|
|
245
|
+
if isinstance(morphism_or_polys, SchemeMorphism_polynomial):
|
|
246
|
+
morphism = morphism_or_polys
|
|
247
|
+
R = morphism.base_ring()
|
|
248
|
+
polys = list(morphism)
|
|
249
|
+
domain = morphism.domain()
|
|
250
|
+
if not isinstance(domain, AffineSpace_generic) and not isinstance(domain, AlgebraicScheme_subscheme_affine):
|
|
251
|
+
raise ValueError('"domain" must be an affine scheme')
|
|
252
|
+
if domain != morphism_or_polys.codomain():
|
|
253
|
+
raise ValueError('domain and codomain do not agree')
|
|
254
|
+
if R not in Fields():
|
|
255
|
+
return typecall(cls, polys, domain)
|
|
256
|
+
if isinstance(R, FiniteField):
|
|
257
|
+
return DynamicalSystem_affine_finite_field(polys, domain)
|
|
258
|
+
return DynamicalSystem_affine_field(polys, domain)
|
|
259
|
+
elif isinstance(morphism_or_polys, (list, tuple)):
|
|
260
|
+
polys = list(morphism_or_polys)
|
|
261
|
+
else:
|
|
262
|
+
polys = [morphism_or_polys]
|
|
263
|
+
|
|
264
|
+
PR = get_coercion_model().common_parent(*polys)
|
|
265
|
+
fraction_field = any(isinstance(poly.parent(), FractionField_generic) for poly in polys)
|
|
266
|
+
if fraction_field:
|
|
267
|
+
K = PR.base_ring().fraction_field()
|
|
268
|
+
# Replace base ring with its fraction field
|
|
269
|
+
PR = PR.ring().change_ring(K).fraction_field()
|
|
270
|
+
polys = [PR(poly) for poly in polys]
|
|
271
|
+
else:
|
|
272
|
+
quotient_ring = any(isinstance(poly.parent(), QuotientRing_nc) for poly in polys)
|
|
273
|
+
# If any of the list entries lies in a quotient ring, we try
|
|
274
|
+
# to lift all entries to a common polynomial ring.
|
|
275
|
+
if quotient_ring:
|
|
276
|
+
polys = [PR(poly).lift() for poly in polys]
|
|
277
|
+
else:
|
|
278
|
+
polys = [PR(poly) for poly in polys]
|
|
279
|
+
if domain is None:
|
|
280
|
+
if isinstance(PR, sage.rings.abc.SymbolicRing):
|
|
281
|
+
raise TypeError("symbolic ring cannot be the base ring")
|
|
282
|
+
if fraction_field:
|
|
283
|
+
PR = PR.ring()
|
|
284
|
+
domain = AffineSpace(PR)
|
|
285
|
+
else:
|
|
286
|
+
# Check if we can coerce the given polynomials over the given domain
|
|
287
|
+
PR = domain.ambient_space().coordinate_ring()
|
|
288
|
+
try:
|
|
289
|
+
if fraction_field:
|
|
290
|
+
PR = PR.fraction_field()
|
|
291
|
+
polys = [PR(poly) for poly in polys]
|
|
292
|
+
except TypeError:
|
|
293
|
+
raise TypeError('coefficients of polynomial not in {}'.format(domain.base_ring()))
|
|
294
|
+
if len(polys) != domain.ambient_space().coordinate_ring().ngens():
|
|
295
|
+
raise ValueError(f'number of polys does not match dimension of {domain}')
|
|
296
|
+
R = domain.base_ring()
|
|
297
|
+
if isinstance(R, sage.rings.abc.SymbolicRing):
|
|
298
|
+
raise TypeError("symbolic ring cannot be the base ring")
|
|
299
|
+
if not isinstance(domain, AffineSpace_generic) and not isinstance(domain, AlgebraicScheme_subscheme_affine):
|
|
300
|
+
raise ValueError('"domain" must be an affine scheme')
|
|
301
|
+
|
|
302
|
+
if R not in Fields():
|
|
303
|
+
return typecall(cls, polys, domain)
|
|
304
|
+
if isinstance(R, FiniteField):
|
|
305
|
+
return DynamicalSystem_affine_finite_field(polys, domain)
|
|
306
|
+
return DynamicalSystem_affine_field(polys, domain)
|
|
307
|
+
|
|
308
|
+
def __init__(self, polys_or_rat_fncts, domain):
|
|
309
|
+
r"""
|
|
310
|
+
The Python constructor.
|
|
311
|
+
|
|
312
|
+
See :class:`DynamicalSystem` for details.
|
|
313
|
+
|
|
314
|
+
EXAMPLES::
|
|
315
|
+
|
|
316
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
317
|
+
sage: DynamicalSystem_affine([3/5*x^2, y^2/(2*x^2)], domain=A)
|
|
318
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
319
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
320
|
+
(3/5*x^2, y^2/(2*x^2))
|
|
321
|
+
"""
|
|
322
|
+
L = polys_or_rat_fncts
|
|
323
|
+
# Next attribute needed for _fast_eval and _fastpolys
|
|
324
|
+
R = L[0].base_ring()
|
|
325
|
+
self._is_prime_finite_field = isinstance(R, FiniteField) and R.degree() == 1
|
|
326
|
+
DynamicalSystem.__init__(self, L, domain)
|
|
327
|
+
|
|
328
|
+
def __copy__(self):
|
|
329
|
+
r"""
|
|
330
|
+
Return a copy of this dynamical system.
|
|
331
|
+
|
|
332
|
+
OUTPUT: :class:`DynamicalSystem_affine`
|
|
333
|
+
|
|
334
|
+
EXAMPLES::
|
|
335
|
+
|
|
336
|
+
sage: A.<x,y> = AffineSpace(QQ,2)
|
|
337
|
+
sage: f = DynamicalSystem_affine([3/5*x^2,6*y^2])
|
|
338
|
+
sage: g = copy(f)
|
|
339
|
+
sage: f == g
|
|
340
|
+
True
|
|
341
|
+
sage: f is g
|
|
342
|
+
False
|
|
343
|
+
"""
|
|
344
|
+
return DynamicalSystem_affine(self._polys, self.domain())
|
|
345
|
+
|
|
346
|
+
def homogenize(self, n):
|
|
347
|
+
r"""
|
|
348
|
+
Return the homogenization of this dynamical system.
|
|
349
|
+
|
|
350
|
+
If its domain is a subscheme, the domain of the homogenized map
|
|
351
|
+
is the projective embedding of the domain. The domain and codomain
|
|
352
|
+
can be homogenized at different coordinates: ``n[0]`` for the
|
|
353
|
+
domain and ``n[1]`` for the codomain.
|
|
354
|
+
|
|
355
|
+
INPUT:
|
|
356
|
+
|
|
357
|
+
- ``n`` -- tuple of nonnegative integers; if `n` is an integer,
|
|
358
|
+
then the two values of the tuple are assumed to be the same
|
|
359
|
+
|
|
360
|
+
OUTPUT: :class:`DynamicalSystem_projective`
|
|
361
|
+
|
|
362
|
+
EXAMPLES::
|
|
363
|
+
|
|
364
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
365
|
+
sage: f = DynamicalSystem_affine([(x^2-2)/x^5, y^2])
|
|
366
|
+
sage: f.homogenize(2)
|
|
367
|
+
Dynamical System of Projective Space of dimension 2 over Rational Field
|
|
368
|
+
Defn: Defined on coordinates by sending (x0 : x1 : x2) to
|
|
369
|
+
(x0^2*x2^5 - 2*x2^7 : x0^5*x1^2 : x0^5*x2^2)
|
|
370
|
+
|
|
371
|
+
::
|
|
372
|
+
|
|
373
|
+
sage: A.<x,y> = AffineSpace(CC, 2)
|
|
374
|
+
sage: f = DynamicalSystem_affine([(x^2-2)/(x*y), y^2-x])
|
|
375
|
+
sage: f.homogenize((2, 0))
|
|
376
|
+
Dynamical System of Projective Space of dimension 2 over Complex Field with 53 bits of precision
|
|
377
|
+
Defn: Defined on coordinates by sending (x0 : x1 : x2) to
|
|
378
|
+
(x0*x1*x2^2 : x0^2*x2^2 + (-2.00000000000000)*x2^4 : x0*x1^3 - x0^2*x1*x2)
|
|
379
|
+
|
|
380
|
+
::
|
|
381
|
+
|
|
382
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
383
|
+
sage: X = A.subscheme([x-y^2])
|
|
384
|
+
sage: f = DynamicalSystem_affine([9*y^2, 3*y], domain=X)
|
|
385
|
+
sage: f.homogenize(2)
|
|
386
|
+
Dynamical System of Closed subscheme of Projective Space
|
|
387
|
+
of dimension 2 over Integer Ring defined by:
|
|
388
|
+
x1^2 - x0*x2
|
|
389
|
+
Defn: Defined on coordinates by sending (x0 : x1 : x2) to
|
|
390
|
+
(9*x1^2 : 3*x1*x2 : x2^2)
|
|
391
|
+
|
|
392
|
+
::
|
|
393
|
+
|
|
394
|
+
sage: A.<x> = AffineSpace(QQ, 1)
|
|
395
|
+
sage: f = DynamicalSystem_affine([x^2-1])
|
|
396
|
+
sage: f.homogenize((1, 0))
|
|
397
|
+
Dynamical System of Projective Space of dimension 1 over Rational Field
|
|
398
|
+
Defn: Defined on coordinates by sending (x0 : x1) to
|
|
399
|
+
(x1^2 : x0^2 - x1^2)
|
|
400
|
+
|
|
401
|
+
::
|
|
402
|
+
|
|
403
|
+
sage: # needs sage.rings.number_field
|
|
404
|
+
sage: R.<a> = PolynomialRing(QQbar)
|
|
405
|
+
sage: A.<x,y> = AffineSpace(R, 2)
|
|
406
|
+
sage: f = DynamicalSystem_affine([QQbar(sqrt(2))*x*y, a*x^2]) # needs sage.symbolic
|
|
407
|
+
sage: f.homogenize(2) # needs sage.symbolic
|
|
408
|
+
Dynamical System of Projective Space of dimension 2 over Univariate
|
|
409
|
+
Polynomial Ring in a over Algebraic Field
|
|
410
|
+
Defn: Defined on coordinates by sending (x0 : x1 : x2) to
|
|
411
|
+
(1.414213562373095?*x0*x1 : a*x0^2 : x2^2)
|
|
412
|
+
|
|
413
|
+
::
|
|
414
|
+
|
|
415
|
+
sage: P.<x,y,z> = AffineSpace(QQ, 3)
|
|
416
|
+
sage: f = DynamicalSystem_affine([x^2 - 2*x*y + z*x, z^2 -y^2 , 5*z*y])
|
|
417
|
+
sage: f.homogenize(2).dehomogenize(2) == f
|
|
418
|
+
True
|
|
419
|
+
"""
|
|
420
|
+
F = self.as_scheme_morphism().homogenize(n)
|
|
421
|
+
return F.as_dynamical_system()
|
|
422
|
+
|
|
423
|
+
def dynatomic_polynomial(self, period):
|
|
424
|
+
r"""
|
|
425
|
+
Compute the (affine) dynatomic polynomial of a dynamical system
|
|
426
|
+
`f: \mathbb{A}^1 \to \mathbb{A}^1`.
|
|
427
|
+
|
|
428
|
+
The dynatomic polynomial is the analog of the cyclotomic polynomial
|
|
429
|
+
and its roots are the points of formal period `n`.
|
|
430
|
+
|
|
431
|
+
ALGORITHM:
|
|
432
|
+
|
|
433
|
+
Homogenize to a map `f: \mathbb{P}^1 \to \mathbb{P}^1` and compute
|
|
434
|
+
the dynatomic polynomial there. Then, dehomogenize.
|
|
435
|
+
|
|
436
|
+
INPUT:
|
|
437
|
+
|
|
438
|
+
- ``period`` -- positive integer or a list/tuple `[m,n]`,
|
|
439
|
+
where `m` is the preperiod and `n` is the period
|
|
440
|
+
|
|
441
|
+
OUTPUT:
|
|
442
|
+
|
|
443
|
+
If possible, a single variable polynomial in the coordinate ring
|
|
444
|
+
of the polynomial. Otherwise a fraction field element of the
|
|
445
|
+
coordinate ring of the polynomial.
|
|
446
|
+
|
|
447
|
+
EXAMPLES::
|
|
448
|
+
|
|
449
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
450
|
+
sage: f = DynamicalSystem_affine([x^2+y^2, y^2])
|
|
451
|
+
sage: f.dynatomic_polynomial(2)
|
|
452
|
+
Traceback (most recent call last):
|
|
453
|
+
...
|
|
454
|
+
TypeError: does not make sense in dimension >1
|
|
455
|
+
|
|
456
|
+
::
|
|
457
|
+
|
|
458
|
+
sage: A.<x> = AffineSpace(ZZ, 1)
|
|
459
|
+
sage: f = DynamicalSystem_affine([(x^2+1)/x])
|
|
460
|
+
sage: f.dynatomic_polynomial(4) # needs sage.libs.pari
|
|
461
|
+
2*x^12 + 18*x^10 + 57*x^8 + 79*x^6 + 48*x^4 + 12*x^2 + 1
|
|
462
|
+
|
|
463
|
+
::
|
|
464
|
+
|
|
465
|
+
sage: A.<x> = AffineSpace(CC, 1)
|
|
466
|
+
sage: f = DynamicalSystem_affine([(x^2+1)/(3*x)])
|
|
467
|
+
sage: f.dynatomic_polynomial(3)
|
|
468
|
+
13.0000000000000*x^6 + 117.000000000000*x^4 + 78.0000000000000*x^2 +
|
|
469
|
+
1.00000000000000
|
|
470
|
+
|
|
471
|
+
::
|
|
472
|
+
|
|
473
|
+
sage: A.<x> = AffineSpace(QQ, 1)
|
|
474
|
+
sage: f = DynamicalSystem_affine([x^2-10/9])
|
|
475
|
+
sage: f.dynatomic_polynomial([2, 1])
|
|
476
|
+
531441*x^4 - 649539*x^2 - 524880
|
|
477
|
+
|
|
478
|
+
::
|
|
479
|
+
|
|
480
|
+
sage: A.<x> = AffineSpace(CC, 1)
|
|
481
|
+
sage: f = DynamicalSystem_affine([x^2+CC.0])
|
|
482
|
+
sage: f.dynatomic_polynomial(2)
|
|
483
|
+
x^2 + x + 1.00000000000000 + 1.00000000000000*I
|
|
484
|
+
|
|
485
|
+
::
|
|
486
|
+
|
|
487
|
+
sage: K.<c> = FunctionField(QQ)
|
|
488
|
+
sage: A.<x> = AffineSpace(K, 1)
|
|
489
|
+
sage: f = DynamicalSystem_affine([x^2 + c])
|
|
490
|
+
sage: f.dynatomic_polynomial(4)
|
|
491
|
+
x^12 + 6*c*x^10 + x^9 + (15*c^2 + 3*c)*x^8 + 4*c*x^7 + (20*c^3 + 12*c^2 + 1)*x^6
|
|
492
|
+
+ (6*c^2 + 2*c)*x^5 + (15*c^4 + 18*c^3 + 3*c^2 + 4*c)*x^4 + (4*c^3 + 4*c^2 + 1)*x^3
|
|
493
|
+
+ (6*c^5 + 12*c^4 + 6*c^3 + 5*c^2 + c)*x^2 + (c^4 + 2*c^3 + c^2 + 2*c)*x
|
|
494
|
+
+ c^6 + 3*c^5 + 3*c^4 + 3*c^3 + 2*c^2 + 1
|
|
495
|
+
|
|
496
|
+
::
|
|
497
|
+
|
|
498
|
+
sage: A.<z> = AffineSpace(QQ, 1)
|
|
499
|
+
sage: f = DynamicalSystem_affine([z^2+3/z+1/7])
|
|
500
|
+
sage: f.dynatomic_polynomial(1).parent()
|
|
501
|
+
Multivariate Polynomial Ring in z over Rational Field
|
|
502
|
+
|
|
503
|
+
::
|
|
504
|
+
|
|
505
|
+
sage: R.<c> = QQ[]
|
|
506
|
+
sage: A.<z> = AffineSpace(R,1)
|
|
507
|
+
sage: f = DynamicalSystem_affine([z^2 + c])
|
|
508
|
+
sage: f.dynatomic_polynomial([1,1])
|
|
509
|
+
z^2 + z + c
|
|
510
|
+
|
|
511
|
+
::
|
|
512
|
+
|
|
513
|
+
sage: A.<x> = AffineSpace(CC,1)
|
|
514
|
+
sage: F = DynamicalSystem_affine([1/2*x^2 + CC(sqrt(3))]) # needs sage.symbolic
|
|
515
|
+
sage: F.dynatomic_polynomial([1,1]) # needs sage.symbolic
|
|
516
|
+
(0.125000000000000*x^4 + 0.366025403784439*x^2 + 1.50000000000000)/(0.500000000000000*x^2 - x + 1.73205080756888)
|
|
517
|
+
|
|
518
|
+
TESTS::
|
|
519
|
+
|
|
520
|
+
sage: R.<c> = QQ[]
|
|
521
|
+
sage: Pc.<x,y> = ProjectiveSpace(R, 1)
|
|
522
|
+
sage: G = DynamicalSystem_projective([(1/2*c + 1/2)*x^2 + (-2*c)*x*y + 2*c*y^2 , \
|
|
523
|
+
....: (1/4*c + 1/2)*x^2 + (-c - 1)*x*y + (c + 1)*y^2])
|
|
524
|
+
sage: G.dehomogenize(1).dynatomic_polynomial(2)
|
|
525
|
+
(1/4*c + 1/4)*x^2 + (-c - 1/2)*x + c + 1
|
|
526
|
+
"""
|
|
527
|
+
from sage.schemes.affine.affine_space import AffineSpace_generic
|
|
528
|
+
if not isinstance(self.domain(), AffineSpace_generic):
|
|
529
|
+
raise NotImplementedError("not implemented for subschemes")
|
|
530
|
+
if self.domain().dimension_relative() > 1:
|
|
531
|
+
raise TypeError("does not make sense in dimension >1")
|
|
532
|
+
G = self.homogenize(1)
|
|
533
|
+
F = G.dynatomic_polynomial(period)
|
|
534
|
+
T = G.domain().coordinate_ring()
|
|
535
|
+
S = self.domain().coordinate_ring()
|
|
536
|
+
if isinstance(F.parent(), sage.rings.abc.SymbolicRing):
|
|
537
|
+
from sage.symbolic.ring import var
|
|
538
|
+
u = var(self.domain().coordinate_ring().variable_name())
|
|
539
|
+
return F.subs({F.variables()[0]: u, F.variables()[1]: 1})
|
|
540
|
+
elif T(F.denominator()).degree() == 0:
|
|
541
|
+
R = F.parent()
|
|
542
|
+
phi = R.hom([S.gen(0), 1], S)
|
|
543
|
+
return phi(F)
|
|
544
|
+
else:
|
|
545
|
+
R = F.numerator().parent()
|
|
546
|
+
phi = R.hom([S.gen(0), 1], S)
|
|
547
|
+
return phi(F.numerator()) / phi(F.denominator())
|
|
548
|
+
|
|
549
|
+
def nth_iterate_map(self, n):
|
|
550
|
+
r"""
|
|
551
|
+
Return the `n`-th iterate of ``self``.
|
|
552
|
+
|
|
553
|
+
ALGORITHM:
|
|
554
|
+
|
|
555
|
+
Uses a form of successive squaring to reducing computations.
|
|
556
|
+
|
|
557
|
+
.. TODO::
|
|
558
|
+
|
|
559
|
+
This could be improved.
|
|
560
|
+
|
|
561
|
+
INPUT:
|
|
562
|
+
|
|
563
|
+
- ``n`` -- positive integer
|
|
564
|
+
|
|
565
|
+
OUTPUT: a dynamical system of affine space
|
|
566
|
+
|
|
567
|
+
EXAMPLES::
|
|
568
|
+
|
|
569
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
570
|
+
sage: f = DynamicalSystem_affine([(x^2-2)/(2*y), y^2-3*x])
|
|
571
|
+
sage: f.nth_iterate_map(2)
|
|
572
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
573
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
574
|
+
((x^4 - 4*x^2 - 8*y^2 + 4)/(8*y^4 - 24*x*y^2), (2*y^5 - 12*x*y^3
|
|
575
|
+
+ 18*x^2*y - 3*x^2 + 6)/(2*y))
|
|
576
|
+
|
|
577
|
+
::
|
|
578
|
+
|
|
579
|
+
sage: A.<x> = AffineSpace(QQ, 1)
|
|
580
|
+
sage: f = DynamicalSystem_affine([(3*x^2-2)/(x)])
|
|
581
|
+
sage: f.nth_iterate_map(3)
|
|
582
|
+
Dynamical System of Affine Space of dimension 1 over Rational Field
|
|
583
|
+
Defn: Defined on coordinates by sending (x) to
|
|
584
|
+
((2187*x^8 - 6174*x^6 + 6300*x^4 - 2744*x^2 + 432)/(81*x^7 -
|
|
585
|
+
168*x^5 + 112*x^3 - 24*x))
|
|
586
|
+
|
|
587
|
+
::
|
|
588
|
+
|
|
589
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
590
|
+
sage: X = A.subscheme([x-y^2])
|
|
591
|
+
sage: f = DynamicalSystem_affine([9*x^2, 3*y], domain=X)
|
|
592
|
+
sage: f.nth_iterate_map(2)
|
|
593
|
+
Dynamical System of Closed subscheme of Affine Space of dimension 2
|
|
594
|
+
over Integer Ring defined by:
|
|
595
|
+
-y^2 + x
|
|
596
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
597
|
+
(729*x^4, 9*y)
|
|
598
|
+
|
|
599
|
+
::
|
|
600
|
+
|
|
601
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
602
|
+
sage: f = DynamicalSystem_affine([3/5*x^2, y^2/(2*x^2)])
|
|
603
|
+
sage: f.nth_iterate_map(2)
|
|
604
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
605
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
606
|
+
(27/125*x^4, y^4/(72/25*x^8))
|
|
607
|
+
"""
|
|
608
|
+
F = list(self._polys)
|
|
609
|
+
R = F[0].parent()
|
|
610
|
+
Coord_ring = self.codomain().ambient_space().coordinate_ring()
|
|
611
|
+
D = Integer(n).digits(2)
|
|
612
|
+
PHI = list(Coord_ring.gens())
|
|
613
|
+
for i in range(len(D)):
|
|
614
|
+
for k in range(D[i]):
|
|
615
|
+
PHI = [poly(F) for poly in PHI]
|
|
616
|
+
if i != len(D) - 1: # avoid extra iterate
|
|
617
|
+
F = [R(poly(F)) for poly in F] # 'square'
|
|
618
|
+
return DynamicalSystem_affine(PHI, domain=self.domain())
|
|
619
|
+
|
|
620
|
+
def nth_iterate(self, P, n):
|
|
621
|
+
r"""
|
|
622
|
+
Return the `n`-th iterate of the point `P` by this dynamical system.
|
|
623
|
+
|
|
624
|
+
INPUT:
|
|
625
|
+
|
|
626
|
+
- ``P`` -- a point in the map's domain
|
|
627
|
+
|
|
628
|
+
- ``n`` -- positive integer
|
|
629
|
+
|
|
630
|
+
OUTPUT: a point in the map's codomain
|
|
631
|
+
|
|
632
|
+
EXAMPLES::
|
|
633
|
+
|
|
634
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
635
|
+
sage: f = DynamicalSystem_affine([(x-2*y^2)/x, 3*x*y])
|
|
636
|
+
sage: f.nth_iterate(A(9, 3), 3)
|
|
637
|
+
(-104975/13123, -9566667)
|
|
638
|
+
|
|
639
|
+
::
|
|
640
|
+
|
|
641
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
642
|
+
sage: X = A.subscheme([x-y^2])
|
|
643
|
+
sage: f = DynamicalSystem_affine([9*y^2, 3*y], domain=X)
|
|
644
|
+
sage: f.nth_iterate(X(9, 3), 4)
|
|
645
|
+
(59049, 243)
|
|
646
|
+
|
|
647
|
+
::
|
|
648
|
+
|
|
649
|
+
sage: R.<t> = PolynomialRing(QQ)
|
|
650
|
+
sage: A.<x,y> = AffineSpace(FractionField(R), 2)
|
|
651
|
+
sage: f = DynamicalSystem_affine([(x-t*y^2)/x, t*x*y])
|
|
652
|
+
sage: f.nth_iterate(A(1, t), 3)
|
|
653
|
+
((-t^16 + 3*t^13 - 3*t^10 + t^7 + t^5 + t^3 - 1)/(t^5 + t^3 - 1), -t^9 - t^7 + t^4)
|
|
654
|
+
|
|
655
|
+
::
|
|
656
|
+
|
|
657
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
658
|
+
sage: X = A.subscheme([x^2-y^2])
|
|
659
|
+
sage: f = DynamicalSystem_affine([x^2, y^2, x+y], domain=X)
|
|
660
|
+
sage: f.nth_iterate_map(2)
|
|
661
|
+
Dynamical System of Closed subscheme of Affine Space of dimension 3 over Rational Field defined by:
|
|
662
|
+
x^2 - y^2
|
|
663
|
+
Defn: Defined on coordinates by sending (x, y, z) to
|
|
664
|
+
(x^4, y^4, x^2 + y^2)
|
|
665
|
+
"""
|
|
666
|
+
n = int(n)
|
|
667
|
+
if n == 0:
|
|
668
|
+
return P
|
|
669
|
+
Q = P
|
|
670
|
+
for i in range(n):
|
|
671
|
+
Q = self(Q)
|
|
672
|
+
return Q
|
|
673
|
+
|
|
674
|
+
def orbit(self, P, n):
|
|
675
|
+
r"""
|
|
676
|
+
Return the orbit of `P` by the dynamical system.
|
|
677
|
+
|
|
678
|
+
Let `F` be this dynamical system. If `n` is an integer
|
|
679
|
+
return `[P, F(P), \ldots, F^n(P)]`. If `n` is a list or
|
|
680
|
+
tuple `n = [m,k]` return `[F^m(P), \ldots, F^k(P)]`.
|
|
681
|
+
|
|
682
|
+
INPUT:
|
|
683
|
+
|
|
684
|
+
- ``P`` -- a point in the map's domain
|
|
685
|
+
|
|
686
|
+
- ``n`` -- nonnegative integer or list or tuple of
|
|
687
|
+
two nonnegative integers
|
|
688
|
+
|
|
689
|
+
OUTPUT: list of points in the map's codomain
|
|
690
|
+
|
|
691
|
+
EXAMPLES::
|
|
692
|
+
|
|
693
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
694
|
+
sage: f = DynamicalSystem_affine([(x-2*y^2)/x, 3*x*y])
|
|
695
|
+
sage: f.orbit(A(9, 3), 3)
|
|
696
|
+
[(9, 3), (-1, 81), (13123, -243), (-104975/13123, -9566667)]
|
|
697
|
+
|
|
698
|
+
::
|
|
699
|
+
|
|
700
|
+
sage: A.<x> = AffineSpace(QQ, 1)
|
|
701
|
+
sage: f = DynamicalSystem_affine([(x-2)/x])
|
|
702
|
+
sage: f.orbit(A(1/2), [1, 3])
|
|
703
|
+
[(-3), (5/3), (-1/5)]
|
|
704
|
+
|
|
705
|
+
::
|
|
706
|
+
|
|
707
|
+
sage: A.<x,y> = AffineSpace(ZZ, 2)
|
|
708
|
+
sage: X = A.subscheme([x-y^2])
|
|
709
|
+
sage: f = DynamicalSystem_affine([9*y^2, 3*y], domain=X)
|
|
710
|
+
sage: f.orbit(X(9, 3), (0, 4))
|
|
711
|
+
[(9, 3), (81, 9), (729, 27), (6561, 81), (59049, 243)]
|
|
712
|
+
|
|
713
|
+
::
|
|
714
|
+
|
|
715
|
+
sage: R.<t> = PolynomialRing(QQ)
|
|
716
|
+
sage: A.<x,y> = AffineSpace(FractionField(R), 2)
|
|
717
|
+
sage: f = DynamicalSystem_affine([(x-t*y^2)/x, t*x*y])
|
|
718
|
+
sage: f.orbit(A(1, t), 3)
|
|
719
|
+
[(1, t),
|
|
720
|
+
(-t^3 + 1, t^2),
|
|
721
|
+
((t^5 + t^3 - 1)/(t^3 - 1), -t^6 + t^3),
|
|
722
|
+
((-t^16 + 3*t^13 - 3*t^10 + t^7 + t^5 + t^3 - 1)/(t^5 + t^3 - 1), -t^9 - t^7 + t^4)]
|
|
723
|
+
"""
|
|
724
|
+
Q = P
|
|
725
|
+
if isinstance(n, (list, tuple)):
|
|
726
|
+
bounds = list(n)
|
|
727
|
+
else:
|
|
728
|
+
bounds = [0, n]
|
|
729
|
+
for i in range(1, bounds[0] + 1):
|
|
730
|
+
Q = self(Q)
|
|
731
|
+
orb = [Q]
|
|
732
|
+
for i in range(bounds[0] + 1, bounds[1] + 1):
|
|
733
|
+
Q = self(Q)
|
|
734
|
+
orb.append(Q)
|
|
735
|
+
return orb
|
|
736
|
+
|
|
737
|
+
def multiplier(self, P, n, check=True):
|
|
738
|
+
r"""
|
|
739
|
+
Return the multiplier of the point `P` of period `n` by this
|
|
740
|
+
dynamical system.
|
|
741
|
+
|
|
742
|
+
INPUT:
|
|
743
|
+
|
|
744
|
+
- ``P`` -- a point on domain of the map
|
|
745
|
+
|
|
746
|
+
- ``n`` -- positive integer, the period of `P`
|
|
747
|
+
|
|
748
|
+
- ``check`` -- boolean (default: ``True``); verify that `P`
|
|
749
|
+
has period `n`
|
|
750
|
+
|
|
751
|
+
OUTPUT: a square matrix of size ``self.codomain().dimension_relative()``
|
|
752
|
+
in the ``base_ring`` of the map
|
|
753
|
+
|
|
754
|
+
EXAMPLES::
|
|
755
|
+
|
|
756
|
+
sage: P.<x,y> = AffineSpace(QQ, 2)
|
|
757
|
+
sage: f = DynamicalSystem_affine([x^2, y^2])
|
|
758
|
+
sage: f.multiplier(P([1, 1]), 1)
|
|
759
|
+
[2 0]
|
|
760
|
+
[0 2]
|
|
761
|
+
|
|
762
|
+
::
|
|
763
|
+
|
|
764
|
+
sage: P.<x,y,z> = AffineSpace(QQ, 3)
|
|
765
|
+
sage: f = DynamicalSystem_affine([x, y^2, z^2 - y])
|
|
766
|
+
sage: f.multiplier(P([1/2, 1, 0]), 2)
|
|
767
|
+
[1 0 0]
|
|
768
|
+
[0 4 0]
|
|
769
|
+
[0 0 0]
|
|
770
|
+
|
|
771
|
+
::
|
|
772
|
+
|
|
773
|
+
sage: P.<x> = AffineSpace(CC, 1)
|
|
774
|
+
sage: f = DynamicalSystem_affine([x^2 + 1/2])
|
|
775
|
+
sage: f.multiplier(P([0.5 + 0.5*I]), 1) # needs sage.symbolic
|
|
776
|
+
[1.00000000000000 + 1.00000000000000*I]
|
|
777
|
+
|
|
778
|
+
::
|
|
779
|
+
|
|
780
|
+
sage: R.<t> = PolynomialRing(CC, 1)
|
|
781
|
+
sage: P.<x> = AffineSpace(R, 1)
|
|
782
|
+
sage: f = DynamicalSystem_affine([x^2 - t^2 + t])
|
|
783
|
+
sage: f.multiplier(P([-t + 1]), 1)
|
|
784
|
+
[(-2.00000000000000)*t + 2.00000000000000]
|
|
785
|
+
|
|
786
|
+
::
|
|
787
|
+
|
|
788
|
+
sage: P.<x,y> = AffineSpace(QQ, 2)
|
|
789
|
+
sage: X = P.subscheme([x^2 - y^2])
|
|
790
|
+
sage: f = DynamicalSystem_affine([x^2, y^2], domain=X)
|
|
791
|
+
sage: f.multiplier(X([1, 1]), 1)
|
|
792
|
+
[2 0]
|
|
793
|
+
[0 2]
|
|
794
|
+
"""
|
|
795
|
+
if check:
|
|
796
|
+
if self.nth_iterate(P, n) != P:
|
|
797
|
+
raise ValueError("%s is not periodic of period %s" % (P, n))
|
|
798
|
+
if n < 1:
|
|
799
|
+
raise ValueError("period must be a positive integer")
|
|
800
|
+
N = self.domain().ambient_space().dimension_relative()
|
|
801
|
+
l = identity_matrix(FractionField(self.codomain().base_ring()), N, N)
|
|
802
|
+
Q = P
|
|
803
|
+
J = self.jacobian()
|
|
804
|
+
for i in range(n):
|
|
805
|
+
R = self(Q)
|
|
806
|
+
l = J(tuple(Q)) * l # chain rule matrix multiplication
|
|
807
|
+
Q = R
|
|
808
|
+
return l
|
|
809
|
+
|
|
810
|
+
def conjugate(self, M):
|
|
811
|
+
r"""
|
|
812
|
+
Conjugate this dynamical system by ``M``, i.e. `M^{-1} \circ f \circ M`.
|
|
813
|
+
|
|
814
|
+
If possible the new map will be defined over the same space.
|
|
815
|
+
Otherwise, will try to coerce to the base ring of ``M``.
|
|
816
|
+
|
|
817
|
+
INPUT:
|
|
818
|
+
|
|
819
|
+
- ``M`` -- a square invertible matrix
|
|
820
|
+
|
|
821
|
+
OUTPUT: an affine dynamical system
|
|
822
|
+
|
|
823
|
+
EXAMPLES::
|
|
824
|
+
|
|
825
|
+
sage: A.<t> = AffineSpace(QQ, 1)
|
|
826
|
+
sage: f = DynamicalSystem_affine([t^2 + 1])
|
|
827
|
+
sage: f.conjugate(matrix([[1,2], [0,1]]))
|
|
828
|
+
Dynamical System of Affine Space of dimension 1 over Rational Field
|
|
829
|
+
Defn: Defined on coordinates by sending (t) to
|
|
830
|
+
(t^2 + 4*t + 3)
|
|
831
|
+
|
|
832
|
+
::
|
|
833
|
+
|
|
834
|
+
sage: A.<x,y> = AffineSpace(ZZ,2)
|
|
835
|
+
sage: f = DynamicalSystem_affine([x^3 + y^3, y^2])
|
|
836
|
+
sage: f.conjugate(matrix([[1,2,3], [0,1,2], [0,0,1]]))
|
|
837
|
+
Dynamical System of Affine Space of dimension 2 over Integer Ring
|
|
838
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
839
|
+
(x^3 + 6*x^2*y + 12*x*y^2 + 9*y^3
|
|
840
|
+
+ 9*x^2 + 36*x*y + 40*y^2 + 27*x + 58*y + 28, y^2 + 4*y + 2)
|
|
841
|
+
|
|
842
|
+
::
|
|
843
|
+
|
|
844
|
+
sage: # needs sage.rings.number_field
|
|
845
|
+
sage: R.<x> = PolynomialRing(QQ)
|
|
846
|
+
sage: K.<i> = NumberField(x^2 + 1)
|
|
847
|
+
sage: A.<x> = AffineSpace(ZZ,1)
|
|
848
|
+
sage: f = DynamicalSystem_affine([x^3 + 2*x^2 + 3])
|
|
849
|
+
sage: f.conjugate(matrix([[i,i], [0,-i]]))
|
|
850
|
+
Dynamical System of Affine Space of dimension 1 over Integer Ring
|
|
851
|
+
Defn: Defined on coordinates by sending (x) to
|
|
852
|
+
(x^3 + x^2 - x - 5)
|
|
853
|
+
"""
|
|
854
|
+
d = self.codomain().ngens()
|
|
855
|
+
f = self.homogenize(d).conjugate(M)
|
|
856
|
+
return f.dehomogenize(d)
|
|
857
|
+
|
|
858
|
+
def degree(self):
|
|
859
|
+
r"""
|
|
860
|
+
Return the degree of the affine dynamical system.
|
|
861
|
+
|
|
862
|
+
EXAMPLES::
|
|
863
|
+
|
|
864
|
+
sage: # needs sage.rings.number_field
|
|
865
|
+
sage: R.<c> = QuadraticField(7)
|
|
866
|
+
sage: A.<x,y,z> = AffineSpace(R, 3)
|
|
867
|
+
sage: f = DynamicalSystem_affine([x^2 + y^5 + c, x^11, z^19])
|
|
868
|
+
sage: f.degree()
|
|
869
|
+
19
|
|
870
|
+
|
|
871
|
+
::
|
|
872
|
+
|
|
873
|
+
sage: R.<c> = QQ[]
|
|
874
|
+
sage: A.<x> = AffineSpace(R, 1)
|
|
875
|
+
sage: f = DynamicalSystem_affine([x^4])
|
|
876
|
+
sage: f.degree()
|
|
877
|
+
4
|
|
878
|
+
|
|
879
|
+
::
|
|
880
|
+
|
|
881
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
882
|
+
sage: f = DynamicalSystem_affine([x, y/(1 + x^2)])
|
|
883
|
+
sage: f.degree()
|
|
884
|
+
2
|
|
885
|
+
"""
|
|
886
|
+
return self.as_scheme_morphism().degree()
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
class DynamicalSystem_affine_field(DynamicalSystem_affine,
|
|
890
|
+
SchemeMorphism_polynomial_affine_space_field):
|
|
891
|
+
@cached_method
|
|
892
|
+
def weil_restriction(self):
|
|
893
|
+
r"""
|
|
894
|
+
Compute the Weil restriction of this morphism over some extension field.
|
|
895
|
+
|
|
896
|
+
If the field is a finite field, then this computes
|
|
897
|
+
the Weil restriction to the prime subfield.
|
|
898
|
+
|
|
899
|
+
A Weil restriction of scalars - denoted `Res_{L/k}` - is a
|
|
900
|
+
functor which, for any finite extension of fields `L/k` and
|
|
901
|
+
any algebraic variety `X` over `L`, produces another
|
|
902
|
+
corresponding variety `Res_{L/k}(X)`, defined over `k`. It is
|
|
903
|
+
useful for reducing questions about varieties over large
|
|
904
|
+
fields to questions about more complicated varieties over
|
|
905
|
+
smaller fields. Since it is a functor it also applied to morphisms.
|
|
906
|
+
In particular, the functor applied to a morphism gives the equivalent
|
|
907
|
+
morphism from the Weil restriction of the domain to the Weil restriction
|
|
908
|
+
of the codomain.
|
|
909
|
+
|
|
910
|
+
OUTPUT:
|
|
911
|
+
|
|
912
|
+
Scheme morphism on the Weil restrictions of the domain
|
|
913
|
+
and codomain of the map.
|
|
914
|
+
|
|
915
|
+
EXAMPLES::
|
|
916
|
+
|
|
917
|
+
sage: # needs sage.rings.number_field
|
|
918
|
+
sage: K.<v> = QuadraticField(5)
|
|
919
|
+
sage: A.<x,y> = AffineSpace(K, 2)
|
|
920
|
+
sage: f = DynamicalSystem_affine([x^2 - y^2, y^2])
|
|
921
|
+
sage: f.weil_restriction()
|
|
922
|
+
Dynamical System of Affine Space of dimension 4 over Rational Field
|
|
923
|
+
Defn: Defined on coordinates by sending (z0, z1, z2, z3) to
|
|
924
|
+
(z0^2 + 5*z1^2 - z2^2 - 5*z3^2, 2*z0*z1 - 2*z2*z3, z2^2 + 5*z3^2, 2*z2*z3)
|
|
925
|
+
|
|
926
|
+
::
|
|
927
|
+
|
|
928
|
+
sage: # needs sage.rings.number_field
|
|
929
|
+
sage: K.<v> = QuadraticField(5)
|
|
930
|
+
sage: PS.<x,y> = AffineSpace(K, 2)
|
|
931
|
+
sage: f = DynamicalSystem_affine([x, y])
|
|
932
|
+
sage: F = f.weil_restriction()
|
|
933
|
+
sage: P = PS(2, 1)
|
|
934
|
+
sage: Q = P.weil_restriction()
|
|
935
|
+
sage: f(P).weil_restriction() == F(Q)
|
|
936
|
+
True
|
|
937
|
+
"""
|
|
938
|
+
F = self.as_scheme_morphism().weil_restriction()
|
|
939
|
+
return F.as_dynamical_system()
|
|
940
|
+
|
|
941
|
+
def reduce_base_field(self):
|
|
942
|
+
"""
|
|
943
|
+
Return this map defined over the field of definition of the coefficients.
|
|
944
|
+
|
|
945
|
+
The base field of the map could be strictly larger than
|
|
946
|
+
the field where all of the coefficients are defined. This function
|
|
947
|
+
reduces the base field to the minimal possible. This can be done when
|
|
948
|
+
the base ring is a number field, ``QQbar``, a finite field, or algebraic
|
|
949
|
+
closure of a finite field.
|
|
950
|
+
|
|
951
|
+
OUTPUT: a dynamical system
|
|
952
|
+
|
|
953
|
+
EXAMPLES::
|
|
954
|
+
|
|
955
|
+
sage: # needs sage.rings.finite_rings
|
|
956
|
+
sage: K.<t> = GF(5^2)
|
|
957
|
+
sage: A.<x,y> = AffineSpace(K, 2)
|
|
958
|
+
sage: f = DynamicalSystem_affine([x^2 + 3*y^2, 3*y^2])
|
|
959
|
+
sage: f.reduce_base_field()
|
|
960
|
+
Dynamical System of Affine Space of dimension 2 over Finite Field of size 5
|
|
961
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
962
|
+
(x^2 - 2*y^2, -2*y^2)
|
|
963
|
+
|
|
964
|
+
::
|
|
965
|
+
|
|
966
|
+
sage: # needs sage.rings.number_field sage.symbolic
|
|
967
|
+
sage: A.<x,y> = AffineSpace(QQbar, 2)
|
|
968
|
+
sage: f = DynamicalSystem_affine([x^2 + QQbar(sqrt(3))*y^2,
|
|
969
|
+
....: QQbar(sqrt(-1))*y^2])
|
|
970
|
+
sage: f.reduce_base_field()
|
|
971
|
+
Dynamical System of Affine Space of dimension 2 over Number Field in a
|
|
972
|
+
with defining polynomial y^4 - y^2 + 1
|
|
973
|
+
with a = -0.866025403784439? + 0.50000000000000000?*I
|
|
974
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
975
|
+
(x^2 + (a^3 - 2*a)*y^2, (a^3)*y^2)
|
|
976
|
+
|
|
977
|
+
::
|
|
978
|
+
|
|
979
|
+
sage: # needs sage.rings.number_field
|
|
980
|
+
sage: K.<v> = CyclotomicField(5)
|
|
981
|
+
sage: A.<x,y> = AffineSpace(K, 2)
|
|
982
|
+
sage: f = DynamicalSystem_affine([(3*x^2 + y) / (5*x), (y^2+1) / (x+y)])
|
|
983
|
+
sage: f.reduce_base_field()
|
|
984
|
+
Dynamical System of Affine Space of dimension 2 over Rational Field
|
|
985
|
+
Defn: Defined on coordinates by sending (x, y) to
|
|
986
|
+
((3*x^2 + y)/(5*x), (5*y^2 + 5)/(5*x + 5*y))
|
|
987
|
+
"""
|
|
988
|
+
return self.as_scheme_morphism().reduce_base_field().as_dynamical_system()
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
class DynamicalSystem_affine_finite_field(DynamicalSystem_affine_field,
|
|
992
|
+
SchemeMorphism_polynomial_affine_space_finite_field):
|
|
993
|
+
|
|
994
|
+
def orbit_structure(self, P):
|
|
995
|
+
r"""
|
|
996
|
+
Every point is preperiodic over a finite field.
|
|
997
|
+
|
|
998
|
+
This function returns the pair `[m,n]` where `m` is the
|
|
999
|
+
preperiod and `n` is the period of the point `P` by this map.
|
|
1000
|
+
|
|
1001
|
+
INPUT:
|
|
1002
|
+
|
|
1003
|
+
- ``P`` -- a point in the map's domain
|
|
1004
|
+
|
|
1005
|
+
OUTPUT: list `[m, n]` of integers
|
|
1006
|
+
|
|
1007
|
+
EXAMPLES::
|
|
1008
|
+
|
|
1009
|
+
sage: A.<x,y> = AffineSpace(GF(13), 2)
|
|
1010
|
+
sage: f = DynamicalSystem_affine([x^2 - 1, y^2])
|
|
1011
|
+
sage: f.orbit_structure(A(2, 3))
|
|
1012
|
+
[1, 6]
|
|
1013
|
+
|
|
1014
|
+
::
|
|
1015
|
+
|
|
1016
|
+
sage: # needs sage.rings.finite_rings
|
|
1017
|
+
sage: A.<x,y,z> = AffineSpace(GF(49, 't'), 3)
|
|
1018
|
+
sage: f = DynamicalSystem_affine([x^2 - z, x - y + z, y^2 - x^2])
|
|
1019
|
+
sage: f.orbit_structure(A(1, 1, 2))
|
|
1020
|
+
[7, 6]
|
|
1021
|
+
"""
|
|
1022
|
+
orbit = []
|
|
1023
|
+
index = 1
|
|
1024
|
+
Q = P
|
|
1025
|
+
while Q not in orbit:
|
|
1026
|
+
orbit.append(Q)
|
|
1027
|
+
Q = self(Q)
|
|
1028
|
+
index += 1
|
|
1029
|
+
I = orbit.index(Q)
|
|
1030
|
+
return [I, index - I - 1]
|
|
1031
|
+
|
|
1032
|
+
def cyclegraph(self):
|
|
1033
|
+
r"""
|
|
1034
|
+
Return the digraph of all orbits of this morphism mod `p`.
|
|
1035
|
+
|
|
1036
|
+
For subschemes, only points on the subscheme whose
|
|
1037
|
+
image are also on the subscheme are in the digraph.
|
|
1038
|
+
|
|
1039
|
+
OUTPUT: a digraph
|
|
1040
|
+
|
|
1041
|
+
EXAMPLES::
|
|
1042
|
+
|
|
1043
|
+
sage: P.<x,y> = AffineSpace(GF(5), 2)
|
|
1044
|
+
sage: f = DynamicalSystem_affine([x^2 - y, x*y + 1])
|
|
1045
|
+
sage: f.cyclegraph() # needs sage.graphs
|
|
1046
|
+
Looped digraph on 25 vertices
|
|
1047
|
+
|
|
1048
|
+
::
|
|
1049
|
+
|
|
1050
|
+
sage: # needs sage.rings.finite_rings
|
|
1051
|
+
sage: P.<x> = AffineSpace(GF(3^3, 't'), 1)
|
|
1052
|
+
sage: f = DynamicalSystem_affine([x^2 - 1])
|
|
1053
|
+
sage: f.cyclegraph() # needs sage.graphs
|
|
1054
|
+
Looped digraph on 27 vertices
|
|
1055
|
+
|
|
1056
|
+
::
|
|
1057
|
+
|
|
1058
|
+
sage: P.<x,y> = AffineSpace(GF(7), 2)
|
|
1059
|
+
sage: X = P.subscheme(x - y)
|
|
1060
|
+
sage: f = DynamicalSystem_affine([x^2, y^2], domain=X)
|
|
1061
|
+
sage: f.cyclegraph() # needs sage.graphs
|
|
1062
|
+
Looped digraph on 7 vertices
|
|
1063
|
+
"""
|
|
1064
|
+
V = []
|
|
1065
|
+
E = []
|
|
1066
|
+
from sage.schemes.affine.affine_space import AffineSpace_generic
|
|
1067
|
+
if isinstance(self.domain(), AffineSpace_generic):
|
|
1068
|
+
for P in self.domain():
|
|
1069
|
+
V.append(str(P))
|
|
1070
|
+
Q = self(P)
|
|
1071
|
+
E.append([str(Q)])
|
|
1072
|
+
else:
|
|
1073
|
+
X = self.domain()
|
|
1074
|
+
for P in X.ambient_space():
|
|
1075
|
+
try:
|
|
1076
|
+
XP = X.point(P)
|
|
1077
|
+
V.append(str(XP))
|
|
1078
|
+
Q = self(XP)
|
|
1079
|
+
E.append([str(Q)])
|
|
1080
|
+
except TypeError: # not on the scheme
|
|
1081
|
+
pass
|
|
1082
|
+
from sage.graphs.digraph import DiGraph
|
|
1083
|
+
return DiGraph(dict(zip(V, E)), loops=True)
|