Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/schemes/elliptic_curves/jacobian.py
8820 views
1
"""
2
Construct Elliptic Curves as Jacobians
3
4
An elliptic curve is a genus one curve with a designated point. The
5
Jacobian of a genus-one curve can be defined as the set of line
6
bundles on the curve, and is isomorphic to the original genus-one
7
curve. It is also an elliptic curve with the trivial line bundle as
8
designated point. The utility of this construction is that we can
9
construct elliptic curves without having to specify which point we
10
take as the origin.
11
12
EXAMPLES::
13
14
sage: R.<u,v,w> = QQ[]
15
sage: Jacobian(u^3+v^3+w^3)
16
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
17
sage: Jacobian(u^4+v^4+w^2)
18
Elliptic Curve defined by y^2 = x^3 - 4*x over Rational Field
19
20
sage: C = Curve(u^3+v^3+w^3)
21
sage: Jacobian(C)
22
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
23
24
sage: P2.<u,v,w> = ProjectiveSpace(2, QQ)
25
sage: C = P2.subscheme(u^3+v^3+w^3)
26
sage: Jacobian(C)
27
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
28
29
One can also define Jacobians of varieties that are not genus-one
30
curves. These are not implemented in this module, but we call the
31
relevant functionality::
32
33
sage: R.<x> = PolynomialRing(QQ)
34
sage: f = x**5 + 1184*x**3 + 1846*x**2 + 956*x + 560
35
sage: C = HyperellipticCurve(f)
36
sage: Jacobian(C)
37
Jacobian of Hyperelliptic Curve over Rational Field defined
38
by y^2 = x^5 + 1184*x^3 + 1846*x^2 + 956*x + 560
39
40
REFERENCES:
41
42
.. [WpJacobianVariety]
43
http://en.wikipedia.org/wiki/Jacobian_variety
44
"""
45
46
##############################################################################
47
# Copyright (C) 2013 Volker Braun <[email protected]>
48
#
49
# Distributed under the terms of the GNU General Public License (GPL)
50
#
51
# The full text of the GPL is available at:
52
#
53
# http://www.gnu.org/licenses/
54
##############################################################################
55
56
from sage.rings.all import QQ
57
from sage.schemes.elliptic_curves.constructor import EllipticCurve
58
59
60
61
62
def Jacobian(X, **kwds):
63
"""
64
Return the Jacobian.
65
66
INPUT:
67
68
- ``X`` -- polynomial, algebraic variety, or anything else that
69
has a Jacobian elliptic curve.
70
71
- ``kwds`` -- optional keyword arguments.
72
73
The input ``X`` can be one of the following:
74
75
* A polynomial, see :func:`Jacobian_of_equation` for details.
76
77
* A curve, see :func:`Jacobian_of_curve` for details.
78
79
EXAMPLES::
80
81
sage: R.<u,v,w> = QQ[]
82
sage: Jacobian(u^3+v^3+w^3)
83
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
84
85
sage: C = Curve(u^3+v^3+w^3)
86
sage: Jacobian(C)
87
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
88
89
sage: P2.<u,v,w> = ProjectiveSpace(2, QQ)
90
sage: C = P2.subscheme(u^3+v^3+w^3)
91
sage: Jacobian(C)
92
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
93
94
sage: Jacobian(C, morphism=True)
95
Scheme morphism:
96
From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
97
u^3 + v^3 + w^3
98
To: Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
99
Defn: Defined on coordinates by sending (u : v : w) to
100
(u*v^7*w + u*v^4*w^4 + u*v*w^7 :
101
v^9 + 3/2*v^6*w^3 - 3/2*v^3*w^6 - w^9 :
102
-v^6*w^3 - v^3*w^6)
103
"""
104
try:
105
return X.jacobian(**kwds)
106
except AttributeError:
107
pass
108
109
morphism = kwds.pop('morphism', False)
110
from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial
111
if is_MPolynomial(X):
112
if morphism:
113
from sage.schemes.plane_curves.constructor import Curve
114
return Jacobian_of_equation(X, curve=Curve(X), **kwds)
115
else:
116
return Jacobian_of_equation(X, **kwds)
117
118
from sage.schemes.all import is_Scheme
119
if is_Scheme(X) and X.dimension() == 1:
120
return Jacobian_of_curve(X, morphism=morphism, **kwds)
121
122
123
def Jacobian_of_curve(curve, morphism=False):
124
"""
125
Return the Jacobian of a genus-one curve
126
127
INPUT:
128
129
- ``curve`` -- a one-dimensional algebraic variety of genus one.
130
131
OUTPUT:
132
133
Its Jacobian elliptic curve.
134
135
EXAMPLES::
136
137
sage: R.<u,v,w> = QQ[]
138
sage: C = Curve(u^3+v^3+w^3)
139
sage: Jacobian(C)
140
Elliptic Curve defined by y^2 = x^3 - 27/4 over Rational Field
141
"""
142
eqn = None
143
try:
144
eqn = curve.defining_polynomial()
145
except AttributeError:
146
pass
147
if len(curve.defining_polynomials()) == 1:
148
eqn = curve.defining_polynomials()[0]
149
if eqn is not None:
150
if morphism:
151
return Jacobian_of_equation(eqn, curve=curve)
152
else:
153
return Jacobian_of_equation(eqn)
154
raise NotImplementedError('Jacobian for this curve is not implemented')
155
156
157
def Jacobian_of_equation(polynomial, variables=None, curve=None):
158
r"""
159
Construct the Jacobian of a genus-one curve given by a polynomial.
160
161
INPUT:
162
163
- ``F`` -- a polynomial defining a plane curve of genus one. May
164
be homogeneous or inhomogeneous.
165
166
- ``variables`` -- list of two or three variables or ``None``
167
(default). The inhomogeneous or homogeneous coordinates. By
168
default, all variables in the polynomial are used.
169
170
- ``curve`` -- the genus-one curve defined by ``polynomial`` or #
171
``None`` (default). If specified, suitable morphism from the
172
jacobian elliptic curve to the curve is returned.
173
174
OUTPUT:
175
176
An elliptic curve in short Weierstrass form isomorphic to the
177
curve ``polynomial=0``. If the optional argument ``curve`` is
178
specified, a rational multicover from the Jacobian elliptic curve
179
to the genus-one curve is returned.
180
181
EXAMPLES::
182
183
sage: R.<a,b,c> = QQ[]
184
sage: f = a^3+b^3+60*c^3
185
sage: Jacobian(f)
186
Elliptic Curve defined by y^2 = x^3 - 24300 over Rational Field
187
sage: Jacobian(f.subs(c=1))
188
Elliptic Curve defined by y^2 = x^3 - 24300 over Rational Field
189
190
If we specify the domain curve the birational covering is returned::
191
192
sage: h = Jacobian(f, curve=Curve(f)); h
193
Scheme morphism:
194
From: Projective Curve over Rational Field defined by a^3 + b^3 + 60*c^3
195
To: Elliptic Curve defined by y^2 = x^3 - 24300 over Rational Field
196
Defn: Defined on coordinates by sending (a : b : c) to
197
(216000*a*b^7*c + 12960000*a*b^4*c^4 + 777600000*a*b*c^7 :
198
216000*b^9 + 19440000*b^6*c^3 - 1166400000*b^3*c^6 - 46656000000*c^9 :
199
-216000*b^6*c^3 - 12960000*b^3*c^6)
200
sage: h([1,-1,0])
201
(0 : 1 : 0)
202
203
Plugging in the polynomials defining `h` allows us to verify that
204
it is indeed a rational morphism to the elliptic curve::
205
206
sage: E = h.codomain()
207
sage: E.defining_polynomial()(h.defining_polynomials()).factor()
208
(-10077696000000000) * c^3 * b^3 * (a^3 + b^3 + 60*c^3) * (b^6 + 60*b^3*c^3 + 3600*c^6)^3
209
210
By specifying the variables, we can also construct an elliptic
211
curve over a polynomial ring::
212
213
sage: R.<u,v,t> = QQ[]
214
sage: Jacobian(u^3+v^3+t, variables=[u,v])
215
Elliptic Curve defined by y^2 = x^3 + (-27/4*t^2) over
216
Multivariate Polynomial Ring in u, v, t over Rational Field
217
218
TESTS::
219
220
sage: from sage.schemes.elliptic_curves.jacobian import Jacobian_of_equation
221
sage: Jacobian_of_equation(f, variables=[a,b,c])
222
Elliptic Curve defined by y^2 = x^3 - 24300 over Rational Field
223
"""
224
from sage.schemes.toric.weierstrass import WeierstrassForm
225
f, g = WeierstrassForm(polynomial, variables=variables)
226
try:
227
K = polynomial.base_ring()
228
f = K(f)
229
g = K(g)
230
except (TypeError, ValueError):
231
pass
232
E = EllipticCurve([f, g])
233
if curve is None:
234
return E
235
X, Y, Z = WeierstrassForm(polynomial, variables=variables, transformation=True)
236
from sage.schemes.elliptic_curves.weierstrass_transform import WeierstrassTransformation
237
return WeierstrassTransformation(curve, E, [X*Z, Y, Z**3], 1)
238
239
240