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,630 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ # sage.doctest: needs sage.libs.flint sage.libs.gap sage.libs.pari
3
+ r"""
4
+ Congruence arithmetic subgroups of `\SL_2(\ZZ)`
5
+
6
+ Sage can compute extensively with the standard congruence subgroups
7
+ `\Gamma_0(N)`, `\Gamma_1(N)`, and `\Gamma_H(N)`.
8
+
9
+ AUTHORS:
10
+
11
+ - William Stein
12
+ - David Loeffler (2009, 10) -- modifications to work with more general arithmetic subgroups
13
+ """
14
+ ################################################################################
15
+ #
16
+ # Copyright (C) 2004, 2006 William Stein <wstein@gmail.com>
17
+ #
18
+ # Distributed under the terms of the GNU General Public License (GPL)
19
+ #
20
+ # The full text of the GPL is available at:
21
+ #
22
+ # https://www.gnu.org/licenses/
23
+ #
24
+ ################################################################################
25
+
26
+ from sage.arith.misc import gcd
27
+ from sage.matrix.matrix_space import MatrixSpace
28
+ from sage.misc.misc_c import prod
29
+ from sage.modular.arithgroup.arithgroup_generic import ArithmeticSubgroup
30
+ from sage.rings.finite_rings.integer_mod_ring import Zmod
31
+ from sage.rings.integer_ring import ZZ
32
+ from sage.rings.rational_field import QQ
33
+ from sage.sets.set import Set
34
+
35
+
36
+ def CongruenceSubgroup_constructor(*args):
37
+ r"""
38
+ Attempt to create a congruence subgroup from the given data.
39
+
40
+ The allowed inputs are as follows:
41
+
42
+ - A :class:`~sage.groups.matrix_gps.matrix_group.MatrixGroup` object. This
43
+ must be a group of matrices over `\ZZ / N\ZZ` for some `N`, with
44
+ determinant 1, in which case the function will return the group of
45
+ matrices in `SL(2, \ZZ)` whose reduction mod `N` is in the given group.
46
+
47
+ - A list of matrices over `\ZZ / N\ZZ` for some `N`. The function will then
48
+ compute the subgroup of `SL(2, \ZZ)` generated by these matrices, and
49
+ proceed as above.
50
+
51
+ - An integer `N` and a list of matrices (over any ring coercible to `\ZZ /
52
+ N\ZZ`, e.g. over `\ZZ`). The matrices will then be coerced to `\ZZ /
53
+ N\ZZ`.
54
+
55
+ The function checks that the input G is valid. It then tests to see if
56
+ `G` is the preimage mod `N` of some group of matrices modulo a proper
57
+ divisor `M` of `N`, in which case it replaces `G` with this group before
58
+ continuing.
59
+
60
+ EXAMPLES::
61
+
62
+ sage: from sage.modular.arithgroup.congroup_generic import CongruenceSubgroup_constructor as CS
63
+ sage: CS(2, [[1,1,0,1]])
64
+ Congruence subgroup of SL(2,Z) of level 2, preimage of:
65
+ Matrix group over Ring of integers modulo 2 with 1 generators (
66
+ [1 1]
67
+ [0 1]
68
+ )
69
+ sage: CS([matrix(Zmod(2), 2, [1,1,0,1])])
70
+ Congruence subgroup of SL(2,Z) of level 2, preimage of:
71
+ Matrix group over Ring of integers modulo 2 with 1 generators (
72
+ [1 1]
73
+ [0 1]
74
+ )
75
+ sage: CS(MatrixGroup([matrix(Zmod(2), 2, [1,1,0,1])]))
76
+ Congruence subgroup of SL(2,Z) of level 2, preimage of:
77
+ Matrix group over Ring of integers modulo 2 with 1 generators (
78
+ [1 1]
79
+ [0 1]
80
+ )
81
+ sage: CS(SL(2, 2))
82
+ Modular Group SL(2,Z)
83
+
84
+ Some invalid inputs::
85
+
86
+ sage: CS(SU(2, 7))
87
+ Traceback (most recent call last):
88
+ ...
89
+ TypeError: Ring of definition must be Z / NZ for some N
90
+ """
91
+ from sage.groups.matrix_gps.finitely_generated import MatrixGroup
92
+ from sage.groups.matrix_gps.matrix_group import MatrixGroup_base
93
+
94
+ if isinstance(args[0], MatrixGroup_base):
95
+ G = args[0]
96
+
97
+ elif isinstance(args[0], list):
98
+ G = MatrixGroup(args[0])
99
+
100
+ elif args[0] in ZZ:
101
+ M = MatrixSpace(Zmod(args[0]), 2)
102
+ G = MatrixGroup([M(x) for x in args[1]])
103
+
104
+ R = G.matrix_space().base_ring()
105
+ if not hasattr(R, "cover_ring") or R.cover_ring() != ZZ:
106
+ raise TypeError("Ring of definition must be Z / NZ for some N")
107
+
108
+ if not all(x.matrix().det() == 1 for x in G.gens()):
109
+ raise ValueError("Group must be contained in SL(2, Z / N)")
110
+ GG = _minimize_level(G)
111
+ if GG in ZZ:
112
+ from .all import Gamma
113
+ return Gamma(GG)
114
+ else:
115
+ return CongruenceSubgroupFromGroup(GG)
116
+
117
+
118
+ def is_CongruenceSubgroup(x):
119
+ r"""
120
+ Return ``True`` if x is of type CongruenceSubgroup.
121
+
122
+ Note that this may be False even if `x` really is a congruence subgroup --
123
+ it tests whether `x` is "obviously" congruence, i.e.~whether it has a
124
+ congruence subgroup datatype. To test whether or not an arithmetic subgroup
125
+ of `SL(2, \ZZ)` is congruence, use the ``is_congruence()`` method instead.
126
+
127
+ EXAMPLES::
128
+
129
+ sage: from sage.modular.arithgroup.congroup_generic import is_CongruenceSubgroup
130
+ sage: is_CongruenceSubgroup(SL2Z)
131
+ doctest:warning...
132
+ DeprecationWarning: The function is_CongruenceSubgroup is deprecated; use 'isinstance(..., CongruenceSubgroupBase)' instead.
133
+ See https://github.com/sagemath/sage/issues/38035 for details.
134
+ True
135
+ sage: is_CongruenceSubgroup(Gamma0(13))
136
+ True
137
+ sage: is_CongruenceSubgroup(Gamma1(6))
138
+ True
139
+ sage: is_CongruenceSubgroup(GammaH(11, [3]))
140
+ True
141
+ sage: G = ArithmeticSubgroup_Permutation(L = "(1, 2)", R = "(1, 2)"); is_CongruenceSubgroup(G)
142
+ False
143
+ sage: G.is_congruence()
144
+ True
145
+ sage: is_CongruenceSubgroup(SymmetricGroup(3))
146
+ False
147
+ """
148
+ from sage.misc.superseded import deprecation
149
+ deprecation(38035, "The function is_CongruenceSubgroup is deprecated; use 'isinstance(..., CongruenceSubgroupBase)' instead.")
150
+ return isinstance(x, CongruenceSubgroupBase)
151
+
152
+
153
+ class CongruenceSubgroupBase(ArithmeticSubgroup):
154
+
155
+ def __init__(self, level):
156
+ """
157
+ Create a congruence subgroup with given level.
158
+
159
+ EXAMPLES::
160
+
161
+ sage: Gamma0(500)
162
+ Congruence Subgroup Gamma0(500)
163
+ """
164
+ level = ZZ(level)
165
+ if level <= 0:
166
+ raise ArithmeticError("Congruence groups only defined for positive levels.")
167
+ self.__level = level
168
+ ArithmeticSubgroup.__init__(self)
169
+
170
+ def _an_element_(self):
171
+ r"""
172
+ Return an element of ``self`` (mainly for use by the test suite).
173
+
174
+ EXAMPLES::
175
+
176
+ sage: Gamma(3).an_element() # indirect doctest
177
+ [-2 -3]
178
+ [ 3 4]
179
+ """
180
+ N = self.level()
181
+ return self([1-N, -N, N, 1+N])
182
+
183
+ def is_congruence(self) -> bool:
184
+ r"""
185
+ Return ``True``, since this is a congruence subgroup.
186
+
187
+ EXAMPLES::
188
+
189
+ sage: Gamma0(7).is_congruence()
190
+ True
191
+ """
192
+ return True
193
+
194
+ def level(self):
195
+ """
196
+ Return the level of this congruence subgroup.
197
+
198
+ EXAMPLES::
199
+
200
+ sage: SL2Z.level()
201
+ 1
202
+ sage: Gamma0(20).level()
203
+ 20
204
+ sage: Gamma1(11).level()
205
+ 11
206
+ sage: GammaH(14, [5]).level()
207
+ 14
208
+ """
209
+ return self.__level
210
+
211
+ def __eq__(self, other):
212
+ r"""
213
+ Check that ``self`` is equal to ``other``.
214
+
215
+ EXAMPLES::
216
+
217
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) == Gamma1(3)
218
+ True
219
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) == Gamma(3)
220
+ False
221
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) == QQ
222
+ False
223
+ """
224
+ # This is carefully laid out so it can be called early on in the Sage
225
+ # startup process when we want to create the standard generators of
226
+ # SL2Z for use in arithgroup_perm. Hence it must work in this case
227
+ # without being able to import the arithgroup_perm module. That's why
228
+ # the most general case is *first*, not last.
229
+ # Note that lazy_import doesn't work here, because it doesn't play
230
+ # nicely with isinstance().
231
+ if not isinstance(other, ArithmeticSubgroup):
232
+ return False
233
+
234
+ elif isinstance(other, CongruenceSubgroupBase):
235
+ if self.level() == other.level() == 1:
236
+ return True
237
+ # shouldn't come up except with pickling/unpickling
238
+ return (self.level() == other.level() and
239
+ self.index() == other.index() and
240
+ self.image_mod_n() == other.image_mod_n())
241
+
242
+ from sage.modular.arithgroup.arithgroup_perm import (
243
+ ArithmeticSubgroup_Permutation_class,
244
+ )
245
+ if isinstance(other, ArithmeticSubgroup_Permutation_class):
246
+ return self.as_permutation_group() == other
247
+
248
+ else:
249
+ # we shouldn't ever get here
250
+ raise NotImplementedError
251
+
252
+ def __ne__(self, other):
253
+ """
254
+ Check that ``self`` is not equal to ``other``.
255
+
256
+ EXAMPLES::
257
+
258
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) != Gamma1(3)
259
+ False
260
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) != Gamma(3)
261
+ True
262
+ sage: CongruenceSubgroup(3,[ [1,1,0,1] ]) != QQ
263
+ True
264
+ """
265
+ return not (self == other)
266
+
267
+ def __hash__(self):
268
+ """
269
+ Return the hash of ``self``.
270
+
271
+ EXAMPLES::
272
+
273
+ sage: hash(CongruenceSubgroup(3,[ [1,1,0,1] ])) == hash(Gamma1(3))
274
+ True
275
+ sage: hash(CongruenceSubgroup(3,[ [1,1,0,1] ])) == hash(Gamma(3))
276
+ False
277
+ """
278
+ return hash((self.level(), self.index()))
279
+
280
+
281
+ class CongruenceSubgroupFromGroup(CongruenceSubgroupBase):
282
+ r"""
283
+ A congruence subgroup, defined by the data of an integer `N` and a subgroup
284
+ `G` of the finite group `SL(2, \ZZ / N\ZZ)`; the congruence subgroup
285
+ consists of all the matrices in `SL(2, \ZZ)` whose reduction modulo `N`
286
+ lies in `G`.
287
+
288
+ This class should not be instantiated directly, but created using the
289
+ factory function
290
+ :func:`~sage.modular.arithgroup.congroup_generic.CongruenceSubgroup_constructor`,
291
+ which accepts much more flexible input, and checks the input to make sure
292
+ it is valid.
293
+
294
+ TESTS::
295
+
296
+ sage: G = CongruenceSubgroup(5, [[0,-1,1,0]]); G
297
+ Congruence subgroup of SL(2,Z) of level 5, preimage of:
298
+ Matrix group over Ring of integers modulo 5 with 1 generators (
299
+ [0 4]
300
+ [1 0]
301
+ )
302
+ sage: TestSuite(G).run()
303
+ """
304
+
305
+ def __init__(self, G):
306
+ r"""
307
+ Standard init function.
308
+
309
+ TESTS::
310
+
311
+ sage: from sage.modular.arithgroup.congroup_generic import CongruenceSubgroupFromGroup
312
+ sage: G = MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])])
313
+ sage: CongruenceSubgroupFromGroup(G).index() # indirect doctest
314
+ 2
315
+ """
316
+ N = G.base_ring().characteristic()
317
+ self.__G = G
318
+ CongruenceSubgroupBase.__init__(self, N)
319
+
320
+ def __reduce__(self):
321
+ r"""
322
+ Data defining ``self`` (for pickling).
323
+
324
+ EXAMPLES::
325
+
326
+ sage: G = CongruenceSubgroup(5, [[0,-1,1,0]])
327
+ sage: G.__reduce__()
328
+ (<function CongruenceSubgroup_constructor at ...>,
329
+ (Matrix group over Ring of integers modulo 5 with 1 generators (
330
+ [0 4]
331
+ [1 0]
332
+ ),))
333
+ """
334
+ return CongruenceSubgroup_constructor, (self.image_mod_n(),)
335
+
336
+ def _contains_sl2(self, a, b, c, d):
337
+ r"""
338
+ Test whether ``[a,b;c,d]`` is an element of ``self``.
339
+
340
+ EXAMPLES::
341
+
342
+ sage: G = MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])])
343
+ sage: H = sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(G)
344
+ sage: H(1)
345
+ [1 0]
346
+ [0 1]
347
+ sage: H([0,-1,1,0])
348
+ Traceback (most recent call last):
349
+ ...
350
+ TypeError: matrix [ 0 -1]
351
+ [ 1 0] is not an element of Congruence subgroup of SL(2,Z) of level 2, preimage of:
352
+ Matrix group over Ring of integers modulo 2 with 1 generators (
353
+ [1 1]
354
+ [1 0]
355
+ )
356
+ sage: H([1,2,0,1])
357
+ [1 2]
358
+ [0 1]
359
+ sage: H(SL2Z([0,-1,1,0]), check=False)
360
+ [ 0 -1]
361
+ [ 1 0]
362
+ sage: H([1,2,0,1]).parent()
363
+ Modular Group SL(2,Z)
364
+ """
365
+ try:
366
+ self.image_mod_n()([a, b, c, d])
367
+ except (TypeError, ValueError):
368
+ return False
369
+ return True
370
+
371
+ def to_even_subgroup(self):
372
+ r"""
373
+ Return the smallest even subgroup of `SL(2, \ZZ)` containing ``self``.
374
+
375
+ EXAMPLES::
376
+
377
+ sage: G = Gamma(3)
378
+ sage: G.to_even_subgroup()
379
+ Congruence subgroup of SL(2,Z) of level 3, preimage of:
380
+ Matrix group over Ring of integers modulo 3 with 1 generators (
381
+ [2 0]
382
+ [0 2]
383
+ )
384
+ """
385
+ if self.is_even():
386
+ return self
387
+ else:
388
+ from sage.groups.matrix_gps.finitely_generated import MatrixGroup
389
+
390
+ G = self.image_mod_n()
391
+ H = MatrixGroup([ g.matrix() for g in G.gens()] + [G.matrix_space()(-1)])
392
+ return CongruenceSubgroup_constructor(H)
393
+
394
+ def _repr_(self):
395
+ r"""
396
+ String representation of ``self``.
397
+
398
+ EXAMPLES::
399
+
400
+ sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])]))._repr_()
401
+ 'Congruence subgroup of SL(2,Z) of level 2, preimage of:\n Matrix group over Ring of integers modulo 2 with 1 generators (\n[1 1]\n[1 0]\n)'
402
+ """
403
+ return "Congruence subgroup of SL(2,Z) of level %s, preimage of:\n %s" % (self.level(), self.image_mod_n())
404
+
405
+ def index(self):
406
+ r"""
407
+ Return the index of ``self`` in the full modular group. This is equal to
408
+ the index in `SL(2, \ZZ / N\ZZ)` of the image of this group modulo
409
+ `\Gamma(N)`.
410
+
411
+ EXAMPLES::
412
+
413
+ sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])])).index()
414
+ 2
415
+ """
416
+ return prod([p**(3*e-2)*(p*p-1) for (p,e) in self.level().factor()]) // self.image_mod_n().order()
417
+
418
+ def image_mod_n(self):
419
+ r"""
420
+ Return the subgroup of `SL(2, \ZZ / N\ZZ)` of which this is the
421
+ preimage, where `N` is the level of ``self``.
422
+
423
+ EXAMPLES::
424
+
425
+ sage: G = MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])])
426
+ sage: H = sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(G); H.image_mod_n()
427
+ Matrix group over Ring of integers modulo 2 with 1 generators (
428
+ [1 1]
429
+ [1 0]
430
+ )
431
+ sage: H.image_mod_n() == G
432
+ True
433
+ """
434
+ return self.__G
435
+
436
+
437
+ class CongruenceSubgroup(CongruenceSubgroupFromGroup):
438
+ r"""
439
+ One of the "standard" congruence subgroups `\Gamma_0(N)`, `\Gamma_1(N)`,
440
+ `\Gamma(N)`, or `\Gamma_H(N)` (for some `H`).
441
+
442
+ This class is not intended to be instantiated directly. Derived subclasses
443
+ must override ``_contains_sl2``, ``_repr_``, and ``image_mod_n``.
444
+ """
445
+
446
+ def image_mod_n(self):
447
+ r"""
448
+ Raise an error: all derived subclasses should override this function.
449
+
450
+ EXAMPLES::
451
+
452
+ sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5).image_mod_n()
453
+ Traceback (most recent call last):
454
+ ...
455
+ NotImplementedError
456
+ """
457
+ raise NotImplementedError
458
+
459
+ def __init__(self, *args, **kwds):
460
+ r"""
461
+ Bypass the init function of the CongruenceSubgroupFromGroup class.
462
+
463
+ EXAMPLES::
464
+
465
+ sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5) # indirect doctest
466
+ Generic congruence subgroup of level 5
467
+ """
468
+ CongruenceSubgroupBase.__init__(self, *args, **kwds)
469
+
470
+ def _repr_(self):
471
+ """
472
+ Return the string representation of ``self``.
473
+
474
+ NOTE: This function should be overridden by all subclasses.
475
+
476
+ EXAMPLES::
477
+
478
+ sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5)._repr_()
479
+ 'Generic congruence subgroup of level 5'
480
+ """
481
+ return "Generic congruence subgroup of level %s" % self.level()
482
+
483
+ def modular_symbols(self, sign=0, weight=2, base_ring=QQ):
484
+ """
485
+ Return the space of modular symbols of the specified weight and sign
486
+ on the congruence subgroup ``self``.
487
+
488
+ EXAMPLES::
489
+
490
+ sage: G = Gamma0(23)
491
+ sage: G.modular_symbols()
492
+ Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field
493
+ sage: G.modular_symbols(weight=4)
494
+ Modular Symbols space of dimension 12 for Gamma_0(23) of weight 4 with sign 0 over Rational Field
495
+ sage: G.modular_symbols(base_ring=GF(7))
496
+ Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Finite Field of size 7
497
+ sage: G.modular_symbols(sign=1)
498
+ Modular Symbols space of dimension 3 for Gamma_0(23) of weight 2 with sign 1 over Rational Field
499
+ """
500
+ from sage.modular.modsym.modsym import ModularSymbols
501
+ return ModularSymbols(self, sign=sign, weight=weight, base_ring=base_ring)
502
+
503
+ def modular_abelian_variety(self):
504
+ """
505
+ Return the modular abelian variety corresponding to the congruence
506
+ subgroup ``self``.
507
+
508
+ EXAMPLES::
509
+
510
+ sage: Gamma0(11).modular_abelian_variety()
511
+ Abelian variety J0(11) of dimension 1
512
+ sage: Gamma1(11).modular_abelian_variety()
513
+ Abelian variety J1(11) of dimension 1
514
+ sage: GammaH(11,[3]).modular_abelian_variety()
515
+ Abelian variety JH(11,[3]) of dimension 1
516
+ """
517
+ from sage.modular.abvar.abvar_ambient_jacobian import ModAbVar_ambient_jacobian
518
+ return ModAbVar_ambient_jacobian(self)
519
+
520
+ def _new_group_from_level(self, level):
521
+ r"""
522
+ Return a new group of the same type (Gamma0, Gamma1, or
523
+ GammaH) as ``self`` of the given level. In the case that ``self`` is of type
524
+ GammaH, we take the largest H inside `(\ZZ/ \text{level}\ZZ)^\times`
525
+ which maps to H, namely its inverse image under the natural reduction
526
+ map.
527
+
528
+ EXAMPLES::
529
+
530
+ sage: G = Gamma0(20)
531
+ sage: G._new_group_from_level(4)
532
+ Congruence Subgroup Gamma0(4)
533
+ sage: G._new_group_from_level(40)
534
+ Congruence Subgroup Gamma0(40)
535
+
536
+ sage: G = Gamma1(10)
537
+ sage: G._new_group_from_level(6)
538
+ Traceback (most recent call last):
539
+ ...
540
+ ValueError: one level must divide the other
541
+
542
+ sage: G = GammaH(50,[7]); G
543
+ Congruence Subgroup Gamma_H(50) with H generated by [7]
544
+ sage: G._new_group_from_level(25)
545
+ Congruence Subgroup Gamma_H(25) with H generated by [7]
546
+ sage: G._new_group_from_level(10)
547
+ Congruence Subgroup Gamma0(10)
548
+ sage: G._new_group_from_level(100)
549
+ Congruence Subgroup Gamma_H(100) with H generated by [7, 57]
550
+ """
551
+ from .all import Gamma0, Gamma1, GammaH
552
+ from .congroup_gamma0 import Gamma0_class
553
+ from .congroup_gamma1 import Gamma1_class
554
+ from .congroup_gammaH import GammaH_class
555
+ N = self.level()
556
+ if (level % N) and (N % level):
557
+ raise ValueError("one level must divide the other")
558
+ if isinstance(self, Gamma0_class):
559
+ return Gamma0(level)
560
+ elif isinstance(self, Gamma1_class):
561
+ return Gamma1(level)
562
+ elif isinstance(self, GammaH_class):
563
+ H = self._generators_for_H()
564
+ if level > N:
565
+ d = level // N
566
+ diffs = [ N*i for i in range(d) ]
567
+ newH = [ h + diff for h in H for diff in diffs ]
568
+ return GammaH(level, [x for x in newH if gcd(level, x) == 1])
569
+ else:
570
+ return GammaH(level, [ h % level for h in H ])
571
+ else:
572
+ raise NotImplementedError
573
+
574
+
575
+ def _minimize_level(G):
576
+ r"""
577
+ Utility function. Given a matrix group `G` contained in `SL(2, \ZZ / N\ZZ)`
578
+ for some `N`, test whether or not `G` is the preimage of a subgroup of
579
+ smaller level, and if so, return that subgroup.
580
+
581
+ The trivial group is handled specially: instead of returning a group, it
582
+ returns an integer `N`, representing the trivial subgroup of `SL(2, \ZZ /
583
+ N\ZZ)`.
584
+
585
+ EXAMPLES::
586
+
587
+ sage: M = MatrixSpace(Zmod(9), 2, 2)
588
+ sage: G = MatrixGroup([M(x) for x in [[1,1,0,1],[1,3,0,1],[1,0,3,1],[4,0,0,7]]]); G
589
+ Matrix group over Ring of integers modulo 9 with 4 generators (
590
+ [1 1] [1 3] [1 0] [4 0]
591
+ [0 1], [0 1], [3 1], [0 7]
592
+ )
593
+ sage: sage.modular.arithgroup.congroup_generic._minimize_level(G)
594
+ Matrix group over Ring of integers modulo 3 with 1 generators (
595
+ [1 1]
596
+ [0 1]
597
+ )
598
+ sage: G = MatrixGroup([M(x) for x in [[1,3,0,1],[1,0,3,1],[4,0,0,7]]]); G
599
+ Matrix group over Ring of integers modulo 9 with 3 generators (
600
+ [1 3] [1 0] [4 0]
601
+ [0 1], [3 1], [0 7]
602
+ )
603
+ sage: sage.modular.arithgroup.congroup_generic._minimize_level(G)
604
+ 3
605
+ """
606
+ from sage.groups.matrix_gps.finitely_generated import MatrixGroup
607
+
608
+ from .congroup_gamma import Gamma_constructor as Gamma
609
+
610
+ Glist = list(G)
611
+ N = G.base_ring().characteristic()
612
+ i = Gamma(N).index()
613
+
614
+ for d in N.divisors()[:-1]:
615
+ j = Gamma(d).index()
616
+ k = len([g for g in Glist if g.matrix().change_ring(Zmod(d)) == 1])
617
+ if k == i // j:
618
+ if d == 1:
619
+ return ZZ(1)
620
+ G = MatrixGroup([g.matrix().change_ring(Zmod(d)) for g in G.gens()])
621
+ N = d
622
+ break
623
+
624
+ # now sanitize the generators (remove duplicates and copies of the identity)
625
+ new_gens = [x.matrix() for x in G.gens() if x.matrix() != 1]
626
+ all(x.set_immutable() for x in new_gens)
627
+ new_gens = list(Set(new_gens))
628
+ if not new_gens:
629
+ return ZZ(N)
630
+ return MatrixGroup(new_gens)