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

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

""" 

Cuspidal subgroups of modular abelian varieties 

 

AUTHORS: 

 

- William Stein (2007-03, 2008-02) 

 

EXAMPLES: We compute the cuspidal subgroup of `J_1(13)`:: 

 

sage: A = J1(13) 

sage: C = A.cuspidal_subgroup(); C 

Finite subgroup with invariants [19, 19] over QQ of Abelian variety J1(13) of dimension 2 

sage: C.gens() 

[[(1/19, 0, 0, 9/19)], [(0, 1/19, 1/19, 18/19)]] 

sage: C.order() 

361 

sage: C.invariants() 

[19, 19] 

 

We compute the cuspidal subgroup of `J_0(54)`:: 

 

sage: A = J0(54) 

sage: C = A.cuspidal_subgroup(); C 

Finite subgroup with invariants [3, 3, 3, 3, 3, 9] over QQ of Abelian variety J0(54) of dimension 4 

sage: C.gens() 

[[(1/3, 0, 0, 0, 0, 1/3, 0, 2/3)], [(0, 1/3, 0, 0, 0, 2/3, 0, 1/3)], [(0, 0, 1/9, 1/9, 1/9, 1/9, 1/9, 2/9)], [(0, 0, 0, 1/3, 0, 1/3, 0, 0)], [(0, 0, 0, 0, 1/3, 1/3, 0, 1/3)], [(0, 0, 0, 0, 0, 0, 1/3, 2/3)]] 

sage: C.order() 

2187 

sage: C.invariants() 

[3, 3, 3, 3, 3, 9] 

 

We compute the subgroup of the cuspidal subgroup generated by 

rational cusps. 

 

:: 

 

sage: C = J0(54).rational_cusp_subgroup(); C 

Finite subgroup with invariants [3, 3, 9] over QQ of Abelian variety J0(54) of dimension 4 

sage: C.gens() 

[[(1/3, 0, 0, 1/3, 2/3, 1/3, 0, 1/3)], [(0, 0, 1/9, 1/9, 7/9, 7/9, 1/9, 8/9)], [(0, 0, 0, 0, 0, 0, 1/3, 2/3)]] 

sage: C.order() 

81 

sage: C.invariants() 

[3, 3, 9] 

 

This might not give us the exact rational torsion subgroup, since 

it might be bigger than order `81`:: 

 

sage: J0(54).rational_torsion_subgroup().multiple_of_order() 

243 

 

TESTS:: 

 

sage: C = J0(54).cuspidal_subgroup() 

sage: loads(dumps(C)) == C 

True 

sage: D = J0(54).rational_cusp_subgroup() 

sage: loads(dumps(D)) == D 

True 

""" 

from __future__ import absolute_import 

 

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

# Copyright (C) 2007 William Stein <wstein@gmail.com> 

# 

# This program is free software: you can redistribute it and/or modify 

# it under the terms of the GNU General Public License as published by 

# the Free Software Foundation, either version 2 of the License, or 

# (at your option) any later version. 

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

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

 

from .finite_subgroup import FiniteSubgroup 

from sage.rings.all import infinity, QQ, ZZ 

from sage.matrix.all import matrix 

from sage.modular.arithgroup.all import is_Gamma0 

from sage.modular.cusps import Cusp 

from sage.arith.all import gcd 

 

class CuspidalSubgroup_generic(FiniteSubgroup): 

def _compute_lattice(self, rational_only=False, rational_subgroup=False): 

r""" 

Return a list of vectors that define elements of the rational 

homology that generate this finite subgroup. 

 

INPUT: 

 

 

- ``rational_only`` - bool (default: False); if 

``True``, only use rational cusps. 

 

 

OUTPUT: 

 

 

- ``list`` - list of vectors 

 

 

EXAMPLES:: 

 

sage: J = J0(37) 

sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J) 

sage: C._compute_lattice() 

Free module of degree 4 and rank 4 over Integer Ring 

Echelon basis matrix: 

[ 1 0 0 0] 

[ 0 1 0 0] 

[ 0 0 1 0] 

[ 0 0 0 1/3] 

sage: J = J0(43) 

sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J) 

sage: C._compute_lattice() 

Free module of degree 6 and rank 6 over Integer Ring 

Echelon basis matrix: 

[ 1 0 0 0 0 0] 

[ 0 1/7 0 6/7 0 5/7] 

[ 0 0 1 0 0 0] 

[ 0 0 0 1 0 0] 

[ 0 0 0 0 1 0] 

[ 0 0 0 0 0 1] 

sage: J = J0(22) 

sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J) 

sage: C._compute_lattice() 

Free module of degree 4 and rank 4 over Integer Ring 

Echelon basis matrix: 

[1/5 1/5 4/5 0] 

[ 0 1 0 0] 

[ 0 0 1 0] 

[ 0 0 0 1/5] 

sage: J = J1(13) 

sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J) 

sage: C._compute_lattice() 

Free module of degree 4 and rank 4 over Integer Ring 

Echelon basis matrix: 

[ 1/19 0 0 9/19] 

[ 0 1/19 1/19 18/19] 

[ 0 0 1 0] 

[ 0 0 0 1] 

 

We compute with and without the optional 

``rational_only`` option. 

 

:: 

 

sage: J = J0(27); G = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J) 

sage: G._compute_lattice() 

Free module of degree 2 and rank 2 over Integer Ring 

Echelon basis matrix: 

[1/3 0] 

[ 0 1/3] 

sage: G._compute_lattice(rational_only=True) 

Free module of degree 2 and rank 2 over Integer Ring 

Echelon basis matrix: 

[1/3 0] 

[ 0 1] 

""" 

A = self.abelian_variety() 

Cusp = A.modular_symbols() 

Amb = Cusp.ambient_module() 

Eis = Amb.eisenstein_submodule() 

 

C = Amb.cusps() 

N = Amb.level() 

 

if rational_subgroup: 

# QQ-rational subgroup of cuspidal subgroup 

assert A.is_ambient() 

Q = Cusp.abvarquo_rational_cuspidal_subgroup() 

return Q.V() 

 

if rational_only: 

# subgroup generated by differences of rational cusps 

if not is_Gamma0(A.group()): 

raise NotImplementedError('computation of rational cusps only implemented in Gamma0 case.') 

if not N.is_squarefree(): 

data = [n for n in range(2,N) if gcd(n,N) == 1] 

C = [c for c in C if is_rational_cusp_gamma0(c, N, data)] 

 

v = [Amb([infinity, alpha]).element() for alpha in C] 

cusp_matrix = matrix(QQ, len(v), Amb.dimension(), v) 

 

# TODO -- refactor something out here 

# Now we project onto the cuspidal part. 

B = Cusp.free_module().basis_matrix().stack(Eis.free_module().basis_matrix()) 

X = B.solve_left(cusp_matrix) 

X = X.matrix_from_columns(range(Cusp.dimension())) 

lattice = X.row_module(ZZ) + A.lattice() 

return lattice 

 

class CuspidalSubgroup(CuspidalSubgroup_generic): 

""" 

EXAMPLES:: 

 

sage: a = J0(65)[2] 

sage: t = a.cuspidal_subgroup() 

sage: t.order() 

6 

""" 

def _repr_(self): 

""" 

String representation of the cuspidal subgroup. 

 

EXAMPLES:: 

 

sage: G = J0(27).cuspidal_subgroup() 

sage: G._repr_() 

'Finite subgroup with invariants [3, 3] over QQ of Abelian variety J0(27) of dimension 1' 

""" 

return "Cuspidal subgroup %sover QQ of %s"%(self._invariants_repr(), self.abelian_variety()) 

 

 

def lattice(self): 

""" 

Returned cached tuple of vectors that define elements of the 

rational homology that generate this finite subgroup. 

 

OUTPUT: 

 

 

- ``tuple`` - cached 

 

 

EXAMPLES:: 

 

sage: J = J0(27) 

sage: G = J.cuspidal_subgroup() 

sage: G.lattice() 

Free module of degree 2 and rank 2 over Integer Ring 

Echelon basis matrix: 

[1/3 0] 

[ 0 1/3] 

 

Test that the result is cached:: 

 

sage: G.lattice() is G.lattice() 

True 

""" 

try: 

return self.__lattice 

except AttributeError: 

lattice = self._compute_lattice(rational_only = False) 

self.__lattice = lattice 

return lattice 

 

class RationalCuspSubgroup(CuspidalSubgroup_generic): 

""" 

EXAMPLES:: 

 

sage: a = J0(65)[2] 

sage: t = a.rational_cusp_subgroup() 

sage: t.order() 

6 

""" 

def _repr_(self): 

""" 

String representation of the cuspidal subgroup. 

 

EXAMPLES:: 

 

sage: G = J0(27).rational_cusp_subgroup() 

sage: G._repr_() 

'Finite subgroup with invariants [3] over QQ of Abelian variety J0(27) of dimension 1' 

""" 

return "Subgroup generated by differences of rational cusps %sover QQ of %s"%(self._invariants_repr(), self.abelian_variety()) 

 

 

def lattice(self): 

""" 

Return lattice that defines this group. 

 

OUTPUT: lattice 

 

EXAMPLES:: 

 

sage: G = J0(27).rational_cusp_subgroup() 

sage: G.lattice() 

Free module of degree 2 and rank 2 over Integer Ring 

Echelon basis matrix: 

[1/3 0] 

[ 0 1] 

 

Test that the result is cached. 

 

:: 

 

sage: G.lattice() is G.lattice() 

True 

""" 

try: 

return self.__lattice 

except AttributeError: 

lattice = self._compute_lattice(rational_only = True) 

self.__lattice = lattice 

return lattice 

 

class RationalCuspidalSubgroup(CuspidalSubgroup_generic): 

""" 

EXAMPLES:: 

 

sage: a = J0(65)[2] 

sage: t = a.rational_cuspidal_subgroup() 

sage: t.order() 

6 

""" 

def _repr_(self): 

""" 

String representation of the cuspidal subgroup. 

 

EXAMPLES:: 

 

sage: G = J0(27).rational_cuspidal_subgroup() 

sage: G._repr_() 

'Finite subgroup with invariants [3] over QQ of Abelian variety J0(27) of dimension 1' 

""" 

return "Rational cuspidal subgroup %sover QQ of %s"%(self._invariants_repr(), self.abelian_variety()) 

 

def lattice(self): 

""" 

Return lattice that defines this group. 

 

OUTPUT: lattice 

 

EXAMPLES:: 

 

sage: G = J0(27).rational_cuspidal_subgroup() 

sage: G.lattice() 

Free module of degree 2 and rank 2 over Integer Ring 

Echelon basis matrix: 

[1/3 0] 

[ 0 1] 

 

Test that the result is cached. 

 

:: 

 

sage: G.lattice() is G.lattice() 

True 

""" 

try: 

return self.__lattice 

except AttributeError: 

lattice = self._compute_lattice(rational_subgroup = True) 

self.__lattice = lattice 

return lattice 

 

def is_rational_cusp_gamma0(c, N, data): 

""" 

Return True if the rational number c is a rational cusp of level N. 

This uses remarks in Glenn Steven's Ph.D. thesis. 

 

INPUT: 

 

 

- ``c`` - a cusp 

 

- ``N`` - a positive integer 

 

- ``data`` - the list [n for n in range(2,N) if 

gcd(n,N) == 1], which is passed in as a parameter purely for 

efficiency reasons. 

 

 

EXAMPLES:: 

 

sage: from sage.modular.abvar.cuspidal_subgroup import is_rational_cusp_gamma0 

sage: N = 27 

sage: data = [n for n in range(2,N) if gcd(n,N) == 1] 

sage: is_rational_cusp_gamma0(Cusp(1/3), N, data) 

False 

sage: is_rational_cusp_gamma0(Cusp(1), N, data) 

True 

sage: is_rational_cusp_gamma0(Cusp(oo), N, data) 

True 

sage: is_rational_cusp_gamma0(Cusp(2/9), N, data) 

False 

""" 

num = c.numerator() 

den = c.denominator() 

for d in data: 

if not c.is_gamma0_equiv(Cusp(num,d*den), N): 

return False 

return True