Skip to content

Commit

Permalink
E221 in cubic_braid
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Nov 5, 2023
1 parent f7269e4 commit a945f88
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions src/sage/groups/cubic_braid.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def eliminate_item(tietze_list):
if second is None:
return None
middle = tietze_list[1:i]
end = tietze_list[i+1:l]
end = tietze_list[i+1:l]
if first == second:
return [-first] + middle + end
else:
Expand Down Expand Up @@ -490,7 +490,7 @@ def find_root(domain):
if root[0] == 0:
continue
root_bur = root[0]
if root[1] == 1:
if root[1] == 1:
break
return root_bur

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

Expand All @@ -759,12 +759,12 @@ def __init__(self, names, cbg_type=None):
free_group = FreeGroup(names)
self._cbg_type = cbg_type
self._nstrands = n + 1
self._ident = self._cbg_type.value + self._nstrands.str()
self._ident = self._cbg_type.value + self._nstrands.str()
self._braid_group = BraidGroup(names)

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

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

def _repr_(self):
Expand Down Expand Up @@ -1095,7 +1095,7 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
# ------------------------------------------------------------------------------
# Setting the List of Braid Images
# ------------------------------------------------------------------------------
im_gens = [base_group(m) for m in transvec_matrices]
im_gens = [base_group(m) for m in transvec_matrices]

# ------------------------------------------------------------------------------
# By the work of Assion no check on the group homomorphism is needed, at all.
Expand All @@ -1109,7 +1109,7 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
# ------------------------------------------------------------------------------
# Do the projective group realization if needed
# ------------------------------------------------------------------------------
embedding = self._classical_embedding
embedding = self._classical_embedding
classical_group = None
if proj_group is None:
classical_group = base_group
Expand All @@ -1128,19 +1128,19 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix,
nat_hom = base_group.hom(proj_group.gens(), check=check)
centralizing_element = nat_hom(centralizing_matrix)
classical_group_gens = [nat_hom(m) for m in transvec_matrices]
classical_group = proj_group.subgroup(classical_group_gens, canonicalize=False)
classical_group = proj_group.subgroup(classical_group_gens, canonicalize=False)
hom_to_classic = self.hom(classical_group.gens(), check=check)
classical_group.register_conversion(hom_to_classic)

# ------------------------------------------------------------------------------
# register constructed items
# ------------------------------------------------------------------------------
self._classical_group = classical_group
self._classical_base_group = base_group
self._classical_invariant_form = base_group.invariant_form()
self._centralizing_matrix = centralizing_matrix
self._centralizing_element = centralizing_element
self._classical_embedding = embedding
self._classical_group = classical_group
self._classical_base_group = base_group
self._classical_invariant_form = base_group.invariant_form()
self._centralizing_matrix = centralizing_matrix
self._centralizing_element = centralizing_element
self._classical_embedding = embedding
return

# -------------------------------------------------------------------------------
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def transvec2mat(v, bas=bas, bform=bform, fact=1):
# ------------------------------------------------------------------------------
centralizing_vector = xbas[mhalf-1]
centralizing_matrix = base_group(transvec2mat(centralizing_vector, fact=1))
transvec_matrices = [transvec2mat(v) for v in transvections]
transvec_matrices = [transvec2mat(v) for v in transvections]

set_classical_realization(self, base_group, proj_group, centralizing_matrix, transvec_matrices)
return
Expand Down Expand Up @@ -1273,9 +1273,9 @@ def create_unitary_realization(self, m):
for j in range(mthird):
pos = 3*(j+1)-1
transvections.append(xbas[pos-1]) # t_{3i} = x_{3i-1}
if pos + 1 < m:
if pos + 1 < m:
transvections.append(xbas[pos-1]+xbas[pos]+xbas[pos+1]) # t_{3i+1} = x_{3i-1} + x_{3i} + x_{3i+1}
if pos + 3 < m:
if pos + 3 < m:
transvections.append(xbas[pos+1]+xbas[pos+2]+xbas[pos+3]) # t_{3i+2} = x_{3i+1} + x_{3i+2} + x_{3i+3}

# -----------------------------------------------------------
Expand All @@ -1294,7 +1294,7 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
# ------------------------------------------------------------------------------
centralizing_vector = xbas[m-2]+xbas[m-1]
centralizing_matrix = base_group(transvec2mat(centralizing_vector, fact=1))
transvec_matrices = [transvec2mat(v) for v in transvections]
transvec_matrices = [transvec2mat(v) for v in transvections]

set_classical_realization(self, base_group, proj_group, centralizing_matrix, transvec_matrices)
return
Expand All @@ -1314,13 +1314,13 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
# Setting the Classical group
# -------------------------------------------------------------------------------
if self._cbg_type == CubicBraidGroup.type.AssionS:
dim_sympl_group = n-1 # S(n-1) = Sp(n-1, 3)
if n % 2 == 0:
dim_sympl_group = n # S(n-1) = subgroup of PSp(n, 3)
dim_sympl_group = n-1 # S(n-1) = Sp(n-1, 3)
if n % 2 == 0:
dim_sympl_group = n # S(n-1) = subgroup of PSp(n, 3)
create_sympl_realization(self, dim_sympl_group)
elif self._cbg_type == CubicBraidGroup.type.AssionU:
dim_unitary_group = n-1 # U(n-1) = GU(n-1, 2)
if n % 3 == 0:
if n % 3 == 0:
dim_unitary_group = n # U(n-1) = subgroup PGU(n, 3)
create_unitary_realization(self, dim_unitary_group)
else:
Expand All @@ -1344,11 +1344,11 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a):
UCF = UniversalCyclotomicField()
z12 = UCF.gen(12)
classical_group = self.as_matrix_group(root_bur=~z12, domain=UCF, reduced='unitary')
self._classical_group = classical_group
self._classical_base_group = classical_group
self._classical_embedding = classical_group
self._classical_group = classical_group
self._classical_base_group = classical_group
self._classical_embedding = classical_group
if self._classical_invariant_form is None:
self._classical_invariant_form = classical_group.ambient().invariant_form()
self._classical_invariant_form = classical_group.ambient().invariant_form()
return

def _element_constructor_(self, x, **kwds):
Expand Down

0 comments on commit a945f88

Please sign in to comment.