passagemath-schemes 10.6.38__cp314-cp314t-macosx_13_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-schemes might be problematic. Click here for more details.
- passagemath_schemes/.dylibs/libflint.21.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.38.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.38.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.38.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.38.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.38.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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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-314t-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,419 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
"""
|
|
3
|
+
Jacobian of a general hyperelliptic curve
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu>
|
|
8
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
9
|
+
# https://www.gnu.org/licenses/
|
|
10
|
+
# ****************************************************************************
|
|
11
|
+
|
|
12
|
+
from sage.rings.integer import Integer
|
|
13
|
+
from sage.rings.rational_field import QQ
|
|
14
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
15
|
+
from sage.schemes.jacobians.abstract_jacobian import Jacobian_generic
|
|
16
|
+
from . import jacobian_homset
|
|
17
|
+
from . import jacobian_morphism
|
|
18
|
+
from sage.misc.lazy_import import lazy_import
|
|
19
|
+
from .jacobian_endomorphism_utils import get_is_geom_field, is_geom_trivial_when_field
|
|
20
|
+
lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction'])
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class HyperellipticJacobian_generic(Jacobian_generic):
|
|
24
|
+
"""
|
|
25
|
+
EXAMPLES::
|
|
26
|
+
|
|
27
|
+
sage: # needs sage.rings.finite_rings
|
|
28
|
+
sage: FF = FiniteField(2003)
|
|
29
|
+
sage: R.<x> = PolynomialRing(FF)
|
|
30
|
+
sage: f = x**5 + 1184*x**3 + 1846*x**2 + 956*x + 560
|
|
31
|
+
sage: C = HyperellipticCurve(f)
|
|
32
|
+
sage: J = C.jacobian()
|
|
33
|
+
sage: a = x**2 + 376*x + 245; b = 1015*x + 1368
|
|
34
|
+
sage: X = J(FF)
|
|
35
|
+
sage: D = X([a,b])
|
|
36
|
+
sage: D
|
|
37
|
+
(x^2 + 376*x + 245, y + 988*x + 635)
|
|
38
|
+
sage: J(0)
|
|
39
|
+
(1)
|
|
40
|
+
sage: D == J([a,b])
|
|
41
|
+
True
|
|
42
|
+
sage: D == D + J(0)
|
|
43
|
+
True
|
|
44
|
+
|
|
45
|
+
A more extended example, demonstrating arithmetic in J(QQ) and
|
|
46
|
+
J(K) for a number field K/QQ.
|
|
47
|
+
|
|
48
|
+
::
|
|
49
|
+
|
|
50
|
+
sage: P.<x> = PolynomialRing(QQ)
|
|
51
|
+
sage: f = x^5 - x + 1; h = x
|
|
52
|
+
sage: C = HyperellipticCurve(f,h,'u,v'); C
|
|
53
|
+
Hyperelliptic Curve over Rational Field defined by v^2 + u*v = u^5 - u + 1
|
|
54
|
+
sage: PP = C.ambient_space(); PP
|
|
55
|
+
Projective Space of dimension 2 over Rational Field
|
|
56
|
+
sage: C.defining_polynomial()
|
|
57
|
+
-x0^5 + x0*x1*x2^3 + x1^2*x2^3 + x0*x2^4 - x2^5
|
|
58
|
+
sage: C(QQ)
|
|
59
|
+
Set of rational points of Hyperelliptic Curve over Rational Field
|
|
60
|
+
defined by v^2 + u*v = u^5 - u + 1
|
|
61
|
+
sage: K.<t> = NumberField(x^2 - 2) # needs sage.rings.number_field
|
|
62
|
+
sage: C(K) # needs sage.rings.number_field
|
|
63
|
+
Set of rational points of Hyperelliptic Curve
|
|
64
|
+
over Number Field in t with defining polynomial x^2 - 2
|
|
65
|
+
defined by v^2 + u*v = u^5 - u + 1
|
|
66
|
+
sage: P = C(QQ)(0,1,1); P
|
|
67
|
+
(0 : 1 : 1)
|
|
68
|
+
sage: P == C(0,1,1)
|
|
69
|
+
True
|
|
70
|
+
sage: C(0,1,1).parent()
|
|
71
|
+
Set of rational points of Hyperelliptic Curve over Rational Field
|
|
72
|
+
defined by v^2 + u*v = u^5 - u + 1
|
|
73
|
+
|
|
74
|
+
sage: # needs sage.rings.number_field
|
|
75
|
+
sage: P1 = C(K)(P)
|
|
76
|
+
sage: P2 = C(K)([2, 4*t - 1, 1])
|
|
77
|
+
sage: P3 = C(K)([-1/2, 1/8*(7*t+2), 1])
|
|
78
|
+
sage: P1, P2, P3
|
|
79
|
+
((0 : 1 : 1), (2 : 4*t - 1 : 1), (-1/2 : 7/8*t + 1/4 : 1))
|
|
80
|
+
|
|
81
|
+
sage: J = C.jacobian(); J
|
|
82
|
+
Jacobian of Hyperelliptic Curve over Rational Field
|
|
83
|
+
defined by v^2 + u*v = u^5 - u + 1
|
|
84
|
+
sage: Q = J(QQ)(P); Q
|
|
85
|
+
(u, v - 1)
|
|
86
|
+
sage: for i in range(6): Q*i
|
|
87
|
+
(1)
|
|
88
|
+
(u, v - 1)
|
|
89
|
+
(u^2, v + u - 1)
|
|
90
|
+
(u^2, v + 1)
|
|
91
|
+
(u, v + 1)
|
|
92
|
+
(1)
|
|
93
|
+
|
|
94
|
+
sage: # needs sage.rings.number_field
|
|
95
|
+
sage: Q1 = J(K)(P1); print("%s -> %s"%( P1, Q1 ))
|
|
96
|
+
(0 : 1 : 1) -> (u, v - 1)
|
|
97
|
+
sage: Q2 = J(K)(P2); print("%s -> %s"%( P2, Q2 ))
|
|
98
|
+
(2 : 4*t - 1 : 1) -> (u - 2, v - 4*t + 1)
|
|
99
|
+
sage: Q3 = J(K)(P3); print("%s -> %s"%( P3, Q3 ))
|
|
100
|
+
(-1/2 : 7/8*t + 1/4 : 1) -> (u + 1/2, v - 7/8*t - 1/4)
|
|
101
|
+
sage: R.<x> = PolynomialRing(K)
|
|
102
|
+
sage: Q4 = J(K)([x^2 - t, R(1)])
|
|
103
|
+
sage: for i in range(4): Q4*i
|
|
104
|
+
(1)
|
|
105
|
+
(u^2 - t, v - 1)
|
|
106
|
+
(u^2 + (-3/4*t - 9/16)*u + 1/2*t + 1/4, v + (-1/32*t - 57/64)*u + 1/2*t + 9/16)
|
|
107
|
+
(u^2 + (1352416/247009*t - 1636930/247009)*u - 1156544/247009*t + 1900544/247009,
|
|
108
|
+
v + (-2326345442/122763473*t + 3233153137/122763473)*u
|
|
109
|
+
+ 2439343104/122763473*t - 3350862929/122763473)
|
|
110
|
+
sage: R2 = Q2*5; R2
|
|
111
|
+
(u^2 - 3789465233/116983808*u - 267915823/58491904,
|
|
112
|
+
v + (-233827256513849/1789384327168*t + 1/2)*u - 15782925357447/894692163584*t)
|
|
113
|
+
sage: R3 = Q3*5; R3
|
|
114
|
+
(u^2 + 5663300808399913890623/14426454798950909645952*u
|
|
115
|
+
- 26531814176395676231273/28852909597901819291904,
|
|
116
|
+
v + (253155440321645614070860868199103/2450498420175733688903836378159104*t + 1/2)*u
|
|
117
|
+
+ 2427708505064902611513563431764311/4900996840351467377807672756318208*t)
|
|
118
|
+
sage: R4 = Q4*5; R4
|
|
119
|
+
(u^2 - 3789465233/116983808*u - 267915823/58491904,
|
|
120
|
+
v + (233827256513849/1789384327168*t + 1/2)*u + 15782925357447/894692163584*t)
|
|
121
|
+
|
|
122
|
+
Thus we find the following identity::
|
|
123
|
+
|
|
124
|
+
sage: 5*Q2 + 5*Q4 # needs sage.rings.number_field
|
|
125
|
+
(1)
|
|
126
|
+
|
|
127
|
+
Moreover the following relation holds in the 5-torsion subgroup::
|
|
128
|
+
|
|
129
|
+
sage: Q2 + Q4 == 2*Q1 # needs sage.rings.number_field
|
|
130
|
+
True
|
|
131
|
+
|
|
132
|
+
TESTS::
|
|
133
|
+
|
|
134
|
+
sage: # needs sage.rings.finite_rings
|
|
135
|
+
sage: k.<a> = GF(9); R.<x> = k[]
|
|
136
|
+
sage: J1 = HyperellipticCurve(x^3 + x - 1, x + a).jacobian()
|
|
137
|
+
sage: FF = FiniteField(2003)
|
|
138
|
+
sage: R.<x> = PolynomialRing(FF)
|
|
139
|
+
sage: f = x**5 + 1184*x**3 + 1846*x**2 + 956*x + 560
|
|
140
|
+
sage: J2 = HyperellipticCurve(f).jacobian()
|
|
141
|
+
sage: J1 == J1
|
|
142
|
+
True
|
|
143
|
+
sage: J1 == J2
|
|
144
|
+
False
|
|
145
|
+
"""
|
|
146
|
+
def dimension(self):
|
|
147
|
+
"""
|
|
148
|
+
Return the dimension of this Jacobian.
|
|
149
|
+
|
|
150
|
+
OUTPUT: integer
|
|
151
|
+
|
|
152
|
+
EXAMPLES::
|
|
153
|
+
|
|
154
|
+
sage: # needs sage.rings.finite_rings
|
|
155
|
+
sage: k.<a> = GF(9); R.<x> = k[]
|
|
156
|
+
sage: HyperellipticCurve(x^3 + x - 1, x + a).jacobian().dimension()
|
|
157
|
+
1
|
|
158
|
+
sage: g = HyperellipticCurve(x^6 + x - 1, x + a).jacobian().dimension(); g
|
|
159
|
+
2
|
|
160
|
+
sage: type(g)
|
|
161
|
+
<... 'sage.rings.integer.Integer'>
|
|
162
|
+
"""
|
|
163
|
+
return Integer(self.curve().genus())
|
|
164
|
+
|
|
165
|
+
def point(self, mumford, check=True):
|
|
166
|
+
try:
|
|
167
|
+
return self(self.base_ring())(mumford)
|
|
168
|
+
except AttributeError:
|
|
169
|
+
raise ValueError("Arguments must determine a valid Mumford divisor.")
|
|
170
|
+
|
|
171
|
+
def _point_homset(self, *args, **kwds):
|
|
172
|
+
return jacobian_homset.JacobianHomset_divisor_classes(*args, **kwds)
|
|
173
|
+
|
|
174
|
+
def _point(self, *args, **kwds):
|
|
175
|
+
return jacobian_morphism.JacobianMorphism_divisor_class_field(*args, **kwds)
|
|
176
|
+
|
|
177
|
+
####################################################################
|
|
178
|
+
# Some properties of geometric Endomorphism ring and algebra
|
|
179
|
+
####################################################################
|
|
180
|
+
|
|
181
|
+
@lazy_attribute
|
|
182
|
+
def _have_established_geometrically_trivial(self):
|
|
183
|
+
r"""
|
|
184
|
+
Initialize the flag which determines whether or not we have
|
|
185
|
+
already established if the geometric endomorphism ring is
|
|
186
|
+
trivial.
|
|
187
|
+
|
|
188
|
+
This is related to the warning at the top of the
|
|
189
|
+
``jacobian_endomorphism_utils.py`` module.
|
|
190
|
+
|
|
191
|
+
INPUT:
|
|
192
|
+
|
|
193
|
+
- ``self`` -- the Jacobian
|
|
194
|
+
|
|
195
|
+
OUTPUT: the boolean ``False``; this will be updated by other methods
|
|
196
|
+
|
|
197
|
+
EXAMPLES:
|
|
198
|
+
|
|
199
|
+
This is LMFDB curve 262144.d.524288.2::
|
|
200
|
+
|
|
201
|
+
sage: R.<x> = QQ[]
|
|
202
|
+
sage: f = x^5 + x^4 + 4*x^3 + 8*x^2 + 5*x + 1
|
|
203
|
+
sage: C = HyperellipticCurve(f)
|
|
204
|
+
sage: J = C.jacobian()
|
|
205
|
+
sage: J._have_established_geometrically_trivial
|
|
206
|
+
False
|
|
207
|
+
"""
|
|
208
|
+
return False
|
|
209
|
+
|
|
210
|
+
@lazy_attribute
|
|
211
|
+
def _have_established_geometrically_field(self):
|
|
212
|
+
r"""
|
|
213
|
+
Initialize the flag which determines whether or not we have
|
|
214
|
+
already established if the geometric endomorphism ring is
|
|
215
|
+
trivial.
|
|
216
|
+
|
|
217
|
+
This is related to the warning at the top of the
|
|
218
|
+
``jacobian_endomorphism_utils.py`` module.
|
|
219
|
+
|
|
220
|
+
INPUT:
|
|
221
|
+
|
|
222
|
+
- ``self`` -- the Jacobian
|
|
223
|
+
|
|
224
|
+
OUTPUT: the boolean ``False``; this will be updated by other methods
|
|
225
|
+
|
|
226
|
+
EXAMPLES:
|
|
227
|
+
|
|
228
|
+
This is LMFDB curve 262144.d.524288.2::
|
|
229
|
+
|
|
230
|
+
sage: R.<x> = QQ[]
|
|
231
|
+
sage: f = x^5 + x^4 + 4*x^3 + 8*x^2 + 5*x + 1
|
|
232
|
+
sage: C = HyperellipticCurve(f)
|
|
233
|
+
sage: J = C.jacobian()
|
|
234
|
+
sage: J._have_established_geometrically_field
|
|
235
|
+
False
|
|
236
|
+
"""
|
|
237
|
+
return False
|
|
238
|
+
|
|
239
|
+
def geometric_endomorphism_algebra_is_field(self, B=200, proof=False):
|
|
240
|
+
r"""
|
|
241
|
+
Return whether the geometric endomorphism algebra is a field.
|
|
242
|
+
|
|
243
|
+
This implies that the Jacobian of the curve is geometrically
|
|
244
|
+
simple. It is based on Algorithm 4.10 from [Lom2019]_
|
|
245
|
+
|
|
246
|
+
INPUT:
|
|
247
|
+
|
|
248
|
+
- ``B`` -- (default: 200) the bound which appears in the statement of
|
|
249
|
+
the algorithm from [Lom2019]_
|
|
250
|
+
|
|
251
|
+
- ``proof`` -- boolean (default: ``False``); whether or not to insist
|
|
252
|
+
on a provably correct answer. This is related to the warning in the
|
|
253
|
+
docstring of this module: if this function returns ``False``, then
|
|
254
|
+
strictly speaking this has not been proven to be ``False`` until one
|
|
255
|
+
has exhibited a non-trivial endomorphism, which these methods are not
|
|
256
|
+
designed to carry out. If one is convinced that this method should
|
|
257
|
+
return ``True``, but it is returning ``False``, then this can be
|
|
258
|
+
exhibited by increasing `B`.
|
|
259
|
+
|
|
260
|
+
OUTPUT:
|
|
261
|
+
|
|
262
|
+
Boolean indicating whether or not the geometric endomorphism
|
|
263
|
+
algebra is a field.
|
|
264
|
+
|
|
265
|
+
EXAMPLES:
|
|
266
|
+
|
|
267
|
+
This is LMFDB curve 262144.d.524288.2 which has QM. Although its
|
|
268
|
+
Jacobian is geometrically simple, the geometric endomorphism algebra
|
|
269
|
+
is not a field::
|
|
270
|
+
|
|
271
|
+
sage: R.<x> = QQ[]
|
|
272
|
+
sage: f = x^5 + x^4 + 4*x^3 + 8*x^2 + 5*x + 1
|
|
273
|
+
sage: C = HyperellipticCurve(f)
|
|
274
|
+
sage: J = C.jacobian()
|
|
275
|
+
sage: J.geometric_endomorphism_algebra_is_field()
|
|
276
|
+
False
|
|
277
|
+
|
|
278
|
+
This is LMFDB curve 50000.a.200000.1::
|
|
279
|
+
|
|
280
|
+
sage: f = 8*x^5 + 1
|
|
281
|
+
sage: C = HyperellipticCurve(f)
|
|
282
|
+
sage: J = C.jacobian()
|
|
283
|
+
sage: J.geometric_endomorphism_algebra_is_field()
|
|
284
|
+
True
|
|
285
|
+
"""
|
|
286
|
+
if self._have_established_geometrically_field:
|
|
287
|
+
return True
|
|
288
|
+
C = self.curve()
|
|
289
|
+
if C.genus() != 2:
|
|
290
|
+
raise NotImplementedError("Current implementation requires the curve to be of genus 2")
|
|
291
|
+
if C.base_ring() != QQ:
|
|
292
|
+
raise NotImplementedError("Current implementation requires the curve to be defined over the rationals")
|
|
293
|
+
f, h = C.hyperelliptic_polynomials()
|
|
294
|
+
if h != 0:
|
|
295
|
+
raise NotImplementedError("Current implementation requires the curve to be in the form y^2 = f(x)")
|
|
296
|
+
red_data = genus2reduction(0,f)
|
|
297
|
+
cond_C = red_data.conductor # WARNING: this is only the prime_to_2 conductor.
|
|
298
|
+
bad_primes = cond_C.prime_divisors()
|
|
299
|
+
self._bad_primes = bad_primes
|
|
300
|
+
|
|
301
|
+
is_abs_simp, is_def_geom_trivial = get_is_geom_field(f, C, bad_primes, B)
|
|
302
|
+
|
|
303
|
+
if is_def_geom_trivial:
|
|
304
|
+
self._have_established_geometrically_trivial = True
|
|
305
|
+
if is_abs_simp:
|
|
306
|
+
self._have_established_geometrically_field = True
|
|
307
|
+
return True
|
|
308
|
+
if proof:
|
|
309
|
+
raise NotImplementedError("Rigorous computation of lower bounds of endomorphism algebras has not yet been implemented.")
|
|
310
|
+
return False
|
|
311
|
+
|
|
312
|
+
def geometric_endomorphism_ring_is_ZZ(self, B=200, proof=False):
|
|
313
|
+
r"""
|
|
314
|
+
Return whether the geometric endomorphism ring of ``self`` is the
|
|
315
|
+
integer ring `\ZZ`.
|
|
316
|
+
|
|
317
|
+
INPUT:
|
|
318
|
+
|
|
319
|
+
- ``B`` -- (default: 200) the bound which appears in the statement of
|
|
320
|
+
the algorithm from [Lom2019]_
|
|
321
|
+
|
|
322
|
+
- ``proof`` -- boolean (default: ``False``); whether or not to insist
|
|
323
|
+
on a provably correct answer. This is related to the warning in the
|
|
324
|
+
module docstring of `jacobian_endomorphisms.py`: if this function
|
|
325
|
+
returns ``False``, then strictly speaking this has not been proven to
|
|
326
|
+
be ``False`` until one has exhibited a non-trivial endomorphism,
|
|
327
|
+
which the methods in that module are not designed to carry out. If
|
|
328
|
+
one is convinced that this method should return ``True``, but it is
|
|
329
|
+
returning ``False``, then this can be exhibited by increasing `B`.
|
|
330
|
+
|
|
331
|
+
OUTPUT:
|
|
332
|
+
|
|
333
|
+
Boolean indicating whether or not the geometric endomorphism
|
|
334
|
+
ring is isomorphic to the integer ring.
|
|
335
|
+
|
|
336
|
+
EXAMPLES:
|
|
337
|
+
|
|
338
|
+
This is LMFDB curve 603.a.603.2::
|
|
339
|
+
|
|
340
|
+
sage: R.<x> = QQ[]
|
|
341
|
+
sage: f = 4*x^5 + x^4 - 4*x^3 + 2*x^2 + 4*x + 1
|
|
342
|
+
sage: C = HyperellipticCurve(f)
|
|
343
|
+
sage: J = C.jacobian()
|
|
344
|
+
sage: J.geometric_endomorphism_ring_is_ZZ()
|
|
345
|
+
True
|
|
346
|
+
|
|
347
|
+
This is LMFDB curve 1152.a.147456.1 whose geometric endomorphism ring
|
|
348
|
+
is isomorphic to the group of 2x2 matrices over `\QQ`::
|
|
349
|
+
|
|
350
|
+
sage: f = x^6 - 2*x^4 + 2*x^2 - 1
|
|
351
|
+
sage: C = HyperellipticCurve(f)
|
|
352
|
+
sage: J = C.jacobian()
|
|
353
|
+
sage: J.geometric_endomorphism_ring_is_ZZ()
|
|
354
|
+
False
|
|
355
|
+
|
|
356
|
+
This is LMFDB curve 20736.k.373248.1 whose geometric endomorphism ring
|
|
357
|
+
is isomorphic to the group of 2x2 matrices over a CM field::
|
|
358
|
+
|
|
359
|
+
sage: f = x^6 + 8
|
|
360
|
+
sage: C = HyperellipticCurve(f)
|
|
361
|
+
sage: J = C.jacobian()
|
|
362
|
+
sage: J.geometric_endomorphism_ring_is_ZZ()
|
|
363
|
+
False
|
|
364
|
+
|
|
365
|
+
This is LMFDB curve 708.a.181248.1::
|
|
366
|
+
|
|
367
|
+
sage: R.<x> = QQ[]
|
|
368
|
+
sage: f = -3*x^6 - 16*x^5 + 36*x^4 + 194*x^3 - 164*x^2 - 392*x - 143
|
|
369
|
+
sage: C = HyperellipticCurve(f)
|
|
370
|
+
sage: J = C.jacobian()
|
|
371
|
+
sage: J.geometric_endomorphism_ring_is_ZZ()
|
|
372
|
+
True
|
|
373
|
+
|
|
374
|
+
This is LMFDB curve 10609.a.10609.1 whose geometric endomorphism ring
|
|
375
|
+
is an order in a real quadratic field::
|
|
376
|
+
|
|
377
|
+
sage: f = x^6 + 2*x^4 + 2*x^3 + 5*x^2 + 6*x + 1
|
|
378
|
+
sage: C = HyperellipticCurve(f)
|
|
379
|
+
sage: J = C.jacobian()
|
|
380
|
+
sage: J.geometric_endomorphism_ring_is_ZZ() # needs sage.groups
|
|
381
|
+
False
|
|
382
|
+
|
|
383
|
+
This is LMFDB curve 160000.c.800000.1 whose geometric endomorphism ring
|
|
384
|
+
is an order in a CM field::
|
|
385
|
+
|
|
386
|
+
sage: f = x^5 - 1
|
|
387
|
+
sage: C = HyperellipticCurve(f)
|
|
388
|
+
sage: J = C.jacobian()
|
|
389
|
+
sage: J.geometric_endomorphism_ring_is_ZZ() # needs sage.groups
|
|
390
|
+
False
|
|
391
|
+
|
|
392
|
+
This is LMFDB curve 262144.d.524288.2 whose geometric endomorphism ring
|
|
393
|
+
is an order in a quaternion algebra::
|
|
394
|
+
|
|
395
|
+
sage: f = x^5 + x^4 + 4*x^3 + 8*x^2 + 5*x + 1
|
|
396
|
+
sage: C = HyperellipticCurve(f)
|
|
397
|
+
sage: J = C.jacobian()
|
|
398
|
+
sage: J.geometric_endomorphism_ring_is_ZZ() # needs sage.groups
|
|
399
|
+
False
|
|
400
|
+
|
|
401
|
+
This is LMFDB curve 578.a.2312.1 whose geometric endomorphism ring
|
|
402
|
+
is `\QQ \times \QQ`::
|
|
403
|
+
|
|
404
|
+
sage: f = 4*x^5 - 7*x^4 + 10*x^3 - 7*x^2 + 4*x
|
|
405
|
+
sage: C = HyperellipticCurve(f)
|
|
406
|
+
sage: J = C.jacobian()
|
|
407
|
+
sage: J.geometric_endomorphism_ring_is_ZZ() # needs sage.groups
|
|
408
|
+
False
|
|
409
|
+
"""
|
|
410
|
+
if self._have_established_geometrically_trivial:
|
|
411
|
+
return True
|
|
412
|
+
is_abs_simple = self.geometric_endomorphism_algebra_is_field(B=B, proof=proof)
|
|
413
|
+
if self._have_established_geometrically_trivial:
|
|
414
|
+
return True
|
|
415
|
+
if is_abs_simple and is_geom_trivial_when_field(self.curve(), self._bad_primes):
|
|
416
|
+
return True
|
|
417
|
+
if proof:
|
|
418
|
+
raise NotImplementedError("Rigorous computation of lower bounds of endomorphism rings has not yet been implemented.")
|
|
419
|
+
return False
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
"""
|
|
3
|
+
Rational point sets on a Jacobian
|
|
4
|
+
|
|
5
|
+
EXAMPLES::
|
|
6
|
+
|
|
7
|
+
sage: x = QQ['x'].0
|
|
8
|
+
sage: f = x^5 + x + 1
|
|
9
|
+
sage: C = HyperellipticCurve(f); C
|
|
10
|
+
Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x + 1
|
|
11
|
+
sage: C(QQ)
|
|
12
|
+
Set of rational points of Hyperelliptic Curve over Rational Field
|
|
13
|
+
defined by y^2 = x^5 + x + 1
|
|
14
|
+
sage: P = C([0,1,1])
|
|
15
|
+
sage: J = C.jacobian(); J
|
|
16
|
+
Jacobian of Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x + 1
|
|
17
|
+
sage: Q = J(QQ)(P); Q
|
|
18
|
+
(x, y - 1)
|
|
19
|
+
sage: Q + Q
|
|
20
|
+
(x^2, y - 1/2*x - 1)
|
|
21
|
+
sage: Q*3
|
|
22
|
+
(x^2 - 1/64*x + 1/8, y + 255/512*x + 65/64)
|
|
23
|
+
|
|
24
|
+
::
|
|
25
|
+
|
|
26
|
+
sage: F.<a> = GF(3)
|
|
27
|
+
sage: R.<x> = F[]
|
|
28
|
+
sage: f = x^5 - 1
|
|
29
|
+
sage: C = HyperellipticCurve(f)
|
|
30
|
+
sage: J = C.jacobian()
|
|
31
|
+
sage: X = J(F)
|
|
32
|
+
sage: a = x^2 - x + 1; b = -x + 1; c = x - 1; d = 0
|
|
33
|
+
sage: D1 = X([a,b]); D1
|
|
34
|
+
(x^2 + 2*x + 1, y + x + 2)
|
|
35
|
+
sage: D2 = X([c,d]); D2
|
|
36
|
+
(x + 2, y)
|
|
37
|
+
sage: D1 + D2
|
|
38
|
+
(x^2 + 2*x + 2, y + 2*x + 1)
|
|
39
|
+
"""
|
|
40
|
+
# ****************************************************************************
|
|
41
|
+
# Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu>
|
|
42
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
43
|
+
# https://www.gnu.org/licenses/
|
|
44
|
+
# ****************************************************************************
|
|
45
|
+
|
|
46
|
+
from sage.misc.lazy_import import lazy_import
|
|
47
|
+
from sage.rings.integer import Integer
|
|
48
|
+
from sage.rings.integer_ring import ZZ
|
|
49
|
+
from sage.rings.polynomial.polynomial_element import Polynomial
|
|
50
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
51
|
+
from sage.schemes.generic.homset import SchemeHomset_points
|
|
52
|
+
from sage.schemes.hyperelliptic_curves.jacobian_morphism import JacobianMorphism_divisor_class_field
|
|
53
|
+
|
|
54
|
+
lazy_import('sage.schemes.generic.morphism', 'SchemeMorphism')
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class JacobianHomset_divisor_classes(SchemeHomset_points):
|
|
58
|
+
def __init__(self, Y, X, **kwds):
|
|
59
|
+
R = X.base_ring()
|
|
60
|
+
S = Y.coordinate_ring()
|
|
61
|
+
SchemeHomset_points.__init__(self, Y, X, **kwds)
|
|
62
|
+
P2 = X.curve()._printing_ring
|
|
63
|
+
if S != R:
|
|
64
|
+
y = str(P2.gen())
|
|
65
|
+
x = str(P2.base_ring().gen())
|
|
66
|
+
P1 = PolynomialRing(S, name=x)
|
|
67
|
+
P2 = PolynomialRing(P1, name=y)
|
|
68
|
+
self._printing_ring = P2
|
|
69
|
+
|
|
70
|
+
def __call__(self, P):
|
|
71
|
+
r"""
|
|
72
|
+
Return a rational point P in the abstract Homset J(K), given:
|
|
73
|
+
|
|
74
|
+
0. A point P in J = Jac(C), returning P;
|
|
75
|
+
|
|
76
|
+
1. A point P on the curve C such that J = Jac(C), where C is
|
|
77
|
+
an odd degree model, returning [P - oo];
|
|
78
|
+
|
|
79
|
+
2. A pair of points (P, Q) on the curve C such that J = Jac(C),
|
|
80
|
+
returning [P-Q];
|
|
81
|
+
|
|
82
|
+
3. A list of polynomials (a,b) such that `b^2 + h*b - f = 0 mod a`,
|
|
83
|
+
returning [(a(x),y-b(x))].
|
|
84
|
+
|
|
85
|
+
EXAMPLES::
|
|
86
|
+
|
|
87
|
+
sage: P.<x> = PolynomialRing(QQ)
|
|
88
|
+
sage: f = x^5 - x + 1; h = x
|
|
89
|
+
sage: C = HyperellipticCurve(f,h,'u,v')
|
|
90
|
+
sage: P = C(0,1,1)
|
|
91
|
+
sage: J = C.jacobian()
|
|
92
|
+
sage: Q = J(QQ)(P)
|
|
93
|
+
sage: for i in range(6): i*Q
|
|
94
|
+
(1)
|
|
95
|
+
(u, v - 1)
|
|
96
|
+
(u^2, v + u - 1)
|
|
97
|
+
(u^2, v + 1)
|
|
98
|
+
(u, v + 1)
|
|
99
|
+
(1)
|
|
100
|
+
|
|
101
|
+
::
|
|
102
|
+
|
|
103
|
+
sage: F.<a> = GF(3)
|
|
104
|
+
sage: R.<x> = F[]
|
|
105
|
+
sage: f = x^5 - 1
|
|
106
|
+
sage: C = HyperellipticCurve(f)
|
|
107
|
+
sage: J = C.jacobian()
|
|
108
|
+
sage: X = J(F)
|
|
109
|
+
sage: a = x^2 - x + 1; b = -x + 1; c = x - 1; d = 0
|
|
110
|
+
sage: D1 = X([a,b]); D1
|
|
111
|
+
(x^2 + 2*x + 1, y + x + 2)
|
|
112
|
+
sage: D2 = X([c,d]); D2
|
|
113
|
+
(x + 2, y)
|
|
114
|
+
sage: D1 + D2
|
|
115
|
+
(x^2 + 2*x + 2, y + 2*x + 1)
|
|
116
|
+
|
|
117
|
+
TESTS:
|
|
118
|
+
|
|
119
|
+
Test :issue:`38459`::
|
|
120
|
+
|
|
121
|
+
sage: K.<u> = QQ[]
|
|
122
|
+
sage: C = HyperellipticCurve(u^5 - 1)
|
|
123
|
+
sage: J = C.jacobian()
|
|
124
|
+
sage: J(u - 1, 0)
|
|
125
|
+
(x - 1, y)
|
|
126
|
+
"""
|
|
127
|
+
if isinstance(P, (Integer, int)) and P == 0:
|
|
128
|
+
R = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring())
|
|
129
|
+
return JacobianMorphism_divisor_class_field(self,
|
|
130
|
+
(R.one(), R.zero()))
|
|
131
|
+
elif isinstance(P, (list, tuple)):
|
|
132
|
+
if len(P) == 1 and P[0] == 0:
|
|
133
|
+
R = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring())
|
|
134
|
+
return JacobianMorphism_divisor_class_field(self,
|
|
135
|
+
(R.one(), R.zero()))
|
|
136
|
+
elif len(P) == 2:
|
|
137
|
+
P1 = P[0]
|
|
138
|
+
P2 = P[1]
|
|
139
|
+
if isinstance(P1, Integer) and isinstance(P2, Integer):
|
|
140
|
+
R = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring())
|
|
141
|
+
P1 = R(P1)
|
|
142
|
+
P2 = R(P2)
|
|
143
|
+
return JacobianMorphism_divisor_class_field(self, (P1, P2))
|
|
144
|
+
if isinstance(P1, Integer) and isinstance(P2, Polynomial):
|
|
145
|
+
R = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring())
|
|
146
|
+
P1 = R(P1)
|
|
147
|
+
return JacobianMorphism_divisor_class_field(self, (P1, P2))
|
|
148
|
+
if isinstance(P2, Integer) and isinstance(P1, Polynomial):
|
|
149
|
+
R = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring())
|
|
150
|
+
P2 = R(P2)
|
|
151
|
+
return JacobianMorphism_divisor_class_field(self, (P1, P2))
|
|
152
|
+
if isinstance(P1, Polynomial) and isinstance(P2, Polynomial):
|
|
153
|
+
return JacobianMorphism_divisor_class_field(self, tuple(P))
|
|
154
|
+
if isinstance(P1, SchemeMorphism) and isinstance(P2, SchemeMorphism):
|
|
155
|
+
return self(P1) - self(P2)
|
|
156
|
+
raise TypeError("argument P (= %s) must have length 2" % P)
|
|
157
|
+
elif isinstance(P, JacobianMorphism_divisor_class_field) and self == P.parent():
|
|
158
|
+
return P
|
|
159
|
+
elif isinstance(P, SchemeMorphism):
|
|
160
|
+
x0 = P[0]
|
|
161
|
+
y0 = P[1]
|
|
162
|
+
R, x = self.curve().hyperelliptic_polynomials()[0].parent().change_ring(self.value_ring()).objgen()
|
|
163
|
+
return self((x - x0, R(y0)))
|
|
164
|
+
raise TypeError("argument P (= %s) does not determine a divisor class" % P)
|
|
165
|
+
|
|
166
|
+
def _morphism(self, *args, **kwds):
|
|
167
|
+
return JacobianMorphism_divisor_class_field(*args, **kwds)
|
|
168
|
+
|
|
169
|
+
def curve(self):
|
|
170
|
+
return self.codomain().curve()
|
|
171
|
+
|
|
172
|
+
def value_ring(self):
|
|
173
|
+
"""
|
|
174
|
+
Return S for a homset X(T) where T = Spec(S).
|
|
175
|
+
"""
|
|
176
|
+
from sage.schemes.generic.scheme import AffineScheme
|
|
177
|
+
T = self.domain()
|
|
178
|
+
if isinstance(T, AffineScheme):
|
|
179
|
+
return T.coordinate_ring()
|
|
180
|
+
else:
|
|
181
|
+
raise TypeError("domain of argument must be of the form Spec(S)")
|
|
182
|
+
|
|
183
|
+
def base_extend(self, R):
|
|
184
|
+
if R != ZZ:
|
|
185
|
+
raise NotImplementedError("Jacobian point sets viewed as modules over rings other than ZZ not implemented")
|
|
186
|
+
return self
|