From 500f76786c1deb56199f568ff3c82ee33cdb1ce9 Mon Sep 17 00:00:00 2001 From: Daniel Bump Date: Mon, 29 Jun 2020 11:48:55 -0700 Subject: [PATCH] new method to_field, rewriting s_ij --- src/sage/combinat/root_system/fusion_ring.py | 39 ++++++++++++------- .../combinat/root_system/weyl_characters.py | 21 +++++++--- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/sage/combinat/root_system/fusion_ring.py b/src/sage/combinat/root_system/fusion_ring.py index ed76e05bbee..c33a7173723 100644 --- a/src/sage/combinat/root_system/fusion_ring.py +++ b/src/sage/combinat/root_system/fusion_ring.py @@ -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. @@ -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): """ @@ -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""" @@ -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""" @@ -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() diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index f145c003176..63f906802f2 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -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:: @@ -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:: @@ -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):