Ticket #11422: trac_11422reviewerfix.patch
File trac_11422reviewerfix.patch, 1.7 KB (added by , 8 years ago) 


sage/modular/arithgroup/arithgroup_perm.py
# HG changeset patch # User David Loeffler <d.loeffler.01@cantab.net> # Date 1310667317 3600 # Node ID c6d6e154ef1f57aa37fda95325d707ab23e4ca5b # Parent cba421f0a2420da360ea889edd62c2975a543e2b #11422: reviewer fix diff r cba421f0a242 r c6d6e154ef1f sage/modular/arithgroup/arithgroup_perm.py
a b 1324 1324 S3=(1,2,3) 1325 1325 L=(2,3,4) 1326 1326 R=(1,4,2) 1327 1328 sage: H = ArithmeticSubgroup_Permutation(S2 = '(1,4,11,14)(2,7,12,17)(3,5,13,15)(6,9,16,19)(8,10,18,20)', S3 = '(1,2,3,11,12,13)(4,5,6,14,15,16)(7,8,9,17,18,19)(10,20)') 1329 sage: G = H.to_even_subgroup(relabel=False); G 1330 Arithmetic subgroup with permutations of right cosets 1331 S2=(1,4)(2,7)(3,5)(6,9)(8,10) 1332 S3=(1,2,3)(4,5,6)(7,8,9) 1333 L=(1,5)(2,4,9,10,8)(3,7,6) 1334 R=(1,7,10,8,6)(2,5,9)(3,4) 1335 sage: H.is_subgroup(G) 1336 True 1327 1337 """ 1328 1338 N = self.index() 1329 1339 1330 1340 # build equivalence classes in e 1331 1341 s2 = self._S2 1332 e = set([]) 1342 e = [] 1343 e2i = [None]*N 1333 1344 for i in xrange(N): 1334 1345 j = s2[s2[i]] 1335 1346 if i < j: 1336 e.add((i,j)) 1347 e2i[i] = e2i[j] = len(e) 1348 e.append((i,j)) 1337 1349 1338 # build index for equivalence classes1339 e2i = [None]*N # eq. class to index1340 for i,(j0,j1) in enumerate(e):1341 e2i[j0] = i1342 e2i[j1] = i1343 1344 1350 # build the quotient permutations 1345 1351 ss2 = [None]*(N/2) 1346 1352 ss3 = [None]*(N/2)