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,542 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.singular
|
|
3
|
+
"""
|
|
4
|
+
Base class of curves
|
|
5
|
+
|
|
6
|
+
This module defines the base class of curves in Sage.
|
|
7
|
+
|
|
8
|
+
Curves in Sage are reduced subschemes of dimension 1 of an ambient space. The ambient space
|
|
9
|
+
is either an affine space or a projective space.
|
|
10
|
+
|
|
11
|
+
EXAMPLES::
|
|
12
|
+
|
|
13
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
14
|
+
sage: C = Curve([x - y, z - 2])
|
|
15
|
+
sage: C
|
|
16
|
+
Affine Curve over Rational Field defined by x - y, z - 2
|
|
17
|
+
sage: C.dimension()
|
|
18
|
+
1
|
|
19
|
+
|
|
20
|
+
AUTHORS:
|
|
21
|
+
|
|
22
|
+
- William Stein (2005)
|
|
23
|
+
"""
|
|
24
|
+
# ****************************************************************************
|
|
25
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
26
|
+
#
|
|
27
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
28
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
29
|
+
# the License, or (at your option) any later version.
|
|
30
|
+
# https://www.gnu.org/licenses/
|
|
31
|
+
# ****************************************************************************
|
|
32
|
+
|
|
33
|
+
from sage.misc.latex import latex
|
|
34
|
+
|
|
35
|
+
from sage.categories.finite_fields import FiniteFields
|
|
36
|
+
from sage.categories.fields import Fields
|
|
37
|
+
|
|
38
|
+
from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme
|
|
39
|
+
from sage.schemes.generic.divisor_group import DivisorGroup
|
|
40
|
+
from sage.schemes.generic.divisor import Divisor_curve
|
|
41
|
+
|
|
42
|
+
from sage.rings.integer import Integer
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class Curve_generic(AlgebraicScheme_subscheme):
|
|
46
|
+
r"""
|
|
47
|
+
Generic curve class.
|
|
48
|
+
|
|
49
|
+
EXAMPLES::
|
|
50
|
+
|
|
51
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
52
|
+
sage: C = Curve([x - y, z - 2])
|
|
53
|
+
sage: loads(C.dumps()) == C
|
|
54
|
+
True
|
|
55
|
+
"""
|
|
56
|
+
def _repr_(self):
|
|
57
|
+
"""
|
|
58
|
+
Return a string representation of this curve.
|
|
59
|
+
|
|
60
|
+
EXAMPLES::
|
|
61
|
+
|
|
62
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
63
|
+
sage: C = Curve([x - y, z - 2])
|
|
64
|
+
sage: C
|
|
65
|
+
Affine Curve over Rational Field defined by x - y, z - 2
|
|
66
|
+
|
|
67
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
68
|
+
sage: C = Curve(x - y)
|
|
69
|
+
sage: C
|
|
70
|
+
Projective Plane Curve over Rational Field defined by x - y
|
|
71
|
+
"""
|
|
72
|
+
if self.defining_ideal().is_zero() and self.ambient_space().dimension() == 1:
|
|
73
|
+
return "{} Line over {}".format(self._repr_type(), self.base_ring())
|
|
74
|
+
polys = ', '.join(str(x) for x in self.defining_polynomials())
|
|
75
|
+
return "{} Curve over {} defined by {}".format(self._repr_type(),
|
|
76
|
+
self.base_ring(), polys)
|
|
77
|
+
|
|
78
|
+
def _repr_type(self) -> str:
|
|
79
|
+
r"""
|
|
80
|
+
Return a string representation of the type of this curve.
|
|
81
|
+
|
|
82
|
+
EXAMPLES::
|
|
83
|
+
|
|
84
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
85
|
+
sage: C = Curve([w^3 - z^3, w*x - x^2])
|
|
86
|
+
sage: from sage.schemes.curves.curve import Curve_generic
|
|
87
|
+
sage: Curve_generic._repr_type(C)
|
|
88
|
+
'Generic'
|
|
89
|
+
"""
|
|
90
|
+
return "Generic"
|
|
91
|
+
|
|
92
|
+
def _latex_(self):
|
|
93
|
+
r"""
|
|
94
|
+
Return a latex representation of this curve.
|
|
95
|
+
|
|
96
|
+
EXAMPLES::
|
|
97
|
+
|
|
98
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
99
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
100
|
+
sage: latex(C)
|
|
101
|
+
\text{Projective Plane curve over $\Bold{Q}$
|
|
102
|
+
defined by $-x^{3} + y^{2} z - 17 x z^{2} + y z^{2}$}
|
|
103
|
+
|
|
104
|
+
sage: A2 = AffineSpace(2, QQ, names=['x','y'])
|
|
105
|
+
sage: x, y = A2.coordinate_ring().gens()
|
|
106
|
+
sage: C = Curve(y^2 - x^3 - 17*x + y)
|
|
107
|
+
sage: latex(C)
|
|
108
|
+
\text{Affine Plane curve over $\Bold{Q}$
|
|
109
|
+
defined by $-x^{3} + y^{2} - 17 x + y$}
|
|
110
|
+
"""
|
|
111
|
+
if (self.defining_ideal().is_zero()
|
|
112
|
+
and self.ambient_space().dimension() == 1):
|
|
113
|
+
ambient_type, ring = self._repr_type(), latex(self.base_ring())
|
|
114
|
+
return fr"\text{{{ambient_type} line over ${ring}$}}"
|
|
115
|
+
else:
|
|
116
|
+
ambient_type, ring = self._repr_type(), latex(self.base_ring())
|
|
117
|
+
polys = ', '.join(f'${latex(p)}$' for p in self.defining_polynomials())
|
|
118
|
+
return fr"\text{{{ambient_type} curve over ${ring}$ defined by {polys}}}"
|
|
119
|
+
|
|
120
|
+
def dimension(self):
|
|
121
|
+
r"""
|
|
122
|
+
Return the dimension of the curve.
|
|
123
|
+
|
|
124
|
+
Curves have dimension one by definition.
|
|
125
|
+
|
|
126
|
+
EXAMPLES::
|
|
127
|
+
|
|
128
|
+
sage: x = polygen(QQ)
|
|
129
|
+
sage: C = HyperellipticCurve(x^7 + x^4 + x)
|
|
130
|
+
sage: C.dimension()
|
|
131
|
+
1
|
|
132
|
+
sage: from sage.schemes.projective.projective_subscheme import AlgebraicScheme_subscheme_projective
|
|
133
|
+
sage: AlgebraicScheme_subscheme_projective.dimension(C)
|
|
134
|
+
1
|
|
135
|
+
"""
|
|
136
|
+
return Integer(1)
|
|
137
|
+
|
|
138
|
+
def defining_polynomial(self):
|
|
139
|
+
"""
|
|
140
|
+
Return the defining polynomial of the curve.
|
|
141
|
+
|
|
142
|
+
EXAMPLES::
|
|
143
|
+
|
|
144
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
145
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
146
|
+
sage: C.defining_polynomial()
|
|
147
|
+
-x^3 + y^2*z - 17*x*z^2 + y*z^2
|
|
148
|
+
"""
|
|
149
|
+
return self.defining_polynomials()[0]
|
|
150
|
+
|
|
151
|
+
def divisor_group(self, base_ring=None):
|
|
152
|
+
r"""
|
|
153
|
+
Return the divisor group of the curve.
|
|
154
|
+
|
|
155
|
+
INPUT:
|
|
156
|
+
|
|
157
|
+
- ``base_ring`` -- the base ring of the divisor group; usually, this is
|
|
158
|
+
`\ZZ` (default) or `\QQ`
|
|
159
|
+
|
|
160
|
+
OUTPUT: the divisor group of the curve
|
|
161
|
+
|
|
162
|
+
EXAMPLES::
|
|
163
|
+
|
|
164
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
165
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
166
|
+
sage: Cp = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
167
|
+
sage: C.divisor_group() is Cp.divisor_group()
|
|
168
|
+
True
|
|
169
|
+
"""
|
|
170
|
+
return DivisorGroup(self, base_ring)
|
|
171
|
+
|
|
172
|
+
def divisor(self, v, base_ring=None, check=True, reduce=True):
|
|
173
|
+
r"""
|
|
174
|
+
Return the divisor specified by ``v``.
|
|
175
|
+
|
|
176
|
+
.. WARNING::
|
|
177
|
+
|
|
178
|
+
The coefficients of the divisor must be in the base ring
|
|
179
|
+
and the terms must be reduced. If you set ``check=False``
|
|
180
|
+
and/or ``reduce=False`` it is your responsibility to pass
|
|
181
|
+
a valid object ``v``.
|
|
182
|
+
|
|
183
|
+
EXAMPLES::
|
|
184
|
+
|
|
185
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
186
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
187
|
+
sage: p1 = C(0, -1, 1)
|
|
188
|
+
sage: p2 = C(0, 0, 1)
|
|
189
|
+
sage: p3 = C(0, 1, 0)
|
|
190
|
+
sage: C.divisor([(1, p1), (-1, p2), (2, p3)])
|
|
191
|
+
(x, y + z) - (x, y) + 2*(x, z)
|
|
192
|
+
"""
|
|
193
|
+
return Divisor_curve(v, check=check, reduce=reduce, parent=self.divisor_group(base_ring))
|
|
194
|
+
|
|
195
|
+
def genus(self):
|
|
196
|
+
"""
|
|
197
|
+
Return the geometric genus of the curve.
|
|
198
|
+
|
|
199
|
+
EXAMPLES::
|
|
200
|
+
|
|
201
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
202
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
203
|
+
sage: C.genus()
|
|
204
|
+
1
|
|
205
|
+
"""
|
|
206
|
+
return self.geometric_genus()
|
|
207
|
+
|
|
208
|
+
def geometric_genus(self):
|
|
209
|
+
r"""
|
|
210
|
+
Return the geometric genus of the curve.
|
|
211
|
+
|
|
212
|
+
EXAMPLES:
|
|
213
|
+
|
|
214
|
+
Examples of projective curves::
|
|
215
|
+
|
|
216
|
+
sage: P2 = ProjectiveSpace(2, GF(5), names=['x','y','z'])
|
|
217
|
+
sage: x, y, z = P2.coordinate_ring().gens()
|
|
218
|
+
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
|
|
219
|
+
sage: C.geometric_genus()
|
|
220
|
+
1
|
|
221
|
+
sage: C = Curve(y^2*z - x^3)
|
|
222
|
+
sage: C.geometric_genus()
|
|
223
|
+
0
|
|
224
|
+
sage: C = Curve(x^10 + y^7*z^3 + z^10)
|
|
225
|
+
sage: C.geometric_genus()
|
|
226
|
+
3
|
|
227
|
+
|
|
228
|
+
Examples of affine curves::
|
|
229
|
+
|
|
230
|
+
sage: x, y = PolynomialRing(GF(5), 2, 'xy').gens()
|
|
231
|
+
sage: C = Curve(y^2 - x^3 - 17*x + y)
|
|
232
|
+
sage: C.geometric_genus()
|
|
233
|
+
1
|
|
234
|
+
sage: C = Curve(y^2 - x^3)
|
|
235
|
+
sage: C.geometric_genus()
|
|
236
|
+
0
|
|
237
|
+
sage: C = Curve(x^10 + y^7 + 1)
|
|
238
|
+
sage: C.geometric_genus()
|
|
239
|
+
3
|
|
240
|
+
|
|
241
|
+
.. WARNING::
|
|
242
|
+
|
|
243
|
+
Geometric genus is only defined for `geometrically irreducible curve
|
|
244
|
+
<https://stacks.math.columbia.edu/tag/0BYE>`_. This method does not
|
|
245
|
+
check the condition. You may get a nonsensical result if the curve is
|
|
246
|
+
not geometrically irreducible::
|
|
247
|
+
|
|
248
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
249
|
+
sage: C = Curve(x^2 + y^2, P2)
|
|
250
|
+
sage: C.geometric_genus() # nonsense!
|
|
251
|
+
-1
|
|
252
|
+
"""
|
|
253
|
+
try:
|
|
254
|
+
return self._genus
|
|
255
|
+
except AttributeError:
|
|
256
|
+
raise NotImplementedError
|
|
257
|
+
|
|
258
|
+
def union(self, other):
|
|
259
|
+
"""
|
|
260
|
+
Return the union of ``self`` and ``other``.
|
|
261
|
+
|
|
262
|
+
EXAMPLES::
|
|
263
|
+
|
|
264
|
+
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
|
|
265
|
+
sage: C1 = Curve(z - x)
|
|
266
|
+
sage: C2 = Curve(y - x)
|
|
267
|
+
sage: C1.union(C2).defining_polynomial()
|
|
268
|
+
x^2 - x*y - x*z + y*z
|
|
269
|
+
"""
|
|
270
|
+
from .constructor import Curve
|
|
271
|
+
return Curve(AlgebraicScheme_subscheme.union(self, other))
|
|
272
|
+
|
|
273
|
+
__add__ = union
|
|
274
|
+
|
|
275
|
+
def singular_subscheme(self):
|
|
276
|
+
r"""
|
|
277
|
+
Return the subscheme of singular points of this curve.
|
|
278
|
+
|
|
279
|
+
OUTPUT: a subscheme in the ambient space of this curve
|
|
280
|
+
|
|
281
|
+
EXAMPLES::
|
|
282
|
+
|
|
283
|
+
sage: A.<x,y> = AffineSpace(CC, 2)
|
|
284
|
+
sage: C = Curve([y^4 - 2*x^5 - x^2*y], A)
|
|
285
|
+
sage: C.singular_subscheme()
|
|
286
|
+
Closed subscheme of Affine Space of dimension 2 over Complex Field
|
|
287
|
+
with 53 bits of precision defined by:
|
|
288
|
+
(-2.00000000000000)*x^5 + y^4 - x^2*y,
|
|
289
|
+
(-10.0000000000000)*x^4 + (-2.00000000000000)*x*y,
|
|
290
|
+
4.00000000000000*y^3 - x^2
|
|
291
|
+
|
|
292
|
+
::
|
|
293
|
+
|
|
294
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
295
|
+
sage: C = Curve([y^8 - x^2*z*w^5, w^2 - 2*y^2 - x*z], P)
|
|
296
|
+
sage: C.singular_subscheme()
|
|
297
|
+
Closed subscheme of Projective Space of dimension 3
|
|
298
|
+
over Rational Field defined by:
|
|
299
|
+
y^8 - x^2*z*w^5,
|
|
300
|
+
-2*y^2 - x*z + w^2,
|
|
301
|
+
-x^3*y*z^4 + 3*x^2*y*z^3*w^2 - 3*x*y*z^2*w^4 + 8*x*y*z*w^5 + y*z*w^6,
|
|
302
|
+
x^2*z*w^5,
|
|
303
|
+
-5*x^2*z^2*w^4 - 4*x*z*w^6,
|
|
304
|
+
x^4*y*z^3 - 3*x^3*y*z^2*w^2 + 3*x^2*y*z*w^4 - 4*x^2*y*w^5 - x*y*w^6,
|
|
305
|
+
-2*x^3*y*z^3*w + 6*x^2*y*z^2*w^3 - 20*x^2*y*z*w^4
|
|
306
|
+
- 6*x*y*z*w^5 + 2*y*w^7,
|
|
307
|
+
-5*x^3*z*w^4 - 2*x^2*w^6
|
|
308
|
+
"""
|
|
309
|
+
return self.ambient_space().subscheme(self.Jacobian())
|
|
310
|
+
|
|
311
|
+
def singular_points(self, F=None):
|
|
312
|
+
r"""
|
|
313
|
+
Return the set of singular points of this curve.
|
|
314
|
+
|
|
315
|
+
INPUT:
|
|
316
|
+
|
|
317
|
+
- ``F`` -- (default: ``None``) field over which to find the singular
|
|
318
|
+
points; if not given, the base ring of this curve is used
|
|
319
|
+
|
|
320
|
+
OUTPUT: list of points in the ambient space of this curve
|
|
321
|
+
|
|
322
|
+
EXAMPLES::
|
|
323
|
+
|
|
324
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
325
|
+
sage: C = Curve([y^2 - x^5, x - z], A)
|
|
326
|
+
sage: C.singular_points()
|
|
327
|
+
[(0, 0, 0)]
|
|
328
|
+
|
|
329
|
+
::
|
|
330
|
+
|
|
331
|
+
sage: # needs sage.rings.number_field
|
|
332
|
+
sage: R.<a> = QQ[]
|
|
333
|
+
sage: K.<b> = NumberField(a^8 - a^4 + 1)
|
|
334
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
335
|
+
sage: C = Curve([359/12*x*y^2*z^2 + 2*y*z^4 + 187/12*y^3*z^2 + x*z^4
|
|
336
|
+
....: + 67/3*x^2*y*z^2 + 117/4*y^5 + 9*x^5 + 6*x^3*z^2
|
|
337
|
+
....: + 393/4*x*y^4 + 145*x^2*y^3 + 115*x^3*y^2 + 49*x^4*y], P)
|
|
338
|
+
sage: sorted(C.singular_points(K), key=str)
|
|
339
|
+
[(-1/2*b^5 - 1/2*b^3 + 1/2*b - 1 : 1 : 0),
|
|
340
|
+
(-2/3*b^4 + 1/3 : 0 : 1),
|
|
341
|
+
(-b^6 : b^6 : 1),
|
|
342
|
+
(1/2*b^5 + 1/2*b^3 - 1/2*b - 1 : 1 : 0),
|
|
343
|
+
(2/3*b^4 - 1/3 : 0 : 1),
|
|
344
|
+
(b^6 : -b^6 : 1)]
|
|
345
|
+
"""
|
|
346
|
+
if F is None:
|
|
347
|
+
if self.base_ring() not in Fields():
|
|
348
|
+
raise TypeError("curve must be defined over a field")
|
|
349
|
+
F = self.base_ring()
|
|
350
|
+
elif F not in Fields():
|
|
351
|
+
raise TypeError("(=%s) must be a field" % F)
|
|
352
|
+
X = self.singular_subscheme()
|
|
353
|
+
return [self.point(p, check=False) for p in X.rational_points(F=F)]
|
|
354
|
+
|
|
355
|
+
def is_singular(self, P=None):
|
|
356
|
+
r"""
|
|
357
|
+
Return whether ``P`` is a singular point of this curve, or if no point
|
|
358
|
+
is passed, whether this curve is singular or not.
|
|
359
|
+
|
|
360
|
+
This just uses the is_smooth function for algebraic subschemes.
|
|
361
|
+
|
|
362
|
+
INPUT:
|
|
363
|
+
|
|
364
|
+
- ``P`` -- (default: ``None``) a point on this curve
|
|
365
|
+
|
|
366
|
+
OUTPUT:
|
|
367
|
+
|
|
368
|
+
boolean; if a point ``P`` is provided, and if ``P`` lies on this
|
|
369
|
+
curve, returns ``True`` if ``P`` is a singular point of this curve, and
|
|
370
|
+
``False`` otherwise. If no point is provided, returns ``True`` or False
|
|
371
|
+
depending on whether this curve is or is not singular, respectively.
|
|
372
|
+
|
|
373
|
+
EXAMPLES::
|
|
374
|
+
|
|
375
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
376
|
+
sage: C = P.curve([y^2 - x^2 - z^2, z - w])
|
|
377
|
+
sage: C.is_singular()
|
|
378
|
+
False
|
|
379
|
+
|
|
380
|
+
::
|
|
381
|
+
|
|
382
|
+
sage: A.<x,y,z> = AffineSpace(GF(11), 3)
|
|
383
|
+
sage: C = A.curve([y^3 - z^5, x^5 - y + 1])
|
|
384
|
+
sage: Q = A([7,0,0])
|
|
385
|
+
sage: C.is_singular(Q)
|
|
386
|
+
True
|
|
387
|
+
"""
|
|
388
|
+
return not self.is_smooth(P)
|
|
389
|
+
|
|
390
|
+
def intersects_at(self, C, P):
|
|
391
|
+
r"""
|
|
392
|
+
Return whether the point ``P`` is or is not in the intersection of this
|
|
393
|
+
curve with the curve ``C``.
|
|
394
|
+
|
|
395
|
+
INPUT:
|
|
396
|
+
|
|
397
|
+
- ``C`` -- a curve in the same ambient space as this curve
|
|
398
|
+
|
|
399
|
+
- ``P`` -- a point in the ambient space of this curve
|
|
400
|
+
|
|
401
|
+
EXAMPLES::
|
|
402
|
+
|
|
403
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
404
|
+
sage: C = Curve([x^2 - z^2, y^3 - w*x^2], P)
|
|
405
|
+
sage: D = Curve([w^2 - 2*x*y + z^2, y^2 - w^2], P)
|
|
406
|
+
sage: Q1 = P([1,1,-1,1])
|
|
407
|
+
sage: C.intersects_at(D, Q1)
|
|
408
|
+
True
|
|
409
|
+
sage: Q2 = P([0,0,1,-1])
|
|
410
|
+
sage: C.intersects_at(D, Q2)
|
|
411
|
+
False
|
|
412
|
+
|
|
413
|
+
::
|
|
414
|
+
|
|
415
|
+
sage: A.<x,y> = AffineSpace(GF(13), 2)
|
|
416
|
+
sage: C = Curve([y + 12*x^5 + 3*x^3 + 7], A)
|
|
417
|
+
sage: D = Curve([y^2 + 7*x^2 + 8], A)
|
|
418
|
+
sage: Q1 = A([9,6])
|
|
419
|
+
sage: C.intersects_at(D, Q1)
|
|
420
|
+
True
|
|
421
|
+
sage: Q2 = A([3,7])
|
|
422
|
+
sage: C.intersects_at(D, Q2)
|
|
423
|
+
False
|
|
424
|
+
"""
|
|
425
|
+
if C.ambient_space() != self.ambient_space():
|
|
426
|
+
raise TypeError("(=%s) must be a curve in the same ambient space as (=%s)" % (C, self))
|
|
427
|
+
if not isinstance(C, Curve_generic):
|
|
428
|
+
raise TypeError("(=%s) must be a curve" % C)
|
|
429
|
+
try:
|
|
430
|
+
P = self.ambient_space()(P)
|
|
431
|
+
except TypeError:
|
|
432
|
+
raise TypeError("(=%s) must be a point in the ambient space of this curve" % P)
|
|
433
|
+
try:
|
|
434
|
+
P = self(P)
|
|
435
|
+
P = C(P)
|
|
436
|
+
except TypeError:
|
|
437
|
+
return False
|
|
438
|
+
return True
|
|
439
|
+
|
|
440
|
+
def intersection_points(self, C, F=None):
|
|
441
|
+
r"""
|
|
442
|
+
Return the points in the intersection of this curve and the curve ``C``.
|
|
443
|
+
|
|
444
|
+
If the intersection of these two curves has dimension greater than
|
|
445
|
+
zero, and if the base ring of this curve is not a finite field, then an
|
|
446
|
+
error is returned.
|
|
447
|
+
|
|
448
|
+
INPUT:
|
|
449
|
+
|
|
450
|
+
- ``C`` -- a curve in the same ambient space as this curve
|
|
451
|
+
|
|
452
|
+
- ``F`` -- (default: ``None``) field over which to compute the
|
|
453
|
+
intersection points; if not specified, the base ring of this curve is
|
|
454
|
+
used
|
|
455
|
+
|
|
456
|
+
OUTPUT: list of points in the ambient space of this curve
|
|
457
|
+
|
|
458
|
+
EXAMPLES::
|
|
459
|
+
|
|
460
|
+
sage: # needs sage.rings.number_field
|
|
461
|
+
sage: R.<a> = QQ[]
|
|
462
|
+
sage: K.<b> = NumberField(a^2 + a + 1)
|
|
463
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
464
|
+
sage: C = Curve([y^2 - w*z, w^3 - y^3], P)
|
|
465
|
+
sage: D = Curve([x*y - w*z, z^3 - y^3], P)
|
|
466
|
+
sage: C.intersection_points(D, F=K)
|
|
467
|
+
[(-b - 1 : -b - 1 : b : 1), (b : b : -b - 1 : 1),
|
|
468
|
+
(1 : 0 : 0 : 0), (1 : 1 : 1 : 1)]
|
|
469
|
+
|
|
470
|
+
::
|
|
471
|
+
|
|
472
|
+
sage: A.<x,y> = AffineSpace(GF(7), 2)
|
|
473
|
+
sage: C = Curve([y^3 - x^3], A)
|
|
474
|
+
sage: D = Curve([-x*y^3 + y^4 - 2*x^3 + 2*x^2*y], A)
|
|
475
|
+
sage: C.intersection_points(D)
|
|
476
|
+
[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 3), (5, 5), (5, 6), (6, 6)]
|
|
477
|
+
|
|
478
|
+
::
|
|
479
|
+
|
|
480
|
+
sage: A.<x,y> = AffineSpace(QQ, 2)
|
|
481
|
+
sage: C = Curve([y^3 - x^3], A)
|
|
482
|
+
sage: D = Curve([-x*y^3 + y^4 - 2*x^3 + 2*x^2*y], A)
|
|
483
|
+
sage: C.intersection_points(D)
|
|
484
|
+
Traceback (most recent call last):
|
|
485
|
+
...
|
|
486
|
+
NotImplementedError: the intersection must have dimension zero or
|
|
487
|
+
(=Rational Field) must be a finite field
|
|
488
|
+
"""
|
|
489
|
+
if C.ambient_space() != self.ambient_space():
|
|
490
|
+
raise TypeError("(=%s) must be a curve in the same ambient space as (=%s)" % (C, self))
|
|
491
|
+
if not isinstance(C, Curve_generic):
|
|
492
|
+
raise TypeError("(=%s) must be a curve" % C)
|
|
493
|
+
X = self.intersection(C)
|
|
494
|
+
if F is None:
|
|
495
|
+
F = self.base_ring()
|
|
496
|
+
if X.dimension() == 0 or F in FiniteFields():
|
|
497
|
+
return X.rational_points(F=F)
|
|
498
|
+
else:
|
|
499
|
+
raise NotImplementedError("the intersection must have dimension "
|
|
500
|
+
"zero or (={}) must be a finite field".format(F))
|
|
501
|
+
|
|
502
|
+
def change_ring(self, R):
|
|
503
|
+
r"""
|
|
504
|
+
Return a new curve which is this curve coerced to ``R``.
|
|
505
|
+
|
|
506
|
+
INPUT:
|
|
507
|
+
|
|
508
|
+
- ``R`` -- ring or embedding
|
|
509
|
+
|
|
510
|
+
OUTPUT: a new curve which is this curve coerced to ``R``
|
|
511
|
+
|
|
512
|
+
EXAMPLES::
|
|
513
|
+
|
|
514
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
515
|
+
sage: C = Curve([x^2 - y^2, z*y - 4/5*w^2], P)
|
|
516
|
+
sage: C.change_ring(QuadraticField(-1)) # needs sage.rings.number_field
|
|
517
|
+
Projective Curve over Number Field in a with defining polynomial x^2 + 1
|
|
518
|
+
with a = 1*I defined by x^2 - y^2, y*z - 4/5*w^2
|
|
519
|
+
|
|
520
|
+
::
|
|
521
|
+
|
|
522
|
+
sage: # needs sage.rings.number_field
|
|
523
|
+
sage: R.<a> = QQ[]
|
|
524
|
+
sage: K.<b> = NumberField(a^3 + a^2 - 1)
|
|
525
|
+
sage: A.<x,y> = AffineSpace(K, 2)
|
|
526
|
+
sage: C = Curve([K.0*x^2 - x + y^3 - 11], A)
|
|
527
|
+
sage: L = K.embeddings(QQbar)
|
|
528
|
+
sage: set_verbose(-1) # suppress warnings for slow computation
|
|
529
|
+
sage: C.change_ring(L[0])
|
|
530
|
+
Affine Plane Curve over Algebraic Field defined
|
|
531
|
+
by y^3 + (-0.8774388331233464? - 0.744861766619745?*I)*x^2 - x - 11
|
|
532
|
+
|
|
533
|
+
::
|
|
534
|
+
|
|
535
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
536
|
+
sage: C = P.curve([y*x - 18*x^2 + 17*z^2])
|
|
537
|
+
sage: C.change_ring(GF(17))
|
|
538
|
+
Projective Plane Curve over Finite Field of size 17 defined by -x^2 + x*y
|
|
539
|
+
"""
|
|
540
|
+
new_AS = self.ambient_space().change_ring(R)
|
|
541
|
+
I = [f.change_ring(R) for f in self.defining_polynomials()]
|
|
542
|
+
return new_AS.curve(I)
|