passagemath-schemes 10.6.38__cp314-cp314t-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.

Files changed (314) hide show
  1. passagemath_schemes/.dylibs/libflint.21.0.dylib +0 -0
  2. passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
  3. passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
  4. passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
  5. passagemath_schemes/__init__.py +3 -0
  6. passagemath_schemes-10.6.38.dist-info/METADATA +204 -0
  7. passagemath_schemes-10.6.38.dist-info/METADATA.bak +205 -0
  8. passagemath_schemes-10.6.38.dist-info/RECORD +314 -0
  9. passagemath_schemes-10.6.38.dist-info/WHEEL +6 -0
  10. passagemath_schemes-10.6.38.dist-info/top_level.txt +3 -0
  11. sage/all__sagemath_schemes.py +23 -0
  12. sage/databases/all__sagemath_schemes.py +7 -0
  13. sage/databases/cremona.py +1723 -0
  14. sage/dynamics/all__sagemath_schemes.py +2 -0
  15. sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
  16. sage/dynamics/arithmetic_dynamics/all.py +14 -0
  17. sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
  18. sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
  19. sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
  20. sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
  21. sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
  22. sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
  23. sage/dynamics/arithmetic_dynamics/projective_ds.py +9558 -0
  24. sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-314t-darwin.so +0 -0
  25. sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
  26. sage/dynamics/arithmetic_dynamics/wehlerK3.py +2576 -0
  27. sage/lfunctions/all.py +18 -0
  28. sage/lfunctions/dokchitser.py +745 -0
  29. sage/lfunctions/pari.py +818 -0
  30. sage/lfunctions/zero_sums.cpython-314t-darwin.so +0 -0
  31. sage/lfunctions/zero_sums.pyx +1847 -0
  32. sage/modular/abvar/abvar.py +5135 -0
  33. sage/modular/abvar/abvar_ambient_jacobian.py +413 -0
  34. sage/modular/abvar/abvar_newform.py +244 -0
  35. sage/modular/abvar/all.py +8 -0
  36. sage/modular/abvar/constructor.py +186 -0
  37. sage/modular/abvar/cuspidal_subgroup.py +371 -0
  38. sage/modular/abvar/finite_subgroup.py +896 -0
  39. sage/modular/abvar/homology.py +720 -0
  40. sage/modular/abvar/homspace.py +998 -0
  41. sage/modular/abvar/lseries.py +415 -0
  42. sage/modular/abvar/morphism.py +935 -0
  43. sage/modular/abvar/torsion_point.py +274 -0
  44. sage/modular/abvar/torsion_subgroup.py +740 -0
  45. sage/modular/all.py +43 -0
  46. sage/modular/arithgroup/all.py +20 -0
  47. sage/modular/arithgroup/arithgroup_element.cpython-314t-darwin.so +0 -0
  48. sage/modular/arithgroup/arithgroup_element.pyx +474 -0
  49. sage/modular/arithgroup/arithgroup_generic.py +1402 -0
  50. sage/modular/arithgroup/arithgroup_perm.py +2692 -0
  51. sage/modular/arithgroup/congroup.cpython-314t-darwin.so +0 -0
  52. sage/modular/arithgroup/congroup.pyx +334 -0
  53. sage/modular/arithgroup/congroup_gamma.py +363 -0
  54. sage/modular/arithgroup/congroup_gamma0.py +692 -0
  55. sage/modular/arithgroup/congroup_gamma1.py +653 -0
  56. sage/modular/arithgroup/congroup_gammaH.py +1469 -0
  57. sage/modular/arithgroup/congroup_generic.py +628 -0
  58. sage/modular/arithgroup/congroup_sl2z.py +267 -0
  59. sage/modular/arithgroup/farey_symbol.cpython-314t-darwin.so +0 -0
  60. sage/modular/arithgroup/farey_symbol.pyx +1066 -0
  61. sage/modular/arithgroup/tests.py +418 -0
  62. sage/modular/btquotients/all.py +4 -0
  63. sage/modular/btquotients/btquotient.py +3753 -0
  64. sage/modular/btquotients/pautomorphicform.py +2570 -0
  65. sage/modular/buzzard.py +100 -0
  66. sage/modular/congroup.py +29 -0
  67. sage/modular/congroup_element.py +13 -0
  68. sage/modular/cusps.py +1109 -0
  69. sage/modular/cusps_nf.py +1270 -0
  70. sage/modular/dims.py +569 -0
  71. sage/modular/dirichlet.py +3310 -0
  72. sage/modular/drinfeld_modform/all.py +2 -0
  73. sage/modular/drinfeld_modform/element.py +446 -0
  74. sage/modular/drinfeld_modform/ring.py +773 -0
  75. sage/modular/drinfeld_modform/tutorial.py +236 -0
  76. sage/modular/etaproducts.py +1065 -0
  77. sage/modular/hecke/algebra.py +746 -0
  78. sage/modular/hecke/all.py +20 -0
  79. sage/modular/hecke/ambient_module.py +1019 -0
  80. sage/modular/hecke/degenmap.py +119 -0
  81. sage/modular/hecke/element.py +325 -0
  82. sage/modular/hecke/hecke_operator.py +780 -0
  83. sage/modular/hecke/homspace.py +206 -0
  84. sage/modular/hecke/module.py +1767 -0
  85. sage/modular/hecke/morphism.py +174 -0
  86. sage/modular/hecke/submodule.py +989 -0
  87. sage/modular/hypergeometric_misc.cpython-314t-darwin.so +0 -0
  88. sage/modular/hypergeometric_misc.pxd +4 -0
  89. sage/modular/hypergeometric_misc.pyx +166 -0
  90. sage/modular/hypergeometric_motive.py +2017 -0
  91. sage/modular/local_comp/all.py +2 -0
  92. sage/modular/local_comp/liftings.py +292 -0
  93. sage/modular/local_comp/local_comp.py +1071 -0
  94. sage/modular/local_comp/smoothchar.py +1825 -0
  95. sage/modular/local_comp/type_space.py +748 -0
  96. sage/modular/modform/all.py +30 -0
  97. sage/modular/modform/ambient.py +815 -0
  98. sage/modular/modform/ambient_R.py +177 -0
  99. sage/modular/modform/ambient_eps.py +306 -0
  100. sage/modular/modform/ambient_g0.py +124 -0
  101. sage/modular/modform/ambient_g1.py +204 -0
  102. sage/modular/modform/constructor.py +545 -0
  103. sage/modular/modform/cuspidal_submodule.py +708 -0
  104. sage/modular/modform/defaults.py +14 -0
  105. sage/modular/modform/eis_series.py +505 -0
  106. sage/modular/modform/eisenstein_submodule.py +663 -0
  107. sage/modular/modform/element.py +4131 -0
  108. sage/modular/modform/find_generators.py +59 -0
  109. sage/modular/modform/half_integral.py +154 -0
  110. sage/modular/modform/hecke_operator_on_qexp.py +247 -0
  111. sage/modular/modform/j_invariant.py +47 -0
  112. sage/modular/modform/l_series_gross_zagier.py +133 -0
  113. sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314t-darwin.so +0 -0
  114. sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
  115. sage/modular/modform/notes.py +45 -0
  116. sage/modular/modform/numerical.py +514 -0
  117. sage/modular/modform/periods.py +14 -0
  118. sage/modular/modform/ring.py +1257 -0
  119. sage/modular/modform/space.py +1860 -0
  120. sage/modular/modform/submodule.py +118 -0
  121. sage/modular/modform/tests.py +64 -0
  122. sage/modular/modform/theta.py +110 -0
  123. sage/modular/modform/vm_basis.py +381 -0
  124. sage/modular/modform/weight1.py +220 -0
  125. sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
  126. sage/modular/modform_hecketriangle/abstract_space.py +2528 -0
  127. sage/modular/modform_hecketriangle/all.py +30 -0
  128. sage/modular/modform_hecketriangle/analytic_type.py +590 -0
  129. sage/modular/modform_hecketriangle/constructor.py +416 -0
  130. sage/modular/modform_hecketriangle/element.py +351 -0
  131. sage/modular/modform_hecketriangle/functors.py +752 -0
  132. sage/modular/modform_hecketriangle/graded_ring.py +541 -0
  133. sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
  134. sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3352 -0
  135. sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1432 -0
  136. sage/modular/modform_hecketriangle/readme.py +1214 -0
  137. sage/modular/modform_hecketriangle/series_constructor.py +580 -0
  138. sage/modular/modform_hecketriangle/space.py +1037 -0
  139. sage/modular/modform_hecketriangle/subspace.py +423 -0
  140. sage/modular/modsym/all.py +17 -0
  141. sage/modular/modsym/ambient.py +3846 -0
  142. sage/modular/modsym/boundary.py +1420 -0
  143. sage/modular/modsym/element.py +336 -0
  144. sage/modular/modsym/g1list.py +178 -0
  145. sage/modular/modsym/ghlist.py +182 -0
  146. sage/modular/modsym/hecke_operator.py +73 -0
  147. sage/modular/modsym/manin_symbol.cpython-314t-darwin.so +0 -0
  148. sage/modular/modsym/manin_symbol.pxd +5 -0
  149. sage/modular/modsym/manin_symbol.pyx +497 -0
  150. sage/modular/modsym/manin_symbol_list.py +1295 -0
  151. sage/modular/modsym/modsym.py +400 -0
  152. sage/modular/modsym/modular_symbols.py +384 -0
  153. sage/modular/modsym/p1list.cpython-314t-darwin.so +0 -0
  154. sage/modular/modsym/p1list.pxd +29 -0
  155. sage/modular/modsym/p1list.pyx +1372 -0
  156. sage/modular/modsym/p1list_nf.py +1241 -0
  157. sage/modular/modsym/relation_matrix.py +591 -0
  158. sage/modular/modsym/relation_matrix_pyx.cpython-314t-darwin.so +0 -0
  159. sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
  160. sage/modular/modsym/space.py +2468 -0
  161. sage/modular/modsym/subspace.py +455 -0
  162. sage/modular/modsym/tests.py +375 -0
  163. sage/modular/multiple_zeta.py +2632 -0
  164. sage/modular/multiple_zeta_F_algebra.py +786 -0
  165. sage/modular/overconvergent/all.py +6 -0
  166. sage/modular/overconvergent/genus0.py +1878 -0
  167. sage/modular/overconvergent/hecke_series.py +1187 -0
  168. sage/modular/overconvergent/weightspace.py +778 -0
  169. sage/modular/pollack_stevens/all.py +4 -0
  170. sage/modular/pollack_stevens/distributions.py +874 -0
  171. sage/modular/pollack_stevens/fund_domain.py +1572 -0
  172. sage/modular/pollack_stevens/manin_map.py +859 -0
  173. sage/modular/pollack_stevens/modsym.py +1593 -0
  174. sage/modular/pollack_stevens/padic_lseries.py +417 -0
  175. sage/modular/pollack_stevens/sigma0.py +534 -0
  176. sage/modular/pollack_stevens/space.py +1076 -0
  177. sage/modular/quasimodform/all.py +3 -0
  178. sage/modular/quasimodform/element.py +845 -0
  179. sage/modular/quasimodform/ring.py +828 -0
  180. sage/modular/quatalg/all.py +3 -0
  181. sage/modular/quatalg/brandt.py +1642 -0
  182. sage/modular/ssmod/all.py +8 -0
  183. sage/modular/ssmod/ssmod.py +827 -0
  184. sage/rings/all__sagemath_schemes.py +1 -0
  185. sage/rings/polynomial/all__sagemath_schemes.py +1 -0
  186. sage/rings/polynomial/binary_form_reduce.py +585 -0
  187. sage/schemes/all.py +41 -0
  188. sage/schemes/berkovich/all.py +6 -0
  189. sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
  190. sage/schemes/berkovich/berkovich_space.py +748 -0
  191. sage/schemes/curves/affine_curve.py +2928 -0
  192. sage/schemes/curves/all.py +33 -0
  193. sage/schemes/curves/closed_point.py +434 -0
  194. sage/schemes/curves/constructor.py +381 -0
  195. sage/schemes/curves/curve.py +542 -0
  196. sage/schemes/curves/plane_curve_arrangement.py +1283 -0
  197. sage/schemes/curves/point.py +463 -0
  198. sage/schemes/curves/projective_curve.py +3026 -0
  199. sage/schemes/curves/zariski_vankampen.py +1932 -0
  200. sage/schemes/cyclic_covers/all.py +2 -0
  201. sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
  202. sage/schemes/cyclic_covers/constructor.py +137 -0
  203. sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
  204. sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
  205. sage/schemes/elliptic_curves/BSD.py +1036 -0
  206. sage/schemes/elliptic_curves/Qcurves.py +592 -0
  207. sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
  208. sage/schemes/elliptic_curves/all.py +49 -0
  209. sage/schemes/elliptic_curves/cardinality.py +609 -0
  210. sage/schemes/elliptic_curves/cm.py +1102 -0
  211. sage/schemes/elliptic_curves/constructor.py +1552 -0
  212. sage/schemes/elliptic_curves/ec_database.py +175 -0
  213. sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
  214. sage/schemes/elliptic_curves/ell_egros.py +459 -0
  215. sage/schemes/elliptic_curves/ell_field.py +2836 -0
  216. sage/schemes/elliptic_curves/ell_finite_field.py +3359 -0
  217. sage/schemes/elliptic_curves/ell_generic.py +3760 -0
  218. sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
  219. sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
  220. sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
  221. sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
  222. sage/schemes/elliptic_curves/ell_point.py +4787 -0
  223. sage/schemes/elliptic_curves/ell_rational_field.py +7368 -0
  224. sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
  225. sage/schemes/elliptic_curves/ell_torsion.py +436 -0
  226. sage/schemes/elliptic_curves/ell_wp.py +352 -0
  227. sage/schemes/elliptic_curves/formal_group.py +760 -0
  228. sage/schemes/elliptic_curves/gal_reps.py +1459 -0
  229. sage/schemes/elliptic_curves/gal_reps_number_field.py +1669 -0
  230. sage/schemes/elliptic_curves/gp_simon.py +152 -0
  231. sage/schemes/elliptic_curves/heegner.py +7335 -0
  232. sage/schemes/elliptic_curves/height.py +2109 -0
  233. sage/schemes/elliptic_curves/hom.py +1406 -0
  234. sage/schemes/elliptic_curves/hom_composite.py +934 -0
  235. sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
  236. sage/schemes/elliptic_curves/hom_scalar.py +531 -0
  237. sage/schemes/elliptic_curves/hom_sum.py +682 -0
  238. sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
  239. sage/schemes/elliptic_curves/homset.py +271 -0
  240. sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
  241. sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
  242. sage/schemes/elliptic_curves/jacobian.py +237 -0
  243. sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
  244. sage/schemes/elliptic_curves/kraus.py +1014 -0
  245. sage/schemes/elliptic_curves/lseries_ell.py +943 -0
  246. sage/schemes/elliptic_curves/mod5family.py +105 -0
  247. sage/schemes/elliptic_curves/mod_poly.py +197 -0
  248. sage/schemes/elliptic_curves/mod_sym_num.cpython-314t-darwin.so +0 -0
  249. sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
  250. sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
  251. sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
  252. sage/schemes/elliptic_curves/padics.py +1816 -0
  253. sage/schemes/elliptic_curves/period_lattice.py +2234 -0
  254. sage/schemes/elliptic_curves/period_lattice_region.cpython-314t-darwin.so +0 -0
  255. sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
  256. sage/schemes/elliptic_curves/saturation.py +715 -0
  257. sage/schemes/elliptic_curves/sha_tate.py +1158 -0
  258. sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
  259. sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
  260. sage/schemes/hyperelliptic_curves/all.py +6 -0
  261. sage/schemes/hyperelliptic_curves/constructor.py +291 -0
  262. sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
  263. sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
  264. sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
  265. sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
  266. sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
  267. sage/schemes/hyperelliptic_curves/invariants.py +410 -0
  268. sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
  269. sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
  270. sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
  271. sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
  272. sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
  273. sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
  274. sage/schemes/hyperelliptic_curves/mestre.py +302 -0
  275. sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
  276. sage/schemes/jacobians/abstract_jacobian.py +277 -0
  277. sage/schemes/jacobians/all.py +2 -0
  278. sage/schemes/overview.py +161 -0
  279. sage/schemes/plane_conics/all.py +22 -0
  280. sage/schemes/plane_conics/con_field.py +1296 -0
  281. sage/schemes/plane_conics/con_finite_field.py +158 -0
  282. sage/schemes/plane_conics/con_number_field.py +456 -0
  283. sage/schemes/plane_conics/con_rational_field.py +406 -0
  284. sage/schemes/plane_conics/con_rational_function_field.py +580 -0
  285. sage/schemes/plane_conics/constructor.py +249 -0
  286. sage/schemes/plane_quartics/all.py +2 -0
  287. sage/schemes/plane_quartics/quartic_constructor.py +71 -0
  288. sage/schemes/plane_quartics/quartic_generic.py +73 -0
  289. sage/schemes/riemann_surfaces/all.py +1 -0
  290. sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
  291. sage_wheels/share/cremona/cremona_mini.db +0 -0
  292. sage_wheels/share/ellcurves/rank0 +30427 -0
  293. sage_wheels/share/ellcurves/rank1 +31871 -0
  294. sage_wheels/share/ellcurves/rank10 +6 -0
  295. sage_wheels/share/ellcurves/rank11 +6 -0
  296. sage_wheels/share/ellcurves/rank12 +1 -0
  297. sage_wheels/share/ellcurves/rank14 +1 -0
  298. sage_wheels/share/ellcurves/rank15 +1 -0
  299. sage_wheels/share/ellcurves/rank17 +1 -0
  300. sage_wheels/share/ellcurves/rank19 +1 -0
  301. sage_wheels/share/ellcurves/rank2 +2388 -0
  302. sage_wheels/share/ellcurves/rank20 +1 -0
  303. sage_wheels/share/ellcurves/rank21 +1 -0
  304. sage_wheels/share/ellcurves/rank22 +1 -0
  305. sage_wheels/share/ellcurves/rank23 +1 -0
  306. sage_wheels/share/ellcurves/rank24 +1 -0
  307. sage_wheels/share/ellcurves/rank28 +1 -0
  308. sage_wheels/share/ellcurves/rank3 +836 -0
  309. sage_wheels/share/ellcurves/rank4 +10 -0
  310. sage_wheels/share/ellcurves/rank5 +5 -0
  311. sage_wheels/share/ellcurves/rank6 +5 -0
  312. sage_wheels/share/ellcurves/rank7 +5 -0
  313. sage_wheels/share/ellcurves/rank8 +6 -0
  314. sage_wheels/share/ellcurves/rank9 +7 -0
@@ -0,0 +1,1543 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ r"""
3
+ Dynamical semigroups
4
+
5
+ A dynamical semigroup is a finitely generated subsemigroup of
6
+ the endomorphism ring of a subscheme of projective or affine space.
7
+
8
+ AUTHORS:
9
+
10
+ - Dang Phan (August 6th, 2023): initial implementation
11
+ """
12
+
13
+ # ****************************************************************************
14
+ # Dang Phan <dang8phan@gmail.com>
15
+ #
16
+ # This program is free software: you can redistribute it and/or modify
17
+ # it under the terms of the GNU General Public License as published by
18
+ # the Free Software Foundation, either version 2 of the License, or
19
+ # (at your option) any later version.
20
+ # https://www.gnu.org/licenses/
21
+ # ****************************************************************************
22
+
23
+ from collections.abc import Collection
24
+ from sage.categories.fields import Fields
25
+ from sage.categories.number_fields import NumberFields
26
+ from sage.categories.semigroups import Semigroups
27
+ from sage.dynamics.arithmetic_dynamics.affine_ds import DynamicalSystem_affine
28
+ from sage.dynamics.arithmetic_dynamics.generic_ds import DynamicalSystem
29
+ from sage.dynamics.arithmetic_dynamics.projective_ds import DynamicalSystem_projective
30
+ from sage.misc.classcall_metaclass import typecall
31
+ from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass
32
+ from sage.rings.finite_rings.finite_field_base import FiniteField
33
+ from sage.rings.integer_ring import ZZ
34
+ from sage.rings.rational_field import QQ
35
+ from sage.structure.parent import Parent
36
+
37
+
38
+ class DynamicalSemigroup(Parent, metaclass=InheritComparisonClasscallMetaclass):
39
+ r"""
40
+ A dynamical semigroup defined by a multiple dynamical systems on projective or affine space.
41
+
42
+ INPUT:
43
+
44
+ - ``ds_data`` -- list or tuple of dynamical systems or objects that define dynamical systems
45
+
46
+ OUTPUT:
47
+
48
+ :class:`DynamicalSemigroup_affine` if ``ds_data`` only contains dynamical systems
49
+ over affine space; and :class:`DynamicalSemigroup_projective` otherwise.
50
+
51
+ EXAMPLES::
52
+
53
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
54
+ sage: DynamicalSemigroup(([x, y], [x^2, y^2]))
55
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
56
+ defined by 2 dynamical systems:
57
+ Dynamical System of Projective Space of dimension 1 over Rational Field
58
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
59
+ Dynamical System of Projective Space of dimension 1 over Rational Field
60
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
61
+
62
+ ::
63
+
64
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
65
+ sage: f = DynamicalSystem([x, y], P)
66
+ sage: g = DynamicalSystem([x^2, y^2], P)
67
+ sage: DynamicalSemigroup((f, g))
68
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
69
+ defined by 2 dynamical systems:
70
+ Dynamical System of Projective Space of dimension 1 over Rational Field
71
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
72
+ Dynamical System of Projective Space of dimension 1 over Rational Field
73
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
74
+
75
+ ::
76
+
77
+ sage: A.<x> = AffineSpace(QQ, 1)
78
+ sage: f = DynamicalSystem_affine(x, A)
79
+ sage: DynamicalSemigroup(f)
80
+ Dynamical semigroup over Affine Space of dimension 1 over Rational Field
81
+ defined by 1 dynamical system:
82
+ Dynamical System of Affine Space of dimension 1 over Rational Field
83
+ Defn: Defined on coordinates by sending (x) to (x)
84
+
85
+ ::
86
+
87
+ sage: A.<x> = AffineSpace(QQ, 1)
88
+ sage: f = DynamicalSystem(x, A)
89
+ sage: g = DynamicalSystem(x^2, A)
90
+ sage: DynamicalSemigroup((f, g))
91
+ Dynamical semigroup over Affine Space of dimension 1 over Rational Field
92
+ defined by 2 dynamical systems:
93
+ Dynamical System of Affine Space of dimension 1 over Rational Field
94
+ Defn: Defined on coordinates by sending (x) to (x)
95
+ Dynamical System of Affine Space of dimension 1 over Rational Field
96
+ Defn: Defined on coordinates by sending (x) to (x^2)
97
+
98
+ ::
99
+
100
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
101
+ sage: X = P.subscheme(x - y)
102
+ sage: f = DynamicalSystem_projective([x, y], X)
103
+ sage: g = DynamicalSystem_projective([x^2, y^2], X)
104
+ sage: DynamicalSemigroup_projective([f, g])
105
+ Dynamical semigroup over Closed subscheme of Projective Space of dimension 1
106
+ over Rational Field defined by: x - y
107
+ defined by 2 dynamical systems:
108
+ Dynamical System of Closed subscheme of Projective Space of dimension 1
109
+ over Rational Field defined by: x - y
110
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
111
+ Dynamical System of Closed subscheme of Projective Space of dimension 1
112
+ over Rational Field defined by: x - y
113
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
114
+
115
+ If a dynamical semigroup is built from dynamical systems with different base rings,
116
+ all systems will be coerced to the largest base ring::
117
+
118
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
119
+ sage: Q.<z,w> = ProjectiveSpace(RR, 1)
120
+ sage: f = DynamicalSystem([x, y], P)
121
+ sage: g = DynamicalSystem([z^2, w^2], Q)
122
+ sage: DynamicalSemigroup((f, g))
123
+ Dynamical semigroup over Projective Space of dimension 1 over
124
+ Real Field with 53 bits of precision defined by 2 dynamical systems:
125
+ Dynamical System of Projective Space of dimension 1
126
+ over Real Field with 53 bits of precision
127
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
128
+ Dynamical System of Projective Space of dimension 1
129
+ over Real Field with 53 bits of precision
130
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
131
+
132
+ ::
133
+
134
+ sage: A.<x> = AffineSpace(QQ, 1)
135
+ sage: B.<y> = AffineSpace(RR, 1)
136
+ sage: f = DynamicalSystem(x, A)
137
+ sage: g = DynamicalSystem(y^2, B)
138
+ sage: DynamicalSemigroup((f, g))
139
+ Dynamical semigroup over Affine Space of dimension 1 over
140
+ Real Field with 53 bits of precision defined by 2 dynamical systems:
141
+ Dynamical System of Affine Space of dimension 1 over
142
+ Real Field with 53 bits of precision
143
+ Defn: Defined on coordinates by sending (x) to (x)
144
+ Dynamical System of Affine Space of dimension 1 over
145
+ Real Field with 53 bits of precision
146
+ Defn: Defined on coordinates by sending (x) to (x^2)
147
+
148
+ If a dynamical semigroup is built from dynamical systems over number fields, a composite number field is created
149
+ and all systems will be coerced to it. This composite number field contains all of the initial number fields::
150
+
151
+ sage: # needs sage.rings.number_field
152
+ sage: R.<r> = QQ[]
153
+ sage: K.<k> = NumberField(r^2 - 2)
154
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
155
+ sage: Q.<x,y> = ProjectiveSpace(K, 1)
156
+ sage: f = DynamicalSystem([x, y], P)
157
+ sage: g = DynamicalSystem([z^2, w^2], Q)
158
+ sage: DynamicalSemigroup((f, g))
159
+ Dynamical semigroup over Projective Space of dimension 1 over
160
+ Number Field in k with defining polynomial r^2 - 2 defined by 2 dynamical systems:
161
+ Dynamical System of Projective Space of dimension 1 over
162
+ Number Field in k with defining polynomial r^2 - 2
163
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
164
+ Dynamical System of Projective Space of dimension 1 over
165
+ Number Field in k with defining polynomial r^2 - 2
166
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
167
+
168
+ ::
169
+
170
+ sage: # needs sage.rings.number_field
171
+ sage: R.<r> = QQ[]
172
+ sage: K.<k> = NumberField(r^2 - 2)
173
+ sage: L.<l> = NumberField(r^2 - 3)
174
+ sage: P.<x,y> = ProjectiveSpace(K, 1)
175
+ sage: Q.<z,w> = ProjectiveSpace(L, 1)
176
+ sage: f = DynamicalSystem([x, y], P)
177
+ sage: g = DynamicalSystem([z^2, w^2], Q)
178
+ sage: DynamicalSemigroup((f, g))
179
+ Dynamical semigroup over Projective Space of dimension 1 over
180
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
181
+ defined by 2 dynamical systems:
182
+ Dynamical System of Projective Space of dimension 1 over
183
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
184
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
185
+ Dynamical System of Projective Space of dimension 1 over
186
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
187
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
188
+
189
+ ::
190
+
191
+ sage: # needs sage.rings.number_field
192
+ sage: R.<r> = QQ[]
193
+ sage: K.<k> = NumberField(r^2 - 2)
194
+ sage: L.<l> = NumberField(r^2 - 3)
195
+ sage: P.<x> = AffineSpace(K, 1)
196
+ sage: Q.<y> = AffineSpace(L, 1)
197
+ sage: f = DynamicalSystem(x, P)
198
+ sage: g = DynamicalSystem(y^2, Q)
199
+ sage: DynamicalSemigroup((f, g))
200
+ Dynamical semigroup over Affine Space of dimension 1 over
201
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
202
+ defined by 2 dynamical systems:
203
+ Dynamical System of Affine Space of dimension 1 over
204
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
205
+ Defn: Defined on coordinates by sending (x) to (x)
206
+ Dynamical System of Affine Space of dimension 1 over
207
+ Number Field in kl with defining polynomial r^4 - 10*r^2 + 1
208
+ Defn: Defined on coordinates by sending (x) to (x^2)
209
+
210
+ A dynamical semigroup may contain dynamical systems over function fields::
211
+
212
+ sage: R.<r> = QQ[]
213
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
214
+ sage: f = DynamicalSystem([r * x, y], P)
215
+ sage: g = DynamicalSystem([x, r * y], P)
216
+ sage: DynamicalSemigroup((f, g))
217
+ Dynamical semigroup over Projective Space of dimension 1 over Univariate
218
+ Polynomial Ring in r over Rational Field defined by 2 dynamical systems:
219
+ Dynamical System of Projective Space of dimension 1 over
220
+ Univariate Polynomial Ring in r over Rational Field
221
+ Defn: Defined on coordinates by sending (x : y) to (r*x : y)
222
+ Dynamical System of Projective Space of dimension 1 over
223
+ Univariate Polynomial Ring in r over Rational Field
224
+ Defn: Defined on coordinates by sending (x : y) to (x : r*y)
225
+
226
+ ::
227
+
228
+ sage: R.<r> = QQ[]
229
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
230
+ sage: f = DynamicalSystem([r * x, y], P)
231
+ sage: g = DynamicalSystem([x, y], P)
232
+ sage: DynamicalSemigroup((f, g))
233
+ Dynamical semigroup over Projective Space of dimension 1 over Univariate
234
+ Polynomial Ring in r over Rational Field defined by 2 dynamical systems:
235
+ Dynamical System of Projective Space of dimension 1 over
236
+ Univariate Polynomial Ring in r over Rational Field
237
+ Defn: Defined on coordinates by sending (x : y) to (r*x : y)
238
+ Dynamical System of Projective Space of dimension 1 over
239
+ Univariate Polynomial Ring in r over Rational Field
240
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
241
+
242
+ ::
243
+
244
+ sage: R.<r,s> = QQ[]
245
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
246
+ sage: f = DynamicalSystem([r * x, y], P)
247
+ sage: g = DynamicalSystem([s * x, y], P)
248
+ sage: DynamicalSemigroup((f, g))
249
+ Dynamical semigroup over Projective Space of dimension 1 over Multivariate
250
+ Polynomial Ring in r, s over Rational Field defined by 2 dynamical systems:
251
+ Dynamical System of Projective Space of dimension 1 over
252
+ Multivariate Polynomial Ring in r, s over Rational Field
253
+ Defn: Defined on coordinates by sending (x : y) to (r*x : y)
254
+ Dynamical System of Projective Space of dimension 1 over
255
+ Multivariate Polynomial Ring in r, s over Rational Field
256
+ Defn: Defined on coordinates by sending (x : y) to (s*x : y)
257
+
258
+ ::
259
+
260
+ sage: R.<r,s> = QQ[]
261
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
262
+ sage: f = DynamicalSystem([r * x, s * y], P)
263
+ sage: g = DynamicalSystem([s * x, r * y], P)
264
+ sage: DynamicalSemigroup((f, g))
265
+ Dynamical semigroup over Projective Space of dimension 1 over
266
+ Multivariate Polynomial Ring in r, s over Rational Field
267
+ defined by 2 dynamical systems:
268
+ Dynamical System of Projective Space of dimension 1 over
269
+ Multivariate Polynomial Ring in r, s over Rational Field
270
+ Defn: Defined on coordinates by sending (x : y) to (r*x : s*y)
271
+ Dynamical System of Projective Space of dimension 1 over
272
+ Multivariate Polynomial Ring in r, s over Rational Field
273
+ Defn: Defined on coordinates by sending (x : y) to (s*x : r*y)
274
+
275
+ A dynamical semigroup may contain dynamical systems over finite fields::
276
+
277
+ sage: F = FiniteField(5)
278
+ sage: P.<x,y> = ProjectiveSpace(F, 1)
279
+ sage: DynamicalSemigroup(([x, y], [x^2, y^2]))
280
+ Dynamical semigroup over Projective Space of dimension 1 over
281
+ Finite Field of size 5 defined by 2 dynamical systems:
282
+ Dynamical System of Projective Space of dimension 1 over Finite Field of size 5
283
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
284
+ Dynamical System of Projective Space of dimension 1 over Finite Field of size 5
285
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
286
+
287
+ If a dynamical semigroup is built from dynamical systems over both projective and
288
+ affine spaces, all systems will be homogenized to dynamical systems over projective space::
289
+
290
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
291
+ sage: A.<z> = AffineSpace(QQ, 1)
292
+ sage: f = DynamicalSystem([x, y], P)
293
+ sage: g = DynamicalSystem(z^2, A)
294
+ sage: DynamicalSemigroup((f, g))
295
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
296
+ defined by 2 dynamical systems:
297
+ Dynamical System of Projective Space of dimension 1 over Rational Field
298
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
299
+ Dynamical System of Projective Space of dimension 1 over Rational Field
300
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
301
+
302
+ TESTS::
303
+
304
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
305
+ sage: DynamicalSemigroup(1)
306
+ Traceback (most recent call last):
307
+ ...
308
+ TypeError: 1 does not define a 'DynamicalSemigroup' object
309
+
310
+ ::
311
+
312
+ sage: # needs sage.rings.number_field
313
+ sage: R.<r> = QQ[]
314
+ sage: K.<k> = NumberField(r^2 - 2)
315
+ sage: P.<x,y> = ProjectiveSpace(RR, 1)
316
+ sage: Q.<z,w> = ProjectiveSpace(K, 1)
317
+ sage: f = DynamicalSystem([x, y], P)
318
+ sage: g = DynamicalSystem([z^2, w^2], Q)
319
+ sage: DynamicalSemigroup((f, g))
320
+ Traceback (most recent call last):
321
+ ...
322
+ ValueError: given dynamical systems are not automorphic under global composition
323
+
324
+ ::
325
+
326
+ sage: F = FiniteField(5)
327
+ sage: P.<x,y> = ProjectiveSpace(F, 1)
328
+ sage: Q.<z,w> = ProjectiveSpace(QQ, 1)
329
+ sage: f = DynamicalSystem([x, y], P)
330
+ sage: g = DynamicalSystem([z^2, w^2], Q)
331
+ sage: DynamicalSemigroup((f, g))
332
+ Traceback (most recent call last):
333
+ ...
334
+ ValueError: given dynamical systems are not automorphic under global composition
335
+
336
+ ::
337
+
338
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
339
+ sage: Q.<u,v,w> = ProjectiveSpace(QQ, 2)
340
+ sage: f = DynamicalSystem([x, y])
341
+ sage: g = DynamicalSystem([u^2, v^2, w^2])
342
+ sage: DynamicalSemigroup((f, g))
343
+ Traceback (most recent call last):
344
+ ...
345
+ ValueError: domains of 'DynamicalSystem' objects must be of the same dimension
346
+ """
347
+
348
+ @staticmethod
349
+ def __classcall_private__(cls, ds_data):
350
+ if isinstance(ds_data, Collection):
351
+ all_affine_systems = all(isinstance(ds_datum, DynamicalSystem_affine) for ds_datum in ds_data)
352
+ if all_affine_systems:
353
+ return DynamicalSemigroup_affine(ds_data)
354
+ elif isinstance(ds_data, DynamicalSystem_affine):
355
+ return DynamicalSemigroup_affine(ds_data)
356
+ elif not isinstance(ds_data, DynamicalSystem):
357
+ raise TypeError(str(ds_data) + " does not define a 'DynamicalSemigroup' object")
358
+ return DynamicalSemigroup_projective(ds_data)
359
+
360
+ def __init__(self, systems):
361
+ r"""
362
+ The Python constructor.
363
+
364
+ EXAMPLES::
365
+
366
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
367
+ sage: DynamicalSemigroup(([x, y], [x^2, y^2]))
368
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
369
+ Dynamical System of Projective Space of dimension 1 over Rational Field
370
+ Defn: Defined on coordinates by sending (x : y) to
371
+ (x : y)
372
+ Dynamical System of Projective Space of dimension 1 over Rational Field
373
+ Defn: Defined on coordinates by sending (x : y) to
374
+ (x^2 : y^2)
375
+ """
376
+
377
+ self._dynamical_systems = []
378
+ for ds in systems:
379
+ if ds not in self._dynamical_systems:
380
+ self._dynamical_systems.append(ds)
381
+ Parent.__init__(self, category=Semigroups().FinitelyGeneratedAsMagma())
382
+
383
+ def __call__(self, input):
384
+ r"""
385
+ The result after evaluating this dynamical semigroup on a value.
386
+
387
+ INPUT:
388
+
389
+ - ``input`` -- one value that can be evaluated
390
+ with the generators of this dynamical semigroup
391
+
392
+ OUTPUT: a set of the resulting values after applying all of this
393
+ dynamical semigroup's generators to ``input``
394
+
395
+ EXAMPLES::
396
+
397
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
398
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
399
+ sage: f(2)
400
+ {(2 : 1), (4 : 1)}
401
+
402
+ ::
403
+
404
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
405
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
406
+ sage: f([2, 1])
407
+ {(2 : 1), (4 : 1)}
408
+
409
+ TESTS::
410
+
411
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
412
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
413
+ sage: f(f(2))
414
+ Traceback (most recent call last):
415
+ ...
416
+ TypeError: unable to convert {(4 : 1), (2 : 1)} to an element of Rational Field
417
+ """
418
+ result = set()
419
+ for ds in self.defining_systems():
420
+ result.add(ds(self.domain()(input)))
421
+ return result
422
+
423
+ def base_ring(self):
424
+ r"""
425
+ The base ring of this dynamical semigroup. This is identical
426
+ to the base ring of all of its defining dynamical system.
427
+
428
+ OUTPUT: a ring
429
+
430
+ EXAMPLES::
431
+
432
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
433
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
434
+ sage: f.base_ring()
435
+ Rational Field
436
+ """
437
+ return self.defining_systems()[0].base_ring()
438
+
439
+ def change_ring(self, new_ring):
440
+ r"""
441
+ Return a new :class:`DynamicalSemigroup` whose generators
442
+ are the initial dynamical systems coerced to ``new_ring``.
443
+
444
+ INPUT:
445
+
446
+ - ``new_ring`` -- a ring
447
+
448
+ OUTPUT:
449
+
450
+ A :class:`DynamicalSemigroup` defined by this dynamical
451
+ semigroup's generators, but coerced to ``new_ring``.
452
+
453
+ EXAMPLES::
454
+
455
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
456
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
457
+ sage: f.change_ring(RR)
458
+ Dynamical semigroup over Projective Space of dimension 1 over
459
+ Real Field with 53 bits of precision defined by 2 dynamical systems:
460
+ Dynamical System of Projective Space of dimension 1 over
461
+ Real Field with 53 bits of precision
462
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
463
+ Dynamical System of Projective Space of dimension 1 over
464
+ Real Field with 53 bits of precision
465
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
466
+ """
467
+ new_systems = []
468
+ for ds in self.defining_systems():
469
+ new_systems.append(ds.change_ring(new_ring))
470
+ return DynamicalSemigroup_projective(new_systems)
471
+
472
+ def domain(self):
473
+ r"""
474
+ Return the domain of the generators of this dynamical semigroup.
475
+
476
+ OUTPUT: a subscheme of a projective space or affine space
477
+
478
+ EXAMPLES::
479
+
480
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
481
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
482
+ sage: f.domain()
483
+ Projective Space of dimension 1 over Rational Field
484
+ """
485
+ return self.defining_systems()[0].domain()
486
+
487
+ def codomain(self):
488
+ r"""
489
+ Return the codomain of the generators of this dynamical semigroup.
490
+
491
+ OUTPUT: a subscheme of a projective space or affine space
492
+
493
+ EXAMPLES::
494
+
495
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
496
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
497
+ sage: f.codomain()
498
+ Projective Space of dimension 1 over Rational Field
499
+ """
500
+ return self.defining_systems()[0].codomain()
501
+
502
+ def defining_polynomials(self):
503
+ r"""
504
+ Return the set of polynomials that define the generators of this dynamical semigroup.
505
+
506
+ OUTPUT: a set of polynomials
507
+
508
+ EXAMPLES::
509
+
510
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
511
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
512
+ sage: f.defining_polynomials()
513
+ {(x, y), (x^2, y^2)}
514
+ """
515
+ result = set()
516
+ for ds in self.defining_systems():
517
+ result.add(ds.defining_polynomials())
518
+ return result
519
+
520
+ def defining_systems(self):
521
+ r"""
522
+ Return the generators of this dynamical semigroup.
523
+
524
+ OUTPUT: a tuple of dynamical systems
525
+
526
+ EXAMPLES::
527
+
528
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
529
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
530
+ sage: f.defining_systems()
531
+ (Dynamical System of Projective Space of dimension 1 over Rational Field
532
+ Defn: Defined on coordinates by sending (x : y) to (x : y),
533
+ Dynamical System of Projective Space of dimension 1 over Rational Field
534
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2))
535
+ """
536
+ return tuple(self._dynamical_systems)
537
+
538
+ def nth_iterate(self, p, n):
539
+ r"""
540
+ Return a set of values that results from evaluating this dynamical semigroup
541
+ on the value ``p`` a total of ``n`` times.
542
+
543
+ INPUT:
544
+
545
+ - ``p`` -- a value on which dynamical systems can evaluate
546
+ - ``n`` -- nonnegative integer
547
+
548
+ OUTPUT: a set of values
549
+
550
+ EXAMPLES::
551
+
552
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
553
+ sage: f = DynamicalSemigroup(([x^2, y^2],))
554
+ sage: f.nth_iterate(2, 0)
555
+ {(2 : 1)}
556
+
557
+ ::
558
+
559
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
560
+ sage: f = DynamicalSemigroup(([x^2, y^2],))
561
+ sage: f.nth_iterate(2, 1)
562
+ {(4 : 1)}
563
+
564
+ ::
565
+
566
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
567
+ sage: f = DynamicalSemigroup(([x^2, y^2],))
568
+ sage: f.nth_iterate(2, 2)
569
+ {(16 : 1)}
570
+
571
+ ::
572
+
573
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
574
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
575
+ sage: f.nth_iterate(2, 0)
576
+ {(2 : 1)}
577
+
578
+ ::
579
+
580
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
581
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
582
+ sage: f.nth_iterate(2, 1)
583
+ {(3 : 1), (4 : 1)}
584
+
585
+ ::
586
+
587
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
588
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
589
+ sage: f.nth_iterate(2, 2)
590
+ {(5/3 : 1), (2 : 1), (9 : 1), (16 : 1)}
591
+
592
+ TESTS::
593
+
594
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
595
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
596
+ sage: f.nth_iterate(2, 3.5)
597
+ Traceback (most recent call last):
598
+ ...
599
+ TypeError: Attempt to coerce non-integral RealNumber to Integer
600
+
601
+ ::
602
+
603
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
604
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
605
+ sage: f.nth_iterate(2, -3)
606
+ Traceback (most recent call last):
607
+ ...
608
+ ValueError: -3 must be a nonnegative integer
609
+
610
+ ::
611
+
612
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
613
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
614
+ sage: f.nth_iterate(3, 2) == (f * f)(3)
615
+ True
616
+
617
+ ::
618
+
619
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
620
+ sage: f = DynamicalSemigroup(([x + y, x - y], [x^2, y^2]))
621
+ sage: one = QQ(1)
622
+ sage: f.nth_iterate(2, one)
623
+ {(3 : 1), (4 : 1)}
624
+ """
625
+ n = ZZ(n)
626
+ if n < 0:
627
+ raise ValueError(str(n) + " must be a nonnegative integer")
628
+ result = {self.domain()(p)}
629
+ for i in range(1, n + 1):
630
+ next_iteration = set()
631
+ for point in result:
632
+ next_iteration.update(self(point))
633
+ result = next_iteration
634
+ return result
635
+
636
+ def orbit(self, p, n):
637
+ r"""
638
+ If ``n`` is an integer, return `(p, f(p), f^2(p), \dots, f^n(p))`. If ``n`` is a list or tuple in interval
639
+ notation `[a, b]`, return `(f^a(p), \dots, f^b(p))`.
640
+
641
+ INPUT:
642
+
643
+ - ``p`` -- value on which this dynamical semigroup can be evaluated
644
+ - ``n`` -- nonnegative integer or a list or tuple of length 2 describing an
645
+ interval of the number line containing entirely nonnegative integers
646
+
647
+ OUTPUT: a tuple of sets of values on the domain of this dynamical semigroup
648
+
649
+ EXAMPLES::
650
+
651
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
652
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
653
+ sage: d.orbit(2, 0)
654
+ ({(2 : 1)},)
655
+
656
+ ::
657
+
658
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
659
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
660
+ sage: d.orbit(2, 1)
661
+ ({(2 : 1)}, {(2 : 1), (4 : 1)})
662
+
663
+ ::
664
+
665
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
666
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
667
+ sage: d.orbit(2, 2)
668
+ ({(2 : 1)}, {(2 : 1), (4 : 1)}, {(2 : 1), (4 : 1), (16 : 1)})
669
+
670
+ ::
671
+
672
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
673
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
674
+ sage: d.orbit(2, [1, 2])
675
+ ({(2 : 1), (4 : 1)}, {(2 : 1), (4 : 1), (16 : 1)})
676
+
677
+ TESTS::
678
+
679
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
680
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
681
+ sage: one = QQ(1)
682
+ sage: d.orbit(2, one)
683
+ ({(2 : 1)}, {(2 : 1), (4 : 1)})
684
+
685
+ ::
686
+
687
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
688
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
689
+ sage: d.orbit(2, -2)
690
+ Traceback (most recent call last):
691
+ ...
692
+ ValueError: -2 must be a nonnegative integer
693
+
694
+ ::
695
+
696
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
697
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
698
+ sage: d.orbit(2, x)
699
+ Traceback (most recent call last):
700
+ ...
701
+ TypeError: x is not a constant polynomial
702
+
703
+ ::
704
+
705
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
706
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
707
+ sage: d.orbit(2, [1, 2, 3])
708
+ Traceback (most recent call last):
709
+ ...
710
+ ValueError: [1, 2, 3] must be an integer or list or tuple of two integers
711
+
712
+ ::
713
+
714
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
715
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
716
+ sage: d.orbit(2, [-2, 1])
717
+ Traceback (most recent call last):
718
+ ...
719
+ ValueError: [-2, 1] must contain exactly two nonnegative integers
720
+
721
+ ::
722
+
723
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
724
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
725
+ sage: d.orbit(2, [2, 1])
726
+ Traceback (most recent call last):
727
+ ...
728
+ ValueError: [2, 1] cannot be in descending order
729
+ """
730
+
731
+ if not isinstance(n, Collection):
732
+ n = ZZ(n)
733
+ if n < 0:
734
+ raise ValueError(str(n) + " must be a nonnegative integer")
735
+ return self.orbit(p, [0, n])
736
+
737
+ if not len(n) == 2:
738
+ raise ValueError(str(n) + " must be an integer or list or tuple of two integers")
739
+ if ZZ(n[0]) < 0 or ZZ(n[1]) < 0:
740
+ raise ValueError(str(n) + " must contain exactly two nonnegative integers")
741
+ if ZZ(n[0]) > ZZ(n[1]):
742
+ raise ValueError(str(n) + " cannot be in descending order")
743
+
744
+ result = []
745
+ current_iterate = self.nth_iterate(p, n[0])
746
+ result.append(current_iterate)
747
+ for i in range(n[0] + 1, n[1] + 1):
748
+ next_iterate = set()
749
+ for value in current_iterate:
750
+ next_iterate.update(self(value))
751
+ result.append(next_iterate)
752
+ current_iterate = next_iterate
753
+ return tuple(result)
754
+
755
+ def specialization(self, assignments):
756
+ r"""
757
+ Return the specialization of the generators of this dynamical semigroup.
758
+
759
+ INPUT:
760
+
761
+ - ``assignments`` -- argument for specialization of the generators of
762
+ this dynamical semigroup
763
+
764
+ OUTPUT: a dynamical semigroup with the specialization of the generators
765
+ of this dynamical semigroup
766
+
767
+ EXAMPLES::
768
+
769
+ sage: R.<r> = QQ[]
770
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
771
+ sage: f = DynamicalSystem([r * x, y], P)
772
+ sage: g = DynamicalSystem([x, r * y], P)
773
+ sage: d = DynamicalSemigroup((f, g))
774
+ sage: d.specialization({r:2})
775
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
776
+ defined by 2 dynamical systems:
777
+ Dynamical System of Projective Space of dimension 1 over Rational Field
778
+ Defn: Defined on coordinates by sending (x : y) to (2*x : y)
779
+ Dynamical System of Projective Space of dimension 1 over Rational Field
780
+ Defn: Defined on coordinates by sending (x : y) to (x : 2*y)
781
+
782
+ ::
783
+
784
+ sage: R.<r> = QQ[]
785
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
786
+ sage: f = DynamicalSystem([r * x, y], P)
787
+ sage: g = DynamicalSystem([x, y], P)
788
+ sage: d = DynamicalSemigroup((f, g))
789
+ sage: d.specialization({r:2})
790
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
791
+ defined by 2 dynamical systems:
792
+ Dynamical System of Projective Space of dimension 1 over Rational Field
793
+ Defn: Defined on coordinates by sending (x : y) to (2*x : y)
794
+ Dynamical System of Projective Space of dimension 1 over Rational Field
795
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
796
+
797
+ ::
798
+
799
+ sage: R.<r,s> = QQ[]
800
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
801
+ sage: f = DynamicalSystem([r * x, y], P)
802
+ sage: g = DynamicalSystem([s * x, y], P)
803
+ sage: d = DynamicalSemigroup((f, g))
804
+ sage: d.specialization({r:2, s:3})
805
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
806
+ defined by 2 dynamical systems:
807
+ Dynamical System of Projective Space of dimension 1 over Rational Field
808
+ Defn: Defined on coordinates by sending (x : y) to (2*x : y)
809
+ Dynamical System of Projective Space of dimension 1 over Rational Field
810
+ Defn: Defined on coordinates by sending (x : y) to (3*x : y)
811
+
812
+ ::
813
+
814
+ sage: R.<r,s> = QQ[]
815
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
816
+ sage: f = DynamicalSystem([r * x, s * y], P)
817
+ sage: g = DynamicalSystem([s * x, r * y], P)
818
+ sage: d = DynamicalSemigroup((f, g))
819
+ sage: d.specialization({s:3})
820
+ Dynamical semigroup over Projective Space of dimension 1 over
821
+ Univariate Polynomial Ring in r over Rational Field
822
+ defined by 2 dynamical systems:
823
+ Dynamical System of Projective Space of dimension 1 over
824
+ Univariate Polynomial Ring in r over Rational Field
825
+ Defn: Defined on coordinates by sending (x : y) to (r*x : 3*y)
826
+ Dynamical System of Projective Space of dimension 1 over
827
+ Univariate Polynomial Ring in r over Rational Field
828
+ Defn: Defined on coordinates by sending (x : y) to (3*x : r*y)
829
+ """
830
+ specialized_systems = []
831
+ for ds in self.defining_systems():
832
+ specialized_systems.append(ds.specialization(assignments))
833
+ return DynamicalSemigroup(specialized_systems)
834
+
835
+ def __mul__(self, other_dynamical_semigroup):
836
+ r"""
837
+ Return a new :class:`DynamicalSemigroup` that is the result of multiplying
838
+ this dynamical semigroup with another dynamical semigroup of the same type
839
+ using the * operator.
840
+
841
+ Let `f` be a dynamical semigroup with generators `\{ f_1, f_2, \dots, f_m \}`
842
+ and `g` be a dynamical semigroup with generators `\{ g_1, g_2, \dots, g_n \}`.
843
+ The product `f * g` has generators
844
+ `\{ f_i(g_j) : 1 \leq i \leq m, 1 \leq j \leq n \}`.
845
+
846
+ INPUT:
847
+
848
+ - ``other_dynamical_semigroup`` -- a dynamical semigroup
849
+
850
+ OUTPUT: :class:`DynamicalSemigroup`
851
+
852
+ EXAMPLES::
853
+
854
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
855
+ sage: f1 = DynamicalSystem([x^10, y^10], P)
856
+ sage: f = DynamicalSemigroup(f1)
857
+ sage: f*f
858
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 1 dynamical system:
859
+ Dynamical System of Projective Space of dimension 1 over Rational Field
860
+ Defn: Defined on coordinates by sending (x : y) to
861
+ (x^100 : y^100)
862
+
863
+ ::
864
+
865
+ sage: A.<x> = AffineSpace(QQ, 1)
866
+ sage: f1 = DynamicalSystem_affine(x^10, A)
867
+ sage: f = DynamicalSemigroup(f1)
868
+ sage: f*f
869
+ Dynamical semigroup over Affine Space of dimension 1 over Rational Field defined by 1 dynamical system:
870
+ Dynamical System of Affine Space of dimension 1 over Rational Field
871
+ Defn: Defined on coordinates by sending (x) to
872
+ (x^100)
873
+
874
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
875
+ sage: f1 = DynamicalSystem([x^2 + x * y, y^2 + x * y], P)
876
+ sage: g1 = DynamicalSystem([x^3 + x^2 * y, y^3 + x * y^2], P)
877
+ sage: f = DynamicalSemigroup(f1)
878
+ sage: g = DynamicalSemigroup(g1)
879
+ sage: f*g
880
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 1 dynamical system:
881
+ Dynamical System of Projective Space of dimension 1 over Rational Field
882
+ Defn: Defined on coordinates by sending (x : y) to
883
+ (x^6 + 2*x^5*y + 2*x^4*y^2 + 2*x^3*y^3 + x^2*y^4 : x^4*y^2 + 2*x^3*y^3 + 2*x^2*y^4 + 2*x*y^5 + y^6)
884
+
885
+ ::
886
+
887
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
888
+ sage: f1 = DynamicalSystem([x^2 + x * y, y^2 + x * y], P)
889
+ sage: f2 = DynamicalSystem([x^2 - x * y, y^2 - x * y], P)
890
+ sage: g1 = DynamicalSystem([x^3 + x^2 * y, y^3 + x * y^2], P)
891
+ sage: g2 = DynamicalSystem([x^3 - x^2 * y, y^3 - x * y^2], P)
892
+ sage: f = DynamicalSemigroup((f1, f2))
893
+ sage: g = DynamicalSemigroup((g1, g2))
894
+ sage: f*g
895
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
896
+ Dynamical System of Projective Space of dimension 1 over Rational Field
897
+ Defn: Defined on coordinates by sending (x : y) to
898
+ (x^6 + 2*x^5*y + 2*x^4*y^2 + 2*x^3*y^3 + x^2*y^4 : x^4*y^2 + 2*x^3*y^3 + 2*x^2*y^4 + 2*x*y^5 + y^6)
899
+ Dynamical System of Projective Space of dimension 1 over Rational Field
900
+ Defn: Defined on coordinates by sending (x : y) to
901
+ (x^6 - 2*x^5*y + 2*x^3*y^3 - x^2*y^4 : -x^4*y^2 + 2*x^3*y^3 - 2*x*y^5 + y^6)
902
+
903
+ TESTS::
904
+
905
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
906
+ sage: f1 = DynamicalSystem([x^2 + x * y, y^2 - x * y], P)
907
+ sage: g1 = DynamicalSystem([x^3 - x^2 * y, y^3 + x * y^2], P)
908
+ sage: f = DynamicalSemigroup(f1)
909
+ sage: g = DynamicalSemigroup(g1)
910
+ sage: f*g == g*f
911
+ False
912
+
913
+ ::
914
+
915
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
916
+ sage: f1 = DynamicalSystem([x^2 + x * y, y^2 + x * y], P)
917
+ sage: g1 = DynamicalSystem([x^3 + x^2 * y, y^3 + x * y^2], P)
918
+ sage: h1 = DynamicalSystem([x^4 + x^3 * y, y^4 + x * y^3], P)
919
+ sage: f = DynamicalSemigroup(f1)
920
+ sage: g = DynamicalSemigroup(g1)
921
+ sage: h = DynamicalSemigroup(h1)
922
+ sage: (f*g)*h == f*(g*h)
923
+ True
924
+
925
+ ::
926
+
927
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
928
+ sage: f1 = DynamicalSystem([x, y], P)
929
+ sage: f = DynamicalSemigroup(f1)
930
+ sage: f*1
931
+ Traceback (most recent call last):
932
+ ...
933
+ TypeError: can only multiply dynamical semigroups with other dynamical semigroups of the same type
934
+
935
+ ::
936
+
937
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
938
+ sage: A.<z> = AffineSpace(QQ, 1)
939
+ sage: f1 = DynamicalSystem_projective([x, y], P)
940
+ sage: g1 = DynamicalSystem_affine(z, A)
941
+ sage: f = DynamicalSemigroup_projective(f1)
942
+ sage: g = DynamicalSemigroup_affine(g1)
943
+ sage: f*g
944
+ Traceback (most recent call last):
945
+ ...
946
+ TypeError: can only multiply dynamical semigroups with other dynamical semigroups of the same type
947
+
948
+ ::
949
+
950
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
951
+ sage: Q.<z,w> = ProjectiveSpace(RR, 1)
952
+ sage: f1 = DynamicalSystem([x, y], P)
953
+ sage: g1 = DynamicalSystem([z, w], Q)
954
+ sage: f = DynamicalSemigroup(f1)
955
+ sage: g = DynamicalSemigroup(g1)
956
+ sage: f*g
957
+ Traceback (most recent call last):
958
+ ...
959
+ ValueError: left dynamical semigroup's domain must equal right dynamical semigroup's codomain
960
+
961
+ ::
962
+
963
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
964
+ sage: Q.<z,w> = ProjectiveSpace(QQ, 1)
965
+ sage: f1 = DynamicalSystem([x, y], P)
966
+ sage: g1 = DynamicalSystem([z, w], Q)
967
+ sage: f = DynamicalSemigroup(f1)
968
+ sage: g = DynamicalSemigroup(g1)
969
+ sage: f*g
970
+ Traceback (most recent call last):
971
+ ...
972
+ ValueError: left dynamical semigroup's domain must equal right dynamical semigroup's codomain
973
+ """
974
+ if type(self) is not type(other_dynamical_semigroup):
975
+ raise TypeError("can only multiply dynamical semigroups with other dynamical semigroups of the same type")
976
+ if self.domain() != other_dynamical_semigroup.codomain():
977
+ raise ValueError("left dynamical semigroup's domain must equal right dynamical semigroup's codomain")
978
+ composite_systems = []
979
+ for f in self.defining_systems():
980
+ for g in other_dynamical_semigroup.defining_systems():
981
+ composite_systems.append(DynamicalSystem(f * g))
982
+ return DynamicalSemigroup(composite_systems)
983
+
984
+ def __pow__(self, n):
985
+ r"""
986
+ Return a new dynamical semigroup that is this dynamical semigroup with itself ``n`` times.
987
+ If ``n`` is zero, return a dynamical semigroup with the identity map.
988
+
989
+ INPUT:
990
+
991
+ - ``n`` -- nonnegative integer
992
+
993
+ OUTPUT: :class:`DynamicalSemigroup`
994
+
995
+ EXAMPLES::
996
+
997
+ sage: A.<x> = AffineSpace(QQ, 1)
998
+ sage: f = DynamicalSystem(x^2, A)
999
+ sage: d = DynamicalSemigroup(f)
1000
+ sage: d^2
1001
+ Dynamical semigroup over Affine Space of dimension 1 over Rational Field defined by 1 dynamical system:
1002
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1003
+ Defn: Defined on coordinates by sending (x) to
1004
+ (x^4)
1005
+
1006
+ ::
1007
+
1008
+ sage: A.<x, y, z, w, t, u ,v> = AffineSpace(QQ, 7)
1009
+ sage: f = DynamicalSystem([t + u, v - w, x + y, z^2, u * t, v^2 - w^2, x * y * z], A)
1010
+ sage: d = DynamicalSemigroup(f)
1011
+ sage: d^0
1012
+ Dynamical semigroup over Affine Space of dimension 7 over Rational Field defined by 1 dynamical system:
1013
+ Dynamical System of Affine Space of dimension 7 over Rational Field
1014
+ Defn: Defined on coordinates by sending (x, y, z, w, t, u, v) to
1015
+ (x, y, z, w, t, u, v)
1016
+
1017
+ TESTS::
1018
+
1019
+ sage: A.<x> = AffineSpace(QQ, 1)
1020
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1021
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1022
+ sage: d = DynamicalSemigroup(f)
1023
+ sage: d*d == d^2
1024
+ True
1025
+
1026
+ ::
1027
+
1028
+ sage: A.<x> = AffineSpace(QQ, 1)
1029
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1030
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1031
+ sage: d = DynamicalSemigroup(f)
1032
+ sage: d^3 * d^2 == d^(3 + 2)
1033
+ True
1034
+
1035
+ ::
1036
+
1037
+ sage: A.<x> = AffineSpace(QQ, 1)
1038
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1039
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1040
+ sage: d = DynamicalSemigroup(f)
1041
+ sage: (d^3)^2 == d^(3 * 2)
1042
+ True
1043
+
1044
+ ::
1045
+
1046
+ sage: A.<x> = AffineSpace(QQ, 1)
1047
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1048
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1049
+ sage: g1 = DynamicalSystem(x^3 + x - 1, A)
1050
+ sage: g2 = DynamicalSystem(x^2 - x + 1, A)
1051
+ sage: f = DynamicalSemigroup((f1, f2))
1052
+ sage: g = DynamicalSemigroup((g1, g2))
1053
+ sage: (f * g) ^ 2 == f^2 * g^2
1054
+ False
1055
+
1056
+ ::
1057
+
1058
+ sage: A.<x> = AffineSpace(QQ, 1)
1059
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1060
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1061
+ sage: g1 = DynamicalSystem(x^3 + x - 1, A)
1062
+ sage: g2 = DynamicalSystem(x^2 - x + 1, A)
1063
+ sage: f = DynamicalSemigroup((f1, f2))
1064
+ sage: g = DynamicalSemigroup((g1, g2))
1065
+ sage: f * g^0 == f
1066
+ True
1067
+
1068
+ ::
1069
+
1070
+ sage: A.<x> = AffineSpace(QQ, 1)
1071
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1072
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1073
+ sage: g1 = DynamicalSystem(x^3 + x - 1, A)
1074
+ sage: g2 = DynamicalSystem(x^2 - x + 1, A)
1075
+ sage: f = DynamicalSemigroup((f1, f2))
1076
+ sage: g = DynamicalSemigroup((g1, g2))
1077
+ sage: g * f^0 == g
1078
+ True
1079
+
1080
+ ::
1081
+
1082
+ sage: A.<x> = AffineSpace(QQ, 1)
1083
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1084
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1085
+ sage: d = DynamicalSemigroup((f1, f2))
1086
+ sage: d^1.5
1087
+ Traceback (most recent call last):
1088
+ ...
1089
+ TypeError: Attempt to coerce non-integral RealNumber to Integer
1090
+
1091
+ ::
1092
+
1093
+ sage: A.<x> = AffineSpace(QQ, 1)
1094
+ sage: f1 = DynamicalSystem(x^2 + 1, A)
1095
+ sage: f2 = DynamicalSystem(x^3 - 1, A)
1096
+ sage: d = DynamicalSemigroup((f1, f2))
1097
+ sage: d^(-1)
1098
+ Traceback (most recent call last):
1099
+ ...
1100
+ ValueError: -1 must be a nonnegative integer
1101
+
1102
+ ::
1103
+
1104
+ sage: A.<x> = AffineSpace(QQ, 1)
1105
+ sage: f = DynamicalSystem(x^2, A)
1106
+ sage: d = DynamicalSemigroup(f)
1107
+ sage: two = RR(2)
1108
+ sage: d^two
1109
+ Dynamical semigroup over Affine Space of dimension 1 over Rational Field defined by 1 dynamical system:
1110
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1111
+ Defn: Defined on coordinates by sending (x) to
1112
+ (x^4)
1113
+ """
1114
+ n = ZZ(n)
1115
+ if n < 0:
1116
+ raise ValueError(str(n) + " must be a nonnegative integer")
1117
+ if n == 0:
1118
+ return DynamicalSemigroup(DynamicalSystem(self.defining_systems()[0] ** 0))
1119
+ result = self
1120
+ for i in range(n - 1):
1121
+ result = result * self
1122
+ return result
1123
+
1124
+ def _repr_(self):
1125
+ r"""
1126
+ Return the :class:`String` representation of this dynamical semigroup.
1127
+
1128
+ OUTPUT: a :class:`String` displaying information about this dynamical semigroup
1129
+
1130
+ EXAMPLES::
1131
+
1132
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1133
+ sage: DynamicalSemigroup(([x, y], [x^2, y^2]))
1134
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
1135
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1136
+ Defn: Defined on coordinates by sending (x : y) to
1137
+ (x : y)
1138
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1139
+ Defn: Defined on coordinates by sending (x : y) to
1140
+ (x^2 : y^2)
1141
+ """
1142
+ header = "Dynamical semigroup over %s defined by %d dynamical system"
1143
+ if (len(self.defining_systems()) > 1):
1144
+ header += "s"
1145
+ header += ":"
1146
+ header = header % (str(self.domain()), len(self.defining_systems()))
1147
+ systems = []
1148
+ for ds in self.defining_systems():
1149
+ systems.append(str(ds))
1150
+ systems = '\n'.join(systems)
1151
+ return header + "\n" + systems
1152
+
1153
+ def __eq__(self, other):
1154
+ r"""
1155
+ Return whether two dynamical semigroups are equal.
1156
+
1157
+ OUTPUT:
1158
+
1159
+ A boolean that is ``True`` if and only if the generators of the two
1160
+ dynamical semigroups are equal as sets and no generator is of degree 1.
1161
+
1162
+ EXAMPLES::
1163
+
1164
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1165
+ sage: f = DynamicalSemigroup(([x^2, y^2], [x^3, y^3]))
1166
+ sage: g = DynamicalSemigroup(([x^2, y^2], [x^3, y^3]))
1167
+ sage: f == g
1168
+ True
1169
+
1170
+ ::
1171
+
1172
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1173
+ sage: f = DynamicalSemigroup(([x^2, y^2], [x^2, y^2]))
1174
+ sage: g = DynamicalSemigroup(([x^2, y^2], [x^2, y^2], [x^2, y^2]))
1175
+ sage: f == g
1176
+ True
1177
+
1178
+ ::
1179
+
1180
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1181
+ sage: f = DynamicalSemigroup(([x^3, y^3], [x^2, y^2]))
1182
+ sage: g = DynamicalSemigroup(([x^2, y^2], [x^3, y^3]))
1183
+ sage: f == g
1184
+ True
1185
+
1186
+ ::
1187
+
1188
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1189
+ sage: f = DynamicalSemigroup(([x^3, y^3], [x^2, y^2]))
1190
+ sage: g = DynamicalSemigroup(([x^2, y^2], [y^3, x^3]))
1191
+ sage: f == g
1192
+ False
1193
+
1194
+ TESTS::
1195
+
1196
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1197
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
1198
+ sage: f == 1
1199
+ False
1200
+
1201
+ ::
1202
+
1203
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1204
+ sage: f = DynamicalSemigroup(([x, y], [x^2, y^2]))
1205
+ sage: g = DynamicalSemigroup(([x^2, y^2], [x^3, y^3]))
1206
+ sage: f == g
1207
+ Traceback (most recent call last):
1208
+ ...
1209
+ NotImplementedError: cannot compare dynamical semigroups with at least one generator of degree 1
1210
+ """
1211
+ if isinstance(other, DynamicalSemigroup):
1212
+ if any(ds.degree() == 1 for ds in self.defining_systems()) or \
1213
+ any(ds.degree() == 1 for ds in other.defining_systems()):
1214
+ raise NotImplementedError("cannot compare dynamical semigroups with at least one generator of degree 1")
1215
+ return all(ds in other.defining_systems() for ds in self.defining_systems()) and \
1216
+ all(ds in self.defining_systems() for ds in other.defining_systems())
1217
+ return False
1218
+
1219
+
1220
+ class DynamicalSemigroup_projective(DynamicalSemigroup):
1221
+ r"""
1222
+ A dynamical semigroup defined by a multiple dynamical systems on projective space.
1223
+
1224
+ INPUT:
1225
+
1226
+ - ``ds_data`` -- list or tuple of dynamical systems or objects that define
1227
+ dynamical systems over projective space
1228
+
1229
+ OUTPUT: :class:`DynamicalSemigroup_projective`
1230
+
1231
+ EXAMPLES::
1232
+
1233
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1234
+ sage: DynamicalSemigroup_projective(([x, y], [x^2, y^2]))
1235
+ Dynamical semigroup over Projective Space of dimension 1 over
1236
+ Rational Field defined by 2 dynamical systems:
1237
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1238
+ Defn: Defined on coordinates by sending (x : y) to (x : y)
1239
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1240
+ Defn: Defined on coordinates by sending (x : y) to (x^2 : y^2)
1241
+ """
1242
+
1243
+ @staticmethod
1244
+ def __classcall_private__(cls, ds_data):
1245
+ systems = []
1246
+
1247
+ if isinstance(ds_data, Collection):
1248
+ for ds_datum in ds_data:
1249
+ if isinstance(ds_datum, DynamicalSystem_projective):
1250
+ systems.append(ds_datum)
1251
+ elif isinstance(ds_datum, DynamicalSystem_affine):
1252
+ dimension = ds_datum.domain().dimension()
1253
+ systems.append(ds_datum.homogenize(dimension))
1254
+ else:
1255
+ try:
1256
+ systems.append(DynamicalSystem_projective(ds_datum))
1257
+ except ValueError:
1258
+ raise ValueError(str(ds_datum) + " does not define a 'DynamicalSystem_projective' object")
1259
+ else:
1260
+ if isinstance(ds_data, DynamicalSystem_projective):
1261
+ systems.append(ds_data)
1262
+ else:
1263
+ try:
1264
+ systems.append(DynamicalSystem_projective(ds_data))
1265
+ except ValueError:
1266
+ raise ValueError(str(ds_data) + " does not define a 'DynamicalSystem_projective' object")
1267
+
1268
+ systems = _standardize_domains_of_(systems)
1269
+ if systems[0].base_ring() not in Fields():
1270
+ return typecall(cls, systems)
1271
+ if isinstance(systems[0].base_ring(), FiniteField):
1272
+ return DynamicalSemigroup_projective_finite_field(systems)
1273
+ return DynamicalSemigroup_projective_field(systems)
1274
+
1275
+ def dehomogenize(self, n):
1276
+ r"""
1277
+ Return a new :class:`DynamicalSemigroup_projective` with the dehomogenization at ``n`` of
1278
+ the generators of this dynamical semigroup.
1279
+
1280
+ INPUT:
1281
+
1282
+ - ``n`` -- tuple of nonnegative integers; if `n` is an integer,
1283
+ then the two values of the tuple are assumed to be the same
1284
+
1285
+ OUTPUT: :class:`DynamicalSemigroup_affine`
1286
+
1287
+ EXAMPLES::
1288
+
1289
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1290
+ sage: f = DynamicalSystem([x, y], P)
1291
+ sage: g = DynamicalSystem([x^2, y^2], P)
1292
+ sage: d = DynamicalSemigroup((f, g))
1293
+ sage: d.dehomogenize(0)
1294
+ Dynamical semigroup over Affine Space of dimension 1 over
1295
+ Rational Field defined by 2 dynamical systems:
1296
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1297
+ Defn: Defined on coordinates by sending (y) to (y)
1298
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1299
+ Defn: Defined on coordinates by sending (y) to (y^2)
1300
+
1301
+ ::
1302
+
1303
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1304
+ sage: f = DynamicalSystem([x, y], P)
1305
+ sage: g = DynamicalSystem([x^2, y^2], P)
1306
+ sage: d = DynamicalSemigroup((f, g))
1307
+ sage: d.dehomogenize(1)
1308
+ Dynamical semigroup over Affine Space of dimension 1 over
1309
+ Rational Field defined by 2 dynamical systems:
1310
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1311
+ Defn: Defined on coordinates by sending (x) to (x)
1312
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1313
+ Defn: Defined on coordinates by sending (x) to (x^2)
1314
+
1315
+ TESTS::
1316
+
1317
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
1318
+ sage: f = DynamicalSystem([x, y], P)
1319
+ sage: g = DynamicalSystem([x^2, y^2], P)
1320
+ sage: d = DynamicalSemigroup((f, g))
1321
+ sage: d.dehomogenize((1, 0))
1322
+ Traceback (most recent call last):
1323
+ ...
1324
+ ValueError: Scheme morphism:
1325
+ From: Affine Space of dimension 1 over Rational Field
1326
+ To: Affine Space of dimension 1 over Rational Field
1327
+ Defn: Defined on coordinates by sending (x) to (1/x)
1328
+ is not a `DynamicalSystem_affine` object
1329
+ """
1330
+ new_systems = []
1331
+ for ds in self.defining_systems():
1332
+ new_system = ds.dehomogenize(n)
1333
+ if not isinstance(new_system, DynamicalSystem_affine):
1334
+ raise ValueError(str(new_system) + " is not a `DynamicalSystem_affine` object")
1335
+ new_systems.append(new_system)
1336
+ return DynamicalSemigroup_affine(new_systems)
1337
+
1338
+
1339
+ class DynamicalSemigroup_projective_field(DynamicalSemigroup_projective):
1340
+ pass
1341
+
1342
+
1343
+ class DynamicalSemigroup_projective_finite_field(DynamicalSemigroup_projective_field):
1344
+ pass
1345
+
1346
+
1347
+ class DynamicalSemigroup_affine(DynamicalSemigroup):
1348
+ r"""
1349
+ A dynamical semigroup defined by multiple dynamical systems on affine space.
1350
+
1351
+ INPUT:
1352
+
1353
+ - ``ds_data`` -- list or tuple of dynamical systems or objects that define dynamical systems
1354
+ over affine space
1355
+
1356
+ OUTPUT: :class:`DynamicalSemigroup_affine`
1357
+
1358
+ EXAMPLES::
1359
+
1360
+ sage: A.<x> = AffineSpace(QQ, 1)
1361
+ sage: f = DynamicalSystem(x, A)
1362
+ sage: g = DynamicalSystem(x^2, A)
1363
+ sage: DynamicalSemigroup_affine((f, g))
1364
+ Dynamical semigroup over Affine Space of dimension 1 over
1365
+ Rational Field defined by 2 dynamical systems:
1366
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1367
+ Defn: Defined on coordinates by sending (x) to (x)
1368
+ Dynamical System of Affine Space of dimension 1 over Rational Field
1369
+ Defn: Defined on coordinates by sending (x) to (x^2)
1370
+ """
1371
+
1372
+ @staticmethod
1373
+ def __classcall_private__(cls, ds_data):
1374
+ systems = []
1375
+
1376
+ if isinstance(ds_data, Collection):
1377
+ for ds_datum in ds_data:
1378
+ if isinstance(ds_datum, DynamicalSystem_affine):
1379
+ systems.append(ds_datum)
1380
+ else:
1381
+ try:
1382
+ systems.append(DynamicalSystem_affine(ds_datum))
1383
+ except ValueError:
1384
+ raise ValueError(str(ds_datum) + " does not define a 'DynamicalSystem_affine' object")
1385
+ else:
1386
+ if isinstance(ds_data, DynamicalSystem_affine):
1387
+ systems.append(ds_data)
1388
+ else:
1389
+ try:
1390
+ systems.append(DynamicalSystem_affine(ds_data))
1391
+ except ValueError:
1392
+ raise ValueError(str(ds_data) + " does not define a 'DynamicalSystem_affine' object")
1393
+
1394
+ systems = _standardize_domains_of_(systems)
1395
+ if systems[0].base_ring() not in Fields():
1396
+ return typecall(cls, systems)
1397
+ if isinstance(systems[0].base_ring(), FiniteField):
1398
+ return DynamicalSemigroup_affine_finite_field(systems)
1399
+ return DynamicalSemigroup_affine_field(systems)
1400
+
1401
+ def homogenize(self, n):
1402
+ r"""
1403
+ Return a new :class:`DynamicalSemigroup_projective` with the homogenization at ``n`` of
1404
+ the generators of this dynamical semigroup.
1405
+
1406
+ INPUT:
1407
+
1408
+ - ``n`` -- tuple of nonnegative integers; if `n` is an integer,
1409
+ then the two values of the tuple are assumed to be the same
1410
+
1411
+ OUTPUT: :class:`DynamicalSemigroup_projective`
1412
+
1413
+ EXAMPLES::
1414
+
1415
+ sage: A.<x> = AffineSpace(QQ, 1)
1416
+ sage: f = DynamicalSystem(x + 1, A)
1417
+ sage: g = DynamicalSystem(x^2, A)
1418
+ sage: d = DynamicalSemigroup((f, g))
1419
+ sage: d.homogenize(1)
1420
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
1421
+ defined by 2 dynamical systems:
1422
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1423
+ Defn: Defined on coordinates by sending (x0 : x1) to (x0 + x1 : x1)
1424
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1425
+ Defn: Defined on coordinates by sending (x0 : x1) to (x0^2 : x1^2)
1426
+
1427
+ ::
1428
+
1429
+ sage: A.<x> = AffineSpace(QQ, 1)
1430
+ sage: f = DynamicalSystem(x + 1, A)
1431
+ sage: g = DynamicalSystem(x^2, A)
1432
+ sage: d = DynamicalSemigroup((f, g))
1433
+ sage: d.homogenize((1, 0))
1434
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field
1435
+ defined by 2 dynamical systems:
1436
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1437
+ Defn: Defined on coordinates by sending (x0 : x1) to (x1 : x0 + x1)
1438
+ Dynamical System of Projective Space of dimension 1 over Rational Field
1439
+ Defn: Defined on coordinates by sending (x0 : x1) to (x1^2 : x0^2)
1440
+ """
1441
+ new_systems = []
1442
+ for ds in self.defining_systems():
1443
+ new_systems.append(ds.homogenize(n))
1444
+ return DynamicalSemigroup_projective(new_systems)
1445
+
1446
+
1447
+ class DynamicalSemigroup_affine_field(DynamicalSemigroup_affine):
1448
+ pass
1449
+
1450
+
1451
+ class DynamicalSemigroup_affine_finite_field(DynamicalSemigroup_affine_field):
1452
+ pass
1453
+
1454
+
1455
+ def _standardize_domains_of_(systems):
1456
+ r"""
1457
+ Coerces dynamical systems to the same domain and have the same generators.
1458
+
1459
+ INPUT:
1460
+
1461
+ - ``systems`` -- list of dynamical systems
1462
+
1463
+ OUTPUT: list of dynamical systems from ``systems`` coerced to the same domain with the same generators
1464
+
1465
+ EXAMPLES::
1466
+
1467
+ sage: A.<x> = AffineSpace(QQ, 1)
1468
+ sage: B.<y> = AffineSpace(RR, 1)
1469
+ sage: f = DynamicalSystem(x, A)
1470
+ sage: g = DynamicalSystem(x^2, B)
1471
+ sage: sage.dynamics.arithmetic_dynamics.dynamical_semigroup._standardize_domains_of_([f, g])
1472
+ [Dynamical System of Affine Space of dimension 1 over Real Field with 53 bits of precision
1473
+ Defn: Defined on coordinates by sending (x) to (x),
1474
+ Dynamical System of Affine Space of dimension 1 over Real Field with 53 bits of precision
1475
+ Defn: Defined on coordinates by sending (x) to (x^2)]
1476
+ """
1477
+ identical_domains = True
1478
+ for ds in systems:
1479
+ if ds.domain() != systems[0].domain():
1480
+ identical_domains = False
1481
+ break
1482
+
1483
+ over_number_fields = True
1484
+ all_over_QQ = True
1485
+ for ds in systems:
1486
+ if ds.base_ring() not in NumberFields():
1487
+ over_number_fields = False
1488
+ if ds.base_ring() is not QQ:
1489
+ all_over_QQ = False
1490
+
1491
+ biggest_ring = None
1492
+
1493
+ if over_number_fields and not all_over_QQ:
1494
+ number_fields = []
1495
+ for ds in systems:
1496
+ number_fields.append(ds.base_ring())
1497
+
1498
+ minimal_composite_field = None
1499
+ for field in number_fields:
1500
+ if field is not QQ:
1501
+ if minimal_composite_field is None:
1502
+ minimal_composite_field = field
1503
+ else:
1504
+ minimal_composite_field = minimal_composite_field.composite_fields(field)[0]
1505
+
1506
+ biggest_ring = minimal_composite_field
1507
+ else:
1508
+ for ds in systems:
1509
+ if biggest_ring is None:
1510
+ biggest_ring = ds.base_ring()
1511
+ elif ds.base_ring().has_coerce_map_from(biggest_ring):
1512
+ biggest_ring = ds.base_ring()
1513
+ elif biggest_ring.has_coerce_map_from(ds.base_ring()):
1514
+ pass
1515
+ else:
1516
+ raise ValueError("given dynamical systems are not automorphic \
1517
+ under global composition")
1518
+
1519
+ for i in range(len(systems)):
1520
+ if systems[i].base_ring() != biggest_ring:
1521
+ systems[i] = systems[i].change_ring(biggest_ring)
1522
+
1523
+ domain = systems[0].domain()
1524
+
1525
+ identical_domains = all(ds.domain() == systems[0].domain() for ds in systems)
1526
+ if not identical_domains:
1527
+ for ds in systems:
1528
+ if ds.domain().dimension() != systems[0].domain().dimension():
1529
+ raise ValueError("domains of 'DynamicalSystem' objects must be of the same dimension")
1530
+
1531
+ gens = systems[0].domain().ambient_space().gens()
1532
+ for i in range(len(systems)):
1533
+ if systems[i].domain().coordinate_ring() != systems[0].domain().coordinate_ring():
1534
+ sub_dict = {}
1535
+ old_gens = systems[i].domain().ambient_space().gens()
1536
+ for j in range(len(old_gens)):
1537
+ sub_dict[old_gens[j]] = gens[j]
1538
+ new_polys = []
1539
+ for poly in systems[i].defining_polynomials():
1540
+ new_polys.append(poly.subs(sub_dict))
1541
+ systems[i] = DynamicalSystem(new_polys, domain)
1542
+
1543
+ return systems