1
1
"""
2
2
Hyperelliptic curves over a `p`-adic field
3
3
"""
4
- #* ****************************************************************************
4
+ # ****************************************************************************
5
5
# Copyright (C) 2007 Robert Bradshaw <[email protected] >
6
6
#
7
7
# This program is free software: you can redistribute it and/or modify
8
8
# it under the terms of the GNU General Public License as published by
9
9
# the Free Software Foundation, either version 2 of the License, or
10
10
# (at your option) any later version.
11
- # http ://www.gnu.org/licenses/
12
- #* ****************************************************************************
11
+ # https ://www.gnu.org/licenses/
12
+ # ****************************************************************************
13
13
14
14
15
15
from sage .rings .all import (PowerSeriesRing , PolynomialRing , ZZ , QQ ,
27
27
class HyperellipticCurve_padic_field (hyperelliptic_generic .HyperellipticCurve_generic ,
28
28
ProjectivePlaneCurve_field ):
29
29
30
- # The functions below were prototyped at the 2007 Arizona Winter School by
31
- # Robert Bradshaw and Ralf Gerkmann, working with Miljan Brakovevic and
32
- # Kiran Kedlaya
33
- # All of the below is with respect to the Monsky Washnitzer cohomology.
30
+ # The functions below were prototyped at the 2007 Arizona Winter School by
31
+ # Robert Bradshaw and Ralf Gerkmann, working with Miljan Brakovevic and
32
+ # Kiran Kedlaya
33
+ # All of the below is with respect to the Monsky Washnitzer cohomology.
34
34
35
35
def local_analytic_interpolation (self , P , Q ):
36
36
"""
@@ -158,7 +158,7 @@ def weierstrass_points(self):
158
158
raise NotImplementedError ()
159
159
return [self ((0 ,1 ,0 ))] + [self ((x , 0 , 1 )) for x in f .roots (multiplicities = False )]
160
160
161
- def is_in_weierstrass_disc (self ,P ):
161
+ def is_in_weierstrass_disc (self , P ):
162
162
"""
163
163
Checks if `P` is in a Weierstrass disc
164
164
@@ -186,12 +186,9 @@ def is_in_weierstrass_disc(self,P):
186
186
187
187
- Jennifer Balakrishnan (2010-02)
188
188
"""
189
- if (P [1 ].valuation () == 0 and P != self (0 ,1 ,0 )):
190
- return False
191
- else :
192
- return True
189
+ return not (P [1 ].valuation () == 0 and P != self (0 , 1 , 0 ))
193
190
194
- def is_weierstrass (self ,P ):
191
+ def is_weierstrass (self , P ):
195
192
"""
196
193
Checks if `P` is a Weierstrass point (i.e., fixed by the hyperelliptic involution)
197
194
@@ -218,12 +215,8 @@ def is_weierstrass(self,P):
218
215
AUTHOR:
219
216
220
217
- Jennifer Balakrishnan (2010-02)
221
-
222
218
"""
223
- if (P [1 ] == 0 or P [2 ] == 0 ):
224
- return True
225
- else :
226
- return False
219
+ return (P [1 ] == 0 or P [2 ] == 0 )
227
220
228
221
def find_char_zero_weier_point (self , Q ):
229
222
"""
@@ -260,7 +253,7 @@ def find_char_zero_weier_point(self, Q):
260
253
if self .is_same_disc (P ,Q ):
261
254
return P
262
255
263
- def residue_disc (self ,P ):
256
+ def residue_disc (self , P ):
264
257
"""
265
258
Gives the residue disc of `P`
266
259
@@ -306,7 +299,7 @@ def residue_disc(self,P):
306
299
else :
307
300
return HF (0 ,1 ,0 )
308
301
309
- def is_same_disc (self ,P , Q ):
302
+ def is_same_disc (self , P , Q ):
310
303
"""
311
304
Checks if `P,Q` are in same residue disc
312
305
@@ -326,10 +319,7 @@ def is_same_disc(self,P,Q):
326
319
sage: HK.is_same_disc(Q,S)
327
320
False
328
321
"""
329
- if self .residue_disc (P ) == self .residue_disc (Q ):
330
- return True
331
- else :
332
- return False
322
+ return self .residue_disc (P ) == self .residue_disc (Q )
333
323
334
324
def tiny_integrals (self , F , P , Q ):
335
325
r"""
@@ -1001,12 +991,12 @@ def newton_sqrt(self, f, x0, prec):
1001
991
- Jennifer Balakrishnan
1002
992
"""
1003
993
z = x0
1004
- loop_prec = ( log (RR (prec )) / log ( RR ( 2 )) ).ceil ()
994
+ loop_prec = log (RR (prec ), 2 ).ceil ()
1005
995
for i in range (loop_prec ):
1006
- z = (z + f / z ) / 2
996
+ z = (z + f / z ) / 2
1007
997
return z
1008
998
1009
- def curve_over_ram_extn (self ,deg ):
999
+ def curve_over_ram_extn (self , deg ):
1010
1000
r"""
1011
1001
Return ``self`` over `\QQ_p(p^(1/deg))`.
1012
1002
@@ -1123,7 +1113,7 @@ def P_to_S(self, P, S):
1123
1113
val = [I (S [1 ]) for I in integrals ]
1124
1114
return vector (val )
1125
1115
1126
- def coleman_integral_P_to_S (self ,w , P , S ):
1116
+ def coleman_integral_P_to_S (self , w , P , S ):
1127
1117
r"""
1128
1118
Given a finite Weierstrass point `P` and a point `S`
1129
1119
in the same disc, computes the Coleman integral `\int_P^S w`
@@ -1168,7 +1158,7 @@ def coleman_integral_P_to_S(self,w,P,S):
1168
1158
int_sing_a = int_sing (S [1 ])
1169
1159
return int_sing_a
1170
1160
1171
- def S_to_Q (self ,S , Q ):
1161
+ def S_to_Q (self , S , Q ):
1172
1162
r"""
1173
1163
Given `S` a point on self over an extension field, computes the
1174
1164
Coleman integrals `\{\int_S^Q x^i dx/2y \}_{i=0}^{2g-1}`
@@ -1248,13 +1238,12 @@ def S_to_Q(self,S,Q):
1248
1238
b = V (L )
1249
1239
M_sys = matrix (K , M_frob ).transpose () - 1
1250
1240
B = (~ M_sys )
1251
- v = [c .valuation () for c in B .list ()]
1252
- vv = min (v )
1241
+ vv = min (c .valuation () for c in B .list ())
1253
1242
B = (p ** (- vv )* B ).change_ring (K )
1254
1243
B = p ** (vv )* B
1255
1244
return B * (b - S_to_FS - FQ_to_Q )
1256
1245
1257
- def coleman_integral_S_to_Q (self ,w , S , Q ):
1246
+ def coleman_integral_S_to_Q (self , w , S , Q ):
1258
1247
r"""
1259
1248
Compute the Coleman integral `\int_S^Q w`
1260
1249
@@ -1293,7 +1282,6 @@ def coleman_integral_S_to_Q(self,w,S,Q):
1293
1282
AUTHOR:
1294
1283
1295
1284
- Jennifer Balakrishnan
1296
-
1297
1285
"""
1298
1286
import sage .schemes .hyperelliptic_curves .monsky_washnitzer as monsky_washnitzer
1299
1287
K = self .base_ring ()
@@ -1350,10 +1338,9 @@ def coleman_integral_from_weierstrass_via_boundary(self, w, P, Q, d):
1350
1338
AUTHOR:
1351
1339
1352
1340
- Jennifer Balakrishnan
1353
-
1354
1341
"""
1355
1342
HJ = self .curve_over_ram_extn (d )
1356
- S = self .get_boundary_point (HJ ,P )
1357
- P_to_S = self .coleman_integral_P_to_S (w ,P , S )
1358
- S_to_Q = HJ .coleman_integral_S_to_Q (w ,S , Q )
1343
+ S = self .get_boundary_point (HJ , P )
1344
+ P_to_S = self .coleman_integral_P_to_S (w , P , S )
1345
+ S_to_Q = HJ .coleman_integral_S_to_Q (w , S , Q )
1359
1346
return P_to_S + S_to_Q
0 commit comments