Skip to content

Commit a945f88

Browse files
committed
E221 in cubic_braid
1 parent f7269e4 commit a945f88

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

src/sage/groups/cubic_braid.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def eliminate_item(tietze_list):
141141
if second is None:
142142
return None
143143
middle = tietze_list[1:i]
144-
end = tietze_list[i+1:l]
144+
end = tietze_list[i+1:l]
145145
if first == second:
146146
return [-first] + middle + end
147147
else:
@@ -490,7 +490,7 @@ def find_root(domain):
490490
if root[0] == 0:
491491
continue
492492
root_bur = root[0]
493-
if root[1] == 1:
493+
if root[1] == 1:
494494
break
495495
return root_bur
496496

@@ -747,7 +747,7 @@ def __init__(self, names, cbg_type=None):
747747
sage: U5 = AssionGroupU(5) # indirect doctest
748748
sage: TestSuite(U5).run() # long time
749749
"""
750-
n = Integer(len(names))
750+
n = Integer(len(names))
751751
if n < 1:
752752
raise ValueError("the number of strands must be an integer larger than one")
753753

@@ -759,12 +759,12 @@ def __init__(self, names, cbg_type=None):
759759
free_group = FreeGroup(names)
760760
self._cbg_type = cbg_type
761761
self._nstrands = n + 1
762-
self._ident = self._cbg_type.value + self._nstrands.str()
762+
self._ident = self._cbg_type.value + self._nstrands.str()
763763
self._braid_group = BraidGroup(names)
764764

765765
# internal naming of elements for convenience
766-
b = [free_group([i]) for i in range(1, n+1)]
767-
t = [free_group([i, i+1]) ** 3 for i in range(1, n)]
766+
b = [free_group([i]) for i in range(1, n+1)]
767+
t = [free_group([i, i+1]) ** 3 for i in range(1, n)]
768768
ti = [free_group([-i, -i-1]) ** 3 for i in range(1, n)]
769769

770770
# first the braid relation
@@ -796,12 +796,12 @@ def __init__(self, names, cbg_type=None):
796796
# the following global pointers to classical group realizations will be set in the private method
797797
# _create_classical_realization
798798
# ------------------------------------------------------------------------------------------------
799-
self._classical_group = None # This is the classical Group returned by as_classical_group
800-
self._classical_base_group = None # this only differs for special cases for Assion groups from the former
801-
self._classical_invariant_form = None # invariant form of the classical base group
802-
self._classical_embedding = None # if self._classical_group different from self._classical_base_group
803-
self._centralizing_matrix = None # for Assion groups: element in classical base group commuting with self
804-
self._centralizing_element = None # image under nat. map of the former one in the proj. classical group
799+
self._classical_group = None # This is the classical Group returned by as_classical_group
800+
self._classical_base_group = None # this only differs for special cases for Assion groups from the former
801+
self._classical_invariant_form = None # invariant form of the classical base group
802+
self._classical_embedding = None # if self._classical_group different from self._classical_base_group
803+
self._centralizing_matrix = None # for Assion groups: element in classical base group commuting with self
804+
self._centralizing_element = None # image under nat. map of the former one in the proj. classical group
805805
return
806806

807807
def _repr_(self):
@@ -1095,7 +1095,7 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
10951095
# ------------------------------------------------------------------------------
10961096
# Setting the List of Braid Images
10971097
# ------------------------------------------------------------------------------
1098-
im_gens = [base_group(m) for m in transvec_matrices]
1098+
im_gens = [base_group(m) for m in transvec_matrices]
10991099

11001100
# ------------------------------------------------------------------------------
11011101
# By the work of Assion no check on the group homomorphism is needed, at all.
@@ -1109,7 +1109,7 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
11091109
# ------------------------------------------------------------------------------
11101110
# Do the projective group realization if needed
11111111
# ------------------------------------------------------------------------------
1112-
embedding = self._classical_embedding
1112+
embedding = self._classical_embedding
11131113
classical_group = None
11141114
if proj_group is None:
11151115
classical_group = base_group
@@ -1128,19 +1128,19 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
11281128
nat_hom = base_group.hom(proj_group.gens(), check=check)
11291129
centralizing_element = nat_hom(centralizing_matrix)
11301130
classical_group_gens = [nat_hom(m) for m in transvec_matrices]
1131-
classical_group = proj_group.subgroup(classical_group_gens, canonicalize=False)
1131+
classical_group = proj_group.subgroup(classical_group_gens, canonicalize=False)
11321132
hom_to_classic = self.hom(classical_group.gens(), check=check)
11331133
classical_group.register_conversion(hom_to_classic)
11341134

11351135
# ------------------------------------------------------------------------------
11361136
# register constructed items
11371137
# ------------------------------------------------------------------------------
1138-
self._classical_group = classical_group
1139-
self._classical_base_group = base_group
1140-
self._classical_invariant_form = base_group.invariant_form()
1141-
self._centralizing_matrix = centralizing_matrix
1142-
self._centralizing_element = centralizing_element
1143-
self._classical_embedding = embedding
1138+
self._classical_group = classical_group
1139+
self._classical_base_group = base_group
1140+
self._classical_invariant_form = base_group.invariant_form()
1141+
self._centralizing_matrix = centralizing_matrix
1142+
self._centralizing_element = centralizing_element
1143+
self._classical_embedding = embedding
11441144
return
11451145

11461146
# -------------------------------------------------------------------------------
@@ -1211,7 +1211,7 @@ def transvec2mat(v, bas=bas, bform=bform, fact=1):
12111211
# ------------------------------------------------------------------------------
12121212
centralizing_vector = xbas[mhalf-1]
12131213
centralizing_matrix = base_group(transvec2mat(centralizing_vector, fact=1))
1214-
transvec_matrices = [transvec2mat(v) for v in transvections]
1214+
transvec_matrices = [transvec2mat(v) for v in transvections]
12151215

12161216
set_classical_realization(self, base_group, proj_group, centralizing_matrix, transvec_matrices)
12171217
return
@@ -1273,9 +1273,9 @@ def create_unitary_realization(self, m):
12731273
for j in range(mthird):
12741274
pos = 3*(j+1)-1
12751275
transvections.append(xbas[pos-1]) # t_{3i} = x_{3i-1}
1276-
if pos + 1 < m:
1276+
if pos + 1 < m:
12771277
transvections.append(xbas[pos-1]+xbas[pos]+xbas[pos+1]) # t_{3i+1} = x_{3i-1} + x_{3i} + x_{3i+1}
1278-
if pos + 3 < m:
1278+
if pos + 3 < m:
12791279
transvections.append(xbas[pos+1]+xbas[pos+2]+xbas[pos+3]) # t_{3i+2} = x_{3i+1} + x_{3i+2} + x_{3i+3}
12801280

12811281
# -----------------------------------------------------------
@@ -1294,7 +1294,7 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
12941294
# ------------------------------------------------------------------------------
12951295
centralizing_vector = xbas[m-2]+xbas[m-1]
12961296
centralizing_matrix = base_group(transvec2mat(centralizing_vector, fact=1))
1297-
transvec_matrices = [transvec2mat(v) for v in transvections]
1297+
transvec_matrices = [transvec2mat(v) for v in transvections]
12981298

12991299
set_classical_realization(self, base_group, proj_group, centralizing_matrix, transvec_matrices)
13001300
return
@@ -1314,13 +1314,13 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
13141314
# Setting the Classical group
13151315
# -------------------------------------------------------------------------------
13161316
if self._cbg_type == CubicBraidGroup.type.AssionS:
1317-
dim_sympl_group = n-1 # S(n-1) = Sp(n-1, 3)
1318-
if n % 2 == 0:
1319-
dim_sympl_group = n # S(n-1) = subgroup of PSp(n, 3)
1317+
dim_sympl_group = n-1 # S(n-1) = Sp(n-1, 3)
1318+
if n % 2 == 0:
1319+
dim_sympl_group = n # S(n-1) = subgroup of PSp(n, 3)
13201320
create_sympl_realization(self, dim_sympl_group)
13211321
elif self._cbg_type == CubicBraidGroup.type.AssionU:
13221322
dim_unitary_group = n-1 # U(n-1) = GU(n-1, 2)
1323-
if n % 3 == 0:
1323+
if n % 3 == 0:
13241324
dim_unitary_group = n # U(n-1) = subgroup PGU(n, 3)
13251325
create_unitary_realization(self, dim_unitary_group)
13261326
else:
@@ -1344,11 +1344,11 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
13441344
UCF = UniversalCyclotomicField()
13451345
z12 = UCF.gen(12)
13461346
classical_group = self.as_matrix_group(root_bur=~z12, domain=UCF, reduced='unitary')
1347-
self._classical_group = classical_group
1348-
self._classical_base_group = classical_group
1349-
self._classical_embedding = classical_group
1347+
self._classical_group = classical_group
1348+
self._classical_base_group = classical_group
1349+
self._classical_embedding = classical_group
13501350
if self._classical_invariant_form is None:
1351-
self._classical_invariant_form = classical_group.ambient().invariant_form()
1351+
self._classical_invariant_form = classical_group.ambient().invariant_form()
13521352
return
13531353

13541354
def _element_constructor_(self, x, **kwds):

0 commit comments

Comments
 (0)