Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
new method to_field, rewriting s_ij
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbump committed Jun 29, 2020
1 parent 8918e84 commit 500f767
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
39 changes: 25 additions & 14 deletions src/sage/combinat/root_system/fusion_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class FusionRing(WeylCharacterRing):
"""
@staticmethod
def __classcall__(cls, ct, k, base_ring=ZZ, prefix=None, style="coroots", conjugate=False):
def __classcall__(cls, ct, k, base_ring=ZZ, prefix=None, style="coroots", conjugate=False, cyclotomic_order=None):
"""
Normalize input to ensure a unique representation.
Expand Down Expand Up @@ -241,7 +241,7 @@ def __classcall__(cls, ct, k, base_ring=ZZ, prefix=None, style="coroots", conjug
sage: TestSuite(E81).run()
"""
return super(FusionRing, cls).__classcall__(cls, ct, base_ring=base_ring,
prefix=prefix, style=style, k=k, conjugate=conjugate)
prefix=prefix, style=style, k=k, conjugate=conjugate, cyclotomic_order=cyclotomic_order)

def _test_verlinde(self, **options):
"""
Expand Down Expand Up @@ -274,7 +274,22 @@ def field(self):
sage: FusionRing("B2",2).field()
Cyclotomic Field of order 40 and degree 16
"""
return CyclotomicField(4 * self._fg * self._l)
return CyclotomicField(4 * self._cyclotomic_order)

def to_field(self, r):
"""
Returns `e^{i\pi r}` as an element of ``self.field()`` if possible.
INPUT:
= ``i`` -- a rational number
"""

n = 2 * r * self._cyclotomic_order
if n in ZZ:
return self.field().gen()**n
else:
return None

def get_order(self):
r"""
Expand Down Expand Up @@ -462,14 +477,10 @@ def s_ij(self, elt_i, elt_j):
sage: [G21.s_ij(x, y) for x in b for y in b]
[1, -zeta60^14 + zeta60^6 + zeta60^4, -zeta60^14 + zeta60^6 + zeta60^4, -1]
"""
l = self.fusion_l() * self._fg
K = self.field()
q = K.gen()
ijtwist = -2 * l * (elt_i.twist() + elt_j.twist())
mc = (elt_i.dual() * elt_j).monomial_coefficients(copy=False)
B = self.basis()
return sum(B[k].q_dimension() * self.Nk_ij(elt_i, B[k], elt_j) * q**(2*l*B[k].twist() + ijtwist)
for k in mc)
b = self.basis()
ijtwist = elt_i.twist() + elt_j.twist()
return sum(k.q_dimension() * self.Nk_ij(elt_i, k, elt_j) * self.to_field(k.twist() - ijtwist) for k in self.basis())

def s_matrix(self):
r"""
Expand All @@ -486,10 +497,10 @@ def s_matrix(self):
sage: D91 = FusionRing('D9', 1)
sage: D91.s_matrix()
[ 1 1 1 1]
[ 1 1 -1 -1]
[ 1 -1 -zeta68^17 zeta68^17]
[ 1 -1 zeta68^17 -zeta68^17]
[ 1 1 1 1]
[ 1 1 -1 -1]
[ 1 -1 -zeta136^34 zeta136^34]
[ 1 -1 zeta136^34 -zeta136^34]
sage: D41 = FusionRing('D4', 1)
sage: D41.s_matrix()
Expand Down
21 changes: 15 additions & 6 deletions src/sage/combinat/root_system/weyl_characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class WeylCharacterRing(CombinatorialFreeModule):
https://doc.sagemath.org/html/en/thematic_tutorials/lie.html
"""
@staticmethod
def __classcall__(cls, ct, base_ring=ZZ, prefix=None, style="lattice", k=None, conjugate=False):
def __classcall__(cls, ct, base_ring=ZZ, prefix=None, style="lattice", k=None, conjugate=False, cyclotomic_order=None):
"""
TESTS::
Expand All @@ -106,9 +106,9 @@ def __classcall__(cls, ct, base_ring=ZZ, prefix=None, style="lattice", k=None, c
prefix = ct[0]+str(ct[1])
else:
prefix = repr(ct)
return super(WeylCharacterRing, cls).__classcall__(cls, ct, base_ring=base_ring, prefix=prefix, style=style, k=k, conjugate=conjugate)
return super(WeylCharacterRing, cls).__classcall__(cls, ct, base_ring=base_ring, prefix=prefix, style=style, k=k, conjugate=conjugate, cyclotomic_order=cyclotomic_order)

def __init__(self, ct, base_ring=ZZ, prefix=None, style="lattice", k=None, conjugate=False):
def __init__(self, ct, base_ring=ZZ, prefix=None, style="lattice", k=None, conjugate=False, cyclotomic_order=None):
"""
EXAMPLES::
Expand Down Expand Up @@ -173,15 +173,24 @@ def next_level(wt):
self._nf = 2
else:
self._nf = 1
h_check = ct.dual_coxeter_number()
self._l = self._m_g * (self._k + h_check)
self._conj = (-1) ** conjugate
self._h_check = ct.dual_coxeter_number()
self._l = self._m_g * (self._k + self._h_check)
if conjugate:
self._conj = -1
else:
self._conj = 1
if ct[0] == 'A':
self._fg = ct[1] + 1
elif ct[0] == 'E' and ct[1] == 6:
self._fg = 3
elif ct[0] == 'D':
self._fg = 2
else:
self._fg = 1
if cyclotomic_order is None:
self._cyclotomic_order = self._fg * self._l
else:
self._cyclotomic_order = cyclotomic_order

@cached_method
def ambient(self):
Expand Down

0 comments on commit 500f767

Please sign in to comment.