168
168
- Craig Citro, Robert Bradshaw (2008-03): Rewrote with modabvar overhaul
169
169
"""
170
170
171
- #* ****************************************************************************
171
+ # ****************************************************************************
172
172
# Copyright (C) 2007 William Stein <[email protected] >
173
173
#
174
174
# This program is free software: you can redistribute it and/or modify
175
175
# it under the terms of the GNU General Public License as published by
176
176
# the Free Software Foundation, either version 2 of the License, or
177
177
# (at your option) any later version.
178
- # http ://www.gnu.org/licenses/
179
- #* ****************************************************************************
178
+ # https ://www.gnu.org/licenses/
179
+ # ****************************************************************************
180
180
181
181
182
182
from copy import copy
188
188
189
189
from . import morphism
190
190
191
- import sage .rings .integer_ring
192
191
from sage .rings .infinity import Infinity
193
192
194
193
from sage .rings .ring import Ring
@@ -276,7 +275,7 @@ def _matrix_space(self):
276
275
sage: Hom(J0(11), J0(22))._matrix_space
277
276
Full MatrixSpace of 2 by 4 dense matrices over Integer Ring
278
277
"""
279
- return MatrixSpace (ZZ ,2 * self .domain ().dimension (), 2 * self .codomain ().dimension ())
278
+ return MatrixSpace (ZZ , 2 * self .domain ().dimension (), 2 * self .codomain ().dimension ())
280
279
281
280
def _element_constructor_from_element_class (self , * args , ** keywords ):
282
281
"""
@@ -479,7 +478,7 @@ def free_module(self):
479
478
"""
480
479
self .calculate_generators ()
481
480
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 ()])
483
482
484
483
def gen (self , i = 0 ):
485
484
"""
@@ -570,7 +569,7 @@ def calculate_generators(self):
570
569
return
571
570
572
571
if (self .domain () == self .codomain ()) and (self .domain ().dimension () == 1 ):
573
- self ._gens = ( identity_matrix (ZZ ,2 ), )
572
+ self ._gens = (identity_matrix (ZZ , 2 ),)
574
573
return
575
574
576
575
phi = self .domain ()._isogeny_to_product_of_powers ()
@@ -583,9 +582,9 @@ def calculate_generators(self):
583
582
Mt = psi .complementary_isogeny ().matrix ()
584
583
585
584
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 ])
589
588
590
589
def _calculate_product_gens (self ):
591
590
"""
@@ -746,7 +745,8 @@ def _calculate_simple_gens(self):
746
745
Mf = f .matrix ()
747
746
Mg = g .matrix ()
748
747
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
+
750
750
751
751
# NOTE/WARNING/TODO: Below in the __init__, etc. we do *not* check
752
752
# 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):
820
820
if gens is None :
821
821
self ._gens = None
822
822
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 ])
824
824
self ._is_full_ring = gens is None
825
825
826
826
def _repr_ (self ):
@@ -903,7 +903,7 @@ def index_in_saturation(self):
903
903
A = self .abelian_variety ()
904
904
d = A .dimension ()
905
905
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 ()]
907
907
R = M .submodule (gens )
908
908
return R .index_in_saturation ()
909
909
@@ -934,8 +934,8 @@ def discriminant(self):
934
934
2
935
935
"""
936
936
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 ))])
939
939
return M .determinant ()
940
940
941
941
def image_of_hecke_algebra (self , check_every = 1 ):
@@ -1002,18 +1002,18 @@ def image_of_hecke_algebra(self, check_every=1):
1002
1002
EndVecZ = ZZ ** (4 * d ** 2 )
1003
1003
1004
1004
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 ]])
1006
1006
return self .__hecke_algebra_image
1007
1007
1008
1008
V = EndVecZ .submodule ([A .hecke_operator (1 ).matrix ().list ()])
1009
1009
1010
- for n in range (2 ,M .sturm_bound ()+ 1 ):
1010
+ for n in range (2 , M .sturm_bound ()+ 1 ):
1011
1011
if (check_every > 0 and
1012
1012
n % check_every == 0 and
1013
1013
V .dimension () == d and
1014
1014
V .index_in_saturation () == 1 ):
1015
1015
break
1016
- V += EndVecZ .submodule ([ A .hecke_operator (n ).matrix ().list () ])
1016
+ V += EndVecZ .submodule ([A .hecke_operator (n ).matrix ().list ()])
1017
1017
1018
1018
self .__hecke_algebra_image = EndomorphismSubring (A , V .basis ())
1019
1019
return self .__hecke_algebra_image
0 commit comments