passagemath-schemes 10.8.1a4__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.
Files changed (312) 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.8.1a4.dist-info/METADATA +203 -0
  7. passagemath_schemes-10.8.1a4.dist-info/METADATA.bak +204 -0
  8. passagemath_schemes-10.8.1a4.dist-info/RECORD +312 -0
  9. passagemath_schemes-10.8.1a4.dist-info/WHEEL +6 -0
  10. passagemath_schemes-10.8.1a4.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 +9556 -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 +2578 -0
  27. sage/lfunctions/all.py +18 -0
  28. sage/lfunctions/dokchitser.py +727 -0
  29. sage/lfunctions/pari.py +971 -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 +5132 -0
  33. sage/modular/abvar/abvar_ambient_jacobian.py +414 -0
  34. sage/modular/abvar/abvar_newform.py +246 -0
  35. sage/modular/abvar/all.py +8 -0
  36. sage/modular/abvar/constructor.py +187 -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 +721 -0
  40. sage/modular/abvar/homspace.py +989 -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 +741 -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 +1406 -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 +361 -0
  54. sage/modular/arithgroup/congroup_gamma0.py +692 -0
  55. sage/modular/arithgroup/congroup_gamma1.py +659 -0
  56. sage/modular/arithgroup/congroup_gammaH.py +1491 -0
  57. sage/modular/arithgroup/congroup_generic.py +630 -0
  58. sage/modular/arithgroup/congroup_sl2z.py +266 -0
  59. sage/modular/arithgroup/farey_symbol.cpython-314t-darwin.so +0 -0
  60. sage/modular/arithgroup/farey_symbol.pyx +1067 -0
  61. sage/modular/arithgroup/tests.py +425 -0
  62. sage/modular/btquotients/all.py +4 -0
  63. sage/modular/btquotients/btquotient.py +3736 -0
  64. sage/modular/btquotients/pautomorphicform.py +2564 -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 +1107 -0
  69. sage/modular/cusps_nf.py +1270 -0
  70. sage/modular/dims.py +571 -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 +1076 -0
  77. sage/modular/hecke/algebra.py +725 -0
  78. sage/modular/hecke/all.py +19 -0
  79. sage/modular/hecke/ambient_module.py +994 -0
  80. sage/modular/hecke/degenmap.py +119 -0
  81. sage/modular/hecke/element.py +302 -0
  82. sage/modular/hecke/hecke_operator.py +736 -0
  83. sage/modular/hecke/homspace.py +185 -0
  84. sage/modular/hecke/module.py +1744 -0
  85. sage/modular/hecke/morphism.py +139 -0
  86. sage/modular/hecke/submodule.py +970 -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 +2020 -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 +1070 -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 +817 -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 +120 -0
  101. sage/modular/modform/ambient_g1.py +199 -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 +487 -0
  106. sage/modular/modform/eisenstein_submodule.py +663 -0
  107. sage/modular/modform/element.py +4105 -0
  108. sage/modular/modform/half_integral.py +154 -0
  109. sage/modular/modform/hecke_operator_on_qexp.py +247 -0
  110. sage/modular/modform/j_invariant.py +47 -0
  111. sage/modular/modform/l_series_gross_zagier.py +127 -0
  112. sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314t-darwin.so +0 -0
  113. sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
  114. sage/modular/modform/notes.py +45 -0
  115. sage/modular/modform/numerical.py +514 -0
  116. sage/modular/modform/periods.py +14 -0
  117. sage/modular/modform/ring.py +1257 -0
  118. sage/modular/modform/space.py +1859 -0
  119. sage/modular/modform/submodule.py +118 -0
  120. sage/modular/modform/tests.py +64 -0
  121. sage/modular/modform/theta.py +110 -0
  122. sage/modular/modform/vm_basis.py +380 -0
  123. sage/modular/modform/weight1.py +221 -0
  124. sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
  125. sage/modular/modform_hecketriangle/abstract_space.py +2527 -0
  126. sage/modular/modform_hecketriangle/all.py +30 -0
  127. sage/modular/modform_hecketriangle/analytic_type.py +590 -0
  128. sage/modular/modform_hecketriangle/constructor.py +416 -0
  129. sage/modular/modform_hecketriangle/element.py +351 -0
  130. sage/modular/modform_hecketriangle/functors.py +752 -0
  131. sage/modular/modform_hecketriangle/graded_ring.py +541 -0
  132. sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
  133. sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3349 -0
  134. sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1426 -0
  135. sage/modular/modform_hecketriangle/readme.py +1214 -0
  136. sage/modular/modform_hecketriangle/series_constructor.py +580 -0
  137. sage/modular/modform_hecketriangle/space.py +1037 -0
  138. sage/modular/modform_hecketriangle/subspace.py +423 -0
  139. sage/modular/modsym/all.py +17 -0
  140. sage/modular/modsym/ambient.py +3844 -0
  141. sage/modular/modsym/boundary.py +1420 -0
  142. sage/modular/modsym/element.py +336 -0
  143. sage/modular/modsym/g1list.py +178 -0
  144. sage/modular/modsym/ghlist.py +182 -0
  145. sage/modular/modsym/hecke_operator.py +73 -0
  146. sage/modular/modsym/manin_symbol.cpython-314t-darwin.so +0 -0
  147. sage/modular/modsym/manin_symbol.pxd +5 -0
  148. sage/modular/modsym/manin_symbol.pyx +497 -0
  149. sage/modular/modsym/manin_symbol_list.py +1291 -0
  150. sage/modular/modsym/modsym.py +400 -0
  151. sage/modular/modsym/modular_symbols.py +384 -0
  152. sage/modular/modsym/p1list_nf.py +1241 -0
  153. sage/modular/modsym/relation_matrix.py +591 -0
  154. sage/modular/modsym/relation_matrix_pyx.cpython-314t-darwin.so +0 -0
  155. sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
  156. sage/modular/modsym/space.py +2468 -0
  157. sage/modular/modsym/subspace.py +455 -0
  158. sage/modular/modsym/tests.py +376 -0
  159. sage/modular/multiple_zeta.py +2635 -0
  160. sage/modular/multiple_zeta_F_algebra.py +789 -0
  161. sage/modular/overconvergent/all.py +6 -0
  162. sage/modular/overconvergent/genus0.py +1879 -0
  163. sage/modular/overconvergent/hecke_series.py +1187 -0
  164. sage/modular/overconvergent/weightspace.py +776 -0
  165. sage/modular/pollack_stevens/all.py +4 -0
  166. sage/modular/pollack_stevens/distributions.py +874 -0
  167. sage/modular/pollack_stevens/fund_domain.py +1572 -0
  168. sage/modular/pollack_stevens/manin_map.py +856 -0
  169. sage/modular/pollack_stevens/modsym.py +1590 -0
  170. sage/modular/pollack_stevens/padic_lseries.py +417 -0
  171. sage/modular/pollack_stevens/sigma0.py +534 -0
  172. sage/modular/pollack_stevens/space.py +1078 -0
  173. sage/modular/quasimodform/all.py +3 -0
  174. sage/modular/quasimodform/element.py +846 -0
  175. sage/modular/quasimodform/ring.py +826 -0
  176. sage/modular/quatalg/all.py +3 -0
  177. sage/modular/quatalg/brandt.py +1642 -0
  178. sage/modular/ssmod/all.py +8 -0
  179. sage/modular/ssmod/ssmod.py +827 -0
  180. sage/rings/all__sagemath_schemes.py +1 -0
  181. sage/rings/polynomial/all__sagemath_schemes.py +1 -0
  182. sage/rings/polynomial/binary_form_reduce.py +585 -0
  183. sage/schemes/all.py +41 -0
  184. sage/schemes/berkovich/all.py +6 -0
  185. sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
  186. sage/schemes/berkovich/berkovich_space.py +700 -0
  187. sage/schemes/curves/affine_curve.py +2924 -0
  188. sage/schemes/curves/all.py +33 -0
  189. sage/schemes/curves/closed_point.py +434 -0
  190. sage/schemes/curves/constructor.py +397 -0
  191. sage/schemes/curves/curve.py +542 -0
  192. sage/schemes/curves/plane_curve_arrangement.py +1283 -0
  193. sage/schemes/curves/point.py +463 -0
  194. sage/schemes/curves/projective_curve.py +3203 -0
  195. sage/schemes/curves/weighted_projective_curve.py +106 -0
  196. sage/schemes/curves/zariski_vankampen.py +1931 -0
  197. sage/schemes/cyclic_covers/all.py +2 -0
  198. sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
  199. sage/schemes/cyclic_covers/constructor.py +137 -0
  200. sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
  201. sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
  202. sage/schemes/elliptic_curves/BSD.py +991 -0
  203. sage/schemes/elliptic_curves/Qcurves.py +592 -0
  204. sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
  205. sage/schemes/elliptic_curves/all.py +49 -0
  206. sage/schemes/elliptic_curves/cardinality.py +609 -0
  207. sage/schemes/elliptic_curves/cm.py +1103 -0
  208. sage/schemes/elliptic_curves/constructor.py +1530 -0
  209. sage/schemes/elliptic_curves/ec_database.py +175 -0
  210. sage/schemes/elliptic_curves/ell_curve_isogeny.py +3971 -0
  211. sage/schemes/elliptic_curves/ell_egros.py +457 -0
  212. sage/schemes/elliptic_curves/ell_field.py +2837 -0
  213. sage/schemes/elliptic_curves/ell_finite_field.py +3249 -0
  214. sage/schemes/elliptic_curves/ell_generic.py +3760 -0
  215. sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
  216. sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
  217. sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
  218. sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
  219. sage/schemes/elliptic_curves/ell_point.py +4944 -0
  220. sage/schemes/elliptic_curves/ell_rational_field.py +7184 -0
  221. sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
  222. sage/schemes/elliptic_curves/ell_torsion.py +436 -0
  223. sage/schemes/elliptic_curves/ell_wp.py +352 -0
  224. sage/schemes/elliptic_curves/formal_group.py +760 -0
  225. sage/schemes/elliptic_curves/gal_reps.py +1459 -0
  226. sage/schemes/elliptic_curves/gal_reps_number_field.py +1663 -0
  227. sage/schemes/elliptic_curves/gp_simon.py +152 -0
  228. sage/schemes/elliptic_curves/heegner.py +7328 -0
  229. sage/schemes/elliptic_curves/height.py +2108 -0
  230. sage/schemes/elliptic_curves/hom.py +1788 -0
  231. sage/schemes/elliptic_curves/hom_composite.py +1084 -0
  232. sage/schemes/elliptic_curves/hom_fractional.py +544 -0
  233. sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
  234. sage/schemes/elliptic_curves/hom_scalar.py +531 -0
  235. sage/schemes/elliptic_curves/hom_sum.py +681 -0
  236. sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
  237. sage/schemes/elliptic_curves/homset.py +271 -0
  238. sage/schemes/elliptic_curves/isogeny_class.py +1523 -0
  239. sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
  240. sage/schemes/elliptic_curves/jacobian.py +247 -0
  241. sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
  242. sage/schemes/elliptic_curves/kraus.py +1014 -0
  243. sage/schemes/elliptic_curves/lseries_ell.py +915 -0
  244. sage/schemes/elliptic_curves/mod5family.py +105 -0
  245. sage/schemes/elliptic_curves/mod_poly.py +197 -0
  246. sage/schemes/elliptic_curves/mod_sym_num.cpython-314t-darwin.so +0 -0
  247. sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
  248. sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
  249. sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
  250. sage/schemes/elliptic_curves/padics.py +1816 -0
  251. sage/schemes/elliptic_curves/period_lattice.py +2234 -0
  252. sage/schemes/elliptic_curves/period_lattice_region.cpython-314t-darwin.so +0 -0
  253. sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
  254. sage/schemes/elliptic_curves/saturation.py +716 -0
  255. sage/schemes/elliptic_curves/sha_tate.py +1158 -0
  256. sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
  257. sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
  258. sage/schemes/hyperelliptic_curves/all.py +6 -0
  259. sage/schemes/hyperelliptic_curves/constructor.py +369 -0
  260. sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1948 -0
  261. sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
  262. sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +936 -0
  263. sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
  264. sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
  265. sage/schemes/hyperelliptic_curves/invariants.py +410 -0
  266. sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +312 -0
  267. sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
  268. sage/schemes/hyperelliptic_curves/jacobian_generic.py +437 -0
  269. sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
  270. sage/schemes/hyperelliptic_curves/jacobian_morphism.py +878 -0
  271. sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
  272. sage/schemes/hyperelliptic_curves/mestre.py +302 -0
  273. sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3863 -0
  274. sage/schemes/jacobians/abstract_jacobian.py +277 -0
  275. sage/schemes/jacobians/all.py +2 -0
  276. sage/schemes/overview.py +161 -0
  277. sage/schemes/plane_conics/all.py +22 -0
  278. sage/schemes/plane_conics/con_field.py +1296 -0
  279. sage/schemes/plane_conics/con_finite_field.py +158 -0
  280. sage/schemes/plane_conics/con_number_field.py +456 -0
  281. sage/schemes/plane_conics/con_rational_field.py +406 -0
  282. sage/schemes/plane_conics/con_rational_function_field.py +581 -0
  283. sage/schemes/plane_conics/constructor.py +249 -0
  284. sage/schemes/plane_quartics/all.py +2 -0
  285. sage/schemes/plane_quartics/quartic_constructor.py +71 -0
  286. sage/schemes/plane_quartics/quartic_generic.py +53 -0
  287. sage/schemes/riemann_surfaces/all.py +1 -0
  288. sage/schemes/riemann_surfaces/riemann_surface.py +4177 -0
  289. sage_wheels/share/cremona/cremona_mini.db +0 -0
  290. sage_wheels/share/ellcurves/rank0 +30427 -0
  291. sage_wheels/share/ellcurves/rank1 +31871 -0
  292. sage_wheels/share/ellcurves/rank10 +6 -0
  293. sage_wheels/share/ellcurves/rank11 +6 -0
  294. sage_wheels/share/ellcurves/rank12 +1 -0
  295. sage_wheels/share/ellcurves/rank14 +1 -0
  296. sage_wheels/share/ellcurves/rank15 +1 -0
  297. sage_wheels/share/ellcurves/rank17 +1 -0
  298. sage_wheels/share/ellcurves/rank19 +1 -0
  299. sage_wheels/share/ellcurves/rank2 +2388 -0
  300. sage_wheels/share/ellcurves/rank20 +1 -0
  301. sage_wheels/share/ellcurves/rank21 +1 -0
  302. sage_wheels/share/ellcurves/rank22 +1 -0
  303. sage_wheels/share/ellcurves/rank23 +1 -0
  304. sage_wheels/share/ellcurves/rank24 +1 -0
  305. sage_wheels/share/ellcurves/rank28 +1 -0
  306. sage_wheels/share/ellcurves/rank3 +836 -0
  307. sage_wheels/share/ellcurves/rank4 +10 -0
  308. sage_wheels/share/ellcurves/rank5 +5 -0
  309. sage_wheels/share/ellcurves/rank6 +5 -0
  310. sage_wheels/share/ellcurves/rank7 +5 -0
  311. sage_wheels/share/ellcurves/rank8 +6 -0
  312. sage_wheels/share/ellcurves/rank9 +7 -0
@@ -0,0 +1,692 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ # sage.doctest: needs sage.libs.pari
3
+ r"""
4
+ Congruence subgroup `\Gamma_0(N)`
5
+ """
6
+
7
+ # ****************************************************************************
8
+ # This program is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation, either version 2 of the License, or
11
+ # (at your option) any later version.
12
+ # https://www.gnu.org/licenses/
13
+ # ****************************************************************************
14
+
15
+ from sage.arith.misc import divisors, euler_phi, gcd, kronecker_symbol, moebius
16
+ from sage.misc.cachefunc import cached_method
17
+ from sage.misc.misc_c import prod
18
+ from sage.modular.arithgroup.congroup_gamma1 import Gamma1_class
19
+ from sage.modular.arithgroup.congroup_gammaH import GammaH_class
20
+ from sage.modular.arithgroup.congroup_generic import CongruenceSubgroup
21
+ from sage.modular.cusps import Cusp
22
+ from sage.modular.modsym.p1list import P1List, lift_to_sl2z
23
+ from sage.rings.finite_rings.integer_mod_ring import IntegerModRing
24
+ from sage.rings.integer_ring import ZZ
25
+
26
+
27
+ def is_Gamma0(x):
28
+ """
29
+ Return ``True`` if x is a congruence subgroup of type Gamma0.
30
+
31
+ EXAMPLES::
32
+
33
+ sage: from sage.modular.arithgroup.congroup_gamma0 import is_Gamma0
34
+ sage: is_Gamma0(SL2Z)
35
+ doctest:warning...
36
+ DeprecationWarning: The function is_Gamma0 is deprecated; use 'isinstance(..., Gamma0_class)' instead.
37
+ See https://github.com/sagemath/sage/issues/38035 for details.
38
+ True
39
+ sage: is_Gamma0(Gamma0(13))
40
+ True
41
+ sage: is_Gamma0(Gamma1(6))
42
+ False
43
+ """
44
+ from sage.misc.superseded import deprecation
45
+ deprecation(38035, "The function is_Gamma0 is deprecated; use 'isinstance(..., Gamma0_class)' instead.")
46
+ return isinstance(x, Gamma0_class)
47
+
48
+
49
+ _gamma0_cache = {}
50
+
51
+
52
+ def Gamma0_constructor(N):
53
+ """
54
+ Return the congruence subgroup Gamma0(N).
55
+
56
+ EXAMPLES::
57
+
58
+ sage: G = Gamma0(51) ; G # indirect doctest
59
+ Congruence Subgroup Gamma0(51)
60
+ sage: G == Gamma0(51)
61
+ True
62
+ sage: G is Gamma0(51)
63
+ True
64
+ """
65
+ from sage.modular.arithgroup.all import SL2Z
66
+ if N == 1:
67
+ return SL2Z
68
+ try:
69
+ return _gamma0_cache[N]
70
+ except KeyError:
71
+ _gamma0_cache[N] = Gamma0_class(N)
72
+ return _gamma0_cache[N]
73
+
74
+
75
+ class Gamma0_class(GammaH_class):
76
+ r"""
77
+ The congruence subgroup `\Gamma_0(N)`.
78
+
79
+ TESTS::
80
+
81
+ sage: Gamma0(11).dimension_cusp_forms(2)
82
+ 1
83
+ sage: a = Gamma0(1).dimension_cusp_forms(2); a
84
+ 0
85
+ sage: type(a)
86
+ <class 'sage.rings.integer.Integer'>
87
+ sage: Gamma0(5).dimension_cusp_forms(0)
88
+ 0
89
+ sage: Gamma0(20).dimension_cusp_forms(1)
90
+ 0
91
+ sage: Gamma0(20).dimension_cusp_forms(4)
92
+ 6
93
+
94
+ sage: Gamma0(23).dimension_cusp_forms(2)
95
+ 2
96
+ sage: Gamma0(1).dimension_cusp_forms(24)
97
+ 2
98
+ sage: Gamma0(3).dimension_cusp_forms(3)
99
+ 0
100
+ sage: Gamma0(11).dimension_cusp_forms(-1)
101
+ 0
102
+
103
+ sage: Gamma0(22).dimension_new_cusp_forms()
104
+ 0
105
+ sage: Gamma0(100).dimension_new_cusp_forms(2, 5)
106
+ 5
107
+
108
+ Independently compute the dimension 5 above::
109
+
110
+ sage: m = ModularSymbols(100, 2, sign=1).cuspidal_subspace()
111
+ sage: m.new_subspace(5)
112
+ Modular Symbols subspace of dimension 5 of
113
+ Modular Symbols space of dimension 18 for Gamma_0(100)
114
+ of weight 2 with sign 1 over Rational Field
115
+ """
116
+
117
+ def __init__(self, level):
118
+ r"""
119
+ The congruence subgroup `\Gamma_0(N)`.
120
+
121
+ EXAMPLES::
122
+
123
+ sage: G = Gamma0(11); G
124
+ Congruence Subgroup Gamma0(11)
125
+ sage: TestSuite(G).run()
126
+ sage: G is loads(dumps(G))
127
+ True
128
+
129
+ TESTS::
130
+
131
+ sage: g = Gamma0(5)([1,1,0,1])
132
+ sage: g in Gamma0(7)
133
+ True
134
+ sage: g = Gamma0(5)([1,0,5,1])
135
+ sage: g in Gamma0(7)
136
+ False
137
+ sage: g = Gamma0(2)([1,0,0,1])
138
+ sage: g in SL2Z
139
+ True
140
+ """
141
+ CongruenceSubgroup.__init__(self, level)
142
+
143
+ # We *don't* call the GammaH init script, as this requires calculating
144
+ # generators for the units modulo N which is time-consuming; this will
145
+ # be done if needed by the _generators_for_H and _list_of_elements_in_H
146
+ # methods.
147
+ #
148
+ # GammaH_class.__init__(self, level, [int(x) for x in IntegerModRing(level).unit_gens()])
149
+
150
+ def _repr_(self):
151
+ """
152
+ Return the string representation of ``self``.
153
+
154
+ EXAMPLES::
155
+
156
+ sage: Gamma0(98)._repr_()
157
+ 'Congruence Subgroup Gamma0(98)'
158
+ """
159
+ return "Congruence Subgroup Gamma0(%s)" % self.level()
160
+
161
+ def __reduce__(self):
162
+ """
163
+ Used for pickling ``self``.
164
+
165
+ EXAMPLES::
166
+
167
+ sage: Gamma0(22).__reduce__()
168
+ (<function Gamma0_constructor at ...>, (22,))
169
+ """
170
+ return Gamma0_constructor, (self.level(),)
171
+
172
+ def _latex_(self):
173
+ r"""
174
+ Return the \LaTeX representation of ``self``.
175
+
176
+ EXAMPLES::
177
+
178
+ sage: Gamma0(20)._latex_()
179
+ '\\Gamma_0(20)'
180
+ sage: latex(Gamma0(20))
181
+ \Gamma_0(20)
182
+ """
183
+ return "\\Gamma_0(%s)" % self.level()
184
+
185
+ @cached_method
186
+ def _generators_for_H(self):
187
+ """
188
+ Return generators for the subgroup `H` of the units mod
189
+ ``self.level()`` that defines ``self``.
190
+
191
+ EXAMPLES::
192
+
193
+ sage: Gamma0(15)._generators_for_H()
194
+ [11, 7]
195
+ """
196
+ if self.level() in [1, 2]:
197
+ return []
198
+ return [ZZ(x) for x in IntegerModRing(self.level()).unit_gens()]
199
+
200
+ @cached_method
201
+ def _list_of_elements_in_H(self):
202
+ """
203
+ Return a sorted list of Python ints that are representatives
204
+ between 0 and N-1 of the elements of H.
205
+
206
+ EXAMPLES::
207
+
208
+ sage: G = Gamma0(11)
209
+ sage: G._list_of_elements_in_H()
210
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
211
+
212
+ sage: G = Gamma0(6)
213
+ sage: G._list_of_elements_in_H()
214
+ [1, 5]
215
+
216
+ sage: G = Gamma0(1)
217
+ sage: G._list_of_elements_in_H()
218
+ [1]
219
+ """
220
+ N = self.level()
221
+ if N != 1:
222
+ H = [x for x in range(1, N) if gcd(x, N) == 1]
223
+ else:
224
+ H = [1]
225
+
226
+ return H
227
+
228
+ def divisor_subgroups(self):
229
+ r"""
230
+ Return the subgroups of SL2Z of the form Gamma0(M) that contain this subgroup,
231
+ i.e. those for M a divisor of N.
232
+
233
+ EXAMPLES::
234
+
235
+ sage: Gamma0(24).divisor_subgroups()
236
+ [Modular Group SL(2,Z),
237
+ Congruence Subgroup Gamma0(2),
238
+ Congruence Subgroup Gamma0(3),
239
+ Congruence Subgroup Gamma0(4),
240
+ Congruence Subgroup Gamma0(6),
241
+ Congruence Subgroup Gamma0(8),
242
+ Congruence Subgroup Gamma0(12),
243
+ Congruence Subgroup Gamma0(24)]
244
+ """
245
+ return [Gamma0_constructor(M) for M in self.level().divisors()]
246
+
247
+ def is_even(self) -> bool:
248
+ r"""
249
+ Return ``True`` precisely if this subgroup contains the matrix -1.
250
+
251
+ Since `\Gamma0(N)` always contains the matrix -1, this always
252
+ returns ``True``.
253
+
254
+ EXAMPLES::
255
+
256
+ sage: Gamma0(12).is_even()
257
+ True
258
+ sage: SL2Z.is_even()
259
+ True
260
+ """
261
+ return True
262
+
263
+ def is_subgroup(self, right) -> bool:
264
+ """
265
+ Return ``True`` if ``self`` is a subgroup of ``right``.
266
+
267
+ EXAMPLES::
268
+
269
+ sage: G = Gamma0(20)
270
+ sage: G.is_subgroup(SL2Z)
271
+ True
272
+ sage: G.is_subgroup(Gamma0(4))
273
+ True
274
+ sage: G.is_subgroup(Gamma0(20))
275
+ True
276
+ sage: G.is_subgroup(Gamma0(7))
277
+ False
278
+ sage: G.is_subgroup(Gamma1(20))
279
+ False
280
+ sage: G.is_subgroup(GammaH(40, []))
281
+ False
282
+ sage: Gamma0(80).is_subgroup(GammaH(40, [31, 21, 17]))
283
+ True
284
+ sage: Gamma0(2).is_subgroup(Gamma1(2))
285
+ True
286
+ """
287
+ if right.level() == 1:
288
+ return True
289
+ if isinstance(right, Gamma0_class):
290
+ return self.level() % right.level() == 0
291
+ if isinstance(right, Gamma1_class):
292
+ if right.level() >= 3:
293
+ return False
294
+ elif right.level() == 2:
295
+ return self.level() == 2
296
+ # case level 1 dealt with above
297
+ else:
298
+ return GammaH_class.is_subgroup(self, right)
299
+
300
+ def coset_reps(self):
301
+ r"""
302
+ Return representatives for the right cosets of this congruence
303
+ subgroup in `\SL_2(\ZZ)` as a generator object.
304
+
305
+ Use ``list(self.coset_reps())`` to obtain coset reps as a
306
+ list.
307
+
308
+ EXAMPLES::
309
+
310
+ sage: list(Gamma0(5).coset_reps())
311
+ [
312
+ [1 0] [ 0 -1] [1 0] [ 0 -1] [ 0 -1] [ 0 -1]
313
+ [0 1], [ 1 0], [1 1], [ 1 2], [ 1 3], [ 1 4]
314
+ ]
315
+ sage: list(Gamma0(4).coset_reps())
316
+ [
317
+ [1 0] [ 0 -1] [1 0] [ 0 -1] [ 0 -1] [1 0]
318
+ [0 1], [ 1 0], [1 1], [ 1 2], [ 1 3], [2 1]
319
+ ]
320
+ sage: list(Gamma0(1).coset_reps())
321
+ [
322
+ [1 0]
323
+ [0 1]
324
+ ]
325
+ """
326
+ from .all import SL2Z
327
+ N = self.level()
328
+ if N == 1: # P1List isn't very happy working modulo 1
329
+ yield SL2Z([1,0,0,1])
330
+ else:
331
+ for z in P1List(N):
332
+ yield SL2Z(lift_to_sl2z(z[0], z[1], N))
333
+
334
+ @cached_method
335
+ def generators(self, algorithm='farey'):
336
+ r"""
337
+ Return generators for this congruence subgroup.
338
+
339
+ INPUT:
340
+
341
+ - ``algorithm`` -- string; either ``'farey'`` (default) or
342
+ ``'todd-coxeter'``
343
+
344
+ If ``algorithm`` is set to ``'farey'``, then the generators will be
345
+ calculated using Farey symbols, which will always return a *minimal*
346
+ generating set. See :mod:`~sage.modular.arithgroup.farey_symbol` for
347
+ more information.
348
+
349
+ If ``algorithm`` is set to ``'todd-coxeter'``, a simpler algorithm
350
+ based on Todd-Coxeter enumeration will be used. This tends to return
351
+ far larger sets of generators.
352
+
353
+ EXAMPLES::
354
+
355
+ sage: Gamma0(3).generators()
356
+ [
357
+ [1 1] [-1 1]
358
+ [0 1], [-3 2]
359
+ ]
360
+ sage: Gamma0(3).generators(algorithm='todd-coxeter')
361
+ [
362
+ [1 1] [-1 0] [ 1 -1] [1 0] [1 1] [-1 0] [ 1 0]
363
+ [0 1], [ 0 -1], [ 0 1], [3 1], [0 1], [ 3 -1], [-3 1]
364
+ ]
365
+ sage: SL2Z.gens()
366
+ (
367
+ [ 0 -1] [1 1]
368
+ [ 1 0], [0 1]
369
+ )
370
+ """
371
+ if self.level() == 1:
372
+ # we return a fixed set of generators for SL2Z, for historical
373
+ # reasons, which aren't the ones the Farey symbol code gives
374
+ return [ self([0,-1,1,0]), self([1,1,0,1]) ]
375
+
376
+ elif algorithm == "farey":
377
+ return self.farey_symbol().generators()
378
+
379
+ elif algorithm == "todd-coxeter":
380
+ from sage.modular.modsym.p1list import P1List
381
+
382
+ from .congroup import generators_helper
383
+ level = self.level()
384
+ if level == 1: # P1List isn't very happy working mod 1
385
+ return [ self([0,-1,1,0]), self([1,1,0,1]) ]
386
+ gen_list = generators_helper(P1List(level), level)
387
+ return [self(g, check=False) for g in gen_list]
388
+
389
+ else:
390
+ raise ValueError("Unknown algorithm '%s' (should be either 'farey' or 'todd-coxeter')" % algorithm)
391
+
392
+ def gamma_h_subgroups(self):
393
+ r"""
394
+ Return the subgroups of the form `\Gamma_H(N)` contained
395
+ in ``self``, where `N` is the level of ``self``.
396
+
397
+ EXAMPLES::
398
+
399
+ sage: G = Gamma0(11)
400
+ sage: G.gamma_h_subgroups() # optional - gap_package_polycyclic
401
+ [Congruence Subgroup Gamma0(11),
402
+ Congruence Subgroup Gamma_H(11) with H generated by [3],
403
+ Congruence Subgroup Gamma_H(11) with H generated by [10],
404
+ Congruence Subgroup Gamma1(11)]
405
+ sage: G = Gamma0(12)
406
+ sage: G.gamma_h_subgroups() # optional - gap_package_polycyclic
407
+ [Congruence Subgroup Gamma0(12),
408
+ Congruence Subgroup Gamma_H(12) with H generated by [7],
409
+ Congruence Subgroup Gamma_H(12) with H generated by [11],
410
+ Congruence Subgroup Gamma_H(12) with H generated by [5],
411
+ Congruence Subgroup Gamma1(12)]
412
+ """
413
+ from .all import GammaH
414
+ N = self.level()
415
+ R = IntegerModRing(N)
416
+ return [GammaH(N, H) for H in R.multiplicative_subgroups()]
417
+
418
+ def _contains_sl2(self, a, b, c, d):
419
+ r"""
420
+ Test whether x is an element of this group.
421
+
422
+ EXAMPLES::
423
+
424
+ sage: G = Gamma0(12)
425
+ sage: [1, 0, 24, 1] in G
426
+ True
427
+ sage: matrix(ZZ, 2, [1, 1, -12, -11]) in G
428
+ True
429
+ sage: SL2Z([0,-1,1,0]) in G
430
+ False
431
+ sage: 1 in G
432
+ True
433
+ sage: -1 in G
434
+ True
435
+ sage: 2 in G
436
+ False
437
+
438
+ The _element_constructor_ method calls this method::
439
+
440
+ sage: G([1, 0, 23, 1]) # indirect doctest
441
+ Traceback (most recent call last):
442
+ ...
443
+ TypeError: matrix [ 1 0]
444
+ [23 1] is not an element of Congruence Subgroup Gamma0(12)
445
+ """
446
+ return (c % self.level() == 0)
447
+
448
+ def _find_cusps(self):
449
+ r"""
450
+ Return an ordered list of inequivalent cusps for self, i.e. a
451
+ set of representatives for the orbits of ``self`` on
452
+ `\mathbb{P}^1(\QQ)`. These are returned in a reduced
453
+ form; see ``self.reduce_cusp`` for the definition of reduced.
454
+
455
+ ALGORITHM:
456
+ Uses explicit formulae specific to `\Gamma_0(N)`: a reduced cusp on
457
+ `\Gamma_0(N)` is always of the form `a/d` where `d | N`, and `a_1/d
458
+ \sim a_2/d` if and only if `a_1 \cong a_2 \bmod {\rm gcd}(d,
459
+ N/d)`.
460
+
461
+ EXAMPLES::
462
+
463
+ sage: Gamma0(90)._find_cusps()
464
+ [0, 1/45, 1/30, 1/18, 1/15, 1/10, 1/9, 2/15, 1/6, 1/5, 1/3, 11/30, 1/2, 2/3, 5/6, Infinity]
465
+ sage: Gamma0(1).cusps()
466
+ [Infinity]
467
+ sage: Gamma0(180).cusps() == Gamma0(180).cusps(algorithm='modsym')
468
+ True
469
+ """
470
+ N = self.level()
471
+ s = []
472
+
473
+ for d in divisors(N):
474
+ w = gcd(d, N//d)
475
+ if w == 1:
476
+ if d == 1:
477
+ s.append(Cusp(1,0))
478
+ elif d == N:
479
+ s.append(Cusp(0,1))
480
+ else:
481
+ s.append(Cusp(1,d))
482
+ else:
483
+ for a in range(1, w):
484
+ if gcd(a, w) == 1:
485
+ while gcd(a, d//w) != 1:
486
+ a += w
487
+ s.append(Cusp(a,d))
488
+ return sorted(s)
489
+
490
+ def ncusps(self):
491
+ r"""
492
+ Return the number of cusps of this subgroup `\Gamma_0(N)`.
493
+
494
+ EXAMPLES::
495
+
496
+ sage: [Gamma0(n).ncusps() for n in [1..19]]
497
+ [1, 2, 2, 3, 2, 4, 2, 4, 4, 4, 2, 6, 2, 4, 4, 6, 2, 8, 2]
498
+ sage: [Gamma0(n).ncusps() for n in prime_range(2,100)]
499
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
500
+ """
501
+ n = self.level()
502
+ return sum(euler_phi(gcd(d, n // d)) for d in n.divisors())
503
+
504
+ def nu2(self):
505
+ r"""
506
+ Return the number of elliptic points of order 2 for this congruence
507
+ subgroup `\Gamma_0(N)`.
508
+
509
+ The number of these is given by a standard formula:
510
+ 0 if `N` is divisible by 4 or any prime congruent to -1 mod 4, and
511
+ otherwise `2^d` where d is the number of odd primes dividing `N`.
512
+
513
+ EXAMPLES::
514
+
515
+ sage: Gamma0(2).nu2()
516
+ 1
517
+ sage: Gamma0(4).nu2()
518
+ 0
519
+ sage: Gamma0(21).nu2()
520
+ 0
521
+ sage: Gamma0(1105).nu2()
522
+ 8
523
+ sage: [Gamma0(n).nu2() for n in [1..19]]
524
+ [1, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0]
525
+ """
526
+ n = self.level()
527
+ if n % 4 == 0:
528
+ return ZZ(0)
529
+ return prod([ 1 + kronecker_symbol(-4, p) for p, _ in n.factor()])
530
+
531
+ def nu3(self):
532
+ r"""
533
+ Return the number of elliptic points of order 3 for this congruence
534
+ subgroup `\Gamma_0(N)`. The number of these is given by a standard formula:
535
+ 0 if `N` is divisible by 9 or any prime congruent to -1 mod 3, and
536
+ otherwise `2^d` where d is the number of primes other than 3 dividing `N`.
537
+
538
+ EXAMPLES::
539
+
540
+ sage: Gamma0(2).nu3()
541
+ 0
542
+ sage: Gamma0(3).nu3()
543
+ 1
544
+ sage: Gamma0(9).nu3()
545
+ 0
546
+ sage: Gamma0(7).nu3()
547
+ 2
548
+ sage: Gamma0(21).nu3()
549
+ 2
550
+ sage: Gamma0(1729).nu3()
551
+ 8
552
+ """
553
+ n = self.level()
554
+ if (n % 9 == 0):
555
+ return ZZ(0)
556
+ return prod([ 1 + kronecker_symbol(-3, p) for p, _ in n.factor()])
557
+
558
+ def index(self):
559
+ r"""
560
+ Return the index of ``self`` in the full modular group.
561
+
562
+ This is given by
563
+
564
+ .. MATH::
565
+
566
+ N \prod_{\substack{p \mid N \\ \text{$p$ prime}}}\left(1 + \frac{1}{p}\right).
567
+
568
+ EXAMPLES::
569
+
570
+ sage: [Gamma0(n).index() for n in [1..19]]
571
+ [1, 3, 4, 6, 6, 12, 8, 12, 12, 18, 12, 24, 14, 24, 24, 24, 18, 36, 20]
572
+ sage: Gamma0(32041).index()
573
+ 32220
574
+ """
575
+ return prod([p**e + p**(e-1) for (p,e) in self.level().factor()])
576
+
577
+ def dimension_new_cusp_forms(self, k=2, p=0):
578
+ r"""
579
+ Return the dimension of the space of new (or `p`-new)
580
+ weight `k` cusp forms for this congruence subgroup.
581
+
582
+ INPUT:
583
+
584
+ - ``k`` -- integer (default: 2); the weight. Not fully
585
+ implemented for `k = 1`.
586
+ - ``p`` -- integer (default: 0); if nonzero, compute the
587
+ `p`-new subspace
588
+
589
+ OUTPUT: integer
590
+
591
+ ALGORITHM:
592
+
593
+ This comes from the formula given in Theorem 1 of
594
+ http://www.math.ubc.ca/~gerg/papers/downloads/DSCFN.pdf
595
+
596
+ EXAMPLES::
597
+
598
+ sage: Gamma0(11000).dimension_new_cusp_forms()
599
+ 240
600
+ sage: Gamma0(11000).dimension_new_cusp_forms(k=1)
601
+ 0
602
+ sage: Gamma0(22).dimension_new_cusp_forms(k=4)
603
+ 3
604
+ sage: Gamma0(389).dimension_new_cusp_forms(k=2,p=17)
605
+ 32
606
+
607
+ TESTS::
608
+
609
+ sage: L = [1213, 1331, 2169, 2583, 2662, 2745, 3208,
610
+ ....: 3232, 3465, 3608, 4040, 4302, 4338]
611
+ sage: all(Gamma0(N).dimension_new_cusp_forms(2)==100 for N in L)
612
+ True
613
+ """
614
+ N = self.level()
615
+ k = ZZ(k)
616
+
617
+ if not (p == 0 or N % p):
618
+ return (self.dimension_cusp_forms(k) -
619
+ 2 * self.restrict(N // p).dimension_new_cusp_forms(k))
620
+
621
+ if k < 2 or k % 2:
622
+ return ZZ.zero()
623
+
624
+ factors = list(N.factor())
625
+
626
+ def s0(q, a):
627
+ # function s_0^#
628
+ if a == 1:
629
+ return 1 - 1/q
630
+ elif a == 2:
631
+ return 1 - 1/q - 1/q**2
632
+ else:
633
+ return (1 - 1/q) * (1 - 1/q**2)
634
+
635
+ def vinf(q, a):
636
+ # function v_oo^#
637
+ if a % 2:
638
+ return 0
639
+ elif a == 2:
640
+ return q - 2
641
+ else:
642
+ return q**(a/2 - 2) * (q - 1)**2
643
+
644
+ def v2(q, a):
645
+ # function v_2^#
646
+ if q % 4 == 1:
647
+ if a == 2:
648
+ return -1
649
+ else:
650
+ return 0
651
+ elif q % 4 == 3:
652
+ if a == 1:
653
+ return -2
654
+ elif a == 2:
655
+ return 1
656
+ else:
657
+ return 0
658
+ elif a in (1, 2):
659
+ return -1
660
+ elif a == 3:
661
+ return 1
662
+ else:
663
+ return 0
664
+
665
+ def v3(q, a):
666
+ # function v_3^#
667
+ if q % 3 == 1:
668
+ if a == 2:
669
+ return -1
670
+ else:
671
+ return 0
672
+ elif q % 3 == 2:
673
+ if a == 1:
674
+ return -2
675
+ elif a == 2:
676
+ return 1
677
+ else:
678
+ return 0
679
+ elif a in (1, 2):
680
+ return -1
681
+ elif a == 3:
682
+ return 1
683
+ else:
684
+ return 0
685
+
686
+ res = (k - 1) / 12 * N * prod(s0(q, a) for q, a in factors)
687
+ res -= prod(vinf(q, a) for q, a in factors) / ZZ(2)
688
+ res += ((1 - k)/4 + k//4) * prod(v2(q, a) for q, a in factors)
689
+ res += ((1 - k)/3 + k//3) * prod(v3(q, a) for q, a in factors)
690
+ if k == 2:
691
+ res += moebius(N)
692
+ return res