Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

""" 

Hyperelliptic curves of genus 2 over a general ring 

""" 

from __future__ import absolute_import 

#***************************************************************************** 

# Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu> 

# Distributed under the terms of the GNU General Public License (GPL) 

# http://www.gnu.org/licenses/ 

#***************************************************************************** 

 

from . import hyperelliptic_generic 

from . import jacobian_g2 

from . import invariants 

 

 

class HyperellipticCurve_g2_generic(hyperelliptic_generic.HyperellipticCurve_generic): 

def is_odd_degree(self): 

""" 

Return ``True`` if the curve is an odd degree model. 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x^4 + 3 

sage: HyperellipticCurve(f).is_odd_degree() 

True 

""" 

f, h = self.hyperelliptic_polynomials() 

df = f.degree() 

if h.degree() < 3: 

return df%2 == 1 

elif df < 6: 

return False 

else: 

a0 = f.leading_coefficient() 

c0 = h.leading_coefficient() 

return (c0**2 + 4*a0) == 0 

 

def jacobian(self): 

""" 

Return the Jacobian of the hyperelliptic curve. 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x^4 + 3 

sage: HyperellipticCurve(f).jacobian() 

Jacobian of Hyperelliptic Curve over Rational Field defined by y^2 = x^5 - x^4 + 3 

""" 

return jacobian_g2.HyperellipticJacobian_g2(self) 

 

def kummer_morphism(self): 

""" 

Return the morphism of an odd degree hyperelliptic curve to the Kummer 

surface of its Jacobian. 

 

This could be extended to an even degree model 

if a prescribed embedding in its Jacobian is fixed. 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x^4 + 3 

sage: HyperellipticCurve(f).kummer_morphism() # not tested 

""" 

try: 

return self._kummer_morphism 

except AttributeError: 

pass 

if not self.is_odd_degree(): 

raise TypeError("Kummer embedding not determined for even degree model curves.") 

J = self.jacobian() 

K = J.kummer_surface() 

return self._kummer_morphism 

 

def clebsch_invariants(self): 

r""" 

Return the Clebsch invariants `(A, B, C, D)` of Mestre, p 317, [M]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x^4 + 3 

sage: HyperellipticCurve(f).clebsch_invariants() 

(0, -2048/375, -4096/25, -4881645568/84375) 

sage: HyperellipticCurve(f(2*x)).clebsch_invariants() 

(0, -8388608/375, -1073741824/25, -5241627016305836032/84375) 

 

sage: HyperellipticCurve(f, x).clebsch_invariants() 

(-8/15, 17504/5625, -23162896/140625, -420832861216768/7119140625) 

sage: HyperellipticCurve(f(2*x), 2*x).clebsch_invariants() 

(-512/15, 71696384/5625, -6072014209024/140625, -451865844002031331704832/7119140625) 

 

TESTS:: 

 

sage: magma(HyperellipticCurve(f)).ClebschInvariants() # optional - magma 

[ 0, -2048/375, -4096/25, -4881645568/84375 ] 

sage: magma(HyperellipticCurve(f(2*x))).ClebschInvariants() # optional - magma 

[ 0, -8388608/375, -1073741824/25, -5241627016305836032/84375 ] 

sage: magma(HyperellipticCurve(f, x)).ClebschInvariants() # optional - magma 

[ -8/15, 17504/5625, -23162896/140625, -420832861216768/7119140625 ] 

sage: magma(HyperellipticCurve(f(2*x), 2*x)).ClebschInvariants() # optional - magma 

[ -512/15, 71696384/5625, -6072014209024/140625, -451865844002031331704832/7119140625 ] 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.clebsch_invariants(4*f + h**2) 

 

def igusa_clebsch_invariants(self): 

r""" 

Return the Igusa-Clebsch invariants `I_2, I_4, I_6, I_{10}` of Igusa and Clebsch [I]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x + 2 

sage: HyperellipticCurve(f).igusa_clebsch_invariants() 

(-640, -20480, 1310720, 52160364544) 

sage: HyperellipticCurve(f(2*x)).igusa_clebsch_invariants() 

(-40960, -83886080, 343597383680, 56006764965979488256) 

 

sage: HyperellipticCurve(f, x).igusa_clebsch_invariants() 

(-640, 17920, -1966656, 52409511936) 

sage: HyperellipticCurve(f(2*x), 2*x).igusa_clebsch_invariants() 

(-40960, 73400320, -515547070464, 56274284941110411264) 

 

TESTS:: 

 

sage: magma(HyperellipticCurve(f)).IgusaClebschInvariants() # optional - magma 

[ -640, -20480, 1310720, 52160364544 ] 

sage: magma(HyperellipticCurve(f(2*x))).IgusaClebschInvariants() # optional - magma 

[ -40960, -83886080, 343597383680, 56006764965979488256 ] 

sage: magma(HyperellipticCurve(f, x)).IgusaClebschInvariants() # optional - magma 

[ -640, 17920, -1966656, 52409511936 ] 

sage: magma(HyperellipticCurve(f(2*x), 2*x)).IgusaClebschInvariants() # optional - magma 

[ -40960, 73400320, -515547070464, 56274284941110411264 ] 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.igusa_clebsch_invariants(4*f + h**2) 

 

def absolute_igusa_invariants_wamelen(self): 

r""" 

Return the three absolute Igusa invariants used by van Wamelen [W]_. 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: HyperellipticCurve(x^5 - 1).absolute_igusa_invariants_wamelen() 

(0, 0, 0) 

sage: HyperellipticCurve((x^5 - 1)(x - 2), (x^2)(x - 2)).absolute_igusa_invariants_wamelen() 

(0, 0, 0) 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.absolute_igusa_invariants_wamelen(4*f + h**2) 

 

def absolute_igusa_invariants_kohel(self): 

r""" 

Return the three absolute Igusa invariants used by Kohel [K]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: HyperellipticCurve(x^5 - 1).absolute_igusa_invariants_kohel() 

(0, 0, 0) 

sage: HyperellipticCurve(x^5 - x + 1, x^2).absolute_igusa_invariants_kohel() 

(-1030567/178769, 259686400/178769, 20806400/178769) 

sage: HyperellipticCurve((x^5 - x + 1)(3*x + 1), (x^2)(3*x + 1)).absolute_igusa_invariants_kohel() 

(-1030567/178769, 259686400/178769, 20806400/178769) 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.absolute_igusa_invariants_kohel(4*f + h**2) 

 

def clebsch_invariants(self): 

r""" 

Return the Clebsch invariants `(A, B, C, D)` of Mestre, p 317, [M]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x^4 + 3 

sage: HyperellipticCurve(f).clebsch_invariants() 

(0, -2048/375, -4096/25, -4881645568/84375) 

sage: HyperellipticCurve(f(2*x)).clebsch_invariants() 

(0, -8388608/375, -1073741824/25, -5241627016305836032/84375) 

 

sage: HyperellipticCurve(f, x).clebsch_invariants() 

(-8/15, 17504/5625, -23162896/140625, -420832861216768/7119140625) 

sage: HyperellipticCurve(f(2*x), 2*x).clebsch_invariants() 

(-512/15, 71696384/5625, -6072014209024/140625, -451865844002031331704832/7119140625) 

 

TESTS:: 

 

sage: magma(HyperellipticCurve(f)).ClebschInvariants() # optional - magma 

[ 0, -2048/375, -4096/25, -4881645568/84375 ] 

sage: magma(HyperellipticCurve(f(2*x))).ClebschInvariants() # optional - magma 

[ 0, -8388608/375, -1073741824/25, -5241627016305836032/84375 ] 

sage: magma(HyperellipticCurve(f, x)).ClebschInvariants() # optional - magma 

[ -8/15, 17504/5625, -23162896/140625, -420832861216768/7119140625 ] 

sage: magma(HyperellipticCurve(f(2*x), 2*x)).ClebschInvariants() # optional - magma 

[ -512/15, 71696384/5625, -6072014209024/140625, -451865844002031331704832/7119140625 ] 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.clebsch_invariants(4*f + h**2) 

 

def igusa_clebsch_invariants(self): 

r""" 

Return the Igusa-Clebsch invariants `I_2, I_4, I_6, I_{10}` of Igusa and Clebsch [I]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: f = x^5 - x + 2 

sage: HyperellipticCurve(f).igusa_clebsch_invariants() 

(-640, -20480, 1310720, 52160364544) 

sage: HyperellipticCurve(f(2*x)).igusa_clebsch_invariants() 

(-40960, -83886080, 343597383680, 56006764965979488256) 

 

sage: HyperellipticCurve(f, x).igusa_clebsch_invariants() 

(-640, 17920, -1966656, 52409511936) 

sage: HyperellipticCurve(f(2*x), 2*x).igusa_clebsch_invariants() 

(-40960, 73400320, -515547070464, 56274284941110411264) 

 

TESTS:: 

 

sage: magma(HyperellipticCurve(f)).IgusaClebschInvariants() # optional - magma 

[ -640, -20480, 1310720, 52160364544 ] 

sage: magma(HyperellipticCurve(f(2*x))).IgusaClebschInvariants() # optional - magma 

[ -40960, -83886080, 343597383680, 56006764965979488256 ] 

 

sage: magma(HyperellipticCurve(f, x)).IgusaClebschInvariants() # optional - magma 

[ -640, 17920, -1966656, 52409511936 ] 

sage: magma(HyperellipticCurve(f(2*x), 2*x)).IgusaClebschInvariants() # optional - magma 

[ -40960, 73400320, -515547070464, 56274284941110411264 ] 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.igusa_clebsch_invariants(4*f + h**2) 

 

def absolute_igusa_invariants_wamelen(self): 

r""" 

Return the three absolute Igusa invariants used by van Wamelen [W]_. 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: HyperellipticCurve(x^5 - 1).absolute_igusa_invariants_wamelen() 

(0, 0, 0) 

sage: HyperellipticCurve((x^5 - 1)(x - 2), (x^2)(x - 2)).absolute_igusa_invariants_wamelen() 

(0, 0, 0) 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.absolute_igusa_invariants_wamelen(4*f + h**2) 

 

def absolute_igusa_invariants_kohel(self): 

r""" 

Return the three absolute Igusa invariants used by Kohel [K]_. 

 

.. SEEALSO:: 

 

:meth:`sage.schemes.hyperelliptic_curves.invariants` 

 

EXAMPLES:: 

 

sage: R.<x> = QQ[] 

sage: HyperellipticCurve(x^5 - 1).absolute_igusa_invariants_kohel() 

(0, 0, 0) 

sage: HyperellipticCurve(x^5 - x + 1, x^2).absolute_igusa_invariants_kohel() 

(-1030567/178769, 259686400/178769, 20806400/178769) 

sage: HyperellipticCurve((x^5 - x + 1)(3*x + 1), (x^2)(3*x + 1)).absolute_igusa_invariants_kohel() 

(-1030567/178769, 259686400/178769, 20806400/178769) 

""" 

f, h = self.hyperelliptic_polynomials() 

return invariants.absolute_igusa_invariants_kohel(4*f + h**2)