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.

Files changed (314) hide show
  1. passagemath_schemes/.dylibs/libflint.22.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.40.dist-info/METADATA +204 -0
  7. passagemath_schemes-10.6.40.dist-info/METADATA.bak +205 -0
  8. passagemath_schemes-10.6.40.dist-info/RECORD +314 -0
  9. passagemath_schemes-10.6.40.dist-info/WHEEL +6 -0
  10. passagemath_schemes-10.6.40.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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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,874 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ # sage.doctest: needs sage.rings.padics
3
+ r"""
4
+ Spaces of distributions for Pollack-Stevens modular symbols
5
+
6
+ The Pollack-Stevens version of modular symbols take values on a
7
+ `\Sigma_0(N)`-module which can be either a symmetric power of the standard
8
+ representation of GL2, or a finite approximation module to the module of
9
+ overconvergent distributions.
10
+
11
+ EXAMPLES::
12
+
13
+ sage: from sage.modular.pollack_stevens.distributions import Symk
14
+ sage: S = Symk(6); S
15
+ Sym^6 Q^2
16
+ sage: v = S(list(range(7))); v
17
+ (0, 1, 2, 3, 4, 5, 6)
18
+ sage: v.act_right([1,2,3,4])
19
+ (18432, 27136, 39936, 58752, 86400, 127008, 186624)
20
+
21
+ sage: S = Symk(4,Zp(5)); S
22
+ Sym^4 Z_5^2
23
+ sage: S([1,2,3,4,5])
24
+ (1 + O(5^20), 2 + O(5^20), 3 + O(5^20), 4 + O(5^20), 5 + O(5^21))
25
+
26
+ ::
27
+
28
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
29
+ sage: D = OverconvergentDistributions(3, 11, 5); D
30
+ Space of 11-adic distributions with k=3 action and precision cap 5
31
+ sage: D([1,2,3,4,5])
32
+ (1 + O(11^5), 2 + O(11^4), 3 + O(11^3), 4 + O(11^2), 5 + O(11))
33
+ """
34
+ # *************************************************************************
35
+ # Copyright (C) 2012 Robert Pollack <rpollack@math.bu.edu>
36
+ #
37
+ # Distributed under the terms of the GNU General Public License (GPL)
38
+ # as published by the Free Software Foundation; either version 2 of
39
+ # the License, or (at your option) any later version.
40
+ # https://www.gnu.org/licenses/
41
+ # *************************************************************************
42
+
43
+ from sage.categories.commutative_rings import CommutativeRings
44
+ from sage.categories.fields import Fields
45
+ from sage.categories.modules import Modules
46
+ from sage.misc.cachefunc import cached_method
47
+ from sage.misc.lazy_import import lazy_import
48
+ from sage.modules.module import Module
49
+ from sage.rings.integer_ring import ZZ
50
+ from sage.rings.rational_field import QQ
51
+ from sage.structure.factory import UniqueFactory
52
+ from sage.structure.parent import Parent
53
+ from .sigma0 import _default_adjuster
54
+
55
+ lazy_import('sage.modular.pollack_stevens.dist', 'get_dist_classes')
56
+ lazy_import('sage.rings.padics.factory', ['ZpCA', 'QpCR'])
57
+ lazy_import('sage.rings.padics.padic_generic', 'pAdicGeneric')
58
+
59
+
60
+ class OverconvergentDistributions_factory(UniqueFactory):
61
+ """
62
+ Create a space of distributions.
63
+
64
+ INPUT:
65
+
66
+ - ``k`` -- nonnegative integer
67
+ - ``p`` -- prime number or ``None``
68
+ - ``prec_cap`` -- positive integer or ``None``
69
+ - ``base`` -- ring or ``None``
70
+ - ``character`` -- a Dirichlet character or ``None``
71
+ - ``adjuster`` -- ``None`` or callable that turns 2 x 2 matrices into a 4-tuple
72
+ - ``act_on_left`` -- boolean (default: ``False``)
73
+ - ``dettwist`` -- integer or ``None`` (interpreted as 0)
74
+ - ``act_padic`` -- whether monoid should allow `p`-adic coefficients
75
+ - ``implementation`` -- string (default: ``None``); either ``None`` (for
76
+ automatic), ``'long'``, or ``'vector'``
77
+
78
+ EXAMPLES::
79
+
80
+ sage: D = OverconvergentDistributions(3, 11, 20)
81
+ sage: D
82
+ Space of 11-adic distributions with k=3 action and precision cap 20
83
+ sage: v = D([1,0,0,0,0])
84
+ sage: v.act_right([2,1,0,1])
85
+ (8 + O(11^5), 4 + O(11^4), 2 + O(11^3), 1 + O(11^2), 6 + O(11))
86
+
87
+ ::
88
+
89
+ sage: D = OverconvergentDistributions(3, 11, 20, dettwist=1)
90
+ sage: v = D([1,0,0,0,0])
91
+ sage: v.act_right([2,1,0,1])
92
+ (5 + 11 + O(11^5), 8 + O(11^4), 4 + O(11^3), 2 + O(11^2), 1 + O(11))
93
+ """
94
+ def create_key(self, k, p=None, prec_cap=None, base=None, character=None,
95
+ adjuster=None, act_on_left=False, dettwist=None,
96
+ act_padic=False, implementation=None):
97
+ """
98
+ EXAMPLES::
99
+
100
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
101
+ sage: OverconvergentDistributions(20, 3, 10) # indirect doctest
102
+ Space of 3-adic distributions with k=20 action and precision cap 10
103
+ sage: TestSuite(OverconvergentDistributions).run()
104
+ """
105
+ k = ZZ(k)
106
+
107
+ if p is None:
108
+ try:
109
+ p = base.prime()
110
+ except AttributeError:
111
+ raise ValueError("You must specify a prime")
112
+ else:
113
+ p = ZZ(p)
114
+
115
+ if base is None:
116
+ if prec_cap is None:
117
+ base = ZpCA(p)
118
+ else:
119
+ base = ZpCA(p, prec_cap)
120
+
121
+ if prec_cap is None:
122
+ try:
123
+ prec_cap = base.precision_cap()
124
+ except AttributeError:
125
+ raise ValueError("You must specify a base or precision cap")
126
+
127
+ if adjuster is None:
128
+ adjuster = _default_adjuster()
129
+
130
+ if dettwist is not None:
131
+ dettwist = ZZ(dettwist)
132
+ if dettwist == 0:
133
+ dettwist = None
134
+
135
+ return (k, p, prec_cap, base, character, adjuster, act_on_left,
136
+ dettwist, act_padic, implementation)
137
+
138
+ def create_object(self, version, key):
139
+ """
140
+ EXAMPLES::
141
+
142
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
143
+ sage: OverconvergentDistributions(0, 7, 5) # indirect doctest
144
+ Space of 7-adic distributions with k=0 action and precision cap 5
145
+ """
146
+ return OverconvergentDistributions_class(*key)
147
+
148
+
149
+ class Symk_factory(UniqueFactory):
150
+ r"""
151
+ Create the space of polynomial distributions of degree `k`
152
+ (stored as a sequence of `k + 1` moments).
153
+
154
+ INPUT:
155
+
156
+ - ``k`` -- integer; the degree (degree `k` corresponds to weight `k + 2`
157
+ modular forms)
158
+ - ``base`` -- ring (default: ``None``); the base ring (``None`` is
159
+ interpreted as `\QQ`)
160
+ - ``character`` -- Dirichlet character or ``None`` (default: ``None``)
161
+ - ``adjuster`` -- ``None`` or a callable that turns `2 \times 2` matrices
162
+ into a 4-tuple (default: ``None``)
163
+ - ``act_on_left`` -- boolean (default: ``False``); whether to have the
164
+ group acting on the left rather than the right
165
+ - ``dettwist`` -- integer or ``None``; power of determinant to twist by
166
+
167
+ EXAMPLES::
168
+
169
+ sage: D = Symk(4)
170
+ sage: loads(dumps(D)) is D
171
+ True
172
+ sage: loads(dumps(D)) == D
173
+ True
174
+ sage: from sage.modular.pollack_stevens.distributions import Symk
175
+ sage: Symk(5)
176
+ Sym^5 Q^2
177
+ sage: Symk(5, RR)
178
+ Sym^5 (Real Field with 53 bits of precision)^2
179
+ sage: Symk(5, oo.parent()) # don't do this
180
+ Sym^5 (The Infinity Ring)^2
181
+ sage: Symk(5, act_on_left = True)
182
+ Sym^5 Q^2
183
+
184
+ The ``dettwist`` attribute::
185
+
186
+ sage: V = Symk(6)
187
+ sage: v = V([1,0,0,0,0,0,0])
188
+ sage: v.act_right([2,1,0,1])
189
+ (64, 32, 16, 8, 4, 2, 1)
190
+ sage: V = Symk(6, dettwist=-1)
191
+ sage: v = V([1,0,0,0,0,0,0])
192
+ sage: v.act_right([2,1,0,1])
193
+ (32, 16, 8, 4, 2, 1, 1/2)
194
+ """
195
+ def create_key(self, k, base=None, character=None, adjuster=None,
196
+ act_on_left=False, dettwist=None, act_padic=False,
197
+ implementation=None):
198
+ r"""
199
+ Sanitize input.
200
+
201
+ EXAMPLES::
202
+
203
+ sage: from sage.modular.pollack_stevens.distributions import Symk
204
+ sage: Symk(6) # indirect doctest
205
+ Sym^6 Q^2
206
+
207
+ sage: V = Symk(6, Qp(7))
208
+ sage: TestSuite(V).run()
209
+ """
210
+ k = ZZ(k)
211
+ if adjuster is None:
212
+ adjuster = _default_adjuster()
213
+ if base is None:
214
+ base = QQ
215
+ return (k, base, character, adjuster, act_on_left, dettwist,
216
+ act_padic, implementation)
217
+
218
+ def create_object(self, version, key):
219
+ r"""
220
+ EXAMPLES::
221
+
222
+ sage: from sage.modular.pollack_stevens.distributions import Symk
223
+ sage: Symk(6) # indirect doctest
224
+ Sym^6 Q^2
225
+ """
226
+ return Symk_class(*key)
227
+
228
+
229
+ OverconvergentDistributions = OverconvergentDistributions_factory('OverconvergentDistributions')
230
+ Symk = Symk_factory('Symk')
231
+
232
+
233
+ class OverconvergentDistributions_abstract(Module):
234
+ """
235
+ Parent object for distributions. Not to be used directly, see derived
236
+ classes :class:`Symk_class` and :class:`OverconvergentDistributions_class`.
237
+
238
+ INPUT:
239
+
240
+ - ``k`` -- integer; `k` is the usual modular forms weight minus 2
241
+ - ``p`` -- ``None`` or prime
242
+ - ``prec_cap`` -- ``None`` or positive integer
243
+ - ``base`` -- ``None`` or the base ring over which to construct the distributions
244
+ - ``character`` -- ``None`` or Dirichlet character
245
+ - ``adjuster`` -- ``None`` or a way to specify the action among different conventions
246
+ - ``act_on_left`` -- boolean (default: ``False``)
247
+ - ``dettwist`` -- ``None`` or integer (twist by determinant); ignored for Symk spaces
248
+ - ``act_padic`` -- boolean (default: ``False``); if ``True``, will allow
249
+ action by `p`-adic matrices
250
+ - ``implementation`` -- string (default: ``None``); either automatic (if ``None``),
251
+ ``'vector'`` or ``'long'``
252
+
253
+ EXAMPLES::
254
+
255
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
256
+ sage: OverconvergentDistributions(2, 17, 100)
257
+ Space of 17-adic distributions with k=2 action and precision cap 100
258
+
259
+ sage: D = OverconvergentDistributions(2, 3, 5); D
260
+ Space of 3-adic distributions with k=2 action and precision cap 5
261
+ sage: type(D)
262
+ <class 'sage.modular.pollack_stevens.distributions.OverconvergentDistributions_class_with_category'>
263
+ """
264
+ def __init__(self, k, p=None, prec_cap=None, base=None, character=None,
265
+ adjuster=None, act_on_left=False, dettwist=None,
266
+ act_padic=False, implementation=None):
267
+ """
268
+ See ``OverconvergentDistributions_abstract`` for full documentation.
269
+
270
+ EXAMPLES::
271
+
272
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
273
+ sage: D = OverconvergentDistributions(2, 3, 5); D
274
+ Space of 3-adic distributions with k=2 action and precision cap 5
275
+ sage: type(D)
276
+ <class 'sage.modular.pollack_stevens.distributions.OverconvergentDistributions_class_with_category'>
277
+
278
+ `p` must be a prime, but `p=6` below, which is not prime::
279
+
280
+ sage: OverconvergentDistributions(k=0, p=6, prec_cap=10)
281
+ Traceback (most recent call last):
282
+ ...
283
+ ValueError: p must be prime
284
+ """
285
+ if base not in CommutativeRings():
286
+ raise TypeError("base must be a commutative ring")
287
+ # from sage.rings.padics.pow_computer import PowComputer
288
+ # should eventually be the PowComputer on ZpCA once that uses longs.
289
+ Dist, WeightKAction = get_dist_classes(p, prec_cap, base,
290
+ self.is_symk(), implementation)
291
+ self.Element = Dist
292
+ # if Dist is Dist_long:
293
+ # self.prime_pow = PowComputer(p, prec_cap, prec_cap, prec_cap)
294
+ Parent.__init__(self, base, category=Modules(base))
295
+ self._k = k
296
+ self._p = p
297
+ self._prec_cap = prec_cap
298
+ self._character = character
299
+ self._adjuster = adjuster
300
+ self._dettwist = dettwist
301
+
302
+ if self.is_symk() or character is not None:
303
+ self._act = WeightKAction(self, character, adjuster, act_on_left,
304
+ dettwist, padic=act_padic)
305
+ else:
306
+ self._act = WeightKAction(self, character, adjuster, act_on_left,
307
+ dettwist, padic=True)
308
+
309
+ self._populate_coercion_lists_(action_list=[self._act])
310
+
311
+ def _element_constructor_(self, val, **kwargs):
312
+ """
313
+ Construct a distribution from data in ``val``.
314
+
315
+ EXAMPLES::
316
+
317
+ sage: V = Symk(6)
318
+ sage: v = V([1,2,3,4,5,6,7]); v
319
+ (1, 2, 3, 4, 5, 6, 7)
320
+ """
321
+ ordp = kwargs.get('ord', 0)
322
+ check = kwargs.get('check', True)
323
+ normalize = kwargs.get('normalize', True)
324
+ return self.Element(val, self, ordp, check, normalize)
325
+
326
+ def _coerce_map_from_(self, other):
327
+ """
328
+ Determine if ``self`` has a coerce map from other.
329
+
330
+ EXAMPLES::
331
+
332
+ sage: V = Symk(4)
333
+ sage: W = V.base_extend(QQ[i])
334
+ sage: W.has_coerce_map_from(V) # indirect doctest
335
+ True
336
+
337
+ Test some coercions::
338
+
339
+ sage: v = V.an_element()
340
+ sage: w = W.an_element()
341
+ sage: v + w
342
+ (0, 2, 4, 6, 8)
343
+ sage: v == w
344
+ True
345
+ """
346
+ return (isinstance(other, OverconvergentDistributions_abstract)
347
+ and other._k == self._k
348
+ and self._character == other._character
349
+ and self.base_ring().has_coerce_map_from(other.base_ring())
350
+ and (self.is_symk() or not other.is_symk()))
351
+
352
+ def acting_matrix(self, g, M):
353
+ r"""
354
+ Return the matrix for the action of `g` on ``self``, truncated to
355
+ the first `M` moments.
356
+
357
+ EXAMPLES::
358
+
359
+ sage: V = Symk(3)
360
+ sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
361
+ sage: V.acting_matrix(Sigma0(1)([3,4,0,1]), 4)
362
+ [27 36 48 64]
363
+ [ 0 9 24 48]
364
+ [ 0 0 3 12]
365
+ [ 0 0 0 1]
366
+
367
+ sage: from sage.modular.btquotients.pautomorphicform import _btquot_adjuster
368
+ sage: V = Symk(3, adjuster = _btquot_adjuster())
369
+ sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
370
+ sage: V.acting_matrix(Sigma0(1)([3,4,0,1]), 4)
371
+ [ 1 4 16 64]
372
+ [ 0 3 24 144]
373
+ [ 0 0 9 108]
374
+ [ 0 0 0 27]
375
+ """
376
+ return self._act.acting_matrix(g, M)
377
+
378
+ def prime(self):
379
+ """
380
+ Return prime `p` such that this is a space of `p`-adic distributions.
381
+
382
+ In case this space is Symk of a non-padic field, we return 0.
383
+
384
+ OUTPUT: a prime or 0
385
+
386
+ EXAMPLES::
387
+
388
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
389
+ sage: D = OverconvergentDistributions(0, 7); D
390
+ Space of 7-adic distributions with k=0 action and precision cap 20
391
+ sage: D.prime()
392
+ 7
393
+ sage: D = Symk(4, base=GF(7)); D
394
+ Sym^4 (Finite Field of size 7)^2
395
+ sage: D.prime()
396
+ 0
397
+
398
+ But Symk of a `p`-adic field does work::
399
+
400
+ sage: D = Symk(4, base=Qp(7)); D
401
+ Sym^4 Q_7^2
402
+ sage: D.prime()
403
+ 7
404
+ sage: D.is_symk()
405
+ True
406
+ """
407
+ return self._p
408
+
409
+ def weight(self):
410
+ """
411
+ Return the weight of this distribution space.
412
+
413
+ The standard caveat applies, namely that the weight of `Sym^k`
414
+ is defined to be `k`, not `k+2`.
415
+
416
+ OUTPUT: nonnegative integer
417
+
418
+ EXAMPLES::
419
+
420
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
421
+ sage: D = OverconvergentDistributions(0, 7); D
422
+ Space of 7-adic distributions with k=0 action and precision cap 20
423
+ sage: D.weight()
424
+ 0
425
+ sage: OverconvergentDistributions(389, 7).weight()
426
+ 389
427
+ """
428
+ return self._k
429
+
430
+ def precision_cap(self):
431
+ """
432
+ Return the precision cap on distributions.
433
+
434
+ EXAMPLES::
435
+
436
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
437
+ sage: D = OverconvergentDistributions(0, 7, 10); D
438
+ Space of 7-adic distributions with k=0 action and precision cap 10
439
+ sage: D.precision_cap()
440
+ 10
441
+ sage: D = Symk(389, base=QQ); D
442
+ Sym^389 Q^2
443
+ sage: D.precision_cap()
444
+ 390
445
+ """
446
+ return self._prec_cap
447
+
448
+ def lift(self, p=None, M=None, new_base_ring=None):
449
+ """
450
+ Return distribution space that contains lifts with given ``p``,
451
+ precision cap ``M``, and base ring ``new_base_ring``.
452
+
453
+ INPUT:
454
+
455
+ - ``p`` -- prime or ``None``
456
+ - ``M`` -- nonnegative integer or ``None``
457
+ - ``new_base_ring`` -- ring or ``None``
458
+
459
+ EXAMPLES::
460
+
461
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
462
+ sage: D = Symk(0, Qp(7)); D
463
+ Sym^0 Q_7^2
464
+ sage: D.lift(M=20)
465
+ Space of 7-adic distributions with k=0 action and precision cap 20
466
+ sage: D.lift(p=7, M=10)
467
+ Space of 7-adic distributions with k=0 action and precision cap 10
468
+ sage: D.lift(p=7, M=10, new_base_ring=QpCR(7,15)).base_ring()
469
+ 7-adic Field with capped relative precision 15
470
+ """
471
+ if self._character is not None:
472
+ if self._character.base_ring() != QQ:
473
+ # need to change coefficient ring for character
474
+ raise NotImplementedError
475
+ if M is None:
476
+ M = self._prec_cap + 1
477
+
478
+ # sanitize new_base_ring. Don't want it to end up being QQ!
479
+ if new_base_ring is None:
480
+ new_base_ring = self.base_ring()
481
+ try:
482
+ pp = new_base_ring.prime()
483
+ except AttributeError:
484
+ pp = None
485
+
486
+ if p is None and pp is None:
487
+ raise ValueError("You must specify a prime")
488
+ elif pp is None:
489
+ new_base_ring = QpCR(p, M)
490
+ elif p is None:
491
+ p = pp
492
+ elif p != pp:
493
+ raise ValueError("Inconsistent primes")
494
+ return OverconvergentDistributions(k=self._k, p=p, prec_cap=M, base=new_base_ring, character=self._character, adjuster=self._adjuster, act_on_left=self._act.is_left())
495
+
496
+ @cached_method
497
+ def approx_module(self, M=None):
498
+ """
499
+ Return the `M`-th approximation module, or if `M` is not specified,
500
+ return the largest approximation module.
501
+
502
+ INPUT:
503
+
504
+ - ``M`` -- ``None`` or nonnegative integer that is at most the
505
+ precision cap
506
+
507
+ EXAMPLES::
508
+
509
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
510
+ sage: D = OverconvergentDistributions(0, 5, 10)
511
+ sage: D.approx_module()
512
+ Ambient free module of rank 10 over the principal ideal domain 5-adic Ring with capped absolute precision 10
513
+ sage: D.approx_module(1)
514
+ Ambient free module of rank 1 over the principal ideal domain 5-adic Ring with capped absolute precision 10
515
+ sage: D.approx_module(0)
516
+ Ambient free module of rank 0 over the principal ideal domain 5-adic Ring with capped absolute precision 10
517
+
518
+ Note that ``M`` must be at most the precision cap, and must be nonnegative::
519
+
520
+ sage: D.approx_module(11)
521
+ Traceback (most recent call last):
522
+ ...
523
+ ValueError: M (=11) must be less than or equal to the precision cap (=10)
524
+ sage: D.approx_module(-1)
525
+ Traceback (most recent call last):
526
+ ...
527
+ ValueError: rank (=-1) must be nonnegative
528
+ """
529
+
530
+ # print("Calling approx_module with self = ",self," and M = ",M)
531
+ if M is None:
532
+ M = self._prec_cap
533
+ elif M > self._prec_cap:
534
+ raise ValueError("M (=%s) must be less than or equal to the precision cap (=%s)" % (M, self._prec_cap))
535
+ elif M < self._prec_cap and self.is_symk():
536
+ raise ValueError("Sym^k objects do not support approximation "
537
+ "modules")
538
+ return self.base_ring() ** M
539
+
540
+ def random_element(self, M=None, **args):
541
+ """
542
+ Return a random element of the `M`-th approximation module with
543
+ nonnegative valuation.
544
+
545
+ INPUT:
546
+
547
+ - ``M`` -- ``None`` or a nonnegative integer
548
+
549
+ EXAMPLES::
550
+
551
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
552
+ sage: D = OverconvergentDistributions(0, 5, 10)
553
+ sage: D.random_element()
554
+ (..., ..., ..., ..., ..., ..., ..., ..., ..., ...)
555
+ sage: D.random_element(0)
556
+ ()
557
+ sage: D.random_element(5)
558
+ (..., ..., ..., ..., ...)
559
+ sage: D.random_element(-1)
560
+ Traceback (most recent call last):
561
+ ...
562
+ ValueError: rank (=-1) must be nonnegative
563
+ sage: D.random_element(11)
564
+ Traceback (most recent call last):
565
+ ...
566
+ ValueError: M (=11) must be less than or equal to the precision cap (=10)
567
+ """
568
+ if M is None:
569
+ M = self.precision_cap()
570
+ R = self.base_ring()
571
+ return self((R ** M).random_element(**args))
572
+ # return self(self.approx_module(M).random_element())
573
+
574
+ def clear_cache(self):
575
+ """
576
+ Clear some caches that are created only for speed purposes.
577
+
578
+ EXAMPLES::
579
+
580
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
581
+ sage: D = OverconvergentDistributions(0, 7, 10)
582
+ sage: D.clear_cache()
583
+ """
584
+ self.approx_module.clear_cache()
585
+ self._act.clear_cache()
586
+
587
+ @cached_method
588
+ def basis(self, M=None):
589
+ """
590
+ Return a basis for this space of distributions.
591
+
592
+ INPUT:
593
+
594
+ - ``M`` -- (default: ``None``) if not ``None``, specifies the ``M``-th
595
+ approximation module, in case that this makes sense
596
+
597
+ EXAMPLES::
598
+
599
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
600
+ sage: D = OverconvergentDistributions(0, 7, 4); D
601
+ Space of 7-adic distributions with k=0 action and precision cap 4
602
+ sage: D.basis()
603
+ [(1 + O(7^4), O(7^3), O(7^2), O(7)),
604
+ (O(7^4), 1 + O(7^3), O(7^2), O(7)),
605
+ (O(7^4), O(7^3), 1 + O(7^2), O(7)),
606
+ (O(7^4), O(7^3), O(7^2), 1 + O(7))]
607
+ sage: D.basis(2)
608
+ [(1 + O(7^2), O(7)), (O(7^2), 1 + O(7))]
609
+ sage: D = Symk(3, base=QQ); D
610
+ Sym^3 Q^2
611
+ sage: D.basis()
612
+ [(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)]
613
+ sage: D.basis(2)
614
+ Traceback (most recent call last):
615
+ ...
616
+ ValueError: Sym^k objects do not support approximation modules
617
+ """
618
+ V = self.approx_module(M)
619
+ return [self(v) for v in V.basis()]
620
+
621
+ def _an_element_(self):
622
+ """
623
+ Return a typical element of ``self``.
624
+
625
+ EXAMPLES::
626
+
627
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
628
+ sage: D = OverconvergentDistributions(0, 7, 4); D
629
+ Space of 7-adic distributions with k=0 action and precision cap 4
630
+ sage: D.an_element() # indirect doctest
631
+ (2 + O(7^2), 1 + O(7))
632
+ """
633
+ if self._prec_cap > 1:
634
+ return self([2, 1])
635
+ else:
636
+ return self([1])
637
+
638
+
639
+ class Symk_class(OverconvergentDistributions_abstract):
640
+
641
+ def __init__(self, k, base, character, adjuster, act_on_left, dettwist,
642
+ act_padic, implementation):
643
+ r"""
644
+ EXAMPLES::
645
+
646
+ sage: D = sage.modular.pollack_stevens.distributions.Symk(4); D
647
+ Sym^4 Q^2
648
+ sage: TestSuite(D).run() # indirect doctest
649
+ """
650
+ if hasattr(base, 'prime'):
651
+ p = base.prime()
652
+ else:
653
+ p = ZZ.zero()
654
+ OverconvergentDistributions_abstract.__init__(self, k, p, k + 1,
655
+ base, character,
656
+ adjuster, act_on_left,
657
+ dettwist,
658
+ act_padic,
659
+ implementation)
660
+
661
+ def _an_element_(self):
662
+ r"""
663
+ Return a representative element of ``self``.
664
+
665
+ EXAMPLES::
666
+
667
+ sage: from sage.modular.pollack_stevens.distributions import Symk
668
+ sage: D = Symk(3, base=QQ); D
669
+ Sym^3 Q^2
670
+ sage: D.an_element() # indirect doctest
671
+ (0, 1, 2, 3)
672
+ """
673
+ return self(list(range(self.weight() + 1)))
674
+
675
+ def _repr_(self):
676
+ """
677
+ EXAMPLES::
678
+
679
+ sage: Symk(6)
680
+ Sym^6 Q^2
681
+ sage: Symk(6,dettwist=3)
682
+ Sym^6 Q^2 * det^3
683
+ sage: Symk(6,character=DirichletGroup(7,QQ).0)
684
+ Sym^6 Q^2 twisted by Dirichlet character modulo 7 of conductor 7 mapping 3 |--> -1
685
+ sage: Symk(6,character=DirichletGroup(7,QQ).0,dettwist=3)
686
+ Sym^6 Q^2 * det^3 twisted by Dirichlet character modulo 7 of conductor 7 mapping 3 |--> -1
687
+ """
688
+ if self.base_ring() is QQ:
689
+ V = 'Q^2'
690
+ elif self.base_ring() is ZZ:
691
+ V = 'Z^2'
692
+ elif isinstance(self.base_ring(), pAdicGeneric) and self.base_ring().degree() == 1:
693
+ if self.base_ring() in Fields():
694
+ V = 'Q_%s^2' % self._p
695
+ else:
696
+ V = 'Z_%s^2' % self._p
697
+ else:
698
+ V = '(%s)^2' % self.base_ring()
699
+ s = "Sym^%s %s" % (self._k, V)
700
+ if self._dettwist is not None and self._dettwist != 0:
701
+ s += " * det^%s" % self._dettwist
702
+ if self._character is not None:
703
+ s += " twisted by %s" % self._character
704
+ return s
705
+
706
+ def is_symk(self) -> bool:
707
+ """
708
+ Whether or not this distributions space is `Sym^k(R)` for some ring `R`.
709
+
710
+ EXAMPLES::
711
+
712
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
713
+ sage: D = OverconvergentDistributions(4, 17, 10); D
714
+ Space of 17-adic distributions with k=4 action and precision cap 10
715
+ sage: D.is_symk()
716
+ False
717
+ sage: D = Symk(4); D
718
+ Sym^4 Q^2
719
+ sage: D.is_symk()
720
+ True
721
+ sage: D = Symk(4, base=GF(7)); D
722
+ Sym^4 (Finite Field of size 7)^2
723
+ sage: D.is_symk()
724
+ True
725
+ """
726
+ return True
727
+
728
+ def change_ring(self, new_base_ring):
729
+ """
730
+ Return a Symk with the same `k` but a different base ring.
731
+
732
+ EXAMPLES::
733
+
734
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
735
+ sage: D = OverconvergentDistributions(0, 7, 4); D
736
+ Space of 7-adic distributions with k=0 action and precision cap 4
737
+ sage: D.base_ring()
738
+ 7-adic Ring with capped absolute precision 4
739
+ sage: D2 = D.change_ring(QpCR(7)); D2
740
+ Space of 7-adic distributions with k=0 action and precision cap 4
741
+ sage: D2.base_ring()
742
+ 7-adic Field with capped relative precision 20
743
+ """
744
+ return Symk(k=self._k, base=new_base_ring, character=self._character, adjuster=self._adjuster, act_on_left=self._act.is_left())
745
+
746
+ def base_extend(self, new_base_ring):
747
+ r"""
748
+ Extend scalars to a new base ring.
749
+
750
+ EXAMPLES::
751
+
752
+ sage: Symk(3).base_extend(Qp(3))
753
+ Sym^3 Q_3^2
754
+ """
755
+ if not new_base_ring.has_coerce_map_from(self.base_ring()):
756
+ raise ValueError("New base ring (%s) does not have a coercion from %s" % (new_base_ring, self.base_ring()))
757
+ return self.change_ring(new_base_ring)
758
+
759
+
760
+ class OverconvergentDistributions_class(OverconvergentDistributions_abstract):
761
+ r"""
762
+ The class of overconvergent distributions.
763
+
764
+ This class represents the module of finite approximation modules, which are finite-dimensional
765
+ spaces with a `\Sigma_0(N)` action which approximate the module of overconvergent distributions.
766
+ There is a specialization map to the finite-dimensional Symk module as well.
767
+
768
+ EXAMPLES::
769
+
770
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions
771
+ sage: D = OverconvergentDistributions(0, 5, 10)
772
+ sage: TestSuite(D).run()
773
+ """
774
+
775
+ def _repr_(self):
776
+ """
777
+ EXAMPLES::
778
+
779
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
780
+ sage: OverconvergentDistributions(0, 5, 10)._repr_()
781
+ 'Space of 5-adic distributions with k=0 action and precision cap 10'
782
+ sage: OverconvergentDistributions(0, 5, 10)
783
+ Space of 5-adic distributions with k=0 action and precision cap 10
784
+
785
+ Examples with twists::
786
+
787
+ sage: OverconvergentDistributions(0,3,4)
788
+ Space of 3-adic distributions with k=0 action and precision cap 4
789
+ sage: OverconvergentDistributions(0,3,4,dettwist=-1)
790
+ Space of 3-adic distributions with k=0 action and precision cap 4 twistted by det^-1
791
+ sage: OverconvergentDistributions(0,3,4,character=DirichletGroup(3).0)
792
+ Space of 3-adic distributions with k=0 action and precision cap 4 twistted by (Dirichlet character modulo 3 of conductor 3 mapping 2 |--> -1)
793
+ sage: OverconvergentDistributions(0,3,4,character=DirichletGroup(3).0,dettwist=-1)
794
+ Space of 3-adic distributions with k=0 action and precision cap 4 twistted by det^-1 * (Dirichlet character modulo 3 of conductor 3 mapping 2 |--> -1)
795
+ """
796
+ s = "Space of %s-adic distributions with k=%s action and precision cap %s" % (self._p, self._k, self._prec_cap)
797
+ twiststuff = []
798
+ if self._dettwist is not None:
799
+ twiststuff.append("det^%s" % self._dettwist)
800
+ if self._character is not None:
801
+ twiststuff.append("(%s)" % self._character)
802
+ if twiststuff:
803
+ s += " twistted by " + " * ".join(twiststuff)
804
+ return s
805
+
806
+ def is_symk(self) -> bool:
807
+ """
808
+ Whether or not this distributions space is `Sym^k(R)` for some ring `R`.
809
+
810
+ EXAMPLES::
811
+
812
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
813
+ sage: D = OverconvergentDistributions(4, 17, 10); D
814
+ Space of 17-adic distributions with k=4 action and precision cap 10
815
+ sage: D.is_symk()
816
+ False
817
+ sage: D = Symk(4); D
818
+ Sym^4 Q^2
819
+ sage: D.is_symk()
820
+ True
821
+ sage: D = Symk(4, base=GF(7)); D
822
+ Sym^4 (Finite Field of size 7)^2
823
+ sage: D.is_symk()
824
+ True
825
+ """
826
+ return False
827
+
828
+ def change_ring(self, new_base_ring):
829
+ """
830
+ Return space of distributions like this one, but with the base ring changed.
831
+
832
+ INPUT:
833
+
834
+ - ``new_base_ring`` -- a ring over which the distribution can be coerced
835
+
836
+ EXAMPLES::
837
+
838
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
839
+ sage: D = OverconvergentDistributions(0, 7, 4); D
840
+ Space of 7-adic distributions with k=0 action and precision cap 4
841
+ sage: D.base_ring()
842
+ 7-adic Ring with capped absolute precision 4
843
+ sage: D2 = D.change_ring(QpCR(7)); D2
844
+ Space of 7-adic distributions with k=0 action and precision cap 4
845
+ sage: D2.base_ring()
846
+ 7-adic Field with capped relative precision 20
847
+ """
848
+ return OverconvergentDistributions(k=self._k, p=self._p, prec_cap=self._prec_cap, base=new_base_ring, character=self._character, adjuster=self._adjuster, act_on_left=self._act.is_left())
849
+
850
+ def specialize(self, new_base_ring=None):
851
+ """
852
+ Return distribution space got by specializing to `Sym^k`, over
853
+ the ``new_base_ring``. If ``new_base_ring`` is not given, use current
854
+ ``base_ring``.
855
+
856
+ EXAMPLES::
857
+
858
+ sage: from sage.modular.pollack_stevens.distributions import OverconvergentDistributions, Symk
859
+ sage: D = OverconvergentDistributions(0, 7, 4); D
860
+ Space of 7-adic distributions with k=0 action and precision cap 4
861
+ sage: D.is_symk()
862
+ False
863
+ sage: D2 = D.specialize(); D2
864
+ Sym^0 Z_7^2
865
+ sage: D2.is_symk()
866
+ True
867
+ sage: D2 = D.specialize(QQ); D2
868
+ Sym^0 Q^2
869
+ """
870
+ if self._character is not None:
871
+ raise NotImplementedError
872
+ if new_base_ring is None:
873
+ new_base_ring = self.base_ring()
874
+ return Symk(k=self._k, base=new_base_ring, adjuster=self._adjuster, act_on_left=self._act.is_left())