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,534 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
r"""
|
|
3
|
+
The matrix monoid `\Sigma_0(N)`.
|
|
4
|
+
|
|
5
|
+
This stands for a monoid of matrices over `\ZZ`, `\QQ`, `\ZZ_p`, or `\QQ_p`,
|
|
6
|
+
depending on an integer `N \ge 1`. This class exists in order to act on `p`-adic
|
|
7
|
+
distribution spaces.
|
|
8
|
+
|
|
9
|
+
Over `\QQ` or `\ZZ`, it is the monoid of matrices `2\times2` matrices
|
|
10
|
+
`\begin{pmatrix} a & b \\ c & d \end{pmatrix}`
|
|
11
|
+
such that
|
|
12
|
+
|
|
13
|
+
- `ad - bc \ne 0`,
|
|
14
|
+
- `a` is integral and invertible at the primes dividing `N`,
|
|
15
|
+
- `c` has valuation at least `v_p(N)` for each `p` dividing `N` (but may be
|
|
16
|
+
non-integral at other places).
|
|
17
|
+
|
|
18
|
+
The value `N=1` is allowed, in which case the second and third conditions are vacuous.
|
|
19
|
+
|
|
20
|
+
EXAMPLES::
|
|
21
|
+
|
|
22
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
23
|
+
sage: S1 = Sigma0(1); S3 = Sigma0(3)
|
|
24
|
+
sage: S1([3, 0, 0, 1])
|
|
25
|
+
[3 0]
|
|
26
|
+
[0 1]
|
|
27
|
+
sage: S3([3, 0, 0, 1]) # boom
|
|
28
|
+
Traceback (most recent call last):
|
|
29
|
+
...
|
|
30
|
+
TypeError: 3 is not a unit at 3
|
|
31
|
+
sage: S3([5,0,0,1])
|
|
32
|
+
[5 0]
|
|
33
|
+
[0 1]
|
|
34
|
+
sage: S3([1, 0, 0, 3])
|
|
35
|
+
[1 0]
|
|
36
|
+
[0 3]
|
|
37
|
+
sage: matrix(ZZ, 2, [1,0,0,1]) in S1
|
|
38
|
+
True
|
|
39
|
+
|
|
40
|
+
AUTHORS:
|
|
41
|
+
|
|
42
|
+
- David Pollack (2012): initial version
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
# Warning to developers: when working with Sigma0 elements it is generally a
|
|
46
|
+
# good idea to avoid using the entries of x.matrix() directly; rather, use the
|
|
47
|
+
# "adjuster" mechanism. The purpose of this is to allow us to seamlessly change
|
|
48
|
+
# conventions for matrix actions (since there are several in use in the
|
|
49
|
+
# literature and no natural "best" choice).
|
|
50
|
+
from sage.matrix.matrix_space import MatrixSpace
|
|
51
|
+
from sage.misc.abstract_method import abstract_method
|
|
52
|
+
from sage.structure.factory import UniqueFactory
|
|
53
|
+
from sage.structure.element import MonoidElement
|
|
54
|
+
from sage.structure.richcmp import richcmp
|
|
55
|
+
from sage.categories.monoids import Monoids
|
|
56
|
+
from sage.categories.morphism import Morphism
|
|
57
|
+
from sage.structure.parent import Parent
|
|
58
|
+
from sage.rings.integer_ring import ZZ
|
|
59
|
+
from sage.rings.rational_field import QQ
|
|
60
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class Sigma0ActionAdjuster(UniqueRepresentation):
|
|
64
|
+
|
|
65
|
+
@abstract_method
|
|
66
|
+
def __call__(self, x):
|
|
67
|
+
r"""
|
|
68
|
+
Given a :class:`Sigma0element` ``x``, return four integers.
|
|
69
|
+
|
|
70
|
+
This is used to allow for other conventions for the action of Sigma0
|
|
71
|
+
on the space of distributions.
|
|
72
|
+
|
|
73
|
+
EXAMPLES::
|
|
74
|
+
|
|
75
|
+
sage: from sage.modular.pollack_stevens.sigma0 import _default_adjuster
|
|
76
|
+
sage: A = _default_adjuster()
|
|
77
|
+
sage: A(matrix(ZZ, 2, [3,4,5,6])) # indirect doctest
|
|
78
|
+
(3, 4, 5, 6)
|
|
79
|
+
"""
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class _default_adjuster(Sigma0ActionAdjuster):
|
|
84
|
+
"""
|
|
85
|
+
A callable object that does nothing to a matrix, returning its entries
|
|
86
|
+
in the natural, by-row, order.
|
|
87
|
+
|
|
88
|
+
INPUT:
|
|
89
|
+
|
|
90
|
+
- ``g`` -- a `2 \times 2` matrix
|
|
91
|
+
|
|
92
|
+
OUTPUT: a 4-tuple consisting of the entries of the matrix
|
|
93
|
+
|
|
94
|
+
EXAMPLES::
|
|
95
|
+
|
|
96
|
+
sage: A = sage.modular.pollack_stevens.sigma0._default_adjuster(); A
|
|
97
|
+
<sage.modular.pollack_stevens.sigma0._default_adjuster object at 0x...>
|
|
98
|
+
sage: TestSuite(A).run()
|
|
99
|
+
"""
|
|
100
|
+
def __call__(self, g):
|
|
101
|
+
"""
|
|
102
|
+
EXAMPLES::
|
|
103
|
+
|
|
104
|
+
sage: T = sage.modular.pollack_stevens.sigma0._default_adjuster()
|
|
105
|
+
sage: T(matrix(ZZ,2,[1..4])) # indirect doctest
|
|
106
|
+
(1, 2, 3, 4)
|
|
107
|
+
"""
|
|
108
|
+
return tuple(g.list())
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class Sigma0_factory(UniqueFactory):
|
|
112
|
+
r"""
|
|
113
|
+
Create the monoid of non-singular matrices, upper triangular mod `N`.
|
|
114
|
+
|
|
115
|
+
INPUT:
|
|
116
|
+
|
|
117
|
+
- ``N`` -- integer; the level (should be strictly positive)
|
|
118
|
+
- ``base_ring`` (commutative ring, default `\ZZ`) -- the base
|
|
119
|
+
ring (normally `\ZZ` or a `p`-adic ring)
|
|
120
|
+
- ``adjuster`` -- ``None``, or a callable which takes a `2 \times 2` matrix
|
|
121
|
+
and returns a 4-tuple of integers. This is supplied in order to support
|
|
122
|
+
differing conventions for the action of `2 \times 2` matrices on
|
|
123
|
+
distributions.
|
|
124
|
+
|
|
125
|
+
EXAMPLES::
|
|
126
|
+
|
|
127
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
128
|
+
sage: Sigma0(3)
|
|
129
|
+
Monoid Sigma0(3) with coefficients in Integer Ring
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
def create_key(self, N, base_ring=ZZ, adjuster=None):
|
|
133
|
+
r"""
|
|
134
|
+
EXAMPLES::
|
|
135
|
+
|
|
136
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
137
|
+
sage: Sigma0.create_key(3)
|
|
138
|
+
(3, Integer Ring, <sage.modular.pollack_stevens.sigma0._default_adjuster object at 0x...>)
|
|
139
|
+
sage: TestSuite(Sigma0).run()
|
|
140
|
+
"""
|
|
141
|
+
N = ZZ(N)
|
|
142
|
+
if N <= 0:
|
|
143
|
+
raise ValueError("Modulus should be > 0")
|
|
144
|
+
if adjuster is None:
|
|
145
|
+
adjuster = _default_adjuster()
|
|
146
|
+
|
|
147
|
+
if base_ring not in (QQ, ZZ):
|
|
148
|
+
try:
|
|
149
|
+
if not N.is_power_of(base_ring.prime()):
|
|
150
|
+
raise ValueError("Modulus must equal base ring prime")
|
|
151
|
+
except AttributeError:
|
|
152
|
+
raise ValueError("Base ring must be QQ, ZZ or a p-adic field")
|
|
153
|
+
return (N, base_ring, adjuster)
|
|
154
|
+
|
|
155
|
+
def create_object(self, version, key):
|
|
156
|
+
r"""
|
|
157
|
+
EXAMPLES::
|
|
158
|
+
|
|
159
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
160
|
+
sage: Sigma0(3) # indirect doctest
|
|
161
|
+
Monoid Sigma0(3) with coefficients in Integer Ring
|
|
162
|
+
"""
|
|
163
|
+
return Sigma0_class(*key)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
Sigma0 = Sigma0_factory('sage.modular.pollack_stevens.sigma0.Sigma0')
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class Sigma0Element(MonoidElement):
|
|
170
|
+
r"""
|
|
171
|
+
An element of the monoid Sigma0. This is a wrapper around a `2 \times 2` matrix.
|
|
172
|
+
|
|
173
|
+
EXAMPLES::
|
|
174
|
+
|
|
175
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
176
|
+
sage: S = Sigma0(7)
|
|
177
|
+
sage: g = S([2,3,7,1])
|
|
178
|
+
sage: g.det()
|
|
179
|
+
-19
|
|
180
|
+
sage: h = S([1,2,0,1])
|
|
181
|
+
sage: g * h
|
|
182
|
+
[ 2 7]
|
|
183
|
+
[ 7 15]
|
|
184
|
+
sage: g.inverse()
|
|
185
|
+
Traceback (most recent call last):
|
|
186
|
+
...
|
|
187
|
+
TypeError: no conversion of this rational to integer
|
|
188
|
+
sage: h.inverse()
|
|
189
|
+
[ 1 -2]
|
|
190
|
+
[ 0 1]
|
|
191
|
+
"""
|
|
192
|
+
def __init__(self, parent, mat):
|
|
193
|
+
r"""
|
|
194
|
+
EXAMPLES::
|
|
195
|
+
|
|
196
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
197
|
+
sage: s = Sigma0(3)([1,4,3,3]) # indirect doctest
|
|
198
|
+
sage: TestSuite(s).run()
|
|
199
|
+
"""
|
|
200
|
+
self._mat = mat
|
|
201
|
+
MonoidElement.__init__(self, parent)
|
|
202
|
+
|
|
203
|
+
def __hash__(self):
|
|
204
|
+
r"""
|
|
205
|
+
EXAMPLES::
|
|
206
|
+
|
|
207
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
208
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
209
|
+
sage: hash(s) # indirect doctest
|
|
210
|
+
8095169151987216923 # 64-bit
|
|
211
|
+
619049499 # 32-bit
|
|
212
|
+
"""
|
|
213
|
+
return hash(self.matrix())
|
|
214
|
+
|
|
215
|
+
def det(self):
|
|
216
|
+
r"""
|
|
217
|
+
Return the determinant of this matrix, which is (by assumption) nonzero.
|
|
218
|
+
|
|
219
|
+
EXAMPLES::
|
|
220
|
+
|
|
221
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
222
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
223
|
+
sage: s.det()
|
|
224
|
+
-9
|
|
225
|
+
"""
|
|
226
|
+
return self.matrix().det()
|
|
227
|
+
|
|
228
|
+
def _mul_(self, other):
|
|
229
|
+
r"""
|
|
230
|
+
Return the product of two Sigma0 elements.
|
|
231
|
+
|
|
232
|
+
EXAMPLES::
|
|
233
|
+
|
|
234
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
235
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
236
|
+
sage: t = Sigma0(15)([4,0,0,1])
|
|
237
|
+
sage: u = s*t; u # indirect doctest
|
|
238
|
+
[ 4 4]
|
|
239
|
+
[12 3]
|
|
240
|
+
sage: type(u)
|
|
241
|
+
<class 'sage.modular.pollack_stevens.sigma0.Sigma0_class_with_category.element_class'>
|
|
242
|
+
sage: u.parent()
|
|
243
|
+
Monoid Sigma0(3) with coefficients in Integer Ring
|
|
244
|
+
"""
|
|
245
|
+
return self.parent()(self._mat * other._mat, check=False)
|
|
246
|
+
|
|
247
|
+
def _richcmp_(self, other, op):
|
|
248
|
+
r"""
|
|
249
|
+
Compare two elements (of a common Sigma0 object).
|
|
250
|
+
|
|
251
|
+
EXAMPLES::
|
|
252
|
+
|
|
253
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
254
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
255
|
+
sage: t = Sigma0(3)([4,0,0,1])
|
|
256
|
+
sage: s == t
|
|
257
|
+
False
|
|
258
|
+
sage: s == Sigma0(1)([1,4,3,3])
|
|
259
|
+
True
|
|
260
|
+
|
|
261
|
+
This uses the coercion model to find a common parent, with occasionally surprising results::
|
|
262
|
+
|
|
263
|
+
sage: t == Sigma0(5)([4, 0, 0, 1])
|
|
264
|
+
False
|
|
265
|
+
"""
|
|
266
|
+
return richcmp(self._mat, other._mat, op)
|
|
267
|
+
|
|
268
|
+
def _repr_(self):
|
|
269
|
+
r"""
|
|
270
|
+
String representation of ``self``.
|
|
271
|
+
|
|
272
|
+
EXAMPLES::
|
|
273
|
+
|
|
274
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
275
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
276
|
+
sage: s._repr_()
|
|
277
|
+
'[1 4]\n[3 3]'
|
|
278
|
+
"""
|
|
279
|
+
return self.matrix().__repr__()
|
|
280
|
+
|
|
281
|
+
def matrix(self):
|
|
282
|
+
r"""
|
|
283
|
+
Return ``self`` as a matrix (forgetting the additional data that it is
|
|
284
|
+
in ``Sigma0(N)``).
|
|
285
|
+
|
|
286
|
+
EXAMPLES::
|
|
287
|
+
|
|
288
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
289
|
+
sage: s = Sigma0(3)([1,4,3,3])
|
|
290
|
+
sage: sm = s.matrix()
|
|
291
|
+
sage: type(s)
|
|
292
|
+
<class 'sage.modular.pollack_stevens.sigma0.Sigma0_class_with_category.element_class'>
|
|
293
|
+
sage: type(sm)
|
|
294
|
+
<class 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
|
|
295
|
+
sage: s == sm
|
|
296
|
+
True
|
|
297
|
+
"""
|
|
298
|
+
return self._mat
|
|
299
|
+
|
|
300
|
+
def __invert__(self):
|
|
301
|
+
r"""
|
|
302
|
+
Return the inverse of ``self``.
|
|
303
|
+
|
|
304
|
+
This will raise an error if the result is not in the monoid.
|
|
305
|
+
|
|
306
|
+
EXAMPLES::
|
|
307
|
+
|
|
308
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
309
|
+
sage: s = Sigma0(3)([1,4,3,13])
|
|
310
|
+
sage: s.inverse() # indirect doctest
|
|
311
|
+
[13 -4]
|
|
312
|
+
[-3 1]
|
|
313
|
+
sage: Sigma0(3)([1, 0, 0, 3]).inverse()
|
|
314
|
+
Traceback (most recent call last):
|
|
315
|
+
...
|
|
316
|
+
TypeError: no conversion of this rational to integer
|
|
317
|
+
|
|
318
|
+
.. TODO::
|
|
319
|
+
|
|
320
|
+
In an ideal world this would silently extend scalars to `\QQ` if
|
|
321
|
+
the inverse has non-integer entries but is still in `\Sigma_0(N)`
|
|
322
|
+
locally at `N`. But we do not use such functionality, anyway.
|
|
323
|
+
"""
|
|
324
|
+
return self.parent()(~self._mat)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
class _Sigma0Embedding(Morphism):
|
|
328
|
+
r"""
|
|
329
|
+
A Morphism object giving the natural inclusion of `\Sigma_0` into the
|
|
330
|
+
appropriate matrix space. This snippet of code is fed to the coercion
|
|
331
|
+
framework so that "x * y" will work if ``x`` is a matrix and ``y`` is a `\Sigma_0`
|
|
332
|
+
element (returning a matrix, *not* a Sigma0 element).
|
|
333
|
+
"""
|
|
334
|
+
def __init__(self, domain):
|
|
335
|
+
r"""
|
|
336
|
+
TESTS::
|
|
337
|
+
|
|
338
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0, _Sigma0Embedding
|
|
339
|
+
sage: x = _Sigma0Embedding(Sigma0(3))
|
|
340
|
+
sage: TestSuite(x).run(skip=['_test_category'])
|
|
341
|
+
|
|
342
|
+
# TODO: The category test breaks because _Sigma0Embedding is not an instance of
|
|
343
|
+
# the element class of its parent (a homset in the category of
|
|
344
|
+
# monoids). I have no idea how to fix this.
|
|
345
|
+
"""
|
|
346
|
+
Morphism.__init__(self, domain.Hom(domain._matrix_space, category=Monoids()))
|
|
347
|
+
|
|
348
|
+
def _call_(self, x):
|
|
349
|
+
r"""
|
|
350
|
+
Return a matrix.
|
|
351
|
+
|
|
352
|
+
EXAMPLES::
|
|
353
|
+
|
|
354
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0, _Sigma0Embedding
|
|
355
|
+
sage: S = Sigma0(3)
|
|
356
|
+
sage: x = _Sigma0Embedding(S)
|
|
357
|
+
sage: x(S([1,0,0,3])).parent() # indirect doctest
|
|
358
|
+
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
|
|
359
|
+
"""
|
|
360
|
+
return x.matrix()
|
|
361
|
+
|
|
362
|
+
def _richcmp_(self, other, op):
|
|
363
|
+
r"""
|
|
364
|
+
Required for pickling.
|
|
365
|
+
|
|
366
|
+
EXAMPLES::
|
|
367
|
+
|
|
368
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0, _Sigma0Embedding
|
|
369
|
+
sage: S = Sigma0(3)
|
|
370
|
+
sage: x = _Sigma0Embedding(S)
|
|
371
|
+
sage: x == loads(dumps(x))
|
|
372
|
+
True
|
|
373
|
+
"""
|
|
374
|
+
return richcmp(self.domain(), other.domain(), op)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
class Sigma0_class(Parent):
|
|
378
|
+
r"""
|
|
379
|
+
The class representing the monoid `\Sigma_0(N)`.
|
|
380
|
+
|
|
381
|
+
EXAMPLES::
|
|
382
|
+
|
|
383
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
384
|
+
sage: S = Sigma0(5); S
|
|
385
|
+
Monoid Sigma0(5) with coefficients in Integer Ring
|
|
386
|
+
sage: S([1,2,1,1])
|
|
387
|
+
Traceback (most recent call last):
|
|
388
|
+
...
|
|
389
|
+
TypeError: level 5^1 does not divide 1
|
|
390
|
+
sage: S([1,2,5,1])
|
|
391
|
+
[1 2]
|
|
392
|
+
[5 1]
|
|
393
|
+
"""
|
|
394
|
+
Element = Sigma0Element
|
|
395
|
+
|
|
396
|
+
def __init__(self, N, base_ring, adjuster):
|
|
397
|
+
r"""
|
|
398
|
+
Standard init function. For args documentation see the factory
|
|
399
|
+
function.
|
|
400
|
+
|
|
401
|
+
EXAMPLES::
|
|
402
|
+
|
|
403
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
404
|
+
sage: S = Sigma0(3) # indirect doctest
|
|
405
|
+
sage: TestSuite(S).run()
|
|
406
|
+
"""
|
|
407
|
+
self._N = N
|
|
408
|
+
self._primes = list(N.factor())
|
|
409
|
+
self._base_ring = base_ring
|
|
410
|
+
self._adjuster = adjuster
|
|
411
|
+
self._matrix_space = MatrixSpace(base_ring, 2)
|
|
412
|
+
Parent.__init__(self, category=Monoids())
|
|
413
|
+
self.register_embedding(_Sigma0Embedding(self))
|
|
414
|
+
|
|
415
|
+
def _an_element_(self):
|
|
416
|
+
r"""
|
|
417
|
+
Return an element of ``self``. This is implemented in a rather dumb way.
|
|
418
|
+
|
|
419
|
+
EXAMPLES::
|
|
420
|
+
|
|
421
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
422
|
+
sage: S = Sigma0(3)
|
|
423
|
+
sage: S.an_element() # indirect doctest
|
|
424
|
+
[1 0]
|
|
425
|
+
[0 1]
|
|
426
|
+
"""
|
|
427
|
+
return self([1, 0, 0, 1])
|
|
428
|
+
|
|
429
|
+
def level(self):
|
|
430
|
+
r"""
|
|
431
|
+
If this monoid is `\Sigma_0(N)`, return `N`.
|
|
432
|
+
|
|
433
|
+
EXAMPLES::
|
|
434
|
+
|
|
435
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
436
|
+
sage: S = Sigma0(3)
|
|
437
|
+
sage: S.level()
|
|
438
|
+
3
|
|
439
|
+
"""
|
|
440
|
+
return self._N
|
|
441
|
+
|
|
442
|
+
def base_ring(self):
|
|
443
|
+
r"""
|
|
444
|
+
Return the base ring.
|
|
445
|
+
|
|
446
|
+
EXAMPLES::
|
|
447
|
+
|
|
448
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
449
|
+
sage: S = Sigma0(3)
|
|
450
|
+
sage: S.base_ring()
|
|
451
|
+
Integer Ring
|
|
452
|
+
"""
|
|
453
|
+
return self._base_ring
|
|
454
|
+
|
|
455
|
+
def _coerce_map_from_(self, other):
|
|
456
|
+
r"""
|
|
457
|
+
Find out whether ``other`` coerces into ``self``.
|
|
458
|
+
|
|
459
|
+
The *only* thing that coerces canonically into `\Sigma_0` is another
|
|
460
|
+
`\Sigma_0`. It is *very bad* if integers are allowed to coerce in, as
|
|
461
|
+
this leads to a noncommutative coercion diagram whenever we let
|
|
462
|
+
`\Sigma_0` act on anything..
|
|
463
|
+
|
|
464
|
+
EXAMPLES::
|
|
465
|
+
|
|
466
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
467
|
+
sage: Sigma0(1, QQ).has_coerce_map_from(Sigma0(3, ZZ)) # indirect doctest
|
|
468
|
+
True
|
|
469
|
+
sage: Sigma0(1, ZZ).has_coerce_map_from(ZZ)
|
|
470
|
+
False
|
|
471
|
+
|
|
472
|
+
(If something changes that causes the last doctest above to return
|
|
473
|
+
True, then the entire purpose of this class is violated, and all sorts
|
|
474
|
+
of nasty things will go wrong with scalar multiplication of
|
|
475
|
+
distributions. Do not let this happen!)
|
|
476
|
+
"""
|
|
477
|
+
return (isinstance(other, Sigma0_class)
|
|
478
|
+
and self.level().divides(other.level())
|
|
479
|
+
and self.base_ring().has_coerce_map_from(other.base_ring()))
|
|
480
|
+
|
|
481
|
+
def _element_constructor_(self, x, check=True):
|
|
482
|
+
r"""
|
|
483
|
+
Construct an element of ``self`` from x.
|
|
484
|
+
|
|
485
|
+
INPUT:
|
|
486
|
+
|
|
487
|
+
- ``x`` -- something that one can make into a matrix over the
|
|
488
|
+
appropriate base ring
|
|
489
|
+
- ``check`` -- boolean (default: ``True``); if ``True``, then check
|
|
490
|
+
that this matrix actually satisfies the conditions
|
|
491
|
+
|
|
492
|
+
EXAMPLES::
|
|
493
|
+
|
|
494
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
495
|
+
sage: S = Sigma0(3)
|
|
496
|
+
sage: S([1,0,0,3]) # indirect doctest
|
|
497
|
+
[1 0]
|
|
498
|
+
[0 3]
|
|
499
|
+
sage: S([3,0,0,1]) # boom
|
|
500
|
+
Traceback (most recent call last):
|
|
501
|
+
...
|
|
502
|
+
TypeError: 3 is not a unit at 3
|
|
503
|
+
sage: S(Sigma0(1)([3,0,0,1]), check=False) # don't do this
|
|
504
|
+
[3 0]
|
|
505
|
+
[0 1]
|
|
506
|
+
"""
|
|
507
|
+
if isinstance(x, Sigma0Element):
|
|
508
|
+
x = x.matrix()
|
|
509
|
+
if check:
|
|
510
|
+
x = self._matrix_space(x)
|
|
511
|
+
a, b, c, d = self._adjuster(x)
|
|
512
|
+
for (p, e) in self._primes:
|
|
513
|
+
if c.valuation(p) < e:
|
|
514
|
+
raise TypeError("level %s^%s does not divide %s" % (p, e, c))
|
|
515
|
+
if a.valuation(p) != 0:
|
|
516
|
+
raise TypeError("%s is not a unit at %s" % (a, p))
|
|
517
|
+
if x.det() == 0:
|
|
518
|
+
raise TypeError("matrix must be nonsingular")
|
|
519
|
+
x.set_immutable()
|
|
520
|
+
return self.element_class(self, x)
|
|
521
|
+
|
|
522
|
+
def _repr_(self):
|
|
523
|
+
r"""
|
|
524
|
+
String representation of ``self``.
|
|
525
|
+
|
|
526
|
+
EXAMPLES::
|
|
527
|
+
|
|
528
|
+
sage: from sage.modular.pollack_stevens.sigma0 import Sigma0
|
|
529
|
+
sage: S = Sigma0(3)
|
|
530
|
+
sage: S._repr_()
|
|
531
|
+
'Monoid Sigma0(3) with coefficients in Integer Ring'
|
|
532
|
+
"""
|
|
533
|
+
return 'Monoid Sigma0(%s) with coefficients in %s' % (self.level(),
|
|
534
|
+
self.base_ring())
|