Skip to content

Commit 46a1441

Browse files
committed
suggested fix
1 parent 69d7cda commit 46a1441

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/sage/modular/abvar/homspace.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@
168168
- Craig Citro, Robert Bradshaw (2008-03): Rewrote with modabvar overhaul
169169
"""
170170

171-
#*****************************************************************************
171+
# ****************************************************************************
172172
# Copyright (C) 2007 William Stein <[email protected]>
173173
#
174174
# This program is free software: you can redistribute it and/or modify
175175
# it under the terms of the GNU General Public License as published by
176176
# the Free Software Foundation, either version 2 of the License, or
177177
# (at your option) any later version.
178-
# http://www.gnu.org/licenses/
179-
#*****************************************************************************
178+
# https://www.gnu.org/licenses/
179+
# ****************************************************************************
180180

181181

182182
from copy import copy
@@ -188,7 +188,6 @@
188188

189189
from . import morphism
190190

191-
import sage.rings.integer_ring
192191
from sage.rings.infinity import Infinity
193192

194193
from sage.rings.ring import Ring
@@ -276,7 +275,7 @@ def _matrix_space(self):
276275
sage: Hom(J0(11), J0(22))._matrix_space
277276
Full MatrixSpace of 2 by 4 dense matrices over Integer Ring
278277
"""
279-
return MatrixSpace(ZZ,2*self.domain().dimension(), 2*self.codomain().dimension())
278+
return MatrixSpace(ZZ, 2*self.domain().dimension(), 2*self.codomain().dimension())
280279

281280
def _element_constructor_from_element_class(self, *args, **keywords):
282281
"""
@@ -479,7 +478,7 @@ def free_module(self):
479478
"""
480479
self.calculate_generators()
481480
V = ZZ**(4*self.domain().dimension() * self.codomain().dimension())
482-
return V.submodule([ V(m.matrix().list()) for m in self.gens() ])
481+
return V.submodule([V(m.matrix().list()) for m in self.gens()])
483482

484483
def gen(self, i=0):
485484
"""
@@ -570,7 +569,7 @@ def calculate_generators(self):
570569
return
571570

572571
if (self.domain() == self.codomain()) and (self.domain().dimension() == 1):
573-
self._gens = ( identity_matrix(ZZ,2), )
572+
self._gens = (identity_matrix(ZZ, 2),)
574573
return
575574

576575
phi = self.domain()._isogeny_to_product_of_powers()
@@ -583,9 +582,9 @@ def calculate_generators(self):
583582
Mt = psi.complementary_isogeny().matrix()
584583

585584
R = ZZ**(4*self.domain().dimension()*self.codomain().dimension())
586-
gens = R.submodule([ (M*self._get_matrix(g)*Mt).list()
587-
for g in im_gens ]).saturation().basis()
588-
self._gens = tuple([ self._get_matrix(g) for g in gens ])
585+
gens = R.submodule([(M*self._get_matrix(g)*Mt).list()
586+
for g in im_gens]).saturation().basis()
587+
self._gens = tuple([self._get_matrix(g) for g in gens])
589588

590589
def _calculate_product_gens(self):
591590
"""
@@ -746,7 +745,8 @@ def _calculate_simple_gens(self):
746745
Mf = f.matrix()
747746
Mg = g.matrix()
748747

749-
return [ Mf * self._get_matrix(e) * Mg for e in ls ]
748+
return [Mf * self._get_matrix(e) * Mg for e in ls]
749+
750750

751751
# NOTE/WARNING/TODO: Below in the __init__, etc. we do *not* check
752752
# that the input gens are give something that spans a sub*ring*, as apposed
@@ -820,7 +820,7 @@ def __init__(self, A, gens=None, category=None):
820820
if gens is None:
821821
self._gens = None
822822
else:
823-
self._gens = tuple([ self._get_matrix(g) for g in gens ])
823+
self._gens = tuple([self._get_matrix(g) for g in gens])
824824
self._is_full_ring = gens is None
825825

826826
def _repr_(self):
@@ -903,7 +903,7 @@ def index_in_saturation(self):
903903
A = self.abelian_variety()
904904
d = A.dimension()
905905
M = ZZ**(4*d**2)
906-
gens = [ x.matrix().list() for x in self.gens() ]
906+
gens = [x.matrix().list() for x in self.gens()]
907907
R = M.submodule(gens)
908908
return R.index_in_saturation()
909909

@@ -934,8 +934,8 @@ def discriminant(self):
934934
2
935935
"""
936936
g = self.gens()
937-
M = Matrix(ZZ,len(g), [ (g[i]*g[j]).trace()
938-
for i in range(len(g)) for j in range(len(g)) ])
937+
M = Matrix(ZZ, len(g), [(g[i]*g[j]).trace()
938+
for i in range(len(g)) for j in range(len(g))])
939939
return M.determinant()
940940

941941
def image_of_hecke_algebra(self, check_every=1):
@@ -1002,18 +1002,18 @@ def image_of_hecke_algebra(self, check_every=1):
10021002
EndVecZ = ZZ**(4*d**2)
10031003

10041004
if d == 1:
1005-
self.__hecke_algebra_image = EndomorphismSubring(A, [[1,0,0,1]])
1005+
self.__hecke_algebra_image = EndomorphismSubring(A, [[1, 0, 0, 1]])
10061006
return self.__hecke_algebra_image
10071007

10081008
V = EndVecZ.submodule([A.hecke_operator(1).matrix().list()])
10091009

1010-
for n in range(2,M.sturm_bound()+1):
1010+
for n in range(2, M.sturm_bound()+1):
10111011
if (check_every > 0 and
10121012
n % check_every == 0 and
10131013
V.dimension() == d and
10141014
V.index_in_saturation() == 1):
10151015
break
1016-
V += EndVecZ.submodule([ A.hecke_operator(n).matrix().list() ])
1016+
V += EndVecZ.submodule([A.hecke_operator(n).matrix().list()])
10171017

10181018
self.__hecke_algebra_image = EndomorphismSubring(A, V.basis())
10191019
return self.__hecke_algebra_image

0 commit comments

Comments
 (0)