passagemath-schemes 10.6.40__cp314-cp314-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.
Potentially problematic release.
This version of passagemath-schemes might be problematic. Click here for more details.
- 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.40.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.40.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.40.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.40.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.40.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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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.cpython-314-darwin.so +0 -0
- sage/modular/modsym/p1list.pxd +29 -0
- sage/modular/modsym/p1list.pyx +1372 -0
- sage/modular/modsym/p1list_nf.py +1241 -0
- sage/modular/modsym/relation_matrix.py +591 -0
- sage/modular/modsym/relation_matrix_pyx.cpython-314-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-314-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-314-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,1332 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.rings.padics
|
|
3
|
+
"""
|
|
4
|
+
Hyperelliptic curves over a `p`-adic field
|
|
5
|
+
"""
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Copyright (C) 2007 Robert Bradshaw <robertwb@math.washington.edu>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
|
11
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
12
|
+
# (at your option) any later version.
|
|
13
|
+
# https://www.gnu.org/licenses/
|
|
14
|
+
# ****************************************************************************
|
|
15
|
+
|
|
16
|
+
from sage.matrix.constructor import matrix
|
|
17
|
+
from sage.misc.lazy_import import lazy_import
|
|
18
|
+
from sage.modules.free_module import VectorSpace
|
|
19
|
+
from sage.modules.free_module_element import vector
|
|
20
|
+
from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF
|
|
21
|
+
from sage.rings.infinity import Infinity
|
|
22
|
+
from sage.rings.integer_ring import ZZ
|
|
23
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
24
|
+
from sage.rings.power_series_ring import PowerSeriesRing
|
|
25
|
+
from sage.rings.rational_field import QQ
|
|
26
|
+
from sage.rings.rational_field import RationalField
|
|
27
|
+
from sage.rings.real_mpfr import RR
|
|
28
|
+
from sage.schemes.curves.projective_curve import ProjectivePlaneCurve_field
|
|
29
|
+
|
|
30
|
+
lazy_import("sage.functions.log", "log")
|
|
31
|
+
lazy_import("sage.rings.padics.factory", "Qp", as_="pAdicField")
|
|
32
|
+
|
|
33
|
+
from . import hyperelliptic_generic
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class HyperellipticCurve_padic_field(hyperelliptic_generic.HyperellipticCurve_generic,
|
|
37
|
+
ProjectivePlaneCurve_field):
|
|
38
|
+
|
|
39
|
+
# The functions below were prototyped at the 2007 Arizona Winter School by
|
|
40
|
+
# Robert Bradshaw and Ralf Gerkmann, working with Miljan Brakovevic and
|
|
41
|
+
# Kiran Kedlaya
|
|
42
|
+
# All of the below is with respect to the Monsky Washnitzer cohomology.
|
|
43
|
+
|
|
44
|
+
def local_analytic_interpolation(self, P, Q):
|
|
45
|
+
"""
|
|
46
|
+
For points `P`, `Q` in the same residue disc,
|
|
47
|
+
this constructs an interpolation from `P` to `Q`
|
|
48
|
+
(in homogeneous coordinates) in a power series in
|
|
49
|
+
the local parameter `t`, with precision equal to
|
|
50
|
+
the `p`-adic precision of the underlying ring.
|
|
51
|
+
|
|
52
|
+
INPUT:
|
|
53
|
+
|
|
54
|
+
- ``P``, ``Q`` -- points on ``self`` in the same residue disc
|
|
55
|
+
|
|
56
|
+
OUTPUT:
|
|
57
|
+
|
|
58
|
+
Returns a point `X(t) = ( x(t) : y(t) : z(t) )` such that:
|
|
59
|
+
|
|
60
|
+
(1) `X(0) = P` and `X(1) = Q` if `P, Q` are not in the infinite disc
|
|
61
|
+
(2) `X(P[0]^g/P[1]) = P` and `X(Q[0]^g/Q[1]) = Q` if `P, Q` are in the infinite disc
|
|
62
|
+
|
|
63
|
+
EXAMPLES::
|
|
64
|
+
|
|
65
|
+
sage: R.<x> = QQ['x']
|
|
66
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
67
|
+
sage: K = Qp(5,8)
|
|
68
|
+
sage: HK = H.change_ring(K)
|
|
69
|
+
|
|
70
|
+
A non-Weierstrass disc::
|
|
71
|
+
|
|
72
|
+
sage: P = HK(0,3)
|
|
73
|
+
sage: Q = HK(5, 3 + 3*5^2 + 2*5^3 + 3*5^4 + 2*5^5 + 2*5^6 + 3*5^7 + O(5^8))
|
|
74
|
+
sage: x,y,z, = HK.local_analytic_interpolation(P,Q)
|
|
75
|
+
sage: x(0) == P[0], x(1) == Q[0], y(0) == P[1], y.polynomial()(1) == Q[1]
|
|
76
|
+
(True, True, True, True)
|
|
77
|
+
|
|
78
|
+
A finite Weierstrass disc::
|
|
79
|
+
|
|
80
|
+
sage: P = HK.lift_x(1 + 2*5^2)
|
|
81
|
+
sage: Q = HK.lift_x(1 + 3*5^2)
|
|
82
|
+
sage: x,y,z = HK.local_analytic_interpolation(P,Q)
|
|
83
|
+
sage: x(0) == P[0], x.polynomial()(1) == Q[0], y(0) == P[1], y(1) == Q[1]
|
|
84
|
+
(True, True, True, True)
|
|
85
|
+
|
|
86
|
+
The infinite disc::
|
|
87
|
+
|
|
88
|
+
sage: P = HK.lift_x(5^-2)
|
|
89
|
+
sage: Q = HK.lift_x(4*5^-2)
|
|
90
|
+
sage: x,y,z = HK.local_analytic_interpolation(P,Q)
|
|
91
|
+
sage: x = x/z
|
|
92
|
+
sage: y = y/z
|
|
93
|
+
sage: x(P[0]/P[1]) == P[0]
|
|
94
|
+
True
|
|
95
|
+
sage: x(Q[0]/Q[1]) == Q[0]
|
|
96
|
+
True
|
|
97
|
+
sage: y(P[0]/P[1]) == P[1]
|
|
98
|
+
True
|
|
99
|
+
sage: y(Q[0]/Q[1]) == Q[1]
|
|
100
|
+
True
|
|
101
|
+
|
|
102
|
+
An error if points are not in the same disc::
|
|
103
|
+
|
|
104
|
+
sage: x,y,z = HK.local_analytic_interpolation(P,HK(1,0))
|
|
105
|
+
Traceback (most recent call last):
|
|
106
|
+
...
|
|
107
|
+
ValueError: (5^-2 + O(5^6) : 4*5^-3 + 4*5^-2 + 4*5^-1 + 4 + 4*5 + 3*5^3 + 5^4 + O(5^5) : 1 + O(5^8)) and (1 + O(5^8) : 0 : 1 + O(5^8)) are not in the same residue disc
|
|
108
|
+
|
|
109
|
+
TESTS:
|
|
110
|
+
|
|
111
|
+
Check that :issue:`26005` is fixed::
|
|
112
|
+
|
|
113
|
+
sage: L = Qp(5, 100)
|
|
114
|
+
sage: HL = H.change_ring(L)
|
|
115
|
+
sage: P = HL.lift_x(1 + 2*5^2)
|
|
116
|
+
sage: Q = HL.lift_x(1 + 3*5^2)
|
|
117
|
+
sage: x,y,z=HL.local_analytic_interpolation(P, Q)
|
|
118
|
+
sage: x.polynomial().degree()
|
|
119
|
+
98
|
|
120
|
+
|
|
121
|
+
AUTHORS:
|
|
122
|
+
|
|
123
|
+
- Robert Bradshaw (2007-03)
|
|
124
|
+
- Jennifer Balakrishnan (2010-02)
|
|
125
|
+
"""
|
|
126
|
+
prec = self.base_ring().precision_cap()
|
|
127
|
+
if not self.is_same_disc(P,Q):
|
|
128
|
+
raise ValueError("%s and %s are not in the same residue disc" % (P,Q))
|
|
129
|
+
disc = self.residue_disc(P)
|
|
130
|
+
t = PowerSeriesRing(self.base_ring(), 't', prec).gen(0)
|
|
131
|
+
if disc == self.change_ring(self.base_ring().residue_field())(0,1,0): # Infinite disc
|
|
132
|
+
x,y = self.local_coordinates_at_infinity(2*prec)
|
|
133
|
+
g = self.genus()
|
|
134
|
+
return (x*t**(2*g+1),y*t**(2*g+1),t**(2*g+1))
|
|
135
|
+
if disc[1] != 0: # non-Weierstrass disc
|
|
136
|
+
x = P[0]+t*(Q[0]-P[0])
|
|
137
|
+
pts = self.lift_x(x, all=True)
|
|
138
|
+
if pts[0][1][0] == P[1]:
|
|
139
|
+
return pts[0]
|
|
140
|
+
else:
|
|
141
|
+
return pts[1]
|
|
142
|
+
else: # Weierstrass disc
|
|
143
|
+
S = self.find_char_zero_weier_point(P)
|
|
144
|
+
x,y = self.local_coord(S, prec)
|
|
145
|
+
a = P[1]
|
|
146
|
+
b = Q[1] - P[1]
|
|
147
|
+
y = a + b*t
|
|
148
|
+
x = x.polynomial()(y).add_bigoh(x.prec())
|
|
149
|
+
return (x, y, 1)
|
|
150
|
+
|
|
151
|
+
def weierstrass_points(self):
|
|
152
|
+
"""
|
|
153
|
+
Return the Weierstrass points of ``self`` defined over
|
|
154
|
+
``self.base_ring()``, that is, the point at infinity and those points
|
|
155
|
+
in the support of the divisor of `y`.
|
|
156
|
+
|
|
157
|
+
EXAMPLES::
|
|
158
|
+
|
|
159
|
+
sage: K = pAdicField(11, 5)
|
|
160
|
+
sage: x = polygen(K)
|
|
161
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
162
|
+
sage: C.weierstrass_points()
|
|
163
|
+
[(0 : 1 + O(11^5) : 0), (7 + 10*11 + 4*11^3 + O(11^5) : 0 : 1 + O(11^5))]
|
|
164
|
+
"""
|
|
165
|
+
f, h = self.hyperelliptic_polynomials()
|
|
166
|
+
if h != 0:
|
|
167
|
+
raise NotImplementedError()
|
|
168
|
+
return [self((0,1,0))] + [self((x, 0, 1)) for x in f.roots(multiplicities=False)]
|
|
169
|
+
|
|
170
|
+
def is_in_weierstrass_disc(self, P):
|
|
171
|
+
"""
|
|
172
|
+
Check if `P` is in a Weierstrass disc.
|
|
173
|
+
|
|
174
|
+
EXAMPLES::
|
|
175
|
+
|
|
176
|
+
sage: R.<x> = QQ['x']
|
|
177
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
178
|
+
sage: K = Qp(5,8)
|
|
179
|
+
sage: HK = H.change_ring(K)
|
|
180
|
+
sage: P = HK(0,3)
|
|
181
|
+
sage: HK.is_in_weierstrass_disc(P)
|
|
182
|
+
False
|
|
183
|
+
sage: Q = HK(0,1,0)
|
|
184
|
+
sage: HK.is_in_weierstrass_disc(Q)
|
|
185
|
+
True
|
|
186
|
+
sage: S = HK(1,0)
|
|
187
|
+
sage: HK.is_in_weierstrass_disc(S)
|
|
188
|
+
True
|
|
189
|
+
sage: T = HK.lift_x(1+3*5^2); T
|
|
190
|
+
(1 + 3*5^2 + O(5^8) : 3*5 + 4*5^2 + 5^4 + 3*5^5 + 5^6 + O(5^7) : 1 + O(5^8))
|
|
191
|
+
sage: HK.is_in_weierstrass_disc(T)
|
|
192
|
+
True
|
|
193
|
+
|
|
194
|
+
AUTHOR:
|
|
195
|
+
|
|
196
|
+
- Jennifer Balakrishnan (2010-02)
|
|
197
|
+
"""
|
|
198
|
+
return not (P[1].valuation() == 0 and P != self(0, 1, 0))
|
|
199
|
+
|
|
200
|
+
def is_weierstrass(self, P):
|
|
201
|
+
"""
|
|
202
|
+
Check if `P` is a Weierstrass point (i.e., fixed by the hyperelliptic
|
|
203
|
+
involution).
|
|
204
|
+
|
|
205
|
+
EXAMPLES::
|
|
206
|
+
|
|
207
|
+
sage: R.<x> = QQ['x']
|
|
208
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
209
|
+
sage: K = Qp(5,8)
|
|
210
|
+
sage: HK = H.change_ring(K)
|
|
211
|
+
sage: P = HK(0,3)
|
|
212
|
+
sage: HK.is_weierstrass(P)
|
|
213
|
+
False
|
|
214
|
+
sage: Q = HK(0,1,0)
|
|
215
|
+
sage: HK.is_weierstrass(Q)
|
|
216
|
+
True
|
|
217
|
+
sage: S = HK(1,0)
|
|
218
|
+
sage: HK.is_weierstrass(S)
|
|
219
|
+
True
|
|
220
|
+
sage: T = HK.lift_x(1+3*5^2); T
|
|
221
|
+
(1 + 3*5^2 + O(5^8) : 3*5 + 4*5^2 + 5^4 + 3*5^5 + 5^6 + O(5^7) : 1 + O(5^8))
|
|
222
|
+
sage: HK.is_weierstrass(T)
|
|
223
|
+
False
|
|
224
|
+
|
|
225
|
+
AUTHOR:
|
|
226
|
+
|
|
227
|
+
- Jennifer Balakrishnan (2010-02)
|
|
228
|
+
"""
|
|
229
|
+
return (P[1] == 0 or P[2] == 0)
|
|
230
|
+
|
|
231
|
+
def find_char_zero_weier_point(self, Q):
|
|
232
|
+
"""
|
|
233
|
+
Given `Q` a point on ``self`` in a Weierstrass disc, finds the
|
|
234
|
+
center of the Weierstrass disc (if defined over ``self.base_ring()``).
|
|
235
|
+
|
|
236
|
+
EXAMPLES::
|
|
237
|
+
|
|
238
|
+
sage: R.<x> = QQ['x']
|
|
239
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
240
|
+
sage: K = Qp(5,8)
|
|
241
|
+
sage: HK = H.change_ring(K)
|
|
242
|
+
sage: P = HK.lift_x(1 + 2*5^2)
|
|
243
|
+
sage: Q = HK.lift_x(5^-2)
|
|
244
|
+
sage: S = HK(1,0)
|
|
245
|
+
sage: T = HK(0,1,0)
|
|
246
|
+
sage: HK.find_char_zero_weier_point(P)
|
|
247
|
+
(1 + O(5^8) : 0 : 1 + O(5^8))
|
|
248
|
+
sage: HK.find_char_zero_weier_point(Q)
|
|
249
|
+
(0 : 1 + O(5^8) : 0)
|
|
250
|
+
sage: HK.find_char_zero_weier_point(S)
|
|
251
|
+
(1 + O(5^8) : 0 : 1 + O(5^8))
|
|
252
|
+
sage: HK.find_char_zero_weier_point(T)
|
|
253
|
+
(0 : 1 + O(5^8) : 0)
|
|
254
|
+
|
|
255
|
+
AUTHOR:
|
|
256
|
+
|
|
257
|
+
- Jennifer Balakrishnan
|
|
258
|
+
"""
|
|
259
|
+
if not self.is_in_weierstrass_disc(Q):
|
|
260
|
+
raise ValueError("%s is not in a Weierstrass disc" % Q)
|
|
261
|
+
points = self.weierstrass_points()
|
|
262
|
+
for P in points:
|
|
263
|
+
if self.is_same_disc(P,Q):
|
|
264
|
+
return P
|
|
265
|
+
|
|
266
|
+
def residue_disc(self, P):
|
|
267
|
+
"""
|
|
268
|
+
Give the residue disc of `P`.
|
|
269
|
+
|
|
270
|
+
EXAMPLES::
|
|
271
|
+
|
|
272
|
+
sage: R.<x> = QQ['x']
|
|
273
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
274
|
+
sage: K = Qp(5,8)
|
|
275
|
+
sage: HK = H.change_ring(K)
|
|
276
|
+
sage: P = HK.lift_x(1 + 2*5^2)
|
|
277
|
+
sage: HK.residue_disc(P)
|
|
278
|
+
(1 : 0 : 1)
|
|
279
|
+
sage: Q = HK(0,3)
|
|
280
|
+
sage: HK.residue_disc(Q)
|
|
281
|
+
(0 : 3 : 1)
|
|
282
|
+
sage: S = HK.lift_x(5^-2)
|
|
283
|
+
sage: HK.residue_disc(S)
|
|
284
|
+
(0 : 1 : 0)
|
|
285
|
+
sage: T = HK(0,1,0)
|
|
286
|
+
sage: HK.residue_disc(T)
|
|
287
|
+
(0 : 1 : 0)
|
|
288
|
+
|
|
289
|
+
AUTHOR:
|
|
290
|
+
|
|
291
|
+
- Jennifer Balakrishnan
|
|
292
|
+
"""
|
|
293
|
+
xPv = P[0].valuation()
|
|
294
|
+
yPv = P[1].valuation()
|
|
295
|
+
F = self.base_ring().residue_field()
|
|
296
|
+
HF = self.change_ring(F)
|
|
297
|
+
if P == self(0,1,0):
|
|
298
|
+
return HF(0,1,0)
|
|
299
|
+
elif yPv > 0:
|
|
300
|
+
if xPv > 0:
|
|
301
|
+
return HF(0,0,1)
|
|
302
|
+
if xPv == 0:
|
|
303
|
+
return HF(P[0].expansion(0), 0,1)
|
|
304
|
+
elif yPv == 0:
|
|
305
|
+
if xPv > 0:
|
|
306
|
+
return HF(0, P[1].expansion(0),1)
|
|
307
|
+
if xPv == 0:
|
|
308
|
+
return HF(P[0].expansion(0), P[1].expansion(0),1)
|
|
309
|
+
else:
|
|
310
|
+
return HF(0,1,0)
|
|
311
|
+
|
|
312
|
+
def is_same_disc(self, P, Q):
|
|
313
|
+
"""
|
|
314
|
+
Check if `P,Q` are in same residue disc.
|
|
315
|
+
|
|
316
|
+
EXAMPLES::
|
|
317
|
+
|
|
318
|
+
sage: R.<x> = QQ['x']
|
|
319
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
320
|
+
sage: K = Qp(5,8)
|
|
321
|
+
sage: HK = H.change_ring(K)
|
|
322
|
+
sage: P = HK.lift_x(1 + 2*5^2)
|
|
323
|
+
sage: Q = HK.lift_x(5^-2)
|
|
324
|
+
sage: S = HK(1,0)
|
|
325
|
+
sage: HK.is_same_disc(P,Q)
|
|
326
|
+
False
|
|
327
|
+
sage: HK.is_same_disc(P,S)
|
|
328
|
+
True
|
|
329
|
+
sage: HK.is_same_disc(Q,S)
|
|
330
|
+
False
|
|
331
|
+
"""
|
|
332
|
+
return self.residue_disc(P) == self.residue_disc(Q)
|
|
333
|
+
|
|
334
|
+
def tiny_integrals(self, F, P, Q):
|
|
335
|
+
r"""
|
|
336
|
+
Evaluate the integrals of `f_i dx/2y` from `P` to `Q` for each `f_i` in `F`
|
|
337
|
+
by formally integrating a power series in a local parameter `t`
|
|
338
|
+
|
|
339
|
+
`P` and `Q` MUST be in the same residue disc for this result to make sense.
|
|
340
|
+
|
|
341
|
+
INPUT:
|
|
342
|
+
|
|
343
|
+
- ``F`` -- list of functions `f_i`
|
|
344
|
+
- ``P`` -- point on ``self``
|
|
345
|
+
- ``Q`` -- point on ``self`` (in the same residue disc as `P`)
|
|
346
|
+
|
|
347
|
+
OUTPUT: the integrals `\int_P^Q f_i dx/2y`
|
|
348
|
+
|
|
349
|
+
EXAMPLES::
|
|
350
|
+
|
|
351
|
+
sage: K = pAdicField(17, 5)
|
|
352
|
+
sage: E = EllipticCurve(K, [-31/3, -2501/108]) # 11a
|
|
353
|
+
sage: P = E(K(14/3), K(11/2))
|
|
354
|
+
sage: TP = E.teichmuller(P);
|
|
355
|
+
sage: x,y = E.monsky_washnitzer_gens()
|
|
356
|
+
sage: E.tiny_integrals([1,x],P, TP) == E.tiny_integrals_on_basis(P,TP)
|
|
357
|
+
True
|
|
358
|
+
|
|
359
|
+
::
|
|
360
|
+
|
|
361
|
+
sage: K = pAdicField(11, 5)
|
|
362
|
+
sage: x = polygen(K)
|
|
363
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
364
|
+
sage: P = C.lift_x(11^(-2))
|
|
365
|
+
sage: Q = C.lift_x(3*11^(-2))
|
|
366
|
+
sage: C.tiny_integrals([1],P,Q)
|
|
367
|
+
(5*11^3 + 7*11^4 + 2*11^5 + 6*11^6 + 11^7 + O(11^8))
|
|
368
|
+
|
|
369
|
+
Note that this fails if the points are not in the same residue disc::
|
|
370
|
+
|
|
371
|
+
sage: S = C(0,1/4)
|
|
372
|
+
sage: C.tiny_integrals([1,x,x^2,x^3],P,S)
|
|
373
|
+
Traceback (most recent call last):
|
|
374
|
+
...
|
|
375
|
+
ValueError: (11^-2 + O(11^3) : 11^-5 + 8*11^-2 + O(11^0) : 1 + O(11^5)) and (0 : 3 + 8*11 + 2*11^2 + 8*11^3 + 2*11^4 + O(11^5) : 1 + O(11^5)) are not in the same residue disc
|
|
376
|
+
"""
|
|
377
|
+
x, y, z = self.local_analytic_interpolation(P, Q) #homogeneous coordinates
|
|
378
|
+
x = x/z
|
|
379
|
+
y = y/z
|
|
380
|
+
dt = x.derivative() / (2*y)
|
|
381
|
+
integrals = []
|
|
382
|
+
g = self.genus()
|
|
383
|
+
for f in F:
|
|
384
|
+
try:
|
|
385
|
+
f_dt = f(x,y)*dt
|
|
386
|
+
except TypeError: #if f is a constant, not callable
|
|
387
|
+
f_dt = f*dt
|
|
388
|
+
if x.valuation() != -2:
|
|
389
|
+
I = sum(f_dt[n]/(n+1) for n in range(f_dt.degree() + 1)) # \int_0^1 f dt
|
|
390
|
+
else:
|
|
391
|
+
If_dt = f_dt.integral().laurent_polynomial()
|
|
392
|
+
I = If_dt(Q[0]**g/Q[1]) - If_dt(P[0]**g/P[1])
|
|
393
|
+
integrals.append(I)
|
|
394
|
+
return vector(integrals)
|
|
395
|
+
|
|
396
|
+
def tiny_integrals_on_basis(self, P, Q):
|
|
397
|
+
r"""
|
|
398
|
+
Evaluate the integrals `\{\int_P^Q x^i dx/2y \}_{i=0}^{2g-1}`
|
|
399
|
+
by formally integrating a power series in a local parameter `t`.
|
|
400
|
+
`P` and `Q` MUST be in the same residue disc for this result to make sense.
|
|
401
|
+
|
|
402
|
+
INPUT:
|
|
403
|
+
|
|
404
|
+
- ``P`` -- point on ``self``
|
|
405
|
+
- ``Q`` -- point on ``self`` (in the same residue disc as `P`)
|
|
406
|
+
|
|
407
|
+
OUTPUT: the integrals `\{\int_P^Q x^i dx/2y \}_{i=0}^{2g-1}`
|
|
408
|
+
|
|
409
|
+
EXAMPLES::
|
|
410
|
+
|
|
411
|
+
sage: K = pAdicField(17, 5)
|
|
412
|
+
sage: E = EllipticCurve(K, [-31/3, -2501/108]) # 11a
|
|
413
|
+
sage: P = E(K(14/3), K(11/2))
|
|
414
|
+
sage: TP = E.teichmuller(P);
|
|
415
|
+
sage: E.tiny_integrals_on_basis(P, TP)
|
|
416
|
+
(17 + 14*17^2 + 17^3 + 8*17^4 + O(17^5), 16*17 + 5*17^2 + 8*17^3 + 14*17^4 + O(17^5))
|
|
417
|
+
|
|
418
|
+
::
|
|
419
|
+
|
|
420
|
+
sage: K = pAdicField(11, 5)
|
|
421
|
+
sage: x = polygen(K)
|
|
422
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
423
|
+
sage: P = C.lift_x(11^(-2))
|
|
424
|
+
sage: Q = C.lift_x(3*11^(-2))
|
|
425
|
+
sage: C.tiny_integrals_on_basis(P,Q)
|
|
426
|
+
(5*11^3 + 7*11^4 + 2*11^5 + 6*11^6 + 11^7 + O(11^8), 10*11 + 2*11^3 + 3*11^4 + 5*11^5 + O(11^6), 5*11^-1 + 8 + 4*11 + 10*11^2 + 7*11^3 + O(11^4), 2*11^-3 + 11^-2 + 11^-1 + 10 + 8*11 + O(11^2))
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
Note that this fails if the points are not in the same residue disc::
|
|
430
|
+
|
|
431
|
+
sage: S = C(0,1/4)
|
|
432
|
+
sage: C.tiny_integrals_on_basis(P,S)
|
|
433
|
+
Traceback (most recent call last):
|
|
434
|
+
...
|
|
435
|
+
ValueError: (11^-2 + O(11^3) : 11^-5 + 8*11^-2 + O(11^0) : 1 + O(11^5)) and (0 : 3 + 8*11 + 2*11^2 + 8*11^3 + 2*11^4 + O(11^5) : 1 + O(11^5)) are not in the same residue disc
|
|
436
|
+
"""
|
|
437
|
+
if P == Q:
|
|
438
|
+
V = VectorSpace(self.base_ring(), 2*self.genus())
|
|
439
|
+
return V(0)
|
|
440
|
+
R = PolynomialRing(self.base_ring(), ['x', 'y'])
|
|
441
|
+
x, y = R.gens()
|
|
442
|
+
return self.tiny_integrals([x**i for i in range(2*self.genus())], P, Q)
|
|
443
|
+
|
|
444
|
+
def teichmuller(self, P):
|
|
445
|
+
r"""
|
|
446
|
+
Find a Teichm\:uller point in the same residue class of `P`.
|
|
447
|
+
|
|
448
|
+
Because this lift of frobenius acts as `x \mapsto x^p`,
|
|
449
|
+
take the Teichmuller lift of `x` and then find a matching `y`
|
|
450
|
+
from that.
|
|
451
|
+
|
|
452
|
+
EXAMPLES::
|
|
453
|
+
|
|
454
|
+
sage: K = pAdicField(7, 5)
|
|
455
|
+
sage: E = EllipticCurve(K, [-31/3, -2501/108]) # 11a
|
|
456
|
+
sage: P = E(K(14/3), K(11/2))
|
|
457
|
+
sage: E.frobenius(P) == P
|
|
458
|
+
False
|
|
459
|
+
sage: TP = E.teichmuller(P); TP
|
|
460
|
+
(0 : 2 + 3*7 + 3*7^2 + 3*7^4 + O(7^5) : 1 + O(7^5))
|
|
461
|
+
sage: E.frobenius(TP) == TP
|
|
462
|
+
True
|
|
463
|
+
sage: (TP[0] - P[0]).valuation() > 0, (TP[1] - P[1]).valuation() > 0
|
|
464
|
+
(True, True)
|
|
465
|
+
"""
|
|
466
|
+
K = P[0].parent()
|
|
467
|
+
x = K.teichmuller(P[0])
|
|
468
|
+
pts = self.lift_x(x, all=True)
|
|
469
|
+
if (pts[0][1] - P[1]).valuation() > 0:
|
|
470
|
+
return pts[0]
|
|
471
|
+
else:
|
|
472
|
+
return pts[1]
|
|
473
|
+
|
|
474
|
+
def coleman_integrals_on_basis(self, P, Q, algorithm=None):
|
|
475
|
+
r"""
|
|
476
|
+
Compute the Coleman integrals `\{\int_P^Q x^i dx/2y \}_{i=0}^{2g-1}`.
|
|
477
|
+
|
|
478
|
+
INPUT:
|
|
479
|
+
|
|
480
|
+
- ``P`` -- point on ``self``
|
|
481
|
+
- ``Q`` -- point on ``self``
|
|
482
|
+
- ``algorithm`` -- ``None`` (default, uses Frobenius) or teichmuller
|
|
483
|
+
(uses Teichmuller points)
|
|
484
|
+
|
|
485
|
+
OUTPUT: the Coleman integrals `\{\int_P^Q x^i dx/2y \}_{i=0}^{2g-1}`
|
|
486
|
+
|
|
487
|
+
EXAMPLES::
|
|
488
|
+
|
|
489
|
+
sage: K = pAdicField(11, 5)
|
|
490
|
+
sage: x = polygen(K)
|
|
491
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
492
|
+
sage: P = C.lift_x(2)
|
|
493
|
+
sage: Q = C.lift_x(3)
|
|
494
|
+
sage: C.coleman_integrals_on_basis(P, Q)
|
|
495
|
+
(9*11^2 + 7*11^3 + 5*11^4 + O(11^5), 11 + 3*11^2 + 7*11^3 + 11^4 + O(11^5), 10*11 + 11^2 + 5*11^3 + 5*11^4 + O(11^5), 3 + 9*11^2 + 6*11^3 + 11^4 + O(11^5))
|
|
496
|
+
sage: C.coleman_integrals_on_basis(P, Q, algorithm='teichmuller')
|
|
497
|
+
(9*11^2 + 7*11^3 + 5*11^4 + O(11^5), 11 + 3*11^2 + 7*11^3 + 11^4 + O(11^5), 10*11 + 11^2 + 5*11^3 + 5*11^4 + O(11^5), 3 + 9*11^2 + 6*11^3 + 11^4 + O(11^5))
|
|
498
|
+
|
|
499
|
+
::
|
|
500
|
+
|
|
501
|
+
sage: K = pAdicField(11,5)
|
|
502
|
+
sage: x = polygen(K)
|
|
503
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
504
|
+
sage: P = C(11^-2, 10*11^-5 + 10*11^-4 + 10*11^-3 + 2*11^-2 + 10*11^-1)
|
|
505
|
+
sage: Q = C(3*11^-2, 11^-5 + 11^-3 + 10*11^-2 + 7*11^-1)
|
|
506
|
+
sage: C.coleman_integrals_on_basis(P, Q)
|
|
507
|
+
(6*11^3 + 3*11^4 + 8*11^5 + 4*11^6 + 9*11^7 + O(11^8), 11 + 10*11^2 + 8*11^3 + 7*11^4 + 5*11^5 + O(11^6), 6*11^-1 + 2 + 6*11 + 3*11^3 + O(11^4), 9*11^-3 + 9*11^-2 + 9*11^-1 + 2*11 + O(11^2))
|
|
508
|
+
|
|
509
|
+
::
|
|
510
|
+
|
|
511
|
+
sage: R = C(0,1/4)
|
|
512
|
+
sage: a = C.coleman_integrals_on_basis(P,R) # long time (7s on sage.math, 2011)
|
|
513
|
+
sage: b = C.coleman_integrals_on_basis(R,Q) # long time (9s on sage.math, 2011)
|
|
514
|
+
sage: c = C.coleman_integrals_on_basis(P,Q) # long time
|
|
515
|
+
sage: a+b == c # long time
|
|
516
|
+
True
|
|
517
|
+
|
|
518
|
+
::
|
|
519
|
+
|
|
520
|
+
sage: R.<x> = QQ['x']
|
|
521
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
522
|
+
sage: K = Qp(5,8)
|
|
523
|
+
sage: HK = H.change_ring(K)
|
|
524
|
+
sage: S = HK(1,0)
|
|
525
|
+
sage: P = HK(0,3)
|
|
526
|
+
sage: T = HK(0,1,0)
|
|
527
|
+
sage: Q = HK.lift_x(5^-2)
|
|
528
|
+
sage: R = HK.lift_x(4*5^-2)
|
|
529
|
+
sage: HK.coleman_integrals_on_basis(S,P)
|
|
530
|
+
(2*5^2 + 5^4 + 5^5 + 3*5^6 + 3*5^7 + 2*5^8 + O(5^9), 5 + 2*5^2 + 4*5^3 + 2*5^4 + 3*5^6 + 4*5^7 + 2*5^8 + O(5^9))
|
|
531
|
+
sage: HK.coleman_integrals_on_basis(T,P)
|
|
532
|
+
(2*5^2 + 5^4 + 5^5 + 3*5^6 + 3*5^7 + 2*5^8 + O(5^9), 5 + 2*5^2 + 4*5^3 + 2*5^4 + 3*5^6 + 4*5^7 + 2*5^8 + O(5^9))
|
|
533
|
+
sage: HK.coleman_integrals_on_basis(P,S) == -HK.coleman_integrals_on_basis(S,P)
|
|
534
|
+
True
|
|
535
|
+
sage: HK.coleman_integrals_on_basis(S,Q)
|
|
536
|
+
(5 + O(5^4), 4*5^-1 + 4 + 4*5 + 4*5^2 + O(5^3))
|
|
537
|
+
sage: HK.coleman_integrals_on_basis(Q,R)
|
|
538
|
+
(5 + 2*5^2 + 2*5^3 + 2*5^4 + 3*5^5 + 3*5^6 + 3*5^7 + 5^8 + O(5^9), 3*5^-1 + 2*5^4 + 5^5 + 2*5^6 + O(5^7))
|
|
539
|
+
sage: HK.coleman_integrals_on_basis(S,R) == HK.coleman_integrals_on_basis(S,Q) + HK.coleman_integrals_on_basis(Q,R)
|
|
540
|
+
True
|
|
541
|
+
sage: HK.coleman_integrals_on_basis(T,T)
|
|
542
|
+
(0, 0)
|
|
543
|
+
sage: HK.coleman_integrals_on_basis(S,T)
|
|
544
|
+
(0, 0)
|
|
545
|
+
|
|
546
|
+
AUTHORS:
|
|
547
|
+
|
|
548
|
+
- Robert Bradshaw (2007-03): non-Weierstrass points
|
|
549
|
+
- Jennifer Balakrishnan and Robert Bradshaw (2010-02): Weierstrass points
|
|
550
|
+
"""
|
|
551
|
+
import sage.schemes.hyperelliptic_curves.monsky_washnitzer as monsky_washnitzer
|
|
552
|
+
from sage.misc.profiler import Profiler
|
|
553
|
+
prof = Profiler()
|
|
554
|
+
prof("setup")
|
|
555
|
+
K = self.base_ring()
|
|
556
|
+
p = K.prime()
|
|
557
|
+
prec = K.precision_cap()
|
|
558
|
+
g = self.genus()
|
|
559
|
+
dim = 2*g
|
|
560
|
+
V = VectorSpace(K, dim)
|
|
561
|
+
#if P or Q is Weierstrass, use the Frobenius algorithm
|
|
562
|
+
if self.is_weierstrass(P):
|
|
563
|
+
if self.is_weierstrass(Q):
|
|
564
|
+
return V(0)
|
|
565
|
+
else:
|
|
566
|
+
PP = None
|
|
567
|
+
QQ = Q
|
|
568
|
+
TP = None
|
|
569
|
+
TQ = self.frobenius(Q)
|
|
570
|
+
elif self.is_weierstrass(Q):
|
|
571
|
+
PP = P
|
|
572
|
+
QQ = None
|
|
573
|
+
TQ = None
|
|
574
|
+
TP = self.frobenius(P)
|
|
575
|
+
elif self.is_same_disc(P,Q):
|
|
576
|
+
return self.tiny_integrals_on_basis(P,Q)
|
|
577
|
+
elif algorithm == 'teichmuller':
|
|
578
|
+
prof("teichmuller")
|
|
579
|
+
PP = TP = self.teichmuller(P)
|
|
580
|
+
QQ = TQ = self.teichmuller(Q)
|
|
581
|
+
else:
|
|
582
|
+
prof("frobPQ")
|
|
583
|
+
TP = self.frobenius(P)
|
|
584
|
+
TQ = self.frobenius(Q)
|
|
585
|
+
PP, QQ = P, Q
|
|
586
|
+
prof("tiny integrals")
|
|
587
|
+
if TP is None:
|
|
588
|
+
P_to_TP = V(0)
|
|
589
|
+
else:
|
|
590
|
+
if TP is not None:
|
|
591
|
+
TPv = (TP[0]**g/TP[1]).valuation()
|
|
592
|
+
xTPv = TP[0].valuation()
|
|
593
|
+
else:
|
|
594
|
+
xTPv = TPv = +Infinity
|
|
595
|
+
if TQ is not None:
|
|
596
|
+
TQv = (TQ[0]**g/TQ[1]).valuation()
|
|
597
|
+
xTQv = TQ[0].valuation()
|
|
598
|
+
else:
|
|
599
|
+
xTQv = TQv = +Infinity
|
|
600
|
+
offset = (2*g-1)*max(TPv, TQv)
|
|
601
|
+
if offset == +Infinity:
|
|
602
|
+
offset = (2*g-1)*min(TPv,TQv)
|
|
603
|
+
if (offset > prec and (xTPv < 0 or xTQv < 0) and (self.residue_disc(P) == self.change_ring(GF(p))(0,1,0) or self.residue_disc(Q) == self.change_ring(GF(p))(0,1,0))):
|
|
604
|
+
newprec = offset + prec
|
|
605
|
+
K = pAdicField(p,newprec)
|
|
606
|
+
A = PolynomialRing(RationalField(),'x')
|
|
607
|
+
f = A(self.hyperelliptic_polynomials()[0])
|
|
608
|
+
from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve
|
|
609
|
+
self = HyperellipticCurve(f).change_ring(K)
|
|
610
|
+
xP = P[0]
|
|
611
|
+
xPv = xP.valuation()
|
|
612
|
+
xPnew = K(sum(c * p**(xPv + i) for i, c in enumerate(xP.expansion())))
|
|
613
|
+
PP = P = self.lift_x(xPnew)
|
|
614
|
+
TP = self.frobenius(P)
|
|
615
|
+
xQ = Q[0]
|
|
616
|
+
xQv = xQ.valuation()
|
|
617
|
+
xQnew = K(sum(c * p**(xQv + i) for i, c in enumerate(xQ.expansion())))
|
|
618
|
+
QQ = Q = self.lift_x(xQnew)
|
|
619
|
+
TQ = self.frobenius(Q)
|
|
620
|
+
V = VectorSpace(K,dim)
|
|
621
|
+
P_to_TP = V(self.tiny_integrals_on_basis(P, TP))
|
|
622
|
+
if TQ is None:
|
|
623
|
+
TQ_to_Q = V(0)
|
|
624
|
+
else:
|
|
625
|
+
TQ_to_Q = V(self.tiny_integrals_on_basis(TQ, Q))
|
|
626
|
+
prof("mw calc")
|
|
627
|
+
try:
|
|
628
|
+
M_frob, forms = self._frob_calc
|
|
629
|
+
except AttributeError:
|
|
630
|
+
M_frob, forms = self._frob_calc = monsky_washnitzer.matrix_of_frobenius_hyperelliptic(self)
|
|
631
|
+
prof("eval f")
|
|
632
|
+
R = forms[0].base_ring()
|
|
633
|
+
try:
|
|
634
|
+
prof("eval f %s" % R)
|
|
635
|
+
if PP is None:
|
|
636
|
+
L = [-ff(R(QQ[0]), R(QQ[1])) for ff in forms] ##changed
|
|
637
|
+
elif QQ is None:
|
|
638
|
+
L = [ff(R(PP[0]), R(PP[1])) for ff in forms]
|
|
639
|
+
else:
|
|
640
|
+
L = [ff(R(PP[0]), R(PP[1])) - ff(R(QQ[0]), R(QQ[1]))
|
|
641
|
+
for ff in forms]
|
|
642
|
+
except ValueError:
|
|
643
|
+
prof("changing rings")
|
|
644
|
+
forms = [ff.change_ring(self.base_ring()) for ff in forms]
|
|
645
|
+
prof("eval f %s" % self.base_ring())
|
|
646
|
+
if PP is None:
|
|
647
|
+
L = [-ff(QQ[0], QQ[1]) for ff in forms] ##changed
|
|
648
|
+
elif QQ is None:
|
|
649
|
+
L = [ff(PP[0], PP[1]) for ff in forms]
|
|
650
|
+
else:
|
|
651
|
+
L = [ff(PP[0], PP[1]) - ff(QQ[0], QQ[1]) for ff in forms]
|
|
652
|
+
b = V(L)
|
|
653
|
+
if PP is None:
|
|
654
|
+
b -= TQ_to_Q
|
|
655
|
+
elif QQ is None:
|
|
656
|
+
b -= P_to_TP
|
|
657
|
+
elif algorithm != 'teichmuller':
|
|
658
|
+
b -= P_to_TP + TQ_to_Q
|
|
659
|
+
prof("lin alg")
|
|
660
|
+
M_sys = matrix(K, M_frob).transpose() - 1
|
|
661
|
+
TP_to_TQ = M_sys**(-1) * b
|
|
662
|
+
prof("done")
|
|
663
|
+
if algorithm == 'teichmuller':
|
|
664
|
+
return P_to_TP + TP_to_TQ + TQ_to_Q
|
|
665
|
+
else:
|
|
666
|
+
return TP_to_TQ
|
|
667
|
+
|
|
668
|
+
coleman_integrals_on_basis_hyperelliptic = coleman_integrals_on_basis
|
|
669
|
+
|
|
670
|
+
# def invariant_differential(self):
|
|
671
|
+
# """
|
|
672
|
+
# Returns the invariant differential `dx/2y` on self
|
|
673
|
+
#
|
|
674
|
+
# EXAMPLES::
|
|
675
|
+
#
|
|
676
|
+
# sage: R.<x> = QQ['x']
|
|
677
|
+
# sage: H = HyperellipticCurve(x^3+1)
|
|
678
|
+
# sage: K = Qp(5,8)
|
|
679
|
+
# sage: HK = H.change_ring(K)
|
|
680
|
+
# sage: w = HK.invariant_differential(); w
|
|
681
|
+
# (((1+O(5^8)))*1) dx/2y
|
|
682
|
+
#
|
|
683
|
+
# ::
|
|
684
|
+
#
|
|
685
|
+
# sage: K = pAdicField(11, 6)
|
|
686
|
+
# sage: x = polygen(K)
|
|
687
|
+
# sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
688
|
+
# sage: C.invariant_differential()
|
|
689
|
+
# (((1+O(11^6)))*1) dx/2y
|
|
690
|
+
#
|
|
691
|
+
# """
|
|
692
|
+
# import sage.schemes.hyperelliptic_curves.monsky_washnitzer as monsky_washnitzer
|
|
693
|
+
# S = monsky_washnitzer.SpecialHyperellipticQuotientRing(self)
|
|
694
|
+
# MW = monsky_washnitzer.MonskyWashnitzerDifferentialRing(S)
|
|
695
|
+
# return MW.invariant_differential()
|
|
696
|
+
|
|
697
|
+
def coleman_integral(self, w, P, Q, algorithm='None'):
|
|
698
|
+
r"""
|
|
699
|
+
Return the Coleman integral `\int_P^Q w`.
|
|
700
|
+
|
|
701
|
+
INPUT:
|
|
702
|
+
|
|
703
|
+
- ``w`` -- differential (if one of P,Q is Weierstrass, w must be odd)
|
|
704
|
+
- ``P`` -- point on ``self``
|
|
705
|
+
- ``Q`` -- point on ``self``
|
|
706
|
+
- ``algorithm`` -- ``None`` (default, uses Frobenius) or teichmuller
|
|
707
|
+
(uses Teichmuller points)
|
|
708
|
+
|
|
709
|
+
OUTPUT: the Coleman integral `\int_P^Q w`
|
|
710
|
+
|
|
711
|
+
EXAMPLES:
|
|
712
|
+
|
|
713
|
+
Example of Leprevost from Kiran Kedlaya
|
|
714
|
+
The first two should be zero as `(P-Q) = 30(P-Q)` in the Jacobian
|
|
715
|
+
and `dx/2y` and `x dx/2y` are holomorphic. ::
|
|
716
|
+
|
|
717
|
+
sage: K = pAdicField(11, 6)
|
|
718
|
+
sage: x = polygen(K)
|
|
719
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
720
|
+
sage: P = C(-1, 1); P1 = C(-1, -1)
|
|
721
|
+
sage: Q = C(0, 1/4); Q1 = C(0, -1/4)
|
|
722
|
+
sage: x, y = C.monsky_washnitzer_gens()
|
|
723
|
+
sage: w = C.invariant_differential()
|
|
724
|
+
sage: w.coleman_integral(P, Q)
|
|
725
|
+
O(11^6)
|
|
726
|
+
sage: C.coleman_integral(x*w, P, Q)
|
|
727
|
+
O(11^6)
|
|
728
|
+
sage: C.coleman_integral(x^2*w, P, Q)
|
|
729
|
+
7*11 + 6*11^2 + 3*11^3 + 11^4 + 5*11^5 + O(11^6)
|
|
730
|
+
|
|
731
|
+
::
|
|
732
|
+
|
|
733
|
+
sage: p = 71; m = 4
|
|
734
|
+
sage: K = pAdicField(p, m)
|
|
735
|
+
sage: x = polygen(K)
|
|
736
|
+
sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16)
|
|
737
|
+
sage: P = C(-1, 1); P1 = C(-1, -1)
|
|
738
|
+
sage: Q = C(0, 1/4); Q1 = C(0, -1/4)
|
|
739
|
+
sage: x, y = C.monsky_washnitzer_gens()
|
|
740
|
+
sage: w = C.invariant_differential()
|
|
741
|
+
sage: w.integrate(P, Q), (x*w).integrate(P, Q)
|
|
742
|
+
(O(71^4), O(71^4))
|
|
743
|
+
sage: R, R1 = C.lift_x(4, all=True)
|
|
744
|
+
sage: w.integrate(P, R)
|
|
745
|
+
50*71 + 3*71^2 + 43*71^3 + O(71^4)
|
|
746
|
+
sage: w.integrate(P, R) + w.integrate(P1, R1)
|
|
747
|
+
O(71^4)
|
|
748
|
+
|
|
749
|
+
A simple example, integrating dx::
|
|
750
|
+
|
|
751
|
+
sage: R.<x> = QQ['x']
|
|
752
|
+
sage: E= HyperellipticCurve(x^3-4*x+4)
|
|
753
|
+
sage: K = Qp(5,10)
|
|
754
|
+
sage: EK = E.change_ring(K)
|
|
755
|
+
sage: P = EK(2, 2)
|
|
756
|
+
sage: Q = EK.teichmuller(P)
|
|
757
|
+
sage: x, y = EK.monsky_washnitzer_gens()
|
|
758
|
+
sage: EK.coleman_integral(x.diff(), P, Q)
|
|
759
|
+
5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10)
|
|
760
|
+
sage: Q[0] - P[0]
|
|
761
|
+
5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + O(5^10)
|
|
762
|
+
|
|
763
|
+
Yet another example::
|
|
764
|
+
|
|
765
|
+
sage: R.<x> = QQ['x']
|
|
766
|
+
sage: H = HyperellipticCurve(x*(x-1)*(x+9))
|
|
767
|
+
sage: K = Qp(7,10)
|
|
768
|
+
sage: HK = H.change_ring(K)
|
|
769
|
+
sage: import sage.schemes.hyperelliptic_curves.monsky_washnitzer as mw
|
|
770
|
+
sage: M_frob, forms = mw.matrix_of_frobenius_hyperelliptic(HK)
|
|
771
|
+
sage: w = HK.invariant_differential()
|
|
772
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
773
|
+
sage: f = forms[0]
|
|
774
|
+
sage: S = HK(9,36)
|
|
775
|
+
sage: Q = HK.teichmuller(S)
|
|
776
|
+
sage: P = HK(-1,4)
|
|
777
|
+
sage: b = x*w*w._coeff.parent()(f)
|
|
778
|
+
sage: HK.coleman_integral(b,P,Q)
|
|
779
|
+
7 + 7^2 + 4*7^3 + 5*7^4 + 3*7^5 + 7^6 + 5*7^7 + 3*7^8 + 4*7^9 + 4*7^10 + O(7^11)
|
|
780
|
+
|
|
781
|
+
::
|
|
782
|
+
|
|
783
|
+
sage: R.<x> = QQ['x']
|
|
784
|
+
sage: H = HyperellipticCurve(x^3+1)
|
|
785
|
+
sage: K = Qp(5,8)
|
|
786
|
+
sage: HK = H.change_ring(K)
|
|
787
|
+
sage: w = HK.invariant_differential()
|
|
788
|
+
sage: P = HK(0,1)
|
|
789
|
+
sage: Q = HK(5, 1 + 3*5^3 + 2*5^4 + 2*5^5 + 3*5^7)
|
|
790
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
791
|
+
sage: (2*y*w).coleman_integral(P,Q)
|
|
792
|
+
5 + O(5^9)
|
|
793
|
+
sage: xloc,yloc,zloc = HK.local_analytic_interpolation(P,Q)
|
|
794
|
+
sage: I2 = (xloc.derivative()/(2*yloc)).integral()
|
|
795
|
+
sage: I2.polynomial()(1) - I2(0)
|
|
796
|
+
3*5 + 2*5^2 + 2*5^3 + 5^4 + 4*5^6 + 5^7 + O(5^9)
|
|
797
|
+
sage: HK.coleman_integral(w,P,Q)
|
|
798
|
+
3*5 + 2*5^2 + 2*5^3 + 5^4 + 4*5^6 + 5^7 + O(5^9)
|
|
799
|
+
|
|
800
|
+
Integrals involving Weierstrass points::
|
|
801
|
+
|
|
802
|
+
sage: R.<x> = QQ['x']
|
|
803
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
804
|
+
sage: K = Qp(5,8)
|
|
805
|
+
sage: HK = H.change_ring(K)
|
|
806
|
+
sage: S = HK(1,0)
|
|
807
|
+
sage: P = HK(0,3)
|
|
808
|
+
sage: negP = HK(0,-3)
|
|
809
|
+
sage: T = HK(0,1,0)
|
|
810
|
+
sage: w = HK.invariant_differential()
|
|
811
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
812
|
+
sage: HK.coleman_integral(w*x^3,S,T)
|
|
813
|
+
0
|
|
814
|
+
sage: HK.coleman_integral(w*x^3,T,S)
|
|
815
|
+
0
|
|
816
|
+
sage: HK.coleman_integral(w,S,P)
|
|
817
|
+
2*5^2 + 5^4 + 5^5 + 3*5^6 + 3*5^7 + 2*5^8 + O(5^9)
|
|
818
|
+
sage: HK.coleman_integral(w,T,P)
|
|
819
|
+
2*5^2 + 5^4 + 5^5 + 3*5^6 + 3*5^7 + 2*5^8 + O(5^9)
|
|
820
|
+
sage: HK.coleman_integral(w*x^3,T,P)
|
|
821
|
+
5^2 + 2*5^3 + 3*5^6 + 3*5^7 + O(5^8)
|
|
822
|
+
sage: HK.coleman_integral(w*x^3,S,P)
|
|
823
|
+
5^2 + 2*5^3 + 3*5^6 + 3*5^7 + O(5^8)
|
|
824
|
+
sage: HK.coleman_integral(w, P, negP, algorithm='teichmuller')
|
|
825
|
+
5^2 + 4*5^3 + 2*5^4 + 2*5^5 + 3*5^6 + 2*5^7 + 4*5^8 + O(5^9)
|
|
826
|
+
sage: HK.coleman_integral(w, P, negP)
|
|
827
|
+
5^2 + 4*5^3 + 2*5^4 + 2*5^5 + 3*5^6 + 2*5^7 + 4*5^8 + O(5^9)
|
|
828
|
+
|
|
829
|
+
AUTHORS:
|
|
830
|
+
|
|
831
|
+
- Robert Bradshaw (2007-03)
|
|
832
|
+
- Kiran Kedlaya (2008-05)
|
|
833
|
+
- Jennifer Balakrishnan (2010-02)
|
|
834
|
+
"""
|
|
835
|
+
# TODO: implement Jacobians and show the relationship directly
|
|
836
|
+
import sage.schemes.hyperelliptic_curves.monsky_washnitzer as monsky_washnitzer
|
|
837
|
+
K = self.base_ring()
|
|
838
|
+
prec = K.precision_cap()
|
|
839
|
+
S = monsky_washnitzer.SpecialHyperellipticQuotientRing(self, K)
|
|
840
|
+
MW = monsky_washnitzer.MonskyWashnitzerDifferentialRing(S)
|
|
841
|
+
w = MW(w)
|
|
842
|
+
f, vec = w.reduce_fast()
|
|
843
|
+
basis_values = self.coleman_integrals_on_basis(P, Q, algorithm)
|
|
844
|
+
dim = len(basis_values)
|
|
845
|
+
x,y = self.local_coordinates_at_infinity(2*prec)
|
|
846
|
+
if self.is_weierstrass(P):
|
|
847
|
+
if self.is_weierstrass(Q):
|
|
848
|
+
return 0
|
|
849
|
+
elif f == 0:
|
|
850
|
+
return sum([vec[i] * basis_values[i] for i in range(dim)])
|
|
851
|
+
elif w._coeff(x,-y)*x.derivative()/(-2*y)+w._coeff(x,y)*x.derivative()/(2*y) == 0:
|
|
852
|
+
return self.coleman_integral(w,self(Q[0],-Q[1]), self(Q[0],Q[1]), algorithm)/2
|
|
853
|
+
else:
|
|
854
|
+
raise ValueError("The differential is not odd: use coleman_integral_from_weierstrass_via_boundary")
|
|
855
|
+
|
|
856
|
+
elif self.is_weierstrass(Q):
|
|
857
|
+
if f == 0:
|
|
858
|
+
return sum([vec[i] * basis_values[i] for i in range(dim)])
|
|
859
|
+
elif w._coeff(x,-y)*x.derivative()/(-2*y)+w._coeff(x,y)*x.derivative()/(2*y) == 0:
|
|
860
|
+
return -self.coleman_integral(w,self(P[0],-P[1]), self(P[0],P[1]), algorithm)/2
|
|
861
|
+
else:
|
|
862
|
+
raise ValueError("The differential is not odd: use coleman_integral_from_weierstrass_via_boundary")
|
|
863
|
+
else:
|
|
864
|
+
return f(Q[0], Q[1]) - f(P[0], P[1]) + sum([vec[i] * basis_values[i] for i in range(dim)]) # this is just a dot product...
|
|
865
|
+
|
|
866
|
+
def frobenius(self, P=None):
|
|
867
|
+
"""
|
|
868
|
+
Return the `p`-th power lift of Frobenius of `P`.
|
|
869
|
+
|
|
870
|
+
EXAMPLES::
|
|
871
|
+
|
|
872
|
+
sage: K = Qp(11, 5)
|
|
873
|
+
sage: R.<x> = K[]
|
|
874
|
+
sage: E = HyperellipticCurve(x^5 - 21*x - 20)
|
|
875
|
+
sage: P = E.lift_x(2)
|
|
876
|
+
sage: E.frobenius(P)
|
|
877
|
+
(2 + 10*11 + 5*11^2 + 11^3 + O(11^5) : 6 + 11 + 8*11^2 + 8*11^3 + 10*11^4 + O(11^5) : 1 + O(11^5))
|
|
878
|
+
sage: Q = E.teichmuller(P); Q
|
|
879
|
+
(2 + 10*11 + 4*11^2 + 9*11^3 + 11^4 + O(11^5) : 6 + 11 + 4*11^2 + 9*11^3 + 4*11^4 + O(11^5) : 1 + O(11^5))
|
|
880
|
+
sage: E.frobenius(Q)
|
|
881
|
+
(2 + 10*11 + 4*11^2 + 9*11^3 + 11^4 + O(11^5) : 6 + 11 + 4*11^2 + 9*11^3 + 4*11^4 + O(11^5) : 1 + O(11^5))
|
|
882
|
+
|
|
883
|
+
::
|
|
884
|
+
|
|
885
|
+
sage: R.<x> = QQ[]
|
|
886
|
+
sage: H = HyperellipticCurve(x^5-23*x^3+18*x^2+40*x)
|
|
887
|
+
sage: Q = H(0,0)
|
|
888
|
+
sage: u,v = H.local_coord(Q,prec=100)
|
|
889
|
+
sage: K = Qp(11,5)
|
|
890
|
+
sage: L.<a> = K.extension(x^20-11)
|
|
891
|
+
sage: HL = H.change_ring(L)
|
|
892
|
+
sage: S = HL(u(a),v(a))
|
|
893
|
+
sage: HL.frobenius(S)
|
|
894
|
+
(8*a^22 + 10*a^42 + 4*a^44 + 2*a^46 + 9*a^48 + 8*a^50 + a^52 + 7*a^54 +
|
|
895
|
+
7*a^56 + 5*a^58 + 9*a^62 + 5*a^64 + a^66 + 6*a^68 + a^70 + 6*a^74 +
|
|
896
|
+
2*a^76 + 2*a^78 + 4*a^82 + 5*a^84 + 2*a^86 + 7*a^88 + a^90 + 6*a^92 +
|
|
897
|
+
a^96 + 5*a^98 + 2*a^102 + 2*a^106 + 6*a^108 + 8*a^110 + 3*a^112 +
|
|
898
|
+
a^114 + 8*a^116 + 10*a^118 + 3*a^120 + O(a^122) :
|
|
899
|
+
a^11 + 7*a^33 + 7*a^35 + 4*a^37 + 6*a^39 + 9*a^41 + 8*a^43 + 8*a^45 +
|
|
900
|
+
a^47 + 7*a^51 + 4*a^53 + 5*a^55 + a^57 + 7*a^59 + 5*a^61 + 9*a^63 +
|
|
901
|
+
4*a^65 + 10*a^69 + 3*a^71 + 2*a^73 + 9*a^75 + 10*a^77 + 6*a^79 +
|
|
902
|
+
10*a^81 + 7*a^85 + a^87 + 4*a^89 + 8*a^91 + a^93 + 8*a^95 + 2*a^97 +
|
|
903
|
+
7*a^99 + a^101 + 3*a^103 + 6*a^105 + 7*a^107 + 4*a^109 + O(a^111) :
|
|
904
|
+
1 + O(a^100))
|
|
905
|
+
|
|
906
|
+
AUTHORS:
|
|
907
|
+
|
|
908
|
+
- Robert Bradshaw and Jennifer Balakrishnan (2010-02)
|
|
909
|
+
"""
|
|
910
|
+
try:
|
|
911
|
+
_frob = self._frob
|
|
912
|
+
except AttributeError:
|
|
913
|
+
K = self.base_ring()
|
|
914
|
+
p = K.prime()
|
|
915
|
+
x = K['x'].gen(0)
|
|
916
|
+
|
|
917
|
+
f, f2 = self.hyperelliptic_polynomials()
|
|
918
|
+
if f2 != 0:
|
|
919
|
+
raise NotImplementedError("Curve must be in weierstrass normal form.")
|
|
920
|
+
h = (f(x**p) - f**p)
|
|
921
|
+
|
|
922
|
+
def _frob(P):
|
|
923
|
+
if P == self(0,1,0):
|
|
924
|
+
return P
|
|
925
|
+
x0 = P[0]
|
|
926
|
+
y0 = P[1]
|
|
927
|
+
try:
|
|
928
|
+
uN = (1 + h(x0)/y0**(2*p)).sqrt()
|
|
929
|
+
yres = y0**p * uN
|
|
930
|
+
xres = x0**p
|
|
931
|
+
if (yres-y0).valuation() == 0:
|
|
932
|
+
yres = -yres
|
|
933
|
+
return self.point([xres,yres, K(1)])
|
|
934
|
+
except (TypeError, NotImplementedError):
|
|
935
|
+
uN2 = 1 + h(x0)/y0**(2*p)
|
|
936
|
+
#yfrob2 = f(x)
|
|
937
|
+
c = uN2.expansion(0)
|
|
938
|
+
v = uN2.valuation()
|
|
939
|
+
a = uN2.parent().gen()
|
|
940
|
+
uN = self.newton_sqrt(uN2,c.sqrt()*a**(v//2),K.precision_cap())
|
|
941
|
+
yres = y0**p * uN
|
|
942
|
+
xres = x0**p
|
|
943
|
+
if (yres - y0).valuation() == 0:
|
|
944
|
+
yres = -yres
|
|
945
|
+
try:
|
|
946
|
+
return self(xres,yres)
|
|
947
|
+
except ValueError:
|
|
948
|
+
return self._curve_over_ram_extn(xres,yres)
|
|
949
|
+
|
|
950
|
+
self._frob = _frob
|
|
951
|
+
|
|
952
|
+
if P is None:
|
|
953
|
+
return _frob
|
|
954
|
+
else:
|
|
955
|
+
return _frob(P)
|
|
956
|
+
|
|
957
|
+
def newton_sqrt(self, f, x0, prec):
|
|
958
|
+
r"""
|
|
959
|
+
Take the square root of the power series `f` by Newton's method.
|
|
960
|
+
|
|
961
|
+
NOTE:
|
|
962
|
+
|
|
963
|
+
this function should eventually be moved to `p`-adic power series ring
|
|
964
|
+
|
|
965
|
+
INPUT:
|
|
966
|
+
|
|
967
|
+
- ``f`` -- power series with coefficients in `\QQ_p` or an extension
|
|
968
|
+
- ``x0`` -- seeds the Newton iteration
|
|
969
|
+
- ``prec`` -- precision
|
|
970
|
+
|
|
971
|
+
OUTPUT: the square root of `f`
|
|
972
|
+
|
|
973
|
+
EXAMPLES::
|
|
974
|
+
|
|
975
|
+
sage: R.<x> = QQ['x']
|
|
976
|
+
sage: H = HyperellipticCurve(x^5-23*x^3+18*x^2+40*x)
|
|
977
|
+
sage: Q = H(0,0)
|
|
978
|
+
sage: u,v = H.local_coord(Q,prec=100)
|
|
979
|
+
sage: K = Qp(11,5)
|
|
980
|
+
sage: HK = H.change_ring(K)
|
|
981
|
+
sage: L.<a> = K.extension(x^20-11)
|
|
982
|
+
sage: HL = H.change_ring(L)
|
|
983
|
+
sage: S = HL(u(a),v(a))
|
|
984
|
+
sage: f = H.hyperelliptic_polynomials()[0]
|
|
985
|
+
sage: y = HK.newton_sqrt( f(u(a)^11), a^11,5)
|
|
986
|
+
sage: y^2 - f(u(a)^11)
|
|
987
|
+
O(a^122)
|
|
988
|
+
|
|
989
|
+
AUTHOR:
|
|
990
|
+
|
|
991
|
+
- Jennifer Balakrishnan
|
|
992
|
+
"""
|
|
993
|
+
z = x0
|
|
994
|
+
loop_prec = log(RR(prec), 2).ceil()
|
|
995
|
+
for i in range(loop_prec):
|
|
996
|
+
z = (z + f / z) / 2
|
|
997
|
+
return z
|
|
998
|
+
|
|
999
|
+
def curve_over_ram_extn(self, deg):
|
|
1000
|
+
r"""
|
|
1001
|
+
Return ``self`` over `\QQ_p(p^(1/deg))`.
|
|
1002
|
+
|
|
1003
|
+
INPUT:
|
|
1004
|
+
|
|
1005
|
+
- ``deg`` -- the degree of the ramified extension
|
|
1006
|
+
|
|
1007
|
+
OUTPUT: ``self`` over `\QQ_p(p^(1/deg))`
|
|
1008
|
+
|
|
1009
|
+
EXAMPLES::
|
|
1010
|
+
|
|
1011
|
+
sage: R.<x> = QQ['x']
|
|
1012
|
+
sage: H = HyperellipticCurve(x^5-23*x^3+18*x^2+40*x)
|
|
1013
|
+
sage: K = Qp(11,5)
|
|
1014
|
+
sage: HK = H.change_ring(K)
|
|
1015
|
+
sage: HL = HK.curve_over_ram_extn(2)
|
|
1016
|
+
sage: HL
|
|
1017
|
+
Hyperelliptic Curve over 11-adic Eisenstein Extension Field in a defined by x^2 - 11 defined by (1 + O(a^10))*y^2 = (1 + O(a^10))*x^5 + (10 + 8*a^2 + 10*a^4 + 10*a^6 + 10*a^8 + O(a^10))*x^3 + (7 + a^2 + O(a^10))*x^2 + (7 + 3*a^2 + O(a^10))*x
|
|
1018
|
+
|
|
1019
|
+
AUTHOR:
|
|
1020
|
+
|
|
1021
|
+
- Jennifer Balakrishnan
|
|
1022
|
+
"""
|
|
1023
|
+
from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve
|
|
1024
|
+
K = self.base_ring()
|
|
1025
|
+
p = K.prime()
|
|
1026
|
+
A = PolynomialRing(QQ,'x')
|
|
1027
|
+
x = A.gen()
|
|
1028
|
+
J = K.extension(x**deg-p,names='a')
|
|
1029
|
+
pol = self.hyperelliptic_polynomials()[0]
|
|
1030
|
+
H = HyperellipticCurve(A(pol))
|
|
1031
|
+
HJ = H.change_ring(J)
|
|
1032
|
+
self._curve_over_ram_extn = HJ
|
|
1033
|
+
self._curve_over_ram_extn._curve_over_Qp = self
|
|
1034
|
+
return HJ
|
|
1035
|
+
|
|
1036
|
+
def get_boundary_point(self, curve_over_extn, P):
|
|
1037
|
+
"""
|
|
1038
|
+
Given ``self`` over an extension field, find a point in the disc of `P`
|
|
1039
|
+
near the boundary.
|
|
1040
|
+
|
|
1041
|
+
INPUT:
|
|
1042
|
+
|
|
1043
|
+
- ``curve_over_extn`` -- ``self`` over a totally ramified extension
|
|
1044
|
+
- ``P`` -- Weierstrass point
|
|
1045
|
+
|
|
1046
|
+
OUTPUT: a point in the disc of `P` near the boundary
|
|
1047
|
+
|
|
1048
|
+
EXAMPLES::
|
|
1049
|
+
|
|
1050
|
+
sage: R.<x> = QQ['x']
|
|
1051
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1052
|
+
sage: K = Qp(3,6)
|
|
1053
|
+
sage: HK = H.change_ring(K)
|
|
1054
|
+
sage: P = HK(1,0)
|
|
1055
|
+
sage: J.<a> = K.extension(x^30-3)
|
|
1056
|
+
sage: HJ = H.change_ring(J)
|
|
1057
|
+
sage: S = HK.get_boundary_point(HJ,P)
|
|
1058
|
+
sage: S
|
|
1059
|
+
(1 + 2*a^2 + 2*a^6 + 2*a^18 + a^32 + a^34 + a^36 + 2*a^38 + 2*a^40 + a^42 + 2*a^44 + a^48 + 2*a^50 + 2*a^52 + a^54 + a^56 + 2*a^60 + 2*a^62 + a^70 + 2*a^72 + a^76 + 2*a^78 + a^82 + a^88 + a^96 + 2*a^98 + 2*a^102 + a^104 + 2*a^106 + a^108 + 2*a^110 + a^112 + 2*a^116 + a^126 + 2*a^130 + 2*a^132 + a^144 + 2*a^148 + 2*a^150 + a^152 + 2*a^154 + a^162 + a^164 + a^166 + a^168 + a^170 + a^176 + a^178 + O(a^180) : a + O(a^180) : 1 + O(a^180))
|
|
1060
|
+
|
|
1061
|
+
AUTHOR:
|
|
1062
|
+
|
|
1063
|
+
- Jennifer Balakrishnan
|
|
1064
|
+
"""
|
|
1065
|
+
J = curve_over_extn.base_ring()
|
|
1066
|
+
a = J.gen()
|
|
1067
|
+
prec2 = J.precision_cap()
|
|
1068
|
+
x,y = self.local_coord(P,prec2)
|
|
1069
|
+
return curve_over_extn(x(a),y(a))
|
|
1070
|
+
|
|
1071
|
+
def P_to_S(self, P, S):
|
|
1072
|
+
r"""
|
|
1073
|
+
Given a finite Weierstrass point `P` and a point `S` in the same disc,
|
|
1074
|
+
compute the Coleman integrals `\{\int_P^S x^i dx/2y \}_{i=0}^{2g-1}`.
|
|
1075
|
+
|
|
1076
|
+
INPUT:
|
|
1077
|
+
|
|
1078
|
+
- ``P`` -- finite Weierstrass point
|
|
1079
|
+
- ``S`` -- point in disc of `P`
|
|
1080
|
+
|
|
1081
|
+
OUTPUT: Coleman integrals `\{\int_P^S x^i dx/2y \}_{i=0}^{2g-1}`
|
|
1082
|
+
|
|
1083
|
+
EXAMPLES::
|
|
1084
|
+
|
|
1085
|
+
sage: R.<x> = QQ['x']
|
|
1086
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1087
|
+
sage: K = Qp(5,4)
|
|
1088
|
+
sage: HK = H.change_ring(K)
|
|
1089
|
+
sage: P = HK(1,0)
|
|
1090
|
+
sage: HJ = HK.curve_over_ram_extn(10)
|
|
1091
|
+
sage: S = HK.get_boundary_point(HJ,P)
|
|
1092
|
+
sage: HK.P_to_S(P, S)
|
|
1093
|
+
(2*a + 4*a^3 + 2*a^11 + 4*a^13 + 2*a^17 + 2*a^19 + a^21 + 4*a^23 + a^25 + 2*a^27 + 2*a^29 + 3*a^31 + 4*a^33 + O(a^35), a^-5 + 2*a + 2*a^3 + a^7 + 3*a^11 + a^13 + 3*a^15 + 3*a^17 + 2*a^19 + 4*a^21 + 4*a^23 + 4*a^25 + 2*a^27 + a^29 + a^31 + O(a^33))
|
|
1094
|
+
|
|
1095
|
+
AUTHOR:
|
|
1096
|
+
|
|
1097
|
+
- Jennifer Balakrishnan
|
|
1098
|
+
"""
|
|
1099
|
+
prec = self.base_ring().precision_cap()
|
|
1100
|
+
deg = (S[0]).parent().defining_polynomial().degree()
|
|
1101
|
+
prec2 = prec*deg
|
|
1102
|
+
x,y = self.local_coord(P,prec2)
|
|
1103
|
+
g = self.genus()
|
|
1104
|
+
integrals = [((x**k*x.derivative()/(2*y)).integral()) for k in range(2*g)]
|
|
1105
|
+
val = [I(S[1]) for I in integrals]
|
|
1106
|
+
return vector(val)
|
|
1107
|
+
|
|
1108
|
+
def coleman_integral_P_to_S(self, w, P, S):
|
|
1109
|
+
r"""
|
|
1110
|
+
Given a finite Weierstrass point `P` and a point `S`
|
|
1111
|
+
in the same disc, compute the Coleman integral `\int_P^S w`.
|
|
1112
|
+
|
|
1113
|
+
INPUT:
|
|
1114
|
+
|
|
1115
|
+
- ``w`` -- differential
|
|
1116
|
+
- ``P`` -- Weierstrass point
|
|
1117
|
+
- ``S`` -- point in the same disc of `P` (S is defined over an extension
|
|
1118
|
+
of `\QQ_p`; coordinates of S are given in terms of uniformizer `a`)
|
|
1119
|
+
|
|
1120
|
+
OUTPUT: Coleman integral `\int_P^S w` in terms of `a`
|
|
1121
|
+
|
|
1122
|
+
EXAMPLES::
|
|
1123
|
+
|
|
1124
|
+
sage: R.<x> = QQ['x']
|
|
1125
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1126
|
+
sage: K = Qp(5,4)
|
|
1127
|
+
sage: HK = H.change_ring(K)
|
|
1128
|
+
sage: P = HK(1,0)
|
|
1129
|
+
sage: J.<a> = K.extension(x^10-5)
|
|
1130
|
+
sage: HJ = H.change_ring(J)
|
|
1131
|
+
sage: S = HK.get_boundary_point(HJ,P)
|
|
1132
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
1133
|
+
sage: S[0]-P[0] == HK.coleman_integral_P_to_S(x.diff(),P,S)
|
|
1134
|
+
True
|
|
1135
|
+
sage: HK.coleman_integral_P_to_S(HK.invariant_differential(),P,S) == HK.P_to_S(P,S)[0]
|
|
1136
|
+
True
|
|
1137
|
+
|
|
1138
|
+
AUTHOR:
|
|
1139
|
+
|
|
1140
|
+
- Jennifer Balakrishnan
|
|
1141
|
+
"""
|
|
1142
|
+
prec = self.base_ring().precision_cap()
|
|
1143
|
+
deg = S[0].parent().defining_polynomial().degree()
|
|
1144
|
+
prec2 = prec * deg
|
|
1145
|
+
x,y = self.local_coord(P,prec2)
|
|
1146
|
+
int_sing = (w.coeff()(x,y)*x.derivative()/(2*y)).integral()
|
|
1147
|
+
int_sing_a = int_sing(S[1])
|
|
1148
|
+
return int_sing_a
|
|
1149
|
+
|
|
1150
|
+
def S_to_Q(self, S, Q):
|
|
1151
|
+
r"""
|
|
1152
|
+
Given `S` a point on ``self`` over an extension field, compute the
|
|
1153
|
+
Coleman integrals `\{\int_S^Q x^i dx/2y \}_{i=0}^{2g-1}`.
|
|
1154
|
+
|
|
1155
|
+
**one should be able to feed `S,Q` into coleman_integral,
|
|
1156
|
+
but currently that segfaults**
|
|
1157
|
+
|
|
1158
|
+
INPUT:
|
|
1159
|
+
|
|
1160
|
+
- ``S`` -- a point with coordinates in an extension of `\QQ_p` (with unif. a)
|
|
1161
|
+
- ``Q`` -- a non-Weierstrass point defined over `\QQ_p`
|
|
1162
|
+
|
|
1163
|
+
OUTPUT:
|
|
1164
|
+
|
|
1165
|
+
The Coleman integrals `\{\int_S^Q x^i dx/2y \}_{i=0}^{2g-1}` in terms of `a`.
|
|
1166
|
+
|
|
1167
|
+
EXAMPLES::
|
|
1168
|
+
|
|
1169
|
+
sage: R.<x> = QQ['x']
|
|
1170
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1171
|
+
sage: K = Qp(5,6)
|
|
1172
|
+
sage: HK = H.change_ring(K)
|
|
1173
|
+
sage: J.<a> = K.extension(x^20-5)
|
|
1174
|
+
sage: HJ = H.change_ring(J)
|
|
1175
|
+
sage: w = HK.invariant_differential()
|
|
1176
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
1177
|
+
sage: P = HK(1,0)
|
|
1178
|
+
sage: Q = HK(0,3)
|
|
1179
|
+
sage: S = HK.get_boundary_point(HJ,P)
|
|
1180
|
+
sage: P_to_S = HK.P_to_S(P,S)
|
|
1181
|
+
sage: S_to_Q = HJ.S_to_Q(S,Q)
|
|
1182
|
+
sage: P_to_S + S_to_Q
|
|
1183
|
+
(2*a^40 + a^80 + a^100 + O(a^105), a^20 + 2*a^40 + 4*a^60 + 2*a^80 + O(a^103))
|
|
1184
|
+
sage: HK.coleman_integrals_on_basis(P,Q)
|
|
1185
|
+
(2*5^2 + 5^4 + 5^5 + 3*5^6 + O(5^7), 5 + 2*5^2 + 4*5^3 + 2*5^4 + 5^6 + O(5^7))
|
|
1186
|
+
|
|
1187
|
+
AUTHOR:
|
|
1188
|
+
|
|
1189
|
+
- Jennifer Balakrishnan
|
|
1190
|
+
"""
|
|
1191
|
+
FS = self.frobenius(S)
|
|
1192
|
+
FS = (FS[0],FS[1])
|
|
1193
|
+
FQ = self.frobenius(Q)
|
|
1194
|
+
import sage.schemes.hyperelliptic_curves.monsky_washnitzer as monsky_washnitzer
|
|
1195
|
+
try:
|
|
1196
|
+
M_frob, forms = self._frob_calc
|
|
1197
|
+
except AttributeError:
|
|
1198
|
+
M_frob, forms = self._frob_calc = monsky_washnitzer.matrix_of_frobenius_hyperelliptic(self)
|
|
1199
|
+
try:
|
|
1200
|
+
HJ = self._curve_over_ram_extn
|
|
1201
|
+
K = HJ.base_ring()
|
|
1202
|
+
except AttributeError:
|
|
1203
|
+
HJ = S.scheme()
|
|
1204
|
+
K = self.base_ring()
|
|
1205
|
+
g = self.genus()
|
|
1206
|
+
prec2 = K.precision_cap()
|
|
1207
|
+
p = K.prime()
|
|
1208
|
+
dim = 2*g
|
|
1209
|
+
V = VectorSpace(K,dim)
|
|
1210
|
+
if S == FS:
|
|
1211
|
+
S_to_FS = V(dim*[0])
|
|
1212
|
+
else:
|
|
1213
|
+
P = self(ZZ(FS[0].expansion(0)),ZZ(FS[1].expansion(0)))
|
|
1214
|
+
x,y = self.local_coord(P,prec2)
|
|
1215
|
+
integrals = [(x**i*x.derivative()/(2*y)).integral() for i in range(dim)]
|
|
1216
|
+
S_to_FS = vector([I.polynomial()(FS[1]) - I.polynomial()(S[1]) for I in integrals])
|
|
1217
|
+
if HJ(Q[0],Q[1]) == HJ(FQ):
|
|
1218
|
+
FQ_to_Q = V(dim*[0])
|
|
1219
|
+
else:
|
|
1220
|
+
FQ_to_Q = V(self.tiny_integrals_on_basis(FQ, Q))
|
|
1221
|
+
try:
|
|
1222
|
+
L = [f(K(S[0]), K(S[1])) - f(K(Q[0]), K(Q[1])) for f in forms]
|
|
1223
|
+
except ValueError:
|
|
1224
|
+
forms = [f.change_ring(K) for f in forms]
|
|
1225
|
+
L = [f(S[0], S[1]) - f(Q[0], Q[1]) for f in forms]
|
|
1226
|
+
b = V(L)
|
|
1227
|
+
M_sys = matrix(K, M_frob).transpose() - 1
|
|
1228
|
+
B = (~M_sys)
|
|
1229
|
+
vv = min(c.valuation() for c in B.list())
|
|
1230
|
+
B = (p**(-vv)*B).change_ring(K)
|
|
1231
|
+
B = p**(vv)*B
|
|
1232
|
+
return B*(b-S_to_FS-FQ_to_Q)
|
|
1233
|
+
|
|
1234
|
+
def coleman_integral_S_to_Q(self, w, S, Q):
|
|
1235
|
+
r"""
|
|
1236
|
+
Compute the Coleman integral `\int_S^Q w`.
|
|
1237
|
+
|
|
1238
|
+
**one should be able to feed `S,Q` into coleman_integral,
|
|
1239
|
+
but currently that segfaults**
|
|
1240
|
+
|
|
1241
|
+
INPUT:
|
|
1242
|
+
|
|
1243
|
+
- ``w`` -- a differential
|
|
1244
|
+
- ``S`` -- a point with coordinates in an extension of `\QQ_p`
|
|
1245
|
+
- ``Q`` -- a non-Weierstrass point defined over `\QQ_p`
|
|
1246
|
+
|
|
1247
|
+
OUTPUT: the Coleman integral `\int_S^Q w`
|
|
1248
|
+
|
|
1249
|
+
EXAMPLES::
|
|
1250
|
+
|
|
1251
|
+
sage: R.<x> = QQ['x']
|
|
1252
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1253
|
+
sage: K = Qp(5,6)
|
|
1254
|
+
sage: HK = H.change_ring(K)
|
|
1255
|
+
sage: J.<a> = K.extension(x^20-5)
|
|
1256
|
+
sage: HJ = H.change_ring(J)
|
|
1257
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
1258
|
+
sage: P = HK(1,0)
|
|
1259
|
+
sage: Q = HK(0,3)
|
|
1260
|
+
sage: S = HK.get_boundary_point(HJ,P)
|
|
1261
|
+
sage: P_to_S = HK.coleman_integral_P_to_S(y.diff(),P,S)
|
|
1262
|
+
sage: S_to_Q = HJ.coleman_integral_S_to_Q(y.diff(),S,Q)
|
|
1263
|
+
sage: P_to_S + S_to_Q
|
|
1264
|
+
3 + O(a^119)
|
|
1265
|
+
sage: HK.coleman_integral(y.diff(),P,Q)
|
|
1266
|
+
3 + O(5^6)
|
|
1267
|
+
|
|
1268
|
+
AUTHOR:
|
|
1269
|
+
|
|
1270
|
+
- Jennifer Balakrishnan
|
|
1271
|
+
"""
|
|
1272
|
+
import sage.schemes.hyperelliptic_curves.monsky_washnitzer as monsky_washnitzer
|
|
1273
|
+
K = self.base_ring()
|
|
1274
|
+
R = monsky_washnitzer.SpecialHyperellipticQuotientRing(self, K)
|
|
1275
|
+
MW = monsky_washnitzer.MonskyWashnitzerDifferentialRing(R)
|
|
1276
|
+
w = MW(w)
|
|
1277
|
+
f, vec = w.reduce_fast()
|
|
1278
|
+
g = self.genus()
|
|
1279
|
+
const = f(Q[0],Q[1])-f(S[0],S[1])
|
|
1280
|
+
if vec == vector(2*g*[0]):
|
|
1281
|
+
return const
|
|
1282
|
+
else:
|
|
1283
|
+
basis_values = self.S_to_Q(S, Q)
|
|
1284
|
+
dim = len(basis_values)
|
|
1285
|
+
dot = sum([vec[i] * basis_values[i] for i in range(dim)])
|
|
1286
|
+
return const + dot
|
|
1287
|
+
|
|
1288
|
+
def coleman_integral_from_weierstrass_via_boundary(self, w, P, Q, d):
|
|
1289
|
+
r"""
|
|
1290
|
+
Compute the Coleman integral `\int_P^Q w` via a boundary point
|
|
1291
|
+
in the disc of `P`, defined over a degree `d` extension
|
|
1292
|
+
|
|
1293
|
+
INPUT:
|
|
1294
|
+
|
|
1295
|
+
- ``w`` -- a differential
|
|
1296
|
+
- ``P`` -- a Weierstrass point
|
|
1297
|
+
- ``Q`` -- a non-Weierstrass point
|
|
1298
|
+
- ``d`` -- degree of extension where coordinates of boundary point lie
|
|
1299
|
+
|
|
1300
|
+
OUTPUT:
|
|
1301
|
+
|
|
1302
|
+
the Coleman integral `\int_P^Q w`, written in terms of the uniformizer
|
|
1303
|
+
`a` of the degree `d` extension
|
|
1304
|
+
|
|
1305
|
+
EXAMPLES::
|
|
1306
|
+
|
|
1307
|
+
sage: R.<x> = QQ['x']
|
|
1308
|
+
sage: H = HyperellipticCurve(x^3-10*x+9)
|
|
1309
|
+
sage: K = Qp(5,6)
|
|
1310
|
+
sage: HK = H.change_ring(K)
|
|
1311
|
+
sage: P = HK(1,0)
|
|
1312
|
+
sage: Q = HK(0,3)
|
|
1313
|
+
sage: x,y = HK.monsky_washnitzer_gens()
|
|
1314
|
+
sage: HK.coleman_integral_from_weierstrass_via_boundary(y.diff(),P,Q,20)
|
|
1315
|
+
3 + O(a^119)
|
|
1316
|
+
sage: HK.coleman_integral(y.diff(),P,Q)
|
|
1317
|
+
3 + O(5^6)
|
|
1318
|
+
sage: w = HK.invariant_differential()
|
|
1319
|
+
sage: HK.coleman_integral_from_weierstrass_via_boundary(w,P,Q,20)
|
|
1320
|
+
2*a^40 + a^80 + a^100 + O(a^105)
|
|
1321
|
+
sage: HK.coleman_integral(w,P,Q)
|
|
1322
|
+
2*5^2 + 5^4 + 5^5 + 3*5^6 + O(5^7)
|
|
1323
|
+
|
|
1324
|
+
AUTHOR:
|
|
1325
|
+
|
|
1326
|
+
- Jennifer Balakrishnan
|
|
1327
|
+
"""
|
|
1328
|
+
HJ = self.curve_over_ram_extn(d)
|
|
1329
|
+
S = self.get_boundary_point(HJ, P)
|
|
1330
|
+
P_to_S = self.coleman_integral_P_to_S(w, P, S)
|
|
1331
|
+
S_to_Q = HJ.coleman_integral_S_to_Q(w, S, Q)
|
|
1332
|
+
return P_to_S + S_to_Q
|