passagemath-schemes 10.6.47__cp312-cp312-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.
- passagemath_schemes/.dylibs/libflint.22.0.dylib +0 -0
- passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
- passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
- passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
- passagemath_schemes/__init__.py +3 -0
- passagemath_schemes-10.6.47.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.47.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.47.dist-info/RECORD +311 -0
- passagemath_schemes-10.6.47.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.47.dist-info/top_level.txt +3 -0
- sage/all__sagemath_schemes.py +23 -0
- sage/databases/all__sagemath_schemes.py +7 -0
- sage/databases/cremona.py +1723 -0
- sage/dynamics/all__sagemath_schemes.py +2 -0
- sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
- sage/dynamics/arithmetic_dynamics/all.py +14 -0
- sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
- sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
- sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
- sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
- sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
- sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
- sage/dynamics/arithmetic_dynamics/projective_ds.py +9558 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-312-darwin.so +0 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
- sage/dynamics/arithmetic_dynamics/wehlerK3.py +2576 -0
- sage/lfunctions/all.py +18 -0
- sage/lfunctions/dokchitser.py +745 -0
- sage/lfunctions/pari.py +818 -0
- sage/lfunctions/zero_sums.cpython-312-darwin.so +0 -0
- sage/lfunctions/zero_sums.pyx +1847 -0
- sage/modular/abvar/abvar.py +5135 -0
- sage/modular/abvar/abvar_ambient_jacobian.py +413 -0
- sage/modular/abvar/abvar_newform.py +244 -0
- sage/modular/abvar/all.py +8 -0
- sage/modular/abvar/constructor.py +186 -0
- sage/modular/abvar/cuspidal_subgroup.py +371 -0
- sage/modular/abvar/finite_subgroup.py +896 -0
- sage/modular/abvar/homology.py +720 -0
- sage/modular/abvar/homspace.py +998 -0
- sage/modular/abvar/lseries.py +415 -0
- sage/modular/abvar/morphism.py +935 -0
- sage/modular/abvar/torsion_point.py +274 -0
- sage/modular/abvar/torsion_subgroup.py +740 -0
- sage/modular/all.py +43 -0
- sage/modular/arithgroup/all.py +20 -0
- sage/modular/arithgroup/arithgroup_element.cpython-312-darwin.so +0 -0
- sage/modular/arithgroup/arithgroup_element.pyx +474 -0
- sage/modular/arithgroup/arithgroup_generic.py +1402 -0
- sage/modular/arithgroup/arithgroup_perm.py +2692 -0
- sage/modular/arithgroup/congroup.cpython-312-darwin.so +0 -0
- sage/modular/arithgroup/congroup.pyx +334 -0
- sage/modular/arithgroup/congroup_gamma.py +363 -0
- sage/modular/arithgroup/congroup_gamma0.py +692 -0
- sage/modular/arithgroup/congroup_gamma1.py +653 -0
- sage/modular/arithgroup/congroup_gammaH.py +1469 -0
- sage/modular/arithgroup/congroup_generic.py +628 -0
- sage/modular/arithgroup/congroup_sl2z.py +267 -0
- sage/modular/arithgroup/farey_symbol.cpython-312-darwin.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1066 -0
- sage/modular/arithgroup/tests.py +418 -0
- sage/modular/btquotients/all.py +4 -0
- sage/modular/btquotients/btquotient.py +3753 -0
- sage/modular/btquotients/pautomorphicform.py +2570 -0
- sage/modular/buzzard.py +100 -0
- sage/modular/congroup.py +29 -0
- sage/modular/congroup_element.py +13 -0
- sage/modular/cusps.py +1109 -0
- sage/modular/cusps_nf.py +1270 -0
- sage/modular/dims.py +569 -0
- sage/modular/dirichlet.py +3310 -0
- sage/modular/drinfeld_modform/all.py +2 -0
- sage/modular/drinfeld_modform/element.py +446 -0
- sage/modular/drinfeld_modform/ring.py +773 -0
- sage/modular/drinfeld_modform/tutorial.py +236 -0
- sage/modular/etaproducts.py +1065 -0
- sage/modular/hecke/algebra.py +746 -0
- sage/modular/hecke/all.py +20 -0
- sage/modular/hecke/ambient_module.py +1019 -0
- sage/modular/hecke/degenmap.py +119 -0
- sage/modular/hecke/element.py +325 -0
- sage/modular/hecke/hecke_operator.py +780 -0
- sage/modular/hecke/homspace.py +206 -0
- sage/modular/hecke/module.py +1767 -0
- sage/modular/hecke/morphism.py +174 -0
- sage/modular/hecke/submodule.py +989 -0
- sage/modular/hypergeometric_misc.cpython-312-darwin.so +0 -0
- sage/modular/hypergeometric_misc.pxd +4 -0
- sage/modular/hypergeometric_misc.pyx +166 -0
- sage/modular/hypergeometric_motive.py +2017 -0
- sage/modular/local_comp/all.py +2 -0
- sage/modular/local_comp/liftings.py +292 -0
- sage/modular/local_comp/local_comp.py +1071 -0
- sage/modular/local_comp/smoothchar.py +1825 -0
- sage/modular/local_comp/type_space.py +748 -0
- sage/modular/modform/all.py +30 -0
- sage/modular/modform/ambient.py +815 -0
- sage/modular/modform/ambient_R.py +177 -0
- sage/modular/modform/ambient_eps.py +306 -0
- sage/modular/modform/ambient_g0.py +124 -0
- sage/modular/modform/ambient_g1.py +204 -0
- sage/modular/modform/constructor.py +545 -0
- sage/modular/modform/cuspidal_submodule.py +708 -0
- sage/modular/modform/defaults.py +14 -0
- sage/modular/modform/eis_series.py +505 -0
- sage/modular/modform/eisenstein_submodule.py +663 -0
- sage/modular/modform/element.py +4131 -0
- sage/modular/modform/find_generators.py +59 -0
- sage/modular/modform/half_integral.py +154 -0
- sage/modular/modform/hecke_operator_on_qexp.py +247 -0
- sage/modular/modform/j_invariant.py +47 -0
- sage/modular/modform/l_series_gross_zagier.py +133 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.cpython-312-darwin.so +0 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
- sage/modular/modform/notes.py +45 -0
- sage/modular/modform/numerical.py +514 -0
- sage/modular/modform/periods.py +14 -0
- sage/modular/modform/ring.py +1257 -0
- sage/modular/modform/space.py +1860 -0
- sage/modular/modform/submodule.py +118 -0
- sage/modular/modform/tests.py +64 -0
- sage/modular/modform/theta.py +110 -0
- sage/modular/modform/vm_basis.py +381 -0
- sage/modular/modform/weight1.py +220 -0
- sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
- sage/modular/modform_hecketriangle/abstract_space.py +2528 -0
- sage/modular/modform_hecketriangle/all.py +30 -0
- sage/modular/modform_hecketriangle/analytic_type.py +590 -0
- sage/modular/modform_hecketriangle/constructor.py +416 -0
- sage/modular/modform_hecketriangle/element.py +351 -0
- sage/modular/modform_hecketriangle/functors.py +752 -0
- sage/modular/modform_hecketriangle/graded_ring.py +541 -0
- sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
- sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3352 -0
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1432 -0
- sage/modular/modform_hecketriangle/readme.py +1214 -0
- sage/modular/modform_hecketriangle/series_constructor.py +580 -0
- sage/modular/modform_hecketriangle/space.py +1037 -0
- sage/modular/modform_hecketriangle/subspace.py +423 -0
- sage/modular/modsym/all.py +17 -0
- sage/modular/modsym/ambient.py +3846 -0
- sage/modular/modsym/boundary.py +1420 -0
- sage/modular/modsym/element.py +336 -0
- sage/modular/modsym/g1list.py +178 -0
- sage/modular/modsym/ghlist.py +182 -0
- sage/modular/modsym/hecke_operator.py +73 -0
- sage/modular/modsym/manin_symbol.cpython-312-darwin.so +0 -0
- sage/modular/modsym/manin_symbol.pxd +5 -0
- sage/modular/modsym/manin_symbol.pyx +497 -0
- sage/modular/modsym/manin_symbol_list.py +1295 -0
- sage/modular/modsym/modsym.py +400 -0
- sage/modular/modsym/modular_symbols.py +384 -0
- sage/modular/modsym/p1list_nf.py +1241 -0
- sage/modular/modsym/relation_matrix.py +591 -0
- sage/modular/modsym/relation_matrix_pyx.cpython-312-darwin.so +0 -0
- sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
- sage/modular/modsym/space.py +2468 -0
- sage/modular/modsym/subspace.py +455 -0
- sage/modular/modsym/tests.py +375 -0
- sage/modular/multiple_zeta.py +2632 -0
- sage/modular/multiple_zeta_F_algebra.py +786 -0
- sage/modular/overconvergent/all.py +6 -0
- sage/modular/overconvergent/genus0.py +1878 -0
- sage/modular/overconvergent/hecke_series.py +1187 -0
- sage/modular/overconvergent/weightspace.py +778 -0
- sage/modular/pollack_stevens/all.py +4 -0
- sage/modular/pollack_stevens/distributions.py +874 -0
- sage/modular/pollack_stevens/fund_domain.py +1572 -0
- sage/modular/pollack_stevens/manin_map.py +859 -0
- sage/modular/pollack_stevens/modsym.py +1593 -0
- sage/modular/pollack_stevens/padic_lseries.py +417 -0
- sage/modular/pollack_stevens/sigma0.py +534 -0
- sage/modular/pollack_stevens/space.py +1076 -0
- sage/modular/quasimodform/all.py +3 -0
- sage/modular/quasimodform/element.py +845 -0
- sage/modular/quasimodform/ring.py +828 -0
- sage/modular/quatalg/all.py +3 -0
- sage/modular/quatalg/brandt.py +1642 -0
- sage/modular/ssmod/all.py +8 -0
- sage/modular/ssmod/ssmod.py +827 -0
- sage/rings/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/binary_form_reduce.py +585 -0
- sage/schemes/all.py +41 -0
- sage/schemes/berkovich/all.py +6 -0
- sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
- sage/schemes/berkovich/berkovich_space.py +748 -0
- sage/schemes/curves/affine_curve.py +2928 -0
- sage/schemes/curves/all.py +33 -0
- sage/schemes/curves/closed_point.py +434 -0
- sage/schemes/curves/constructor.py +381 -0
- sage/schemes/curves/curve.py +542 -0
- sage/schemes/curves/plane_curve_arrangement.py +1283 -0
- sage/schemes/curves/point.py +463 -0
- sage/schemes/curves/projective_curve.py +3026 -0
- sage/schemes/curves/zariski_vankampen.py +1932 -0
- sage/schemes/cyclic_covers/all.py +2 -0
- sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
- sage/schemes/cyclic_covers/constructor.py +137 -0
- sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
- sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
- sage/schemes/elliptic_curves/BSD.py +1036 -0
- sage/schemes/elliptic_curves/Qcurves.py +592 -0
- sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
- sage/schemes/elliptic_curves/all.py +49 -0
- sage/schemes/elliptic_curves/cardinality.py +609 -0
- sage/schemes/elliptic_curves/cm.py +1102 -0
- sage/schemes/elliptic_curves/constructor.py +1552 -0
- sage/schemes/elliptic_curves/ec_database.py +175 -0
- sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
- sage/schemes/elliptic_curves/ell_egros.py +459 -0
- sage/schemes/elliptic_curves/ell_field.py +2836 -0
- sage/schemes/elliptic_curves/ell_finite_field.py +3359 -0
- sage/schemes/elliptic_curves/ell_generic.py +3760 -0
- sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
- sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
- sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
- sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
- sage/schemes/elliptic_curves/ell_point.py +4787 -0
- sage/schemes/elliptic_curves/ell_rational_field.py +7368 -0
- sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
- sage/schemes/elliptic_curves/ell_torsion.py +436 -0
- sage/schemes/elliptic_curves/ell_wp.py +352 -0
- sage/schemes/elliptic_curves/formal_group.py +760 -0
- sage/schemes/elliptic_curves/gal_reps.py +1459 -0
- sage/schemes/elliptic_curves/gal_reps_number_field.py +1669 -0
- sage/schemes/elliptic_curves/gp_simon.py +152 -0
- sage/schemes/elliptic_curves/heegner.py +7335 -0
- sage/schemes/elliptic_curves/height.py +2109 -0
- sage/schemes/elliptic_curves/hom.py +1406 -0
- sage/schemes/elliptic_curves/hom_composite.py +934 -0
- sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
- sage/schemes/elliptic_curves/hom_scalar.py +531 -0
- sage/schemes/elliptic_curves/hom_sum.py +682 -0
- sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
- sage/schemes/elliptic_curves/homset.py +271 -0
- sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
- sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
- sage/schemes/elliptic_curves/jacobian.py +237 -0
- sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
- sage/schemes/elliptic_curves/kraus.py +1014 -0
- sage/schemes/elliptic_curves/lseries_ell.py +943 -0
- sage/schemes/elliptic_curves/mod5family.py +105 -0
- sage/schemes/elliptic_curves/mod_poly.py +197 -0
- sage/schemes/elliptic_curves/mod_sym_num.cpython-312-darwin.so +0 -0
- sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
- sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
- sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
- sage/schemes/elliptic_curves/padics.py +1816 -0
- sage/schemes/elliptic_curves/period_lattice.py +2234 -0
- sage/schemes/elliptic_curves/period_lattice_region.cpython-312-darwin.so +0 -0
- sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
- sage/schemes/elliptic_curves/saturation.py +715 -0
- sage/schemes/elliptic_curves/sha_tate.py +1158 -0
- sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
- sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
- sage/schemes/hyperelliptic_curves/all.py +6 -0
- sage/schemes/hyperelliptic_curves/constructor.py +291 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
- sage/schemes/hyperelliptic_curves/invariants.py +410 -0
- sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
- sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
- sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
- sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
- sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
- sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
- sage/schemes/hyperelliptic_curves/mestre.py +302 -0
- sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
- sage/schemes/jacobians/abstract_jacobian.py +277 -0
- sage/schemes/jacobians/all.py +2 -0
- sage/schemes/overview.py +161 -0
- sage/schemes/plane_conics/all.py +22 -0
- sage/schemes/plane_conics/con_field.py +1296 -0
- sage/schemes/plane_conics/con_finite_field.py +158 -0
- sage/schemes/plane_conics/con_number_field.py +456 -0
- sage/schemes/plane_conics/con_rational_field.py +406 -0
- sage/schemes/plane_conics/con_rational_function_field.py +580 -0
- sage/schemes/plane_conics/constructor.py +249 -0
- sage/schemes/plane_quartics/all.py +2 -0
- sage/schemes/plane_quartics/quartic_constructor.py +71 -0
- sage/schemes/plane_quartics/quartic_generic.py +73 -0
- sage/schemes/riemann_surfaces/all.py +1 -0
- sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
- sage_wheels/share/cremona/cremona_mini.db +0 -0
- sage_wheels/share/ellcurves/rank0 +30427 -0
- sage_wheels/share/ellcurves/rank1 +31871 -0
- sage_wheels/share/ellcurves/rank10 +6 -0
- sage_wheels/share/ellcurves/rank11 +6 -0
- sage_wheels/share/ellcurves/rank12 +1 -0
- sage_wheels/share/ellcurves/rank14 +1 -0
- sage_wheels/share/ellcurves/rank15 +1 -0
- sage_wheels/share/ellcurves/rank17 +1 -0
- sage_wheels/share/ellcurves/rank19 +1 -0
- sage_wheels/share/ellcurves/rank2 +2388 -0
- sage_wheels/share/ellcurves/rank20 +1 -0
- sage_wheels/share/ellcurves/rank21 +1 -0
- sage_wheels/share/ellcurves/rank22 +1 -0
- sage_wheels/share/ellcurves/rank23 +1 -0
- sage_wheels/share/ellcurves/rank24 +1 -0
- sage_wheels/share/ellcurves/rank28 +1 -0
- sage_wheels/share/ellcurves/rank3 +836 -0
- sage_wheels/share/ellcurves/rank4 +10 -0
- sage_wheels/share/ellcurves/rank5 +5 -0
- sage_wheels/share/ellcurves/rank6 +5 -0
- sage_wheels/share/ellcurves/rank7 +5 -0
- sage_wheels/share/ellcurves/rank8 +6 -0
- sage_wheels/share/ellcurves/rank9 +7 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.flint
|
|
3
|
+
"""
|
|
4
|
+
A single element of an ambient space of modular symbols
|
|
5
|
+
"""
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Sage: Open Source Mathematical Software
|
|
8
|
+
#
|
|
9
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
10
|
+
#
|
|
11
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
12
|
+
#
|
|
13
|
+
# This code is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
# General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# The full text of the GPL is available at:
|
|
19
|
+
#
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ****************************************************************************
|
|
22
|
+
|
|
23
|
+
import sage.modules.free_module_element
|
|
24
|
+
from sage.misc.repr import repr_lincomb
|
|
25
|
+
import sage.structure.formal_sum as formal_sum
|
|
26
|
+
import sage.modular.hecke.all as hecke
|
|
27
|
+
import sage.misc.latex as latex
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
_print_mode = "manin"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def is_ModularSymbolsElement(x) -> bool:
|
|
34
|
+
r"""
|
|
35
|
+
Return ``True`` if x is an element of a modular symbols space.
|
|
36
|
+
|
|
37
|
+
EXAMPLES::
|
|
38
|
+
|
|
39
|
+
sage: sage.modular.modsym.element.is_ModularSymbolsElement(ModularSymbols(11, 2).0)
|
|
40
|
+
doctest:warning...
|
|
41
|
+
DeprecationWarning: The function is_ModularSymbolsElement is deprecated;
|
|
42
|
+
use 'isinstance(..., ModularSymbolsElement)' instead.
|
|
43
|
+
See https://github.com/sagemath/sage/issues/38184 for details.
|
|
44
|
+
True
|
|
45
|
+
sage: sage.modular.modsym.element.is_ModularSymbolsElement(13)
|
|
46
|
+
False
|
|
47
|
+
"""
|
|
48
|
+
from sage.misc.superseded import deprecation
|
|
49
|
+
deprecation(38184,
|
|
50
|
+
"The function is_ModularSymbolsElement is deprecated; "
|
|
51
|
+
"use 'isinstance(..., ModularSymbolsElement)' instead.")
|
|
52
|
+
return isinstance(x, ModularSymbolsElement)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def set_modsym_print_mode(mode='manin'):
|
|
56
|
+
r"""
|
|
57
|
+
Set the mode for printing of elements of modular symbols spaces.
|
|
58
|
+
|
|
59
|
+
INPUT:
|
|
60
|
+
|
|
61
|
+
- ``mode`` -- string; the possibilities are as follows:
|
|
62
|
+
|
|
63
|
+
- ``'manin'`` -- (the default) formal sums of Manin
|
|
64
|
+
symbols [P(X,Y),(u,v)]
|
|
65
|
+
|
|
66
|
+
- ``'modular'`` -- formal sums of Modular symbols
|
|
67
|
+
P(X,Y)\*alpha,beta, where alpha and beta are cusps
|
|
68
|
+
|
|
69
|
+
- ``'vector'`` -- as vectors on the basis for the
|
|
70
|
+
ambient space
|
|
71
|
+
|
|
72
|
+
OUTPUT: none
|
|
73
|
+
|
|
74
|
+
EXAMPLES::
|
|
75
|
+
|
|
76
|
+
sage: M = ModularSymbols(13, 8)
|
|
77
|
+
sage: x = M.0 + M.1 + M.14
|
|
78
|
+
sage: set_modsym_print_mode('manin'); x
|
|
79
|
+
[X^5*Y,(1,11)] + [X^5*Y,(1,12)] + [X^6,(1,11)]
|
|
80
|
+
sage: set_modsym_print_mode('modular'); x
|
|
81
|
+
1610510*X^6*{-1/11, 0} + 893101*X^5*Y*{-1/11, 0} + 206305*X^4*Y^2*{-1/11, 0} + 25410*X^3*Y^3*{-1/11, 0} + 1760*X^2*Y^4*{-1/11, 0} + 65*X*Y^5*{-1/11, 0} - 248832*X^6*{-1/12, 0} - 103680*X^5*Y*{-1/12, 0} - 17280*X^4*Y^2*{-1/12, 0} - 1440*X^3*Y^3*{-1/12, 0} - 60*X^2*Y^4*{-1/12, 0} - X*Y^5*{-1/12, 0} + Y^6*{-1/11, 0}
|
|
82
|
+
sage: set_modsym_print_mode('vector'); x
|
|
83
|
+
(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)
|
|
84
|
+
sage: set_modsym_print_mode()
|
|
85
|
+
"""
|
|
86
|
+
mode = str(mode).lower()
|
|
87
|
+
if mode not in ['manin', 'modular', 'vector']:
|
|
88
|
+
raise ValueError("mode must be one of 'manin', 'modular', or 'vector'")
|
|
89
|
+
global _print_mode
|
|
90
|
+
_print_mode = mode
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class ModularSymbolsElement(hecke.HeckeModuleElement):
|
|
94
|
+
"""
|
|
95
|
+
An element of a space of modular symbols.
|
|
96
|
+
|
|
97
|
+
TESTS::
|
|
98
|
+
|
|
99
|
+
sage: x = ModularSymbols(3, 12).cuspidal_submodule().gen(0)
|
|
100
|
+
sage: x == loads(dumps(x))
|
|
101
|
+
True
|
|
102
|
+
"""
|
|
103
|
+
def __init__(self, parent, x, check=True):
|
|
104
|
+
"""
|
|
105
|
+
INPUT:
|
|
106
|
+
|
|
107
|
+
- ``parent`` -- a space of modular symbols
|
|
108
|
+
|
|
109
|
+
- ``x`` -- a free module element that represents the modular
|
|
110
|
+
symbol in terms of a basis for the ambient space (not in
|
|
111
|
+
terms of a basis for parent!)
|
|
112
|
+
|
|
113
|
+
EXAMPLES::
|
|
114
|
+
|
|
115
|
+
sage: S = ModularSymbols(11, sign=1).cuspidal_submodule()
|
|
116
|
+
sage: S(vector([0,1])) == S.basis()[0]
|
|
117
|
+
True
|
|
118
|
+
sage: S(vector([1,0]))
|
|
119
|
+
Traceback (most recent call last):
|
|
120
|
+
...
|
|
121
|
+
TypeError: x does not coerce to an element of this Hecke module
|
|
122
|
+
"""
|
|
123
|
+
if check:
|
|
124
|
+
from .space import ModularSymbolsSpace
|
|
125
|
+
if not isinstance(parent, ModularSymbolsSpace):
|
|
126
|
+
raise TypeError("parent (= %s) must be a space of modular symbols" % parent)
|
|
127
|
+
if not isinstance(x, sage.modules.free_module_element.FreeModuleElement):
|
|
128
|
+
raise TypeError("x must be a free module element.")
|
|
129
|
+
if x.degree() != parent.degree():
|
|
130
|
+
raise TypeError("x (of degree %s) must be of degree the same as the degree of the parent (of degree %s)." % (x.degree(), parent.degree()))
|
|
131
|
+
hecke.HeckeModuleElement.__init__(self, parent, x)
|
|
132
|
+
|
|
133
|
+
def _repr_(self):
|
|
134
|
+
r"""
|
|
135
|
+
String representation of ``self``. The output will depend on the global
|
|
136
|
+
modular symbols print mode setting controlled by the function
|
|
137
|
+
``set_modsym_print_mode``.
|
|
138
|
+
|
|
139
|
+
EXAMPLES::
|
|
140
|
+
|
|
141
|
+
sage: M = ModularSymbols(13, 4)
|
|
142
|
+
sage: set_modsym_print_mode('manin'); M.0._repr_()
|
|
143
|
+
'[X^2,(0,1)]'
|
|
144
|
+
sage: set_modsym_print_mode('modular'); M.0._repr_()
|
|
145
|
+
'X^2*{0, Infinity}'
|
|
146
|
+
sage: set_modsym_print_mode('vector'); M.0._repr_()
|
|
147
|
+
'(1, 0, 0, 0, 0, 0, 0, 0)'
|
|
148
|
+
sage: set_modsym_print_mode()
|
|
149
|
+
"""
|
|
150
|
+
if _print_mode == "vector":
|
|
151
|
+
return str(self.element())
|
|
152
|
+
elif _print_mode == "manin":
|
|
153
|
+
m = self.manin_symbol_rep()
|
|
154
|
+
elif _print_mode == "modular":
|
|
155
|
+
m = self.modular_symbol_rep()
|
|
156
|
+
return repr_lincomb([(t, c) for c, t in m])
|
|
157
|
+
|
|
158
|
+
def _latex_(self):
|
|
159
|
+
r"""
|
|
160
|
+
LaTeX representation of ``self``. The output will be determined by the
|
|
161
|
+
print mode setting set using ``set_modsym_print_mode``.
|
|
162
|
+
|
|
163
|
+
EXAMPLES::
|
|
164
|
+
|
|
165
|
+
sage: M = ModularSymbols(11, 2)
|
|
166
|
+
sage: x = M.0 + M.2; x
|
|
167
|
+
(1,0) + (1,9)
|
|
168
|
+
sage: set_modsym_print_mode('manin'); latex(x) # indirect doctest
|
|
169
|
+
(1,0) + (1,9)
|
|
170
|
+
sage: set_modsym_print_mode('modular'); latex(x) # indirect doctest
|
|
171
|
+
\left\{\infty, 0\right\} + \left\{\frac{-1}{9}, 0\right\}
|
|
172
|
+
sage: set_modsym_print_mode('vector'); latex(x) # indirect doctest
|
|
173
|
+
\left(1,\,0,\,1\right)
|
|
174
|
+
sage: set_modsym_print_mode()
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
if _print_mode == "vector":
|
|
178
|
+
return self.element()._latex_()
|
|
179
|
+
elif _print_mode == "manin":
|
|
180
|
+
m = self.manin_symbol_rep()
|
|
181
|
+
elif _print_mode == "modular":
|
|
182
|
+
m = self.modular_symbol_rep()
|
|
183
|
+
c = [x[0] for x in m]
|
|
184
|
+
v = [x[1] for x in m]
|
|
185
|
+
# TODO: use repr_lincomb with is_latex=True
|
|
186
|
+
return latex.repr_lincomb(v, c)
|
|
187
|
+
|
|
188
|
+
def _add_(self, right):
|
|
189
|
+
r"""
|
|
190
|
+
Sum of ``self`` and ``other``.
|
|
191
|
+
|
|
192
|
+
EXAMPLES::
|
|
193
|
+
|
|
194
|
+
sage: M = ModularSymbols(3, 12)
|
|
195
|
+
sage: x = M.0; y = M.1; z = x + y; z # indirect doctest
|
|
196
|
+
[X^8*Y^2,(1,2)] + [X^9*Y,(1,0)]
|
|
197
|
+
sage: z.parent() is M
|
|
198
|
+
True
|
|
199
|
+
"""
|
|
200
|
+
return ModularSymbolsElement(self.parent(), self.element() + right.element(), check=False)
|
|
201
|
+
|
|
202
|
+
def _rmul_(self, other):
|
|
203
|
+
r"""
|
|
204
|
+
Right-multiply ``self`` by ``other``.
|
|
205
|
+
|
|
206
|
+
EXAMPLES::
|
|
207
|
+
|
|
208
|
+
sage: M = ModularSymbols(3, 12)
|
|
209
|
+
sage: x = M.0; z = x*3; z # indirect doctest
|
|
210
|
+
3*[X^8*Y^2,(1,2)]
|
|
211
|
+
sage: z.parent() is M
|
|
212
|
+
True
|
|
213
|
+
sage: z*Mod(1, 17)
|
|
214
|
+
Traceback (most recent call last):
|
|
215
|
+
...
|
|
216
|
+
TypeError: unsupported operand parent(s) for *: 'Modular Symbols space of dimension 8 for Gamma_0(3) of weight 12 with sign 0 over Rational Field' and 'Ring of integers modulo 17'
|
|
217
|
+
"""
|
|
218
|
+
return ModularSymbolsElement(self.parent(), self.element() * other,
|
|
219
|
+
check=False)
|
|
220
|
+
|
|
221
|
+
def _lmul_(self, left):
|
|
222
|
+
r"""
|
|
223
|
+
Left-multiply ``self`` by ``other``.
|
|
224
|
+
|
|
225
|
+
EXAMPLES::
|
|
226
|
+
|
|
227
|
+
sage: M = ModularSymbols(3, 12)
|
|
228
|
+
sage: x = M.0; z = 3*x; z # indirect doctest
|
|
229
|
+
3*[X^8*Y^2,(1,2)]
|
|
230
|
+
sage: z.parent() is M
|
|
231
|
+
True
|
|
232
|
+
sage: Mod(1, 17)*z
|
|
233
|
+
Traceback (most recent call last):
|
|
234
|
+
...
|
|
235
|
+
TypeError: unsupported operand parent(s) for *: 'Ring of integers modulo 17' and 'Modular Symbols space of dimension 8 for Gamma_0(3) of weight 12 with sign 0 over Rational Field'
|
|
236
|
+
"""
|
|
237
|
+
return ModularSymbolsElement(self.parent(), left * self.element(),
|
|
238
|
+
check=False)
|
|
239
|
+
|
|
240
|
+
def _neg_(self):
|
|
241
|
+
r"""
|
|
242
|
+
Multiply by -1.
|
|
243
|
+
|
|
244
|
+
EXAMPLES::
|
|
245
|
+
|
|
246
|
+
sage: M = ModularSymbols(3, 12)
|
|
247
|
+
sage: x = M.0; z = -x; z # indirect doctest
|
|
248
|
+
-[X^8*Y^2,(1,2)]
|
|
249
|
+
sage: z.parent() is M
|
|
250
|
+
True
|
|
251
|
+
"""
|
|
252
|
+
return ModularSymbolsElement(self.parent(), -self.element(), check=False)
|
|
253
|
+
|
|
254
|
+
def _sub_(self, other):
|
|
255
|
+
r"""
|
|
256
|
+
Subtract ``other`` from ``self``.
|
|
257
|
+
|
|
258
|
+
EXAMPLES::
|
|
259
|
+
|
|
260
|
+
sage: M = ModularSymbols(3, 12)
|
|
261
|
+
sage: x = M.0; y = M.1; z = y-x; z # indirect doctest
|
|
262
|
+
-[X^8*Y^2,(1,2)] + [X^9*Y,(1,0)]
|
|
263
|
+
sage: z.parent() is M
|
|
264
|
+
True
|
|
265
|
+
"""
|
|
266
|
+
return ModularSymbolsElement(self.parent(), self.element() - other.element(), check=False)
|
|
267
|
+
|
|
268
|
+
# this clearly hasn't worked for some time -- the method embedded_vector_space doesn't exist -- DL 2009-05-18
|
|
269
|
+
# def coordinate_vector(self):
|
|
270
|
+
# if self.parent().is_ambient():
|
|
271
|
+
# return self.element()
|
|
272
|
+
# return self.parent().embedded_vector_space().coordinate_vector(self.element())
|
|
273
|
+
|
|
274
|
+
def list(self):
|
|
275
|
+
r"""
|
|
276
|
+
Return a list of the coordinates of ``self`` in terms of a basis for
|
|
277
|
+
the ambient space.
|
|
278
|
+
|
|
279
|
+
EXAMPLES::
|
|
280
|
+
|
|
281
|
+
sage: ModularSymbols(37, 2).0.list()
|
|
282
|
+
[1, 0, 0, 0, 0]
|
|
283
|
+
"""
|
|
284
|
+
return self.element().list()
|
|
285
|
+
|
|
286
|
+
def manin_symbol_rep(self):
|
|
287
|
+
"""
|
|
288
|
+
Return a representation of ``self`` as a formal sum of Manin symbols.
|
|
289
|
+
|
|
290
|
+
EXAMPLES::
|
|
291
|
+
|
|
292
|
+
sage: x = ModularSymbols(37, 4).0
|
|
293
|
+
sage: x.manin_symbol_rep()
|
|
294
|
+
[X^2,(0,1)]
|
|
295
|
+
|
|
296
|
+
The result is cached::
|
|
297
|
+
|
|
298
|
+
sage: x.manin_symbol_rep() is x.manin_symbol_rep()
|
|
299
|
+
True
|
|
300
|
+
"""
|
|
301
|
+
try:
|
|
302
|
+
return self.__manin_symbols
|
|
303
|
+
except AttributeError:
|
|
304
|
+
A = self.parent()
|
|
305
|
+
v = self.element()
|
|
306
|
+
manin_symbols = A.ambient_hecke_module().manin_symbols_basis()
|
|
307
|
+
F = formal_sum.FormalSums(A.base_ring())
|
|
308
|
+
ms = F([(v[i], manin_symbols[i]) for i in range(v.degree())
|
|
309
|
+
if v[i] != 0], check=False, reduce=False)
|
|
310
|
+
self.__manin_symbols = ms
|
|
311
|
+
return self.__manin_symbols
|
|
312
|
+
|
|
313
|
+
def modular_symbol_rep(self):
|
|
314
|
+
"""
|
|
315
|
+
Return a representation of ``self`` as a formal sum of modular symbols.
|
|
316
|
+
|
|
317
|
+
EXAMPLES::
|
|
318
|
+
|
|
319
|
+
sage: x = ModularSymbols(37, 4).0
|
|
320
|
+
sage: x.modular_symbol_rep()
|
|
321
|
+
X^2*{0, Infinity}
|
|
322
|
+
|
|
323
|
+
The result is cached::
|
|
324
|
+
|
|
325
|
+
sage: x.modular_symbol_rep() is x.modular_symbol_rep()
|
|
326
|
+
True
|
|
327
|
+
"""
|
|
328
|
+
try:
|
|
329
|
+
return self.__modular_symbols
|
|
330
|
+
except AttributeError:
|
|
331
|
+
v = self.manin_symbol_rep()
|
|
332
|
+
if v == 0:
|
|
333
|
+
return v
|
|
334
|
+
w = [c * x.modular_symbol_rep() for c, x in v]
|
|
335
|
+
self.__modular_symbols = sum(w)
|
|
336
|
+
return self.__modular_symbols
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
r"""
|
|
3
|
+
List of coset representatives for `\Gamma_1(N)` in `\SL_2(\ZZ)`
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Sage: Open Source Mathematical Software
|
|
8
|
+
#
|
|
9
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
10
|
+
#
|
|
11
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
12
|
+
#
|
|
13
|
+
# This code is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
# General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# The full text of the GPL is available at:
|
|
19
|
+
#
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ****************************************************************************
|
|
22
|
+
|
|
23
|
+
from sage.arith.misc import GCD
|
|
24
|
+
from sage.structure.richcmp import richcmp_method, richcmp
|
|
25
|
+
from sage.structure.sage_object import SageObject
|
|
26
|
+
from sage.misc.persist import register_unpickle_override
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@richcmp_method
|
|
30
|
+
class G1list(SageObject):
|
|
31
|
+
r"""
|
|
32
|
+
A class representing a list of coset representatives for `\Gamma_1(N)` in
|
|
33
|
+
`\SL_2(\ZZ)`. What we actually calculate is a list of elements of
|
|
34
|
+
`(\ZZ/N\ZZ)^2` of exact order `N`.
|
|
35
|
+
|
|
36
|
+
TESTS::
|
|
37
|
+
|
|
38
|
+
sage: L = sage.modular.modsym.g1list.G1list(18)
|
|
39
|
+
sage: loads(dumps(L)) == L
|
|
40
|
+
True
|
|
41
|
+
"""
|
|
42
|
+
def __init__(self, N):
|
|
43
|
+
"""
|
|
44
|
+
EXAMPLES::
|
|
45
|
+
|
|
46
|
+
sage: L = sage.modular.modsym.g1list.G1list(6); L # indirect doctest
|
|
47
|
+
List of coset representatives for Gamma_1(6) in SL_2(Z)
|
|
48
|
+
"""
|
|
49
|
+
self.__N = N
|
|
50
|
+
self.__list = [(u, v) for u in range(N) for v in range(N)
|
|
51
|
+
if GCD(GCD(u, v), N) == 1]
|
|
52
|
+
|
|
53
|
+
def __richcmp__(self, other, op):
|
|
54
|
+
r"""
|
|
55
|
+
Compare ``self`` to ``other``.
|
|
56
|
+
|
|
57
|
+
EXAMPLES::
|
|
58
|
+
|
|
59
|
+
sage: L1 = sage.modular.modsym.g1list.G1list(6)
|
|
60
|
+
sage: L2 = sage.modular.modsym.g1list.G1list(7)
|
|
61
|
+
sage: L1 < L2
|
|
62
|
+
True
|
|
63
|
+
sage: L1 == QQ
|
|
64
|
+
False
|
|
65
|
+
"""
|
|
66
|
+
if not isinstance(other, G1list):
|
|
67
|
+
return NotImplemented
|
|
68
|
+
else:
|
|
69
|
+
return richcmp(self.__N, other.__N, op)
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, i):
|
|
72
|
+
"""
|
|
73
|
+
EXAMPLES::
|
|
74
|
+
|
|
75
|
+
sage: L = sage.modular.modsym.g1list.G1list(19); L[100] # indirect doctest
|
|
76
|
+
(5, 6)
|
|
77
|
+
"""
|
|
78
|
+
return self.__list[i]
|
|
79
|
+
|
|
80
|
+
def __len__(self):
|
|
81
|
+
"""
|
|
82
|
+
Return the length of the underlying list.
|
|
83
|
+
|
|
84
|
+
EXAMPLES::
|
|
85
|
+
|
|
86
|
+
sage: L = sage.modular.modsym.g1list.G1list(24); len(L) # indirect doctest
|
|
87
|
+
384
|
|
88
|
+
"""
|
|
89
|
+
return len(self.__list)
|
|
90
|
+
|
|
91
|
+
def __repr__(self):
|
|
92
|
+
"""
|
|
93
|
+
String representation of ``self``.
|
|
94
|
+
|
|
95
|
+
EXAMPLES::
|
|
96
|
+
|
|
97
|
+
sage: L = sage.modular.modsym.g1list.G1list(3); L.__repr__()
|
|
98
|
+
'List of coset representatives for Gamma_1(3) in SL_2(Z)'
|
|
99
|
+
"""
|
|
100
|
+
return f"List of coset representatives for Gamma_1({self.__N}) in SL_2(Z)"
|
|
101
|
+
|
|
102
|
+
def list(self):
|
|
103
|
+
r"""
|
|
104
|
+
Return a list of vectors representing the cosets.
|
|
105
|
+
|
|
106
|
+
Do not change the returned list!
|
|
107
|
+
|
|
108
|
+
EXAMPLES::
|
|
109
|
+
|
|
110
|
+
sage: L = sage.modular.modsym.g1list.G1list(4); L.list()
|
|
111
|
+
[(0, 1), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 0), (3, 1), (3, 2), (3, 3)]
|
|
112
|
+
"""
|
|
113
|
+
return self.__list
|
|
114
|
+
|
|
115
|
+
def normalize(self, u, v):
|
|
116
|
+
r"""
|
|
117
|
+
Given a pair `(u,v)` of integers, return the unique pair `(u', v')`
|
|
118
|
+
such that the pair `(u', v')` appears in ``self.list()`` and `(u, v)`
|
|
119
|
+
is equivalent to `(u', v')`. This is rather trivial, but is here for
|
|
120
|
+
consistency with the ``P1List`` class which is the equivalent for
|
|
121
|
+
`\Gamma_0` (where the problem is rather harder).
|
|
122
|
+
|
|
123
|
+
This will only make sense if `{\rm gcd}(u, v, N) = 1`; otherwise the
|
|
124
|
+
output will not be an element of ``self``.
|
|
125
|
+
|
|
126
|
+
EXAMPLES::
|
|
127
|
+
|
|
128
|
+
sage: L = sage.modular.modsym.g1list.G1list(4); L.normalize(6, 1)
|
|
129
|
+
(2, 1)
|
|
130
|
+
sage: L = sage.modular.modsym.g1list.G1list(4); L.normalize(6, 2) # nonsense!
|
|
131
|
+
(2, 2)
|
|
132
|
+
"""
|
|
133
|
+
return u % self.__N, v % self.__N
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class _G1list_old_pickle(G1list):
|
|
137
|
+
"""
|
|
138
|
+
This class exists only for dealing with old pickles.
|
|
139
|
+
|
|
140
|
+
This needs to handle both old-style class pickles, where there is
|
|
141
|
+
no input to the class on the initial ``__init__`` call, and the
|
|
142
|
+
new class pickles, we need to have ``__setstate__`` handle it.
|
|
143
|
+
"""
|
|
144
|
+
def __init__(self):
|
|
145
|
+
"""
|
|
146
|
+
For unpickling old pickles.
|
|
147
|
+
|
|
148
|
+
TESTS::
|
|
149
|
+
|
|
150
|
+
sage: from sage.modular.modsym.g1list import _G1list_old_pickle
|
|
151
|
+
sage: L = _G1list_old_pickle()
|
|
152
|
+
sage: type(L) == G1list
|
|
153
|
+
True
|
|
154
|
+
"""
|
|
155
|
+
self.__class__ = G1list
|
|
156
|
+
|
|
157
|
+
def __setstate__(self, state):
|
|
158
|
+
"""
|
|
159
|
+
For unpickling new pickles.
|
|
160
|
+
|
|
161
|
+
TESTS::
|
|
162
|
+
|
|
163
|
+
sage: from sage.modular.modsym.g1list import G1list
|
|
164
|
+
sage: L = G1list(6)
|
|
165
|
+
sage: Lp = loads(dumps(L))
|
|
166
|
+
sage: L == Lp
|
|
167
|
+
True
|
|
168
|
+
sage: type(Lp) == G1list
|
|
169
|
+
True
|
|
170
|
+
"""
|
|
171
|
+
# We don't really want this class, but we want to handle new
|
|
172
|
+
# pickles without creating a new class
|
|
173
|
+
self.__class__ = G1list
|
|
174
|
+
self.__dict__ = state # Default pickling is ``state = self.__dict__``
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
register_unpickle_override('sage.modular.modsym.g1list', 'G1list',
|
|
178
|
+
_G1list_old_pickle)
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.pari
|
|
3
|
+
r"""
|
|
4
|
+
List of coset representatives for `\Gamma_H(N)` in `\SL_2(\ZZ)`
|
|
5
|
+
"""
|
|
6
|
+
###########################################################################
|
|
7
|
+
# Sage: Open Source Mathematical Software
|
|
8
|
+
#
|
|
9
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
10
|
+
#
|
|
11
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
12
|
+
#
|
|
13
|
+
# This code is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
# General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# The full text of the GPL is available at:
|
|
19
|
+
#
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
###########################################################################
|
|
22
|
+
from sage.structure.richcmp import richcmp_method, richcmp
|
|
23
|
+
from sage.structure.sage_object import SageObject
|
|
24
|
+
from sage.misc.persist import register_unpickle_override
|
|
25
|
+
|
|
26
|
+
from . import p1list
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@richcmp_method
|
|
30
|
+
class GHlist(SageObject):
|
|
31
|
+
r"""
|
|
32
|
+
A class representing a list of coset representatives for `\Gamma_H(N)` in
|
|
33
|
+
`\SL_2(\ZZ)`.
|
|
34
|
+
|
|
35
|
+
TESTS::
|
|
36
|
+
|
|
37
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(18,[13]))
|
|
38
|
+
sage: loads(dumps(L)) == L
|
|
39
|
+
True
|
|
40
|
+
"""
|
|
41
|
+
def __init__(self, group):
|
|
42
|
+
"""
|
|
43
|
+
EXAMPLES::
|
|
44
|
+
|
|
45
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(8,[7])); L # indirect doctest
|
|
46
|
+
List of coset representatives for Congruence Subgroup Gamma_H(8) with H generated by [7]
|
|
47
|
+
"""
|
|
48
|
+
self.__group = group
|
|
49
|
+
N = group.level()
|
|
50
|
+
v = group._coset_reduction_data()[0]
|
|
51
|
+
N = group.level()
|
|
52
|
+
coset_reps = {a for a, b, _ in v if b == 1}
|
|
53
|
+
w = [group._reduce_coset(x*u, x*v) for x in coset_reps for u,v in p1list.P1List(N).list()]
|
|
54
|
+
w = sorted(set(w))
|
|
55
|
+
self.__list = w
|
|
56
|
+
|
|
57
|
+
def __getitem__(self, i):
|
|
58
|
+
"""
|
|
59
|
+
EXAMPLES::
|
|
60
|
+
|
|
61
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(8, [5])); L[5] # indirect doctest
|
|
62
|
+
(1, 3)
|
|
63
|
+
"""
|
|
64
|
+
return self.__list[i]
|
|
65
|
+
|
|
66
|
+
def __richcmp__(self, other, op):
|
|
67
|
+
r"""
|
|
68
|
+
Compare ``self`` to ``other``.
|
|
69
|
+
|
|
70
|
+
EXAMPLES::
|
|
71
|
+
|
|
72
|
+
sage: L1 = sage.modular.modsym.ghlist.GHlist(GammaH(18, [11]))
|
|
73
|
+
sage: L2 = sage.modular.modsym.ghlist.GHlist(GammaH(18, [13]))
|
|
74
|
+
sage: L1 > L2
|
|
75
|
+
True
|
|
76
|
+
sage: L1 == QQ
|
|
77
|
+
False
|
|
78
|
+
"""
|
|
79
|
+
if not isinstance(other, GHlist):
|
|
80
|
+
return NotImplemented
|
|
81
|
+
else:
|
|
82
|
+
return richcmp(self.__group, other.__group, op)
|
|
83
|
+
|
|
84
|
+
def __len__(self):
|
|
85
|
+
"""
|
|
86
|
+
Return the length of the underlying list (the index of the group).
|
|
87
|
+
|
|
88
|
+
EXAMPLES::
|
|
89
|
+
|
|
90
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(24, [5])); len(L) # indirect doctest
|
|
91
|
+
192
|
|
92
|
+
"""
|
|
93
|
+
return len(self.__list)
|
|
94
|
+
|
|
95
|
+
def __repr__(self):
|
|
96
|
+
"""
|
|
97
|
+
String representation of ``self``.
|
|
98
|
+
|
|
99
|
+
EXAMPLES::
|
|
100
|
+
|
|
101
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(11, [3]))
|
|
102
|
+
sage: L.__repr__()
|
|
103
|
+
'List of coset representatives for Congruence Subgroup Gamma_H(11) with H generated by [3]'
|
|
104
|
+
"""
|
|
105
|
+
return "List of coset representatives for %s" % self.__group
|
|
106
|
+
|
|
107
|
+
def list(self):
|
|
108
|
+
r"""
|
|
109
|
+
Return a list of vectors representing the cosets. Do not change the
|
|
110
|
+
returned list!
|
|
111
|
+
|
|
112
|
+
EXAMPLES::
|
|
113
|
+
|
|
114
|
+
sage: L = sage.modular.modsym.ghlist.GHlist(GammaH(4,[])); L.list()
|
|
115
|
+
[(0, 1), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 0), (3, 1), (3, 2), (3, 3)]
|
|
116
|
+
"""
|
|
117
|
+
return self.__list
|
|
118
|
+
|
|
119
|
+
def normalize(self, u, v):
|
|
120
|
+
r"""
|
|
121
|
+
Given a pair `(u,v)` of integers, return the unique pair `(u', v')`
|
|
122
|
+
such that the pair `(u', v')` appears in ``self.list()`` and `(u, v)`
|
|
123
|
+
is equivalent to `(u', v')`.
|
|
124
|
+
|
|
125
|
+
This will only make sense if `{\rm gcd}(u, v, N) = 1`; otherwise the
|
|
126
|
+
output will not be an element of ``self``.
|
|
127
|
+
|
|
128
|
+
EXAMPLES::
|
|
129
|
+
|
|
130
|
+
sage: sage.modular.modsym.ghlist.GHlist(GammaH(24, [17, 19])).normalize(17, 6)
|
|
131
|
+
(1, 6)
|
|
132
|
+
sage: sage.modular.modsym.ghlist.GHlist(GammaH(24, [7, 13])).normalize(17, 6)
|
|
133
|
+
(5, 6)
|
|
134
|
+
sage: sage.modular.modsym.ghlist.GHlist(GammaH(24, [5, 23])).normalize(17, 6)
|
|
135
|
+
(7, 18)
|
|
136
|
+
"""
|
|
137
|
+
return self.__group._reduce_coset(u,v)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class _GHlist_old_pickle(GHlist):
|
|
141
|
+
"""
|
|
142
|
+
This class exists only for dealing with old pickles.
|
|
143
|
+
|
|
144
|
+
This needs to handle both old-style class pickles, where there is
|
|
145
|
+
no input to the class on the initial ``__init__`` call, and the
|
|
146
|
+
new class pickles, we need to have ``__setstate__`` handle it.
|
|
147
|
+
"""
|
|
148
|
+
def __init__(self):
|
|
149
|
+
"""
|
|
150
|
+
For unpickling old pickles.
|
|
151
|
+
|
|
152
|
+
TESTS::
|
|
153
|
+
|
|
154
|
+
sage: from sage.modular.modsym.ghlist import _GHlist_old_pickle
|
|
155
|
+
sage: L = _GHlist_old_pickle()
|
|
156
|
+
sage: type(L) == GHlist
|
|
157
|
+
True
|
|
158
|
+
"""
|
|
159
|
+
self.__class__ = GHlist
|
|
160
|
+
|
|
161
|
+
def __setstate__(self, state):
|
|
162
|
+
"""
|
|
163
|
+
For unpickling new pickles.
|
|
164
|
+
|
|
165
|
+
TESTS::
|
|
166
|
+
|
|
167
|
+
sage: from sage.modular.modsym.ghlist import GHlist
|
|
168
|
+
sage: L = GHlist(GammaH(4,[]))
|
|
169
|
+
sage: Lp = loads(dumps(L))
|
|
170
|
+
sage: L == Lp
|
|
171
|
+
True
|
|
172
|
+
sage: type(Lp) == GHlist
|
|
173
|
+
True
|
|
174
|
+
"""
|
|
175
|
+
# We don't really want this class, but we want to handle new
|
|
176
|
+
# pickles without creating a new class
|
|
177
|
+
self.__class__ = GHlist
|
|
178
|
+
self.__dict__ = state # Default pickling is ``state = self.__dict__``
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
register_unpickle_override('sage.modular.modsym.ghlist', 'GHlist',
|
|
182
|
+
_GHlist_old_pickle)
|