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,778 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.rings.padics
|
|
3
|
+
r"""
|
|
4
|
+
The space of `p`-adic weights
|
|
5
|
+
|
|
6
|
+
A `p`-adic weight is a continuous character `\ZZ_p^\times \to
|
|
7
|
+
\CC_p^\times`. These are the `\CC_p`-points of a rigid space over
|
|
8
|
+
`\QQ_p`, which is isomorphic to a disjoint union of copies (indexed by
|
|
9
|
+
`(\ZZ/p\ZZ)^\times`) of the open unit `p`-adic disc.
|
|
10
|
+
|
|
11
|
+
Sage supports both "classical points", which are determined by the data of a
|
|
12
|
+
Dirichlet character modulo `p^m` for some `m` and an integer `k` (corresponding
|
|
13
|
+
to the character `z \mapsto z^k \chi(z)`) and "non-classical points" which are
|
|
14
|
+
determined by the data of an element of `(\ZZ/p\ZZ)^\times` and
|
|
15
|
+
an element `w \in \CC_p` with `|w - 1| < 1`.
|
|
16
|
+
|
|
17
|
+
EXAMPLES::
|
|
18
|
+
|
|
19
|
+
sage: W = pAdicWeightSpace(17)
|
|
20
|
+
sage: W
|
|
21
|
+
Space of 17-adic weight-characters
|
|
22
|
+
defined over 17-adic Field with capped relative precision 20
|
|
23
|
+
sage: R.<x> = QQ[]
|
|
24
|
+
sage: L = Qp(17).extension(x^2 - 17, names='a'); L.rename('L')
|
|
25
|
+
sage: W.base_extend(L)
|
|
26
|
+
Space of 17-adic weight-characters defined over L
|
|
27
|
+
|
|
28
|
+
We create a simple element of `\mathcal{W}`: the algebraic character, `x \mapsto x^6`::
|
|
29
|
+
|
|
30
|
+
sage: kappa = W(6)
|
|
31
|
+
sage: kappa(5)
|
|
32
|
+
15625
|
|
33
|
+
sage: kappa(5) == 5^6
|
|
34
|
+
True
|
|
35
|
+
|
|
36
|
+
A locally algebraic character, `x \mapsto x^6 \chi(x)` for `\chi` a Dirichlet
|
|
37
|
+
character mod `p`::
|
|
38
|
+
|
|
39
|
+
sage: kappa2 = W(6, DirichletGroup(17, Qp(17)).0^8)
|
|
40
|
+
sage: kappa2(5) == -5^6
|
|
41
|
+
True
|
|
42
|
+
sage: kappa2(13) == 13^6
|
|
43
|
+
True
|
|
44
|
+
|
|
45
|
+
A non-locally-algebraic character, sending the generator 18 of `1 + 17
|
|
46
|
+
\ZZ_{17}` to 35 and acting as `\mu \mapsto \mu^4` on the group of 16th
|
|
47
|
+
roots of unity::
|
|
48
|
+
|
|
49
|
+
sage: kappa3 = W(35 + O(17^20), 4, algebraic=False)
|
|
50
|
+
sage: kappa3(2)
|
|
51
|
+
16 + 8*17 + ... + O(17^20)
|
|
52
|
+
|
|
53
|
+
AUTHORS:
|
|
54
|
+
|
|
55
|
+
- David Loeffler (2008-9)
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# ****************************************************************************
|
|
59
|
+
# Copyright (C) 2008 William Stein <wstein@gmail.com>
|
|
60
|
+
# 2008-9 David Loeffler <d.loeffler.01@cantab.net>
|
|
61
|
+
#
|
|
62
|
+
# This program is free software: you can redistribute it and/or modify
|
|
63
|
+
# it under the terms of the GNU General Public License as published by
|
|
64
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
65
|
+
# (at your option) any later version.
|
|
66
|
+
# https://www.gnu.org/licenses/
|
|
67
|
+
# ****************************************************************************
|
|
68
|
+
import weakref
|
|
69
|
+
|
|
70
|
+
from sage.arith.misc import divisors
|
|
71
|
+
from sage.categories.sets_cat import Sets
|
|
72
|
+
from sage.misc.cachefunc import cached_method
|
|
73
|
+
from sage.misc.lazy_import import lazy_import
|
|
74
|
+
from sage.modular.dirichlet import DirichletGroup, trivial_character
|
|
75
|
+
from sage.rings.finite_rings.integer_mod_ring import IntegerModRing
|
|
76
|
+
from sage.rings.infinity import Infinity
|
|
77
|
+
from sage.rings.integer_ring import ZZ
|
|
78
|
+
from sage.rings.padics.precision_error import PrecisionError
|
|
79
|
+
from sage.rings.rational_field import QQ
|
|
80
|
+
from sage.structure.element import Element
|
|
81
|
+
from sage.structure.parent import Parent
|
|
82
|
+
from sage.structure.richcmp import richcmp
|
|
83
|
+
|
|
84
|
+
lazy_import('sage.rings.padics.factory', 'Qp')
|
|
85
|
+
lazy_import('sage.rings.padics.padic_generic_element', 'pAdicGenericElement')
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
_wscache = {}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def WeightSpace_constructor(p, base_ring=None):
|
|
92
|
+
r"""
|
|
93
|
+
Construct the `p`-adic weight space for the given prime p.
|
|
94
|
+
|
|
95
|
+
A `p`-adic weight
|
|
96
|
+
is a continuous character `\ZZ_p^\times \to \CC_p^\times`.
|
|
97
|
+
These are the `\CC_p`-points of a rigid space over `\QQ_p`,
|
|
98
|
+
which is isomorphic to a disjoint union of copies (indexed by
|
|
99
|
+
`(\ZZ/p\ZZ)^\times`) of the open unit `p`-adic disc.
|
|
100
|
+
|
|
101
|
+
Note that the "base ring" of a `p`-adic weight is the smallest ring
|
|
102
|
+
containing the image of `\ZZ`; in particular, although the default base
|
|
103
|
+
ring is `\QQ_p`, base ring `\QQ` will also work.
|
|
104
|
+
|
|
105
|
+
EXAMPLES::
|
|
106
|
+
|
|
107
|
+
sage: pAdicWeightSpace(3) # indirect doctest
|
|
108
|
+
Space of 3-adic weight-characters
|
|
109
|
+
defined over 3-adic Field with capped relative precision 20
|
|
110
|
+
sage: pAdicWeightSpace(3, QQ)
|
|
111
|
+
Space of 3-adic weight-characters defined over Rational Field
|
|
112
|
+
sage: pAdicWeightSpace(10)
|
|
113
|
+
Traceback (most recent call last):
|
|
114
|
+
...
|
|
115
|
+
ValueError: p must be prime
|
|
116
|
+
"""
|
|
117
|
+
if base_ring is None:
|
|
118
|
+
base_ring = Qp(p)
|
|
119
|
+
if (p, base_ring) in _wscache:
|
|
120
|
+
m = _wscache[(p, base_ring)]()
|
|
121
|
+
if m is not None:
|
|
122
|
+
return m
|
|
123
|
+
m = WeightSpace_class(p, base_ring)
|
|
124
|
+
_wscache[(p, base_ring)] = weakref.ref(m)
|
|
125
|
+
return m
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class WeightSpace_class(Parent):
|
|
129
|
+
r"""
|
|
130
|
+
The space of `p`-adic weight-characters `\mathcal{W} = {\rm
|
|
131
|
+
Hom}(\ZZ_p^\times, \CC_p^\times)`.
|
|
132
|
+
|
|
133
|
+
This is isomorphic to a
|
|
134
|
+
disjoint union of `(p-1)` open discs of radius 1 (or 2 such discs if `p =
|
|
135
|
+
2`), with the parameter on the open disc corresponding to the image of `1 +
|
|
136
|
+
p` (or 5 if `p = 2`)
|
|
137
|
+
|
|
138
|
+
TESTS::
|
|
139
|
+
|
|
140
|
+
sage: W = pAdicWeightSpace(3)
|
|
141
|
+
sage: W is loads(dumps(W))
|
|
142
|
+
True
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
def __init__(self, p, base_ring):
|
|
146
|
+
r"""
|
|
147
|
+
Initialisation function.
|
|
148
|
+
|
|
149
|
+
EXAMPLES::
|
|
150
|
+
|
|
151
|
+
sage: pAdicWeightSpace(17)
|
|
152
|
+
Space of 17-adic weight-characters defined over 17-adic Field with capped relative precision 20
|
|
153
|
+
"""
|
|
154
|
+
Parent.__init__(self, base=base_ring, category=Sets())
|
|
155
|
+
p = ZZ(p)
|
|
156
|
+
if not p.is_prime():
|
|
157
|
+
raise ValueError("p must be prime")
|
|
158
|
+
self._p = p
|
|
159
|
+
self._param = Qp(p)((p == 2 and 5) or (p + 1))
|
|
160
|
+
|
|
161
|
+
def _repr_(self) -> str:
|
|
162
|
+
r"""
|
|
163
|
+
String representation of ``self``.
|
|
164
|
+
|
|
165
|
+
EXAMPLES::
|
|
166
|
+
|
|
167
|
+
sage: pAdicWeightSpace(17)._repr_()
|
|
168
|
+
'Space of 17-adic weight-characters defined over 17-adic Field with capped relative precision 20'
|
|
169
|
+
"""
|
|
170
|
+
return "Space of %s-adic weight-characters defined over %s" % (self.prime(), self.base_ring())
|
|
171
|
+
|
|
172
|
+
def __reduce__(self):
|
|
173
|
+
r"""
|
|
174
|
+
Used for pickling.
|
|
175
|
+
|
|
176
|
+
EXAMPLES::
|
|
177
|
+
|
|
178
|
+
sage: pAdicWeightSpace(3).__reduce__()
|
|
179
|
+
(<function WeightSpace_constructor at ...>, (3, 3-adic Field with capped relative precision 20))
|
|
180
|
+
"""
|
|
181
|
+
return (WeightSpace_constructor, (self.prime(), self.base_ring()))
|
|
182
|
+
|
|
183
|
+
def _element_constructor_(self, arg1, arg2=None, algebraic=True):
|
|
184
|
+
r"""
|
|
185
|
+
Create an element of this space.
|
|
186
|
+
|
|
187
|
+
If ``algebraic = True`` (the default), create a locally algebraic
|
|
188
|
+
character. The arguments should be `(k, \chi)` with `k \in \ZZ`
|
|
189
|
+
and `\chi` a Dirichlet character of `p`-power conductor defined over a
|
|
190
|
+
`p`-adic field; this corresponds to the weight-character `x \mapsto x^k
|
|
191
|
+
\chi(x)`. If `\chi` is omitted, it defaults to the trivial character.
|
|
192
|
+
|
|
193
|
+
If ``algebraic = False``, create a general character. The arguments are
|
|
194
|
+
now (t, w) where `t \in \ZZ/(p-1)\ZZ` and `w \in
|
|
195
|
+
\CC_p` with `|w - 1| < 1`. This corresponds to the character
|
|
196
|
+
`\kappa` satisfying `\kappa(\mu) = \mu^t` where `\mu` is a `(p-1)`-st
|
|
197
|
+
root of unity, and `\kappa(1 + p) = w`.
|
|
198
|
+
|
|
199
|
+
EXAMPLES::
|
|
200
|
+
|
|
201
|
+
sage: W = pAdicWeightSpace(17)
|
|
202
|
+
sage: W(4)
|
|
203
|
+
4
|
|
204
|
+
sage: W(4, DirichletGroup(17, Qp(17)).0)
|
|
205
|
+
(4, 17, [3 + 13*17 + ... + O(17^20)])
|
|
206
|
+
sage: W(1 + O(17^5), 4, algebraic = False)
|
|
207
|
+
[1 + O(17^5), 4]
|
|
208
|
+
"""
|
|
209
|
+
if isinstance(arg1, WeightCharacter):
|
|
210
|
+
if arg1.parent() is self:
|
|
211
|
+
return arg1
|
|
212
|
+
elif arg1.parent().prime() == self.prime():
|
|
213
|
+
return self._coerce_in_wtchar(arg1)
|
|
214
|
+
else:
|
|
215
|
+
raise TypeError("Incompatible type!")
|
|
216
|
+
|
|
217
|
+
if algebraic:
|
|
218
|
+
return AlgebraicWeight(self, arg1, arg2)
|
|
219
|
+
else:
|
|
220
|
+
return ArbitraryWeight(self, arg1, arg2)
|
|
221
|
+
|
|
222
|
+
@cached_method
|
|
223
|
+
def zero(self):
|
|
224
|
+
"""
|
|
225
|
+
Return the zero of this weight space.
|
|
226
|
+
|
|
227
|
+
EXAMPLES::
|
|
228
|
+
|
|
229
|
+
sage: W = pAdicWeightSpace(17)
|
|
230
|
+
sage: W.zero()
|
|
231
|
+
0
|
|
232
|
+
"""
|
|
233
|
+
return self(0)
|
|
234
|
+
|
|
235
|
+
def prime(self):
|
|
236
|
+
r"""
|
|
237
|
+
Return the prime `p` such that this is a `p`-adic weight space.
|
|
238
|
+
|
|
239
|
+
EXAMPLES::
|
|
240
|
+
|
|
241
|
+
sage: pAdicWeightSpace(17).prime()
|
|
242
|
+
17
|
|
243
|
+
"""
|
|
244
|
+
return self._p
|
|
245
|
+
|
|
246
|
+
def base_extend(self, R):
|
|
247
|
+
r"""
|
|
248
|
+
Extend scalars to the ring R.
|
|
249
|
+
|
|
250
|
+
There must be a canonical coercion map from the present base ring to R.
|
|
251
|
+
|
|
252
|
+
EXAMPLES::
|
|
253
|
+
|
|
254
|
+
sage: W = pAdicWeightSpace(3, QQ)
|
|
255
|
+
sage: W.base_extend(Qp(3))
|
|
256
|
+
Space of 3-adic weight-characters
|
|
257
|
+
defined over 3-adic Field with capped relative precision 20
|
|
258
|
+
sage: W.base_extend(IntegerModRing(12))
|
|
259
|
+
Traceback (most recent call last):
|
|
260
|
+
...
|
|
261
|
+
TypeError: No coercion map from 'Rational Field'
|
|
262
|
+
to 'Ring of integers modulo 12' is defined
|
|
263
|
+
"""
|
|
264
|
+
if R.has_coerce_map_from(self.base_ring()):
|
|
265
|
+
return WeightSpace_constructor(self.prime(), R)
|
|
266
|
+
else:
|
|
267
|
+
raise TypeError("No coercion map from '%s' to '%s' is defined" % (self.base_ring(), R))
|
|
268
|
+
|
|
269
|
+
def _coerce_map_from_(self, other):
|
|
270
|
+
r"""
|
|
271
|
+
Canonical coercion of ``other`` into ``self``.
|
|
272
|
+
|
|
273
|
+
TESTS::
|
|
274
|
+
|
|
275
|
+
sage: W1 = pAdicWeightSpace(23, QQ)
|
|
276
|
+
sage: W2 = W1.base_extend(Qp(23))
|
|
277
|
+
sage: w = W1(3)
|
|
278
|
+
sage: W2.coerce(w) # indirect doctest
|
|
279
|
+
3
|
|
280
|
+
"""
|
|
281
|
+
return (isinstance(other, WeightSpace_class)
|
|
282
|
+
and other.prime() == self.prime()
|
|
283
|
+
and self.base_ring().has_coerce_map_from(other.base_ring()))
|
|
284
|
+
|
|
285
|
+
def _coerce_in_wtchar(self, x):
|
|
286
|
+
r"""
|
|
287
|
+
Convert in a weight-character whose parent is different from ``self``
|
|
288
|
+
(with has the prime, but possibly different base ring).
|
|
289
|
+
|
|
290
|
+
EXAMPLES::
|
|
291
|
+
|
|
292
|
+
sage: W1 = pAdicWeightSpace(23, Qp(3))
|
|
293
|
+
sage: W2 = pAdicWeightSpace(23, QQ)
|
|
294
|
+
sage: w = W1(3)
|
|
295
|
+
sage: W2._coerce_in_wtchar(w)
|
|
296
|
+
3
|
|
297
|
+
"""
|
|
298
|
+
if isinstance(x, AlgebraicWeight):
|
|
299
|
+
return AlgebraicWeight(self, x.k(), x.chi().change_ring(self.base_ring()))
|
|
300
|
+
else:
|
|
301
|
+
return ArbitraryWeight(self, self.base_ring()(x.w()), x.teichmuller_type())
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
class WeightCharacter(Element):
|
|
305
|
+
r"""
|
|
306
|
+
Abstract base class representing an element of the `p`-adic weight space
|
|
307
|
+
`Hom(\ZZ_p^\times, \CC_p^\times)`.
|
|
308
|
+
"""
|
|
309
|
+
|
|
310
|
+
# This should probably derive from Morphism or even from
|
|
311
|
+
# AbelianGroupMorphism; but Sage does not know about the abelian group
|
|
312
|
+
# Z_p^*, so Hom(Z_p^*, C_p^*) is a bit beyond it!
|
|
313
|
+
|
|
314
|
+
def __init__(self, parent):
|
|
315
|
+
r"""
|
|
316
|
+
Initialisation function.
|
|
317
|
+
|
|
318
|
+
EXAMPLES::
|
|
319
|
+
|
|
320
|
+
sage: pAdicWeightSpace(17)(0)
|
|
321
|
+
0
|
|
322
|
+
"""
|
|
323
|
+
Element.__init__(self, parent)
|
|
324
|
+
self._p = self.parent().prime()
|
|
325
|
+
|
|
326
|
+
def base_extend(self, R):
|
|
327
|
+
r"""
|
|
328
|
+
Extend scalars to the base ring R.
|
|
329
|
+
|
|
330
|
+
The ring R must have a canonical map from the current base ring.
|
|
331
|
+
|
|
332
|
+
EXAMPLES::
|
|
333
|
+
|
|
334
|
+
sage: w = pAdicWeightSpace(17, QQ)(3)
|
|
335
|
+
sage: w.base_extend(Qp(17))
|
|
336
|
+
3
|
|
337
|
+
"""
|
|
338
|
+
return self.parent().base_extend(R).coerce(self)
|
|
339
|
+
|
|
340
|
+
def is_even(self) -> bool:
|
|
341
|
+
r"""
|
|
342
|
+
Return ``True`` if this weight-character sends -1 to +1.
|
|
343
|
+
|
|
344
|
+
EXAMPLES::
|
|
345
|
+
|
|
346
|
+
sage: pAdicWeightSpace(17)(0).is_even()
|
|
347
|
+
True
|
|
348
|
+
sage: pAdicWeightSpace(17)(11).is_even()
|
|
349
|
+
False
|
|
350
|
+
sage: pAdicWeightSpace(17)(1 + 17 + O(17^20), 3, False).is_even()
|
|
351
|
+
False
|
|
352
|
+
sage: pAdicWeightSpace(17)(1 + 17 + O(17^20), 4, False).is_even()
|
|
353
|
+
True
|
|
354
|
+
"""
|
|
355
|
+
return self(-1) != -1
|
|
356
|
+
|
|
357
|
+
def pAdicEisensteinSeries(self, ring, prec=20):
|
|
358
|
+
r"""
|
|
359
|
+
Calculate the `q`-expansion of the `p`-adic Eisenstein series of given
|
|
360
|
+
weight-character, normalised so the constant term is 1.
|
|
361
|
+
|
|
362
|
+
EXAMPLES::
|
|
363
|
+
|
|
364
|
+
sage: kappa = pAdicWeightSpace(3)(3, DirichletGroup(3,QQ).0)
|
|
365
|
+
sage: kappa.pAdicEisensteinSeries(QQ[['q']], 20)
|
|
366
|
+
1 - 9*q + 27*q^2 - 9*q^3 - 117*q^4 + 216*q^5 + 27*q^6 - 450*q^7 + 459*q^8
|
|
367
|
+
- 9*q^9 - 648*q^10 + 1080*q^11 - 117*q^12 - 1530*q^13 + 1350*q^14 + 216*q^15
|
|
368
|
+
- 1845*q^16 + 2592*q^17 + 27*q^18 - 3258*q^19 + O(q^20)
|
|
369
|
+
"""
|
|
370
|
+
if not self.is_even():
|
|
371
|
+
raise ValueError("Eisenstein series not defined for odd weight-characters")
|
|
372
|
+
q = ring.gen()
|
|
373
|
+
s = ring(1) + 2*self.one_over_Lvalue() * sum(sum(self(d)/d for d in divisors(n)) * q**n for n in range(1, prec))
|
|
374
|
+
return s.add_bigoh(prec)
|
|
375
|
+
|
|
376
|
+
def values_on_gens(self):
|
|
377
|
+
r"""
|
|
378
|
+
If `\kappa` is this character, calculate the values `(\kappa(r), t)`
|
|
379
|
+
where `r` is `1 + p` (or 5 if `p = 2`) and `t` is the unique element of
|
|
380
|
+
`\ZZ/(p-1)\ZZ` such that `\kappa(\mu) = \mu^t` for `\mu`
|
|
381
|
+
a (p-1)st root of unity. (If `p = 2`, we take `t` to be 0 or 1
|
|
382
|
+
according to whether `\kappa` is odd or even.) These two values
|
|
383
|
+
uniquely determine the character `\kappa`.
|
|
384
|
+
|
|
385
|
+
EXAMPLES::
|
|
386
|
+
|
|
387
|
+
sage: W = pAdicWeightSpace(11); W(2).values_on_gens()
|
|
388
|
+
(1 + 2*11 + 11^2 + O(11^20), 2)
|
|
389
|
+
sage: W(2, DirichletGroup(11, QQ).0).values_on_gens()
|
|
390
|
+
(1 + 2*11 + 11^2 + O(11^20), 7)
|
|
391
|
+
sage: W(1 + 2*11 + O(11^5), 4, algebraic = False).values_on_gens()
|
|
392
|
+
(1 + 2*11 + O(11^5), 4)
|
|
393
|
+
"""
|
|
394
|
+
|
|
395
|
+
return ( self(self.parent()._param), self.teichmuller_type())
|
|
396
|
+
|
|
397
|
+
def is_trivial(self) -> bool:
|
|
398
|
+
r"""
|
|
399
|
+
Return ``True`` if and only if this is the trivial character.
|
|
400
|
+
|
|
401
|
+
EXAMPLES::
|
|
402
|
+
|
|
403
|
+
sage: pAdicWeightSpace(11)(2).is_trivial()
|
|
404
|
+
False
|
|
405
|
+
sage: pAdicWeightSpace(11)(2, DirichletGroup(11, QQ).0).is_trivial()
|
|
406
|
+
False
|
|
407
|
+
sage: pAdicWeightSpace(11)(0).is_trivial()
|
|
408
|
+
True
|
|
409
|
+
"""
|
|
410
|
+
return self.values_on_gens() == (1, 0)
|
|
411
|
+
|
|
412
|
+
def _richcmp_(self, other, op) -> bool:
|
|
413
|
+
r"""
|
|
414
|
+
Compare ``self`` to ``other``.
|
|
415
|
+
|
|
416
|
+
EXAMPLES::
|
|
417
|
+
|
|
418
|
+
sage: W = pAdicWeightSpace(11)
|
|
419
|
+
sage: W(2) == W(3)
|
|
420
|
+
False
|
|
421
|
+
sage: W(2, DirichletGroup(11, QQ).0) == W(2)
|
|
422
|
+
False
|
|
423
|
+
sage: W(2, DirichletGroup(11, QQ).0) == W(144 + O(11^20), 7, False)
|
|
424
|
+
True
|
|
425
|
+
"""
|
|
426
|
+
return richcmp(self.values_on_gens(), other.values_on_gens(), op)
|
|
427
|
+
|
|
428
|
+
def Lvalue(self):
|
|
429
|
+
r"""
|
|
430
|
+
Return the value of the `p`-adic `L`-function of `\QQ`, which can be
|
|
431
|
+
regarded as a rigid-analytic function on weight space, evaluated at
|
|
432
|
+
this character.
|
|
433
|
+
|
|
434
|
+
EXAMPLES::
|
|
435
|
+
|
|
436
|
+
sage: W = pAdicWeightSpace(11)
|
|
437
|
+
sage: sage.modular.overconvergent.weightspace.WeightCharacter(W).Lvalue()
|
|
438
|
+
Traceback (most recent call last):
|
|
439
|
+
...
|
|
440
|
+
NotImplementedError
|
|
441
|
+
"""
|
|
442
|
+
raise NotImplementedError
|
|
443
|
+
|
|
444
|
+
def one_over_Lvalue(self):
|
|
445
|
+
r"""
|
|
446
|
+
Return the reciprocal of the `p`-adic `L`-function evaluated at this
|
|
447
|
+
weight-character.
|
|
448
|
+
|
|
449
|
+
If the weight-character is odd, then the `L`-function
|
|
450
|
+
is zero, so an error will be raised.
|
|
451
|
+
|
|
452
|
+
EXAMPLES::
|
|
453
|
+
|
|
454
|
+
sage: pAdicWeightSpace(11)(4).one_over_Lvalue()
|
|
455
|
+
-12/133
|
|
456
|
+
sage: pAdicWeightSpace(11)(3, DirichletGroup(11, QQ).0).one_over_Lvalue()
|
|
457
|
+
-1/6
|
|
458
|
+
sage: pAdicWeightSpace(11)(3).one_over_Lvalue()
|
|
459
|
+
Traceback (most recent call last):
|
|
460
|
+
...
|
|
461
|
+
ZeroDivisionError: rational division by zero
|
|
462
|
+
sage: pAdicWeightSpace(11)(0).one_over_Lvalue()
|
|
463
|
+
0
|
|
464
|
+
sage: type(_)
|
|
465
|
+
<class 'sage.rings.integer.Integer'>
|
|
466
|
+
"""
|
|
467
|
+
if self.is_trivial():
|
|
468
|
+
return ZZ(0)
|
|
469
|
+
else:
|
|
470
|
+
return 1 / self.Lvalue()
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
class AlgebraicWeight(WeightCharacter):
|
|
474
|
+
r"""
|
|
475
|
+
A point in weight space corresponding to a locally algebraic character, of
|
|
476
|
+
the form `x \mapsto \chi(x) x^k` where `k` is an integer and `\chi` is a
|
|
477
|
+
Dirichlet character modulo `p^n` for some `n`.
|
|
478
|
+
|
|
479
|
+
TESTS::
|
|
480
|
+
|
|
481
|
+
sage: w = pAdicWeightSpace(23)(12, DirichletGroup(23, QQ).0) # exact
|
|
482
|
+
sage: w == loads(dumps(w))
|
|
483
|
+
True
|
|
484
|
+
sage: w = pAdicWeightSpace(23)(12, DirichletGroup(23, Qp(23)).0) # inexact
|
|
485
|
+
sage: w == loads(dumps(w))
|
|
486
|
+
True
|
|
487
|
+
sage: w is loads(dumps(w)) # elements are not globally unique
|
|
488
|
+
False
|
|
489
|
+
"""
|
|
490
|
+
|
|
491
|
+
def __init__(self, parent, k, chi=None):
|
|
492
|
+
r"""
|
|
493
|
+
Create a locally algebraic weight-character.
|
|
494
|
+
|
|
495
|
+
EXAMPLES::
|
|
496
|
+
|
|
497
|
+
sage: pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0)
|
|
498
|
+
(13, 29, [2 + 2*29 + ... + O(29^20)])
|
|
499
|
+
"""
|
|
500
|
+
WeightCharacter.__init__(self, parent)
|
|
501
|
+
k = ZZ(k)
|
|
502
|
+
self._k = k
|
|
503
|
+
if chi is None:
|
|
504
|
+
chi = trivial_character(self._p, QQ)
|
|
505
|
+
n = ZZ(chi.conductor())
|
|
506
|
+
if n == 1:
|
|
507
|
+
n = self._p
|
|
508
|
+
if not n.is_power_of(self._p):
|
|
509
|
+
raise ValueError("Character must have %s-power conductor" % self._p)
|
|
510
|
+
self._chi = DirichletGroup(n, chi.base_ring())(chi)
|
|
511
|
+
|
|
512
|
+
def __call__(self, x):
|
|
513
|
+
r"""
|
|
514
|
+
Evaluate this character at an element of `\ZZ_p^\times`.
|
|
515
|
+
|
|
516
|
+
EXAMPLES:
|
|
517
|
+
|
|
518
|
+
Exact answers are returned when this is possible::
|
|
519
|
+
|
|
520
|
+
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, QQ).0)
|
|
521
|
+
sage: kappa(1)
|
|
522
|
+
1
|
|
523
|
+
sage: kappa(0)
|
|
524
|
+
0
|
|
525
|
+
sage: kappa(12)
|
|
526
|
+
-106993205379072
|
|
527
|
+
sage: kappa(-1)
|
|
528
|
+
-1
|
|
529
|
+
sage: kappa(13 + 4*29 + 11*29^2 + O(29^3))
|
|
530
|
+
9 + 21*29 + 27*29^2 + O(29^3)
|
|
531
|
+
|
|
532
|
+
When the character chi is defined over a `p`-adic field, the results returned are inexact::
|
|
533
|
+
|
|
534
|
+
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
|
|
535
|
+
sage: kappa(1)
|
|
536
|
+
1 + O(29^20)
|
|
537
|
+
sage: kappa(0)
|
|
538
|
+
0
|
|
539
|
+
sage: kappa(12)
|
|
540
|
+
17 + 11*29 + 7*29^2 + 4*29^3 + 5*29^4 + 2*29^5 + 13*29^6 + 3*29^7 + 18*29^8 + 21*29^9 + 28*29^10 + 28*29^11 + 28*29^12 + 28*29^13 + 28*29^14 + 28*29^15 + 28*29^16 + 28*29^17 + 28*29^18 + 28*29^19 + O(29^20)
|
|
541
|
+
sage: kappa(12) == -106993205379072
|
|
542
|
+
True
|
|
543
|
+
sage: kappa(-1) == -1
|
|
544
|
+
True
|
|
545
|
+
sage: kappa(13 + 4*29 + 11*29^2 + O(29^3))
|
|
546
|
+
9 + 21*29 + 27*29^2 + O(29^3)
|
|
547
|
+
"""
|
|
548
|
+
if isinstance(x, pAdicGenericElement):
|
|
549
|
+
if x.parent().prime() != self._p:
|
|
550
|
+
raise TypeError("x must be an integer or a %s-adic integer" % self._p)
|
|
551
|
+
if self._p**(x.precision_absolute()) < self._chi.conductor():
|
|
552
|
+
raise PrecisionError("Precision too low")
|
|
553
|
+
xint = x.lift()
|
|
554
|
+
else:
|
|
555
|
+
xint = x
|
|
556
|
+
if (xint % self._p == 0):
|
|
557
|
+
return 0
|
|
558
|
+
return self._chi(xint) * x**self._k
|
|
559
|
+
|
|
560
|
+
def k(self):
|
|
561
|
+
r"""
|
|
562
|
+
If this character is `x \mapsto x^k \chi(x)` for an integer `k` and a
|
|
563
|
+
Dirichlet character `\chi`, return `k`.
|
|
564
|
+
|
|
565
|
+
EXAMPLES::
|
|
566
|
+
|
|
567
|
+
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
|
|
568
|
+
sage: kappa.k()
|
|
569
|
+
13
|
|
570
|
+
"""
|
|
571
|
+
return self._k
|
|
572
|
+
|
|
573
|
+
def chi(self):
|
|
574
|
+
r"""
|
|
575
|
+
If this character is `x \mapsto x^k \chi(x)` for an integer `k` and a
|
|
576
|
+
Dirichlet character `\chi`, return `\chi`.
|
|
577
|
+
|
|
578
|
+
EXAMPLES::
|
|
579
|
+
|
|
580
|
+
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
|
|
581
|
+
sage: kappa.chi()
|
|
582
|
+
Dirichlet character modulo 29 of conductor 29
|
|
583
|
+
mapping 2 |--> 28 + 28*29 + 28*29^2 + ... + O(29^20)
|
|
584
|
+
"""
|
|
585
|
+
return self._chi
|
|
586
|
+
|
|
587
|
+
def __hash__(self):
|
|
588
|
+
r"""
|
|
589
|
+
TESTS::
|
|
590
|
+
|
|
591
|
+
sage: w = pAdicWeightSpace(23)(12, DirichletGroup(23, QQ).0)
|
|
592
|
+
sage: hash(w) == hash((12, 23, (-1,)))
|
|
593
|
+
True
|
|
594
|
+
"""
|
|
595
|
+
if self._chi.is_trivial():
|
|
596
|
+
return hash(self._k)
|
|
597
|
+
else:
|
|
598
|
+
return hash( (self._k,self._chi.modulus(),self._chi) )
|
|
599
|
+
|
|
600
|
+
def _repr_(self):
|
|
601
|
+
r"""
|
|
602
|
+
String representation of ``self``.
|
|
603
|
+
|
|
604
|
+
EXAMPLES::
|
|
605
|
+
|
|
606
|
+
sage: pAdicWeightSpace(17)(2)._repr_()
|
|
607
|
+
'2'
|
|
608
|
+
sage: pAdicWeightSpace(17)(2, DirichletGroup(17, QQ).0)._repr_()
|
|
609
|
+
'(2, 17, [-1])'
|
|
610
|
+
sage: pAdicWeightSpace(17)(2, DirichletGroup(17, QQ).0^2)._repr_()
|
|
611
|
+
'2'
|
|
612
|
+
"""
|
|
613
|
+
if self._chi.is_trivial():
|
|
614
|
+
return "%s" % self._k
|
|
615
|
+
else:
|
|
616
|
+
return "(%s, %s, %s)" % (self._k, self._chi.modulus(), self._chi._repr_short_())
|
|
617
|
+
|
|
618
|
+
def teichmuller_type(self):
|
|
619
|
+
r"""
|
|
620
|
+
Return the Teichmuller type of this weight-character `\kappa`.
|
|
621
|
+
|
|
622
|
+
This is the unique `t \in \ZZ/(p-1)\ZZ` such that `\kappa(\mu)
|
|
623
|
+
= \mu^t` for `\mu` a `(p-1)`-st root of 1.
|
|
624
|
+
|
|
625
|
+
For `p = 2` this does not make sense, but we still want the Teichmuller
|
|
626
|
+
type to correspond to the index of the component of weight space in
|
|
627
|
+
which `\kappa` lies, so we return 1 if `\kappa` is odd and 0 otherwise.
|
|
628
|
+
|
|
629
|
+
EXAMPLES::
|
|
630
|
+
|
|
631
|
+
sage: pAdicWeightSpace(11)(2, DirichletGroup(11,QQ).0).teichmuller_type()
|
|
632
|
+
7
|
|
633
|
+
sage: pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0).teichmuller_type()
|
|
634
|
+
14
|
|
635
|
+
sage: pAdicWeightSpace(2)(3, DirichletGroup(4,QQ).0).teichmuller_type()
|
|
636
|
+
0
|
|
637
|
+
"""
|
|
638
|
+
# Special case p == 2
|
|
639
|
+
if self._p == 2:
|
|
640
|
+
if self.is_even():
|
|
641
|
+
return IntegerModRing(2).zero()
|
|
642
|
+
else:
|
|
643
|
+
return IntegerModRing(2).one()
|
|
644
|
+
m = IntegerModRing(self._p).multiplicative_generator()
|
|
645
|
+
x = [y for y in IntegerModRing(self._chi.modulus()) if y == m and y**(self._p - 1) == 1]
|
|
646
|
+
if len(x) != 1:
|
|
647
|
+
raise ArithmeticError
|
|
648
|
+
x = x[0]
|
|
649
|
+
f = IntegerModRing(self._p)(self._chi(x)).log(m)
|
|
650
|
+
return IntegerModRing(self._p - 1)(self._k + f)
|
|
651
|
+
|
|
652
|
+
def Lvalue(self):
|
|
653
|
+
r"""
|
|
654
|
+
Return the value of the `p`-adic `L`-function of `\QQ` evaluated at
|
|
655
|
+
this weight-character.
|
|
656
|
+
|
|
657
|
+
If the character is `x \mapsto x^k \chi(x)`
|
|
658
|
+
where `k > 0` and `\chi` has conductor a power of `p`, this is an
|
|
659
|
+
element of the number field generated by the values of `\chi`, equal to
|
|
660
|
+
the value of the complex `L`-function `L(1-k, \chi)`. If `\chi` is
|
|
661
|
+
trivial, it is equal to `(1 - p^{k-1})\zeta(1-k)`.
|
|
662
|
+
|
|
663
|
+
At present this is not implemented in any other cases, except the
|
|
664
|
+
trivial character (for which the value is `\infty`).
|
|
665
|
+
|
|
666
|
+
.. TODO::
|
|
667
|
+
|
|
668
|
+
Implement this more generally using the Amice transform
|
|
669
|
+
machinery in
|
|
670
|
+
sage/schemes/elliptic_curves/padic_lseries.py, which
|
|
671
|
+
should clearly be factored out into a separate class.
|
|
672
|
+
|
|
673
|
+
EXAMPLES::
|
|
674
|
+
|
|
675
|
+
sage: pAdicWeightSpace(7)(4).Lvalue() == (1 - 7^3)*zeta__exact(-3)
|
|
676
|
+
True
|
|
677
|
+
sage: pAdicWeightSpace(7)(5, DirichletGroup(7, Qp(7)).0^4).Lvalue()
|
|
678
|
+
0
|
|
679
|
+
sage: pAdicWeightSpace(7)(6, DirichletGroup(7, Qp(7)).0^4).Lvalue()
|
|
680
|
+
1 + 2*7 + 7^2 + 3*7^3 + 3*7^5 + 4*7^6 + 2*7^7 + 5*7^8 + 2*7^9 + 3*7^10 + 6*7^11
|
|
681
|
+
+ 2*7^12 + 3*7^13 + 5*7^14 + 6*7^15 + 5*7^16 + 3*7^17 + 6*7^18 + O(7^19)
|
|
682
|
+
"""
|
|
683
|
+
if self._k > 0:
|
|
684
|
+
return -self._chi.bernoulli(self._k) / self._k
|
|
685
|
+
if self.is_trivial():
|
|
686
|
+
return Infinity
|
|
687
|
+
else:
|
|
688
|
+
raise NotImplementedError("Don't know how to compute value of this L-function")
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
class ArbitraryWeight(WeightCharacter):
|
|
692
|
+
|
|
693
|
+
def __init__(self, parent, w, t):
|
|
694
|
+
r"""
|
|
695
|
+
Create the element of `p`-adic weight space in the given component
|
|
696
|
+
mapping 1 + p to w.
|
|
697
|
+
|
|
698
|
+
Here w must be an element of a `p`-adic field, with finite
|
|
699
|
+
precision.
|
|
700
|
+
|
|
701
|
+
EXAMPLES::
|
|
702
|
+
|
|
703
|
+
sage: pAdicWeightSpace(17)(1 + 17^2 + O(17^3), 11, False)
|
|
704
|
+
[1 + 17^2 + O(17^3), 11]
|
|
705
|
+
"""
|
|
706
|
+
WeightCharacter.__init__(self, parent)
|
|
707
|
+
|
|
708
|
+
self.t = ZZ(t) % (self._p > 2 and (self._p - 1) or 2)
|
|
709
|
+
# do we store w precisely?
|
|
710
|
+
if (w - 1).valuation() <= 0:
|
|
711
|
+
raise ValueError("Must send generator to something nearer 1")
|
|
712
|
+
self.w = w
|
|
713
|
+
|
|
714
|
+
def _repr_(self):
|
|
715
|
+
r"""
|
|
716
|
+
String representation of this character.
|
|
717
|
+
|
|
718
|
+
EXAMPLES::
|
|
719
|
+
|
|
720
|
+
sage: pAdicWeightSpace(97)(1 + 2*97 + O(97^20), 12, False)._repr_()
|
|
721
|
+
'[1 + 2*97 + O(97^20), 12]'
|
|
722
|
+
"""
|
|
723
|
+
return "[%s, %s]" % (self.w, self.t)
|
|
724
|
+
|
|
725
|
+
def __call__(self, x):
|
|
726
|
+
r"""
|
|
727
|
+
Evaluate this character at an element of `\ZZ_p^\times`.
|
|
728
|
+
|
|
729
|
+
EXAMPLES::
|
|
730
|
+
|
|
731
|
+
sage: kappa = pAdicWeightSpace(23)(1 + 23^2 + O(23^20), 4, False)
|
|
732
|
+
sage: kappa(2)
|
|
733
|
+
16 + 7*23 + 7*23^2 + 16*23^3 + 23^4 + 20*23^5 + 15*23^7 + 11*23^8 + 12*23^9 + 8*23^10 + 22*23^11 + 16*23^12 + 13*23^13 + 4*23^14 + 19*23^15 + 6*23^16 + 7*23^17 + 11*23^19 + O(23^20)
|
|
734
|
+
sage: kappa(-1)
|
|
735
|
+
1 + O(23^20)
|
|
736
|
+
sage: kappa(23)
|
|
737
|
+
0
|
|
738
|
+
sage: kappa(2 + 2*23 + 11*23^2 + O(23^3))
|
|
739
|
+
16 + 7*23 + O(23^3)
|
|
740
|
+
"""
|
|
741
|
+
from sage.misc.verbose import verbose
|
|
742
|
+
|
|
743
|
+
if not isinstance(x, pAdicGenericElement):
|
|
744
|
+
x = Qp(self._p)(x)
|
|
745
|
+
if x.valuation() != 0:
|
|
746
|
+
return 0
|
|
747
|
+
|
|
748
|
+
teich = x.parent().teichmuller(x, x.precision_absolute())
|
|
749
|
+
xx = x / teich
|
|
750
|
+
if (xx - 1).valuation() <= 0:
|
|
751
|
+
raise ArithmeticError
|
|
752
|
+
verbose("Normalised element is %s" % xx)
|
|
753
|
+
|
|
754
|
+
e = xx.log() / self.parent()._param.log()
|
|
755
|
+
verbose("Exponent is %s" % e)
|
|
756
|
+
|
|
757
|
+
return teich**(self.t) * (self.w.log() * e).exp()
|
|
758
|
+
|
|
759
|
+
def teichmuller_type(self):
|
|
760
|
+
r"""
|
|
761
|
+
Return the Teichmuller type of this weight-character `\kappa`.
|
|
762
|
+
|
|
763
|
+
This is
|
|
764
|
+
the unique `t \in \ZZ/(p-1)\ZZ` such that `\kappa(\mu) =
|
|
765
|
+
\mu^t` for \mu a `(p-1)`-st root of 1.
|
|
766
|
+
|
|
767
|
+
For `p = 2` this does not make sense, but we still want the Teichmuller
|
|
768
|
+
type to correspond to the index of the component of weight space in
|
|
769
|
+
which `\kappa` lies, so we return 1 if `\kappa` is odd and 0 otherwise.
|
|
770
|
+
|
|
771
|
+
EXAMPLES::
|
|
772
|
+
|
|
773
|
+
sage: pAdicWeightSpace(17)(1 + 3*17 + 2*17^2 + O(17^3), 8, False).teichmuller_type()
|
|
774
|
+
8
|
|
775
|
+
sage: pAdicWeightSpace(2)(1 + 2 + O(2^2), 1, False).teichmuller_type()
|
|
776
|
+
1
|
|
777
|
+
"""
|
|
778
|
+
return self.t
|