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,875 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
r"""
|
|
3
|
+
Jacobian 'morphism' as a class in the Picard group
|
|
4
|
+
|
|
5
|
+
This module implements the group operation in the Picard group of a
|
|
6
|
+
hyperelliptic curve, represented as divisors in Mumford
|
|
7
|
+
representation, using Cantor's algorithm.
|
|
8
|
+
|
|
9
|
+
A divisor on the hyperelliptic curve `y^2 + y h(x) = f(x)`
|
|
10
|
+
is stored in Mumford representation, that is, as two polynomials
|
|
11
|
+
`u(x)` and `v(x)` such that:
|
|
12
|
+
|
|
13
|
+
- `u(x)` is monic,
|
|
14
|
+
|
|
15
|
+
- `u(x)` divides `f(x) - h(x) v(x) - v(x)^2`,
|
|
16
|
+
|
|
17
|
+
- `deg(v(x)) < deg(u(x)) \le g`.
|
|
18
|
+
|
|
19
|
+
REFERENCES:
|
|
20
|
+
|
|
21
|
+
A readable introduction to divisors, the Picard group, Mumford
|
|
22
|
+
representation, and Cantor's algorithm:
|
|
23
|
+
|
|
24
|
+
- J. Scholten, F. Vercauteren. An Introduction to Elliptic and
|
|
25
|
+
Hyperelliptic Curve Cryptography and the NTRU Cryptosystem. To
|
|
26
|
+
appear in B. Preneel (Ed.) State of the Art in Applied Cryptography
|
|
27
|
+
- COSIC '03, Lecture Notes in Computer Science, Springer 2004.
|
|
28
|
+
|
|
29
|
+
A standard reference in the field of cryptography:
|
|
30
|
+
|
|
31
|
+
- R. Avanzi, H. Cohen, C. Doche, G. Frey, T. Lange, K. Nguyen, and F.
|
|
32
|
+
Vercauteren, Handbook of Elliptic and Hyperelliptic Curve
|
|
33
|
+
Cryptography. CRC Press, 2005.
|
|
34
|
+
|
|
35
|
+
EXAMPLES: The following curve is the reduction of a curve whose
|
|
36
|
+
Jacobian has complex multiplication.
|
|
37
|
+
|
|
38
|
+
::
|
|
39
|
+
|
|
40
|
+
sage: x = GF(37)['x'].gen()
|
|
41
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x); H
|
|
42
|
+
Hyperelliptic Curve over Finite Field of size 37 defined
|
|
43
|
+
by y^2 = x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x
|
|
44
|
+
|
|
45
|
+
At this time, Jacobians of hyperelliptic curves are handled
|
|
46
|
+
differently than elliptic curves::
|
|
47
|
+
|
|
48
|
+
sage: J = H.jacobian(); J
|
|
49
|
+
Jacobian of Hyperelliptic Curve over Finite Field of size 37 defined
|
|
50
|
+
by y^2 = x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x
|
|
51
|
+
sage: J = J(J.base_ring()); J
|
|
52
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over Finite Field
|
|
53
|
+
of size 37 defined by y^2 = x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x
|
|
54
|
+
|
|
55
|
+
Points on the Jacobian are represented by Mumford's polynomials.
|
|
56
|
+
First we find a couple of points on the curve::
|
|
57
|
+
|
|
58
|
+
sage: P1 = H.lift_x(2); P1
|
|
59
|
+
(2 : 11 : 1)
|
|
60
|
+
sage: Q1 = H.lift_x(10); Q1
|
|
61
|
+
(10 : 18 : 1)
|
|
62
|
+
|
|
63
|
+
Observe that 2 and 10 are the roots of the polynomials in x,
|
|
64
|
+
respectively::
|
|
65
|
+
|
|
66
|
+
sage: P = J(P1); P
|
|
67
|
+
(x + 35, y + 26)
|
|
68
|
+
sage: Q = J(Q1); Q
|
|
69
|
+
(x + 27, y + 19)
|
|
70
|
+
|
|
71
|
+
::
|
|
72
|
+
|
|
73
|
+
sage: P + Q
|
|
74
|
+
(x^2 + 25*x + 20, y + 13*x)
|
|
75
|
+
sage: (x^2 + 25*x + 20).roots(multiplicities=False)
|
|
76
|
+
[10, 2]
|
|
77
|
+
|
|
78
|
+
Frobenius satisfies
|
|
79
|
+
|
|
80
|
+
.. MATH::
|
|
81
|
+
|
|
82
|
+
x^4 + 12*x^3 + 78*x^2 + 444*x + 1369
|
|
83
|
+
|
|
84
|
+
on the Jacobian of this reduction and the order of the Jacobian is
|
|
85
|
+
`N = 1904`.
|
|
86
|
+
|
|
87
|
+
::
|
|
88
|
+
|
|
89
|
+
sage: 1904*P
|
|
90
|
+
(1)
|
|
91
|
+
sage: 34*P == 0
|
|
92
|
+
True
|
|
93
|
+
sage: 35*P == P
|
|
94
|
+
True
|
|
95
|
+
sage: 33*P == -P
|
|
96
|
+
True
|
|
97
|
+
|
|
98
|
+
::
|
|
99
|
+
|
|
100
|
+
sage: Q*1904
|
|
101
|
+
(1)
|
|
102
|
+
sage: Q*238 == 0
|
|
103
|
+
True
|
|
104
|
+
sage: Q*239 == Q
|
|
105
|
+
True
|
|
106
|
+
sage: Q*237 == -Q
|
|
107
|
+
True
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
#*****************************************************************************
|
|
111
|
+
# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu.au>
|
|
112
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
113
|
+
# http://www.gnu.org/licenses/
|
|
114
|
+
#*****************************************************************************
|
|
115
|
+
|
|
116
|
+
from sage.misc.latex import latex
|
|
117
|
+
|
|
118
|
+
from sage.structure.element import AdditiveGroupElement
|
|
119
|
+
from sage.structure.richcmp import richcmp, op_NE
|
|
120
|
+
from sage.schemes.generic.morphism import SchemeMorphism
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def cantor_reduction_simple(a, b, f, genus):
|
|
124
|
+
r"""
|
|
125
|
+
Return the unique reduced divisor linearly equivalent to
|
|
126
|
+
`(a, b)` on the curve `y^2 = f(x).`
|
|
127
|
+
|
|
128
|
+
See the docstring of
|
|
129
|
+
:mod:`sage.schemes.hyperelliptic_curves.jacobian_morphism` for
|
|
130
|
+
information about divisors, linear equivalence, and reduction.
|
|
131
|
+
|
|
132
|
+
EXAMPLES::
|
|
133
|
+
|
|
134
|
+
sage: x = QQ['x'].gen()
|
|
135
|
+
sage: f = x^5 - x
|
|
136
|
+
sage: H = HyperellipticCurve(f); H
|
|
137
|
+
Hyperelliptic Curve over Rational Field defined by y^2 = x^5 - x
|
|
138
|
+
sage: J = H.jacobian()(QQ); J
|
|
139
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over Rational Field
|
|
140
|
+
defined by y^2 = x^5 - x
|
|
141
|
+
|
|
142
|
+
The following point is 2-torsion::
|
|
143
|
+
|
|
144
|
+
sage: P = J(H.lift_x(-1)); P
|
|
145
|
+
(x + 1, y)
|
|
146
|
+
sage: 2 * P # indirect doctest
|
|
147
|
+
(1)
|
|
148
|
+
"""
|
|
149
|
+
a2 = (f - b**2) // a
|
|
150
|
+
a2 = a2.monic()
|
|
151
|
+
b2 = -b % (a2)
|
|
152
|
+
if a2.degree() == a.degree():
|
|
153
|
+
# XXX
|
|
154
|
+
assert a2.degree() == genus + 1
|
|
155
|
+
print("Returning ambiguous form of degree genus+1.")
|
|
156
|
+
return (a2, b2)
|
|
157
|
+
elif a2.degree() > genus:
|
|
158
|
+
return cantor_reduction_simple(a2, b2, f, genus)
|
|
159
|
+
return (a2, b2)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def cantor_reduction(a, b, f, h, genus):
|
|
163
|
+
r"""
|
|
164
|
+
Return the unique reduced divisor linearly equivalent to
|
|
165
|
+
`(a, b)` on the curve `y^2 + y h(x) = f(x)`.
|
|
166
|
+
|
|
167
|
+
See the docstring of
|
|
168
|
+
:mod:`sage.schemes.hyperelliptic_curves.jacobian_morphism` for
|
|
169
|
+
information about divisors, linear equivalence, and reduction.
|
|
170
|
+
|
|
171
|
+
EXAMPLES::
|
|
172
|
+
|
|
173
|
+
sage: x = QQ['x'].gen()
|
|
174
|
+
sage: f = x^5 - x
|
|
175
|
+
sage: H = HyperellipticCurve(f, x); H
|
|
176
|
+
Hyperelliptic Curve over Rational Field defined by y^2 + x*y = x^5 - x
|
|
177
|
+
sage: J = H.jacobian()(QQ); J
|
|
178
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
179
|
+
Rational Field defined by y^2 + x*y = x^5 - x
|
|
180
|
+
|
|
181
|
+
The following point is 2-torsion::
|
|
182
|
+
|
|
183
|
+
sage: Q = J(H.lift_x(0)); Q
|
|
184
|
+
(x, y)
|
|
185
|
+
sage: 2*Q # indirect doctest
|
|
186
|
+
(1)
|
|
187
|
+
|
|
188
|
+
The next point is not 2-torsion::
|
|
189
|
+
|
|
190
|
+
sage: P = J(H.lift_x(-1)); P
|
|
191
|
+
(x + 1, y)
|
|
192
|
+
sage: 2 * J(H.lift_x(-1)) # indirect doctest
|
|
193
|
+
(x^2 + 2*x + 1, y + 4*x + 4)
|
|
194
|
+
sage: 3 * J(H.lift_x(-1)) # indirect doctest
|
|
195
|
+
(x^2 - 487*x - 324, y + 10755*x + 7146)
|
|
196
|
+
"""
|
|
197
|
+
assert a.degree() < 2*genus+1
|
|
198
|
+
assert b.degree() < a.degree()
|
|
199
|
+
k = f - h*b - b**2
|
|
200
|
+
if 2*a.degree() == k.degree():
|
|
201
|
+
# must adjust b to include the point at infinity
|
|
202
|
+
g1 = a.degree()
|
|
203
|
+
x = a.parent().gen()
|
|
204
|
+
r = (x**2 + h[g1]*x - f[2*g1]).roots()[0][0]
|
|
205
|
+
b = b + r*(x**g1 - (x**g1) % (a))
|
|
206
|
+
k = f - h*b - b**2
|
|
207
|
+
assert k % (a) == 0
|
|
208
|
+
a = (k // a).monic()
|
|
209
|
+
b = -(b+h) % (a)
|
|
210
|
+
if a.degree() > genus:
|
|
211
|
+
return cantor_reduction(a, b, f, h, genus)
|
|
212
|
+
return (a, b)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def cantor_composition_simple(D1, D2, f, genus):
|
|
216
|
+
r"""
|
|
217
|
+
Given `D_1` and `D_2` two reduced Mumford
|
|
218
|
+
divisors on the Jacobian of the curve `y^2 = f(x)`,
|
|
219
|
+
computes a representative `D_1 + D_2`.
|
|
220
|
+
|
|
221
|
+
.. warning::
|
|
222
|
+
|
|
223
|
+
The representative computed is NOT reduced! Use
|
|
224
|
+
:func:`cantor_reduction_simple` to reduce it.
|
|
225
|
+
|
|
226
|
+
EXAMPLES::
|
|
227
|
+
|
|
228
|
+
sage: x = QQ['x'].gen()
|
|
229
|
+
sage: f = x^5 + x
|
|
230
|
+
sage: H = HyperellipticCurve(f); H
|
|
231
|
+
Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x
|
|
232
|
+
|
|
233
|
+
::
|
|
234
|
+
|
|
235
|
+
sage: F.<a> = NumberField(x^2 - 2, 'a') # needs sage.rings.number_field
|
|
236
|
+
sage: J = H.jacobian()(F); J # needs sage.rings.number_field
|
|
237
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
238
|
+
Number Field in a with defining polynomial x^2 - 2 defined by y^2 = x^5 + x
|
|
239
|
+
|
|
240
|
+
::
|
|
241
|
+
|
|
242
|
+
sage: # needs sage.rings.number_field
|
|
243
|
+
sage: P = J(H.lift_x(F(1))); P
|
|
244
|
+
(x - 1, y + a)
|
|
245
|
+
sage: Q = J(H.lift_x(F(0))); Q
|
|
246
|
+
(x, y)
|
|
247
|
+
sage: 2*P + 2*Q # indirect doctest
|
|
248
|
+
(x^2 - 2*x + 1, y + 3/2*a*x - 1/2*a)
|
|
249
|
+
sage: 2*(P + Q) # indirect doctest
|
|
250
|
+
(x^2 - 2*x + 1, y + 3/2*a*x - 1/2*a)
|
|
251
|
+
sage: 3*P # indirect doctest
|
|
252
|
+
(x^2 - 25/32*x + 49/32, y + 45/256*a*x + 315/256*a)
|
|
253
|
+
"""
|
|
254
|
+
a1, b1 = D1
|
|
255
|
+
a2, b2 = D2
|
|
256
|
+
if a1 == a2 and b1 == b2:
|
|
257
|
+
# Duplication law:
|
|
258
|
+
d, h1, h3 = a1.xgcd(2*b1)
|
|
259
|
+
a = (a1 // d)**2
|
|
260
|
+
b = (b1 + h3*((f - b1**2) // d)) % (a)
|
|
261
|
+
else:
|
|
262
|
+
d0, _, h2 = a1.xgcd(a2)
|
|
263
|
+
if d0 == 1:
|
|
264
|
+
a = a1*a2
|
|
265
|
+
b = (b2 + h2*a2*(b1-b2)) % (a)
|
|
266
|
+
else:
|
|
267
|
+
d, l, h3 = d0.xgcd(b1 + b2)
|
|
268
|
+
a = (a1*a2) // (d**2)
|
|
269
|
+
b = ((b2 + l*h2*(b1-b2)*(a2 // d)) + h3*((f - b2**2) // d)) % (a)
|
|
270
|
+
a = a.monic()
|
|
271
|
+
return (a, b)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def cantor_composition(D1, D2, f, h, genus):
|
|
275
|
+
r"""
|
|
276
|
+
EXAMPLES::
|
|
277
|
+
|
|
278
|
+
sage: # needs sage.rings.finite_rings
|
|
279
|
+
sage: F.<a> = GF(7^2, 'a')
|
|
280
|
+
sage: x = F['x'].gen()
|
|
281
|
+
sage: f = x^7 + x^2 + a
|
|
282
|
+
sage: H = HyperellipticCurve(f, 2*x); H
|
|
283
|
+
Hyperelliptic Curve over Finite Field in a of size 7^2
|
|
284
|
+
defined by y^2 + 2*x*y = x^7 + x^2 + a
|
|
285
|
+
sage: J = H.jacobian()(F); J
|
|
286
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
287
|
+
Finite Field in a of size 7^2 defined by y^2 + 2*x*y = x^7 + x^2 + a
|
|
288
|
+
|
|
289
|
+
::
|
|
290
|
+
|
|
291
|
+
sage: Q = J(H.lift_x(F(1))); Q # needs sage.rings.finite_rings
|
|
292
|
+
(x + 6, y + 5*a)
|
|
293
|
+
sage: 10*Q # indirect doctest # needs sage.rings.finite_rings
|
|
294
|
+
(x^3 + (3*a + 1)*x^2 + (2*a + 5)*x + a + 5, y + (3*a + 2)*x^2 + (6*a + 1)*x + a + 4)
|
|
295
|
+
sage: 7*8297*Q # needs sage.rings.finite_rings
|
|
296
|
+
(1)
|
|
297
|
+
|
|
298
|
+
::
|
|
299
|
+
|
|
300
|
+
sage: Q = J(H.lift_x(F(a+1))); Q # needs sage.rings.finite_rings
|
|
301
|
+
(x + 6*a + 6, y + 2)
|
|
302
|
+
sage: 7*8297*Q # indirect doctest # needs sage.rings.finite_rings
|
|
303
|
+
(1)
|
|
304
|
+
|
|
305
|
+
A test over a prime field:
|
|
306
|
+
|
|
307
|
+
sage: # needs sage.rings.finite_rings
|
|
308
|
+
sage: F = GF(next_prime(10^30))
|
|
309
|
+
sage: x = F['x'].gen()
|
|
310
|
+
sage: f = x^7 + x^2 + 1
|
|
311
|
+
sage: H = HyperellipticCurve(f, 2*x); H
|
|
312
|
+
Hyperelliptic Curve over Finite Field of size 1000000000000000000000000000057
|
|
313
|
+
defined by y^2 + 2*x*y = x^7 + x^2 + 1
|
|
314
|
+
sage: J = H.jacobian()(F); J
|
|
315
|
+
Set of rational points of Jacobian of Hyperelliptic Curve
|
|
316
|
+
over Finite Field of size 1000000000000000000000000000057
|
|
317
|
+
defined by y^2 + 2*x*y = x^7 + x^2 + 1
|
|
318
|
+
sage: Q = J(H.lift_x(F(1))); Q
|
|
319
|
+
(x + 1000000000000000000000000000056, y + 1000000000000000000000000000056)
|
|
320
|
+
sage: 10*Q # indirect doctest
|
|
321
|
+
(x^3 + 150296037169838934997145567227*x^2
|
|
322
|
+
+ 377701248971234560956743242408*x + 509456150352486043408603286615,
|
|
323
|
+
y + 514451014495791237681619598519*x^2
|
|
324
|
+
+ 875375621665039398768235387900*x + 861429240012590886251910326876)
|
|
325
|
+
sage: 7*8297*Q
|
|
326
|
+
(x^3 + 35410976139548567549919839063*x^2
|
|
327
|
+
+ 26230404235226464545886889960*x + 681571430588959705539385624700,
|
|
328
|
+
y + 999722365017286747841221441793*x^2
|
|
329
|
+
+ 262703715994522725686603955650*x + 626219823403254233972118260890)
|
|
330
|
+
"""
|
|
331
|
+
a1, b1 = D1
|
|
332
|
+
a2, b2 = D2
|
|
333
|
+
if a1 == a2 and b1 == b2:
|
|
334
|
+
# Duplication law:
|
|
335
|
+
d, h1, h3 = a1.xgcd(2*b1 + h)
|
|
336
|
+
a = (a1 // d)**2
|
|
337
|
+
b = (b1 + h3*((f-h*b1-b1**2) // d)) % (a)
|
|
338
|
+
else:
|
|
339
|
+
d0, _, h2 = a1.xgcd(a2)
|
|
340
|
+
if d0 == 1:
|
|
341
|
+
a = a1 * a2
|
|
342
|
+
b = (b2 + h2*a2*(b1-b2)) % (a)
|
|
343
|
+
else:
|
|
344
|
+
e0 = b1+b2+h
|
|
345
|
+
if e0 == 0:
|
|
346
|
+
a = (a1*a2) // (d0**2)
|
|
347
|
+
b = (b2 + h2*(b1-b2)*(a2 // d0)) % (a)
|
|
348
|
+
else:
|
|
349
|
+
d, l, h3 = d0.xgcd(e0)
|
|
350
|
+
a = (a1*a2) // (d**2)
|
|
351
|
+
b = (b2 + l*h2*(b1-b2)*(a2 // d) + h3*((f-h*b2-b2**2) // d)) % (a)
|
|
352
|
+
a = a.monic()
|
|
353
|
+
return (a, b)
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class JacobianMorphism_divisor_class_field(AdditiveGroupElement, SchemeMorphism):
|
|
357
|
+
r"""
|
|
358
|
+
An element of a Jacobian defined over a field, i.e. in
|
|
359
|
+
`J(K) = \mathrm{Pic}^0_K(C)`.
|
|
360
|
+
"""
|
|
361
|
+
def __init__(self, parent, polys, check=True):
|
|
362
|
+
r"""
|
|
363
|
+
Create a new Jacobian element in Mumford representation.
|
|
364
|
+
|
|
365
|
+
INPUT:
|
|
366
|
+
|
|
367
|
+
- ``parent`` -- the parent Homset
|
|
368
|
+
- ``polys`` -- Mumford's `u` and `v` polynomials
|
|
369
|
+
- ``check`` -- boolean (default: ``True``); if ``True``, ensure that
|
|
370
|
+
polynomials define a divisor on the appropriate curve and are reduced
|
|
371
|
+
|
|
372
|
+
.. warning::
|
|
373
|
+
|
|
374
|
+
Not for external use! Use ``J(K)([u, v])`` instead.
|
|
375
|
+
|
|
376
|
+
EXAMPLES::
|
|
377
|
+
|
|
378
|
+
sage: x = GF(37)['x'].gen()
|
|
379
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x)
|
|
380
|
+
sage: J = H.jacobian()(GF(37)); J
|
|
381
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
382
|
+
Finite Field of size 37 defined by
|
|
383
|
+
y^2 = x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x
|
|
384
|
+
|
|
385
|
+
::
|
|
386
|
+
|
|
387
|
+
sage: P1 = J(H.lift_x(2)); P1 # indirect doctest
|
|
388
|
+
(x + 35, y + 26)
|
|
389
|
+
sage: P1.parent()
|
|
390
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
391
|
+
Finite Field of size 37 defined by
|
|
392
|
+
y^2 = x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x
|
|
393
|
+
sage: type(P1)
|
|
394
|
+
<class 'sage.schemes.hyperelliptic_curves.jacobian_morphism.JacobianMorphism_divisor_class_field'>
|
|
395
|
+
"""
|
|
396
|
+
SchemeMorphism.__init__(self, parent)
|
|
397
|
+
if check:
|
|
398
|
+
C = parent.curve()
|
|
399
|
+
f, h = C.hyperelliptic_polynomials()
|
|
400
|
+
a, b = polys
|
|
401
|
+
if not (b**2 + h*b - f) % a == 0:
|
|
402
|
+
raise ValueError("Argument polys (= %s) must be divisor on curve %s." % (
|
|
403
|
+
polys, C))
|
|
404
|
+
genus = C.genus()
|
|
405
|
+
if a.degree() > genus:
|
|
406
|
+
polys = cantor_reduction(a, b, f, h, genus)
|
|
407
|
+
self.__polys = polys
|
|
408
|
+
|
|
409
|
+
def _printing_polys(self):
|
|
410
|
+
r"""
|
|
411
|
+
Internal function formatting Mumford polynomials for printing.
|
|
412
|
+
|
|
413
|
+
TESTS::
|
|
414
|
+
|
|
415
|
+
sage: # needs sage.rings.finite_rings
|
|
416
|
+
sage: F.<a> = GF(7^2, 'a')
|
|
417
|
+
sage: x = F['x'].gen()
|
|
418
|
+
sage: f = x^7 + x^2 + a
|
|
419
|
+
sage: H = HyperellipticCurve(f, 2*x)
|
|
420
|
+
sage: J = H.jacobian()(F)
|
|
421
|
+
|
|
422
|
+
::
|
|
423
|
+
|
|
424
|
+
sage: Q = J(H.lift_x(F(1))); Q # indirect doctest # needs sage.rings.finite_rings
|
|
425
|
+
(x + 6, y + 5*a)
|
|
426
|
+
"""
|
|
427
|
+
a, b = self.__polys
|
|
428
|
+
P = self.parent()._printing_ring
|
|
429
|
+
y = P.gen()
|
|
430
|
+
x = P.base_ring().gen()
|
|
431
|
+
return (a(x), y - b(x))
|
|
432
|
+
|
|
433
|
+
def _repr_(self):
|
|
434
|
+
r"""
|
|
435
|
+
Return a string representation of this Mumford divisor.
|
|
436
|
+
|
|
437
|
+
EXAMPLES::
|
|
438
|
+
|
|
439
|
+
sage: # needs sage.rings.finite_rings
|
|
440
|
+
sage: F.<a> = GF(7^2, 'a')
|
|
441
|
+
sage: x = F['x'].gen()
|
|
442
|
+
sage: f = x^7 + x^2 + a
|
|
443
|
+
sage: H = HyperellipticCurve(f, 2*x)
|
|
444
|
+
sage: J = H.jacobian()(F)
|
|
445
|
+
|
|
446
|
+
::
|
|
447
|
+
|
|
448
|
+
sage: Q = J(0); Q # indirect doctest # needs sage.rings.finite_rings
|
|
449
|
+
(1)
|
|
450
|
+
sage: Q = J(H.lift_x(F(1))); Q # indirect doctest # needs sage.rings.finite_rings
|
|
451
|
+
(x + 6, y + 5*a)
|
|
452
|
+
sage: Q + Q # indirect doctest # needs sage.rings.finite_rings
|
|
453
|
+
(x^2 + 5*x + 1, y + (4*a + 2)*x + a + 5)
|
|
454
|
+
"""
|
|
455
|
+
if self.is_zero():
|
|
456
|
+
return "(1)"
|
|
457
|
+
a, b = self._printing_polys()
|
|
458
|
+
return "(%s, %s)" % (a, b)
|
|
459
|
+
|
|
460
|
+
def _latex_(self):
|
|
461
|
+
r"""
|
|
462
|
+
Return a LaTeX string representing this Mumford divisor.
|
|
463
|
+
|
|
464
|
+
EXAMPLES::
|
|
465
|
+
|
|
466
|
+
sage: # needs sage.rings.finite_rings
|
|
467
|
+
sage: F.<alpha> = GF(7^2)
|
|
468
|
+
sage: x = F['x'].gen()
|
|
469
|
+
sage: f = x^7 + x^2 + alpha
|
|
470
|
+
sage: H = HyperellipticCurve(f, 2*x)
|
|
471
|
+
sage: J = H.jacobian()(F)
|
|
472
|
+
|
|
473
|
+
::
|
|
474
|
+
|
|
475
|
+
sage: Q = J(0); print(latex(Q)) # indirect doctest # needs sage.rings.finite_rings
|
|
476
|
+
\left(1\right)
|
|
477
|
+
sage: Q = J(H.lift_x(F(1))); print(latex(Q)) # indirect doctest # needs sage.rings.finite_rings
|
|
478
|
+
\left(x + 6, y + 5 \alpha\right)
|
|
479
|
+
|
|
480
|
+
::
|
|
481
|
+
|
|
482
|
+
sage: print(latex(Q + Q)) # needs sage.rings.finite_rings
|
|
483
|
+
\left(x^{2} + 5 x + 1, y + \left(4 \alpha + 2\right) x + \alpha + 5\right)
|
|
484
|
+
"""
|
|
485
|
+
if self.is_zero():
|
|
486
|
+
return "\\left(1\\right)"
|
|
487
|
+
a, b = self._printing_polys()
|
|
488
|
+
return "\\left(%s, %s\\right)" % (latex(a), latex(b))
|
|
489
|
+
|
|
490
|
+
def scheme(self):
|
|
491
|
+
r"""
|
|
492
|
+
Return the scheme this morphism maps to; or, where this divisor lives.
|
|
493
|
+
|
|
494
|
+
.. WARNING::
|
|
495
|
+
|
|
496
|
+
Although a pointset is defined over a specific field, the
|
|
497
|
+
scheme returned may be over a different (usually smaller)
|
|
498
|
+
field. The example below demonstrates this: the pointset
|
|
499
|
+
is determined over a number field of absolute degree 2 but
|
|
500
|
+
the scheme returned is defined over the rationals.
|
|
501
|
+
|
|
502
|
+
EXAMPLES::
|
|
503
|
+
|
|
504
|
+
sage: # needs sage.rings.number_field
|
|
505
|
+
sage: x = QQ['x'].gen()
|
|
506
|
+
sage: f = x^5 + x
|
|
507
|
+
sage: H = HyperellipticCurve(f)
|
|
508
|
+
sage: F.<a> = NumberField(x^2 - 2, 'a')
|
|
509
|
+
sage: J = H.jacobian()(F); J
|
|
510
|
+
Set of rational points of Jacobian of Hyperelliptic Curve
|
|
511
|
+
over Number Field in a with defining polynomial x^2 - 2
|
|
512
|
+
defined by y^2 = x^5 + x
|
|
513
|
+
sage: P = J(H.lift_x(F(1)))
|
|
514
|
+
sage: P.scheme()
|
|
515
|
+
Jacobian of Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x
|
|
516
|
+
"""
|
|
517
|
+
return self.codomain()
|
|
518
|
+
|
|
519
|
+
def point_of_jacobian_of_curve(self):
|
|
520
|
+
r"""
|
|
521
|
+
Return the point in the Jacobian of the curve.
|
|
522
|
+
|
|
523
|
+
The Jacobian is the one attached to the projective curve
|
|
524
|
+
corresponding to this hyperelliptic curve.
|
|
525
|
+
|
|
526
|
+
EXAMPLES::
|
|
527
|
+
|
|
528
|
+
sage: R.<x> = PolynomialRing(GF(11))
|
|
529
|
+
sage: f = x^6 + x + 1
|
|
530
|
+
sage: H = HyperellipticCurve(f)
|
|
531
|
+
sage: J = H.jacobian()
|
|
532
|
+
sage: D = J(H.lift_x(1))
|
|
533
|
+
sage: D # divisor in Mumford representation
|
|
534
|
+
(x + 10, y + 6)
|
|
535
|
+
sage: jacobian_order = sum(H.frobenius_polynomial())
|
|
536
|
+
sage: jacobian_order
|
|
537
|
+
234
|
|
538
|
+
sage: p = D.point_of_jacobian_of_curve(); p
|
|
539
|
+
[Place (1/x0, 1/x0^3*x1 + 1)
|
|
540
|
+
+ Place (x0 + 10, x1 + 6)]
|
|
541
|
+
sage: p # Jacobian point represented by an effective divisor
|
|
542
|
+
[Place (1/x0, 1/x0^3*x1 + 1)
|
|
543
|
+
+ Place (x0 + 10, x1 + 6)]
|
|
544
|
+
sage: p.order()
|
|
545
|
+
39
|
|
546
|
+
sage: 234*p == 0
|
|
547
|
+
True
|
|
548
|
+
sage: G = p.parent()
|
|
549
|
+
sage: G
|
|
550
|
+
Group of rational points of Jacobian over Finite Field of size 11 (Hess model)
|
|
551
|
+
sage: J = G.parent()
|
|
552
|
+
sage: J
|
|
553
|
+
Jacobian of Projective Plane Curve over Finite Field of size 11
|
|
554
|
+
defined by x0^6 + x0^5*x1 + x1^6 - x0^4*x2^2 (Hess model)
|
|
555
|
+
sage: C = J.curve()
|
|
556
|
+
sage: C
|
|
557
|
+
Projective Plane Curve over Finite Field of size 11
|
|
558
|
+
defined by x0^6 + x0^5*x1 + x1^6 - x0^4*x2^2
|
|
559
|
+
sage: C.affine_patch(0) == H.affine_patch(2)
|
|
560
|
+
True
|
|
561
|
+
"""
|
|
562
|
+
from sage.schemes.curves.constructor import Curve
|
|
563
|
+
C = self.parent().curve()
|
|
564
|
+
P = C.ambient_space() # projective plane
|
|
565
|
+
x0, x1, x2 = P.gens()
|
|
566
|
+
|
|
567
|
+
# X is the curve positioned in the ambient space
|
|
568
|
+
# such that x1 = x and x2 = y
|
|
569
|
+
X = Curve(C.defining_ideal().gens(), P)
|
|
570
|
+
X = X.affine_patch(2).projective_closure()
|
|
571
|
+
|
|
572
|
+
u0, v0 = list(self)
|
|
573
|
+
u1 = u0.subs(x1).homogenize(x0)
|
|
574
|
+
v1 = (x2 - v0.subs(x1)).homogenize(x0)
|
|
575
|
+
u2 = u1/x0**u1.degree()
|
|
576
|
+
v2 = v1/x0**v1.degree()
|
|
577
|
+
u = X.function(u2)
|
|
578
|
+
v = X.function(v2)
|
|
579
|
+
|
|
580
|
+
F = X.function_field()
|
|
581
|
+
O = F.maximal_order()
|
|
582
|
+
D = O.ideal([u,v]).divisor()
|
|
583
|
+
|
|
584
|
+
Pinf = F.places_infinite()[0]
|
|
585
|
+
assert Pinf.degree() == 1, "no rational point at infinity"
|
|
586
|
+
|
|
587
|
+
J = X.jacobian(model='hess', base_div=F.genus()*Pinf)
|
|
588
|
+
G = J.group(self.base_ring())
|
|
589
|
+
return G(D - D.degree()*Pinf)
|
|
590
|
+
|
|
591
|
+
def __list__(self):
|
|
592
|
+
r"""
|
|
593
|
+
Return a list `(a(x), b(x))` of the polynomials giving the
|
|
594
|
+
Mumford representation of ``self``.
|
|
595
|
+
|
|
596
|
+
TESTS::
|
|
597
|
+
|
|
598
|
+
sage: x = QQ['x'].gen()
|
|
599
|
+
sage: f = x^5 + x
|
|
600
|
+
sage: H = HyperellipticCurve(f)
|
|
601
|
+
sage: F.<a> = NumberField(x^2 - 2, 'a') # needs sage.rings.number_field
|
|
602
|
+
sage: J = H.jacobian()(F); J # needs sage.rings.number_field
|
|
603
|
+
Set of rational points of Jacobian of Hyperelliptic Curve
|
|
604
|
+
over Number Field in a with defining polynomial x^2 - 2
|
|
605
|
+
defined by y^2 = x^5 + x
|
|
606
|
+
|
|
607
|
+
::
|
|
608
|
+
|
|
609
|
+
sage: P = J(H.lift_x(F(1))) # needs sage.rings.number_field
|
|
610
|
+
sage: list(P) # indirect doctest # needs sage.rings.number_field
|
|
611
|
+
[x - 1, -a]
|
|
612
|
+
"""
|
|
613
|
+
return list(self.__polys)
|
|
614
|
+
|
|
615
|
+
def __tuple__(self):
|
|
616
|
+
r"""
|
|
617
|
+
Return a tuple `(a(x), b(x))` of the polynomials giving the
|
|
618
|
+
Mumford representation of ``self``.
|
|
619
|
+
|
|
620
|
+
TESTS::
|
|
621
|
+
|
|
622
|
+
sage: x = QQ['x'].gen()
|
|
623
|
+
sage: f = x^5 + x
|
|
624
|
+
sage: H = HyperellipticCurve(f)
|
|
625
|
+
sage: F.<a> = NumberField(x^2 - 2, 'a') # needs sage.rings.number_field
|
|
626
|
+
sage: J = H.jacobian()(F); J # needs sage.rings.number_field
|
|
627
|
+
Set of rational points of Jacobian of Hyperelliptic Curve
|
|
628
|
+
over Number Field in a with defining polynomial x^2 - 2
|
|
629
|
+
defined by y^2 = x^5 + x
|
|
630
|
+
|
|
631
|
+
::
|
|
632
|
+
|
|
633
|
+
sage: P = J(H.lift_x(F(1))) # needs sage.rings.number_field
|
|
634
|
+
sage: tuple(P) # indirect doctest # needs sage.rings.number_field
|
|
635
|
+
(x - 1, -a)
|
|
636
|
+
"""
|
|
637
|
+
return tuple(self.__polys)
|
|
638
|
+
|
|
639
|
+
def __getitem__(self, n):
|
|
640
|
+
r"""
|
|
641
|
+
Return the `n`-th item of the pair `(a(x), b(x))`
|
|
642
|
+
of polynomials giving the Mumford representation of ``self``.
|
|
643
|
+
|
|
644
|
+
TESTS::
|
|
645
|
+
|
|
646
|
+
sage: x = QQ['x'].gen()
|
|
647
|
+
sage: f = x^5 + x
|
|
648
|
+
sage: H = HyperellipticCurve(f)
|
|
649
|
+
sage: F.<a> = NumberField(x^2 - 2, 'a') # needs sage.rings.number_field
|
|
650
|
+
sage: J = H.jacobian()(F); J # needs sage.rings.number_field
|
|
651
|
+
Set of rational points of Jacobian of Hyperelliptic Curve
|
|
652
|
+
over Number Field in a with defining polynomial x^2 - 2
|
|
653
|
+
defined by y^2 = x^5 + x
|
|
654
|
+
|
|
655
|
+
::
|
|
656
|
+
|
|
657
|
+
sage: # needs sage.rings.number_field
|
|
658
|
+
sage: P = J(H.lift_x(F(1)))
|
|
659
|
+
sage: P[0] # indirect doctest
|
|
660
|
+
x - 1
|
|
661
|
+
sage: P[1] # indirect doctest
|
|
662
|
+
-a
|
|
663
|
+
sage: P[-1] # indirect doctest
|
|
664
|
+
-a
|
|
665
|
+
sage: P[:1] # indirect doctest
|
|
666
|
+
[x - 1]
|
|
667
|
+
"""
|
|
668
|
+
return list(self.__polys)[n]
|
|
669
|
+
|
|
670
|
+
def _richcmp_(self, other, op):
|
|
671
|
+
r"""
|
|
672
|
+
Compare ``self`` and ``other``.
|
|
673
|
+
|
|
674
|
+
TESTS::
|
|
675
|
+
|
|
676
|
+
sage: x = QQ['x'].gen()
|
|
677
|
+
sage: f = x^5 - x
|
|
678
|
+
sage: H = HyperellipticCurve(f); H
|
|
679
|
+
Hyperelliptic Curve over Rational Field defined by y^2 = x^5 - x
|
|
680
|
+
sage: J = H.jacobian()(QQ); J
|
|
681
|
+
Set of rational points of Jacobian of Hyperelliptic Curve over
|
|
682
|
+
Rational Field defined by y^2 = x^5 - x
|
|
683
|
+
|
|
684
|
+
The following point is 2-torsion::
|
|
685
|
+
|
|
686
|
+
sage: P = J(H.lift_x(-1)); P
|
|
687
|
+
(x + 1, y)
|
|
688
|
+
sage: 0 == 2 * P # indirect doctest
|
|
689
|
+
True
|
|
690
|
+
sage: P == P
|
|
691
|
+
True
|
|
692
|
+
|
|
693
|
+
::
|
|
694
|
+
|
|
695
|
+
sage: Q = J(H.lift_x(-1))
|
|
696
|
+
sage: Q == P
|
|
697
|
+
True
|
|
698
|
+
|
|
699
|
+
::
|
|
700
|
+
|
|
701
|
+
sage: 2 == Q
|
|
702
|
+
False
|
|
703
|
+
sage: P == False
|
|
704
|
+
False
|
|
705
|
+
|
|
706
|
+
Let's verify the same "points" on different schemes are not equal::
|
|
707
|
+
|
|
708
|
+
sage: x = QQ['x'].gen()
|
|
709
|
+
sage: f = x^5 + x
|
|
710
|
+
sage: H2 = HyperellipticCurve(f)
|
|
711
|
+
sage: J2 = H2.jacobian()(QQ)
|
|
712
|
+
|
|
713
|
+
::
|
|
714
|
+
|
|
715
|
+
sage: P1 = J(H.lift_x(0)); P1
|
|
716
|
+
(x, y)
|
|
717
|
+
sage: P2 = J2(H2.lift_x(0)); P2
|
|
718
|
+
(x, y)
|
|
719
|
+
sage: P1 == P2
|
|
720
|
+
False
|
|
721
|
+
"""
|
|
722
|
+
if self.scheme() != other.scheme():
|
|
723
|
+
return op == op_NE
|
|
724
|
+
# since divisors are internally represented as Mumford divisors,
|
|
725
|
+
# comparing polynomials is well-defined
|
|
726
|
+
return richcmp(self.__polys, other.__polys, op)
|
|
727
|
+
|
|
728
|
+
def __bool__(self):
|
|
729
|
+
r"""
|
|
730
|
+
Return ``True`` if this divisor is not the additive identity element.
|
|
731
|
+
|
|
732
|
+
EXAMPLES::
|
|
733
|
+
|
|
734
|
+
sage: x = GF(37)['x'].gen()
|
|
735
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x)
|
|
736
|
+
sage: J = H.jacobian()(GF(37))
|
|
737
|
+
|
|
738
|
+
::
|
|
739
|
+
|
|
740
|
+
sage: P1 = J(H.lift_x(2)); P1
|
|
741
|
+
(x + 35, y + 26)
|
|
742
|
+
sage: P1 == 0 # indirect doctest
|
|
743
|
+
False
|
|
744
|
+
sage: P1 - P1 == 0 # indirect doctest
|
|
745
|
+
True
|
|
746
|
+
"""
|
|
747
|
+
return self.__polys[0] != 1
|
|
748
|
+
|
|
749
|
+
def __neg__(self):
|
|
750
|
+
r"""
|
|
751
|
+
Return the additive inverse of this divisor.
|
|
752
|
+
|
|
753
|
+
EXAMPLES::
|
|
754
|
+
|
|
755
|
+
sage: x = GF(37)['x'].gen()
|
|
756
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x)
|
|
757
|
+
sage: J = H.jacobian()(GF(37))
|
|
758
|
+
sage: P1 = J(H.lift_x(2)); P1
|
|
759
|
+
(x + 35, y + 26)
|
|
760
|
+
sage: - P1 # indirect doctest
|
|
761
|
+
(x + 35, y + 11)
|
|
762
|
+
sage: P1 + (-P1) # indirect doctest
|
|
763
|
+
(1)
|
|
764
|
+
|
|
765
|
+
::
|
|
766
|
+
|
|
767
|
+
sage: H2 = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x, x)
|
|
768
|
+
sage: J2 = H2.jacobian()(GF(37))
|
|
769
|
+
sage: P2 = J2(H2.lift_x(2)); P2
|
|
770
|
+
(x + 35, y + 24)
|
|
771
|
+
sage: - P2 # indirect doctest
|
|
772
|
+
(x + 35, y + 15)
|
|
773
|
+
sage: P2 + (-P2) # indirect doctest
|
|
774
|
+
(1)
|
|
775
|
+
|
|
776
|
+
TESTS:
|
|
777
|
+
|
|
778
|
+
The following was fixed in :issue:`14264`::
|
|
779
|
+
|
|
780
|
+
sage: # needs sage.rings.number_field
|
|
781
|
+
sage: P.<x> = QQ[]
|
|
782
|
+
sage: f = x^5 - x + 1; h = x
|
|
783
|
+
sage: C = HyperellipticCurve(f, h, 'u,v')
|
|
784
|
+
sage: J = C.jacobian()
|
|
785
|
+
sage: K.<t> = NumberField(x^2 - 2)
|
|
786
|
+
sage: R.<x> = K[]
|
|
787
|
+
sage: Q = J(K)([x^2 - t, R(1)])
|
|
788
|
+
sage: Q
|
|
789
|
+
(u^2 - t, v - 1)
|
|
790
|
+
sage: -Q
|
|
791
|
+
(u^2 - t, v + u + 1)
|
|
792
|
+
sage: Q + (-Q) # indirect doctest
|
|
793
|
+
(1)
|
|
794
|
+
"""
|
|
795
|
+
if self.is_zero():
|
|
796
|
+
return self
|
|
797
|
+
polys = self.__polys
|
|
798
|
+
X = self.parent()
|
|
799
|
+
f, h = X.curve().hyperelliptic_polynomials()
|
|
800
|
+
if h.is_zero():
|
|
801
|
+
D = (polys[0],-polys[1])
|
|
802
|
+
else:
|
|
803
|
+
# It is essential that the modulus polys[0] can be converted into
|
|
804
|
+
# the parent of the dividend h. This is not always automatically
|
|
805
|
+
# the case (h can be a rational polynomial and polys[0] can a
|
|
806
|
+
# non-constant polynomial over a number field different from
|
|
807
|
+
# QQ). Hence, we force coercion into a common parent before
|
|
808
|
+
# computing the modulus. See trac #14249
|
|
809
|
+
D = (polys[0],-polys[1]-(h+polys[0]) % (polys[0]))
|
|
810
|
+
return JacobianMorphism_divisor_class_field(X, D, check=False)
|
|
811
|
+
|
|
812
|
+
def _add_(self, other):
|
|
813
|
+
r"""
|
|
814
|
+
Return a Mumford representative of the divisor ``self + other``.
|
|
815
|
+
|
|
816
|
+
EXAMPLES::
|
|
817
|
+
|
|
818
|
+
sage: x = GF(37)['x'].gen()
|
|
819
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x)
|
|
820
|
+
sage: J = H.jacobian()(GF(37))
|
|
821
|
+
|
|
822
|
+
::
|
|
823
|
+
|
|
824
|
+
sage: P1 = J(H.lift_x(2)); P1
|
|
825
|
+
(x + 35, y + 26)
|
|
826
|
+
sage: P1 + P1 # indirect doctest
|
|
827
|
+
(x^2 + 33*x + 4, y + 13*x)
|
|
828
|
+
"""
|
|
829
|
+
X = self.parent()
|
|
830
|
+
C = X.curve()
|
|
831
|
+
f, h = C.hyperelliptic_polynomials()
|
|
832
|
+
genus = C.genus()
|
|
833
|
+
if h == 0:
|
|
834
|
+
D = cantor_composition_simple(self.__polys, other.__polys, f, genus)
|
|
835
|
+
if D[0].degree() > genus:
|
|
836
|
+
D = cantor_reduction_simple(D[0], D[1], f, genus)
|
|
837
|
+
else:
|
|
838
|
+
D = cantor_composition(self.__polys, other.__polys, f, h, genus)
|
|
839
|
+
if D[0].degree() > genus:
|
|
840
|
+
D = cantor_reduction(D[0], D[1], f, h, genus)
|
|
841
|
+
return JacobianMorphism_divisor_class_field(X, D, check=False)
|
|
842
|
+
|
|
843
|
+
def _sub_(self, other):
|
|
844
|
+
r"""
|
|
845
|
+
Return a Mumford representative of the divisor ``self - other``.
|
|
846
|
+
|
|
847
|
+
EXAMPLES::
|
|
848
|
+
|
|
849
|
+
sage: x = GF(37)['x'].gen()
|
|
850
|
+
sage: H = HyperellipticCurve(x^5 + 12*x^4 + 13*x^3 + 15*x^2 + 33*x)
|
|
851
|
+
sage: J = H.jacobian()(GF(37))
|
|
852
|
+
|
|
853
|
+
::
|
|
854
|
+
|
|
855
|
+
sage: P1 = J(H.lift_x(2)); P1
|
|
856
|
+
(x + 35, y + 26)
|
|
857
|
+
sage: P1 - P1 # indirect doctest
|
|
858
|
+
(1)
|
|
859
|
+
|
|
860
|
+
::
|
|
861
|
+
|
|
862
|
+
sage: P2 = J(H.lift_x(4)); P2
|
|
863
|
+
(x + 33, y + 34)
|
|
864
|
+
|
|
865
|
+
Observe that the `x`-coordinates are the same but the
|
|
866
|
+
`y`-coordinates differ::
|
|
867
|
+
|
|
868
|
+
sage: P1 - P2 # indirect doctest
|
|
869
|
+
(x^2 + 31*x + 8, y + 7*x + 12)
|
|
870
|
+
sage: P1 + P2 # indirect doctest
|
|
871
|
+
(x^2 + 31*x + 8, y + 4*x + 18)
|
|
872
|
+
sage: (P1 - P2) - (P1 + P2) + 2*P2 # indirect doctest
|
|
873
|
+
(1)
|
|
874
|
+
"""
|
|
875
|
+
return self + (-other)
|