Skip to content

Commit fc2d24d

Browse files
fchapotondimpase
authored andcommitted
looking for the unit character of the full group.
1 parent 7e416a9 commit fc2d24d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sage/algebras/fusion_rings/fusion_double.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,16 @@ def __init__(self, G, prefix="s"):
175175
self._names = {}
176176
self._elt = {}
177177
self._chi = {}
178+
self._unit_index = None # index of the unit element
178179
count = ZZ.zero()
179180
for g in G.conjugacy_classes_representatives():
180181
for chi in G.centralizer(g).irreducible_characters():
182+
# NOTE: the trivial char is not necessarily the first one
181183
self._names[count] = "%s%s" % (prefix, count)
182184
self._elt[count] = g
183185
self._chi[count] = chi
186+
if self._unit_index is None and all(v == 1 for v in chi):
187+
self._unit_index = count
184188
count += ZZ.one()
185189
self._cyclotomic_order = G.exponent()
186190
self._basecoer = None
@@ -650,9 +654,9 @@ def one_basis(self):
650654
EXAMPLES::
651655
652656
sage: FusionDouble(CyclicPermutationGroup(2), prefix="h").one()
653-
h0
657+
h1
654658
"""
655-
return ZZ.zero()
659+
return self._unit_index
656660

657661
@cached_method
658662
def dual(self, i):

0 commit comments

Comments
 (0)