Ticket #3051: 3051-2.patch

File 3051-2.patch, 9.3 KB (added by bump, 5 years ago)
  • sage/combinat/root_system/all.py

    # HG changeset patch
    # User Daniel Bump <bump@match.stanford.edu>
    # Date 1210290542 25200
    # Node ID bed10729a1ca4e70caf7ea414d1e030ced36eecb
    # Parent  49901b81c613be32bc5956e0e6a3ea9f0b0048c8
    added references, changed Weight->WeightRingElement
    
    diff -r 49901b81c613 -r bed10729a1ca sage/combinat/root_system/all.py
    a b from coxeter_matrix import coxeter_matri 
    44from coxeter_matrix import coxeter_matrix 
    55from root_system import RootSystem, WeylDim 
    66from weyl_group import WeylGroup, WeylGroupElement 
    7 from weyl_characters import WeylCharacter, WeylCharacterRing, branch_weyl_character, WeightRing, Weight 
     7from weyl_characters import WeylCharacter, WeylCharacterRing, branch_weyl_character, WeightRing, WeightRingElement 
  • sage/combinat/root_system/weyl_characters.py

    diff -r 49901b81c613 -r bed10729a1ca sage/combinat/root_system/weyl_characters.py
    a b from sage.algebras.algebra_element impor 
    2828from sage.algebras.algebra_element import AlgebraElement 
    2929 
    3030class WeylCharacter(AlgebraElement): 
    31     """A class for Weyl Characters. A Weyl character is a character 
    32     of a reductive Lie group or algebra. It is represented by a pair of 
     31    """A class for Weyl Characters. Let K be a compact Lie group, which we 
     32    assume is semisimple and simply-connected. Its complexified Lie algebra 
     33    L is the Lie algebra of a complex analytic Lie group G. The following 
     34    three categories are equivalent: representations of K; representations 
     35    of L; and analytic representations of G. In every case, there is a 
     36    parametrization of the irreducible representations by their highest 
     37    weight vectors. For this theory of Weyl, see (for example) J. F. Adams, 
     38    Lectures on Lie groups; Bröcker and tom Dieck, Representations of 
     39    Compact Lie groups; Bump, Lie Groups, Part I; Fulton and Harris, 
     40    Representation Theory, Part IV; Goodman and Wallach, Representations 
     41    and Invariants of the Classical Groups, Chapter 5; Hall, Lie Groups, 
     42    Lie Algebras and Representations; Humphreys, Introduction to Lie 
     43    Algebras and their representations; Procesi, Lie Groups; Samelson, 
     44    Notes on Lie Algebras; Varadarajan, Lie groups, Lie algebras, and their 
     45    representations; or Zhelobenko, Compact Lie Groups and their 
     46    Representations. 
     47 
     48    There is associated with K, L or G as above a lattice, the weight 
     49    lattice, whose elements (called weights) are characters of a Cartan 
     50    subgroup or subalgebra. There is an action of the Weyl group W on the 
     51    lattice, and elements of a fixed fundamental domain for W, the positive 
     52    Weyl chamber, are called dominant. There is for each representation a 
     53    unique highest dominant weight that occurs with nonzero multiplicity 
     54    with respect to a certain partial order, and it is called the highest 
     55    weight vector. 
     56 
     57    EXAMPLES: 
     58       sage: L = RootSystem(['A',2]).ambient_lattice() 
     59       sage: [fw1,fw2] = L.fundamental_weights() 
     60       sage: R = WeylCharacterRing(['A',2], prefix="R") 
     61       sage: [R(1),R(fw1),R(fw2)] 
     62       [R("000"), R("100"), R("110")] 
     63 
     64    Here R(1), R(fw1) and R(fw2) are irreducible representations with 
     65    highest weight vectors 0, and the first two fundamental weights. 
     66 
     67    A Weyl character is a character (not necessarily irreducible) of a 
     68    reductive Lie group or algebra. It is represented by a pair of 
    3369    dictionaries.  The mdict is a dictionary of weight multiplicities. The 
    3470    hdict is a dictionary of highest weight vectors of the irreducible 
    3571    characters that occur in its decomposition into irreducibles, with the 
    3672    multiplicities in this decomposition. 
    3773 
    38     EXAMPLES: 
    39        sage: L = RootSystem(['A',2]).ambient_lattice() 
    40        sage: [fw1,fw2] = L.fundamental_weights() 
    41        sage: R = WeylCharacterRing(['A',2]) 
    42        sage: [R(1),R(fw1),R(fw2)] 
    43        [A2("000"), A2("100"), A2("110")] 
     74    For type A (also G2, F4, E6 and E7) we will take as the weight lattice 
     75    not the weight lattice of the semisimple group, but for a larger one. 
     76    For type A, this means we are concerned with the representation theory 
     77    of K=U(n) or G=GL(n,CC) rather than SU(n) or SU(n,CC). This is useful 
     78    since the representation theory of GL(n) is ubiquitous, and also since 
     79    we may then represent the fundamental weights (in root_system.py) by 
     80    vectors with integer entries. If you are only interested in SL(3), say, 
     81    use WeylCharacterRing(['A',2]) as above but be aware that R([a,b,c]) 
     82    and R([a+1,b+1,c+1]) represent the same character of SL(3) since 
     83    R([1,1,1]) is the determinant. 
    4484    """ 
    4585    def __init__(self, A, hdict, mdict): 
    4686        """ 
    def irreducible_character_freudenthal(hw 
    506546        hwv - a dominant weight in a weight lattice. 
    507547        L - the ambient lattice 
    508548 
    509     Produces the dictionary of multiplicities for the 
    510     irreducible character with highest weight lamb. 
    511     The weight multiplicities are computed by the Freudenthal 
    512     multiplity formula. The algorithm is based on recursion relation that is stated, 
    513     for example, in Humphfrey's book on Lie Algebras. The 
    514     multiplicities are invariant under the Weyl group, so to 
    515     compute them it would be sufficient to compute them for the 
    516     weights in the positive Weyl chamber. However after some 
    517     testing it was found to be faster to compute every weight 
    518     using the recursion, since the use of the Weyl group is 
    519     expensive in its current implementation. 
     549    Produces the dictionary of multiplicities for the irreducible character 
     550    with highest weight lamb.  The weight multiplicities are computed by 
     551    the Freudenthal multiplity formula. The algorithm is based on recursion 
     552    relation that is stated, for example, in Humphrey's book on Lie 
     553    Algebras. The multiplicities are invariant under the Weyl group, so to 
     554    compute them it would be sufficient to compute them for the weights in 
     555    the positive Weyl chamber. However after some testing it was found to 
     556    be faster to compute every weight using the recursion, since the use of 
     557    the Weyl group is expensive in its current implementation. 
    520558    """ 
    521559    rank = L.ct[1] 
    522560    VS = VectorSpace(QQ, L.n) 
    def branch_weyl_character(chi, R, S, rul 
    875913 
    876914 
    877915 
    878 class Weight(AlgebraElement): 
     916class WeightRingElement(AlgebraElement): 
    879917    """ 
    880     A class for weights, and linear combinations of weights. See WeightAlgebra? 
     918    A class for weights, and linear combinations of weights. See WeightRing? 
    881919    for more information. 
    882     INPUT: 
    883         A - the Weight Ring 
    884         mdict - a dictionary of weights. 
    885     Produces an element of the Weight ring. 
    886920    """ 
    887921    def __init__(self, A, mdict): 
    888922        """ 
    class Weight(AlgebraElement): 
    961995        for k in y._mdict: 
    962996            if not k in self._mdict: 
    963997                mdict[k] = y._mdict[k] 
    964         return Weight(self._parent, mdict) 
     998        return WeightRingElement(self._parent, mdict) 
    965999 
    9661000    def _neg_(self): 
    9671001        """ 
    class Weight(AlgebraElement): 
    9741008        mdict = self._mdict.copy() 
    9751009        for k in self._mdict: 
    9761010            mdict[k] = - mdict[k] 
    977         return Weight(self._parent, mdict) 
     1011        return WeightRingElement(self._parent, mdict) 
    9781012 
    9791013    def _sub_(self, y): 
    9801014        """ 
    class Weight(AlgebraElement): 
    10121046        for k in mdict.keys(): 
    10131047            if mdict[k] == 0: 
    10141048                del mdict[k] 
    1015         return Weight(self._parent, mdict) 
     1049        return WeightRingElement(self._parent, mdict) 
    10161050 
    10171051    def __pow__(self, n): 
    10181052        """ 
    class Weight(AlgebraElement): 
    10611095            sage: sum(g2(fw2).weyl_group_action(w) for w in L.weyl_group()) 
    10621096            2*g2("-2,1,1") + 2*g2("-1,-1,2") + 2*g2("-1,2,-1") + 2*g2("1,-2,1") + 2*g2("1,1,-2") + 2*g2("2,-1,-1") 
    10631097        """ 
    1064         return Weight(self._parent, dict([[tuple(w.action(self._parent.VS(x))),self._mdict[x]] for x in self._mdict.keys()])) 
     1098        return WeightRingElement(self._parent, dict([[tuple(w.action(self._parent.VS(x))),self._mdict[x]] for x in self._mdict.keys()])) 
    10651099 
    10661100    def character(self): 
    10671101        """ 
    class WeightRing(Algebra): 
    11721206          True 
    11731207        """ 
    11741208        if x == 0: 
    1175             return Weight(self, {}) 
     1209            return WeightRingElement(self, {}) 
    11761210        if x in ZZ: 
    11771211            mdict = {self._origin: x} 
    1178             return Weight(self, mdict) 
     1212            return WeightRingElement(self, mdict) 
    11791213        if is_Element(x): 
    11801214            P = x.parent() 
    11811215            if P is self: 
    11821216                return x 
    11831217            elif x in self.base_ring(): 
    11841218                mdict = {self._origin: x} 
    1185                 return Weight(self, mdict) 
     1219                return WeightRingElement(self, mdict) 
    11861220        try: 
    11871221            if x.parent() == self._parent: 
    1188                 return Weight(self, x._mdict) 
     1222                return WeightRingElement(self, x._mdict) 
    11891223        except AttributeError: 
    11901224            pass 
    11911225        if type(x) == str: 
    class WeightRing(Algebra): 
    11971231                x = tuple(eval(i) for i in x) 
    11981232        x = self.VS(x) 
    11991233        mdict = {tuple(x): 1} 
    1200         return Weight(self, mdict) 
     1234        return WeightRingElement(self, mdict) 
    12011235 
    12021236    def __repr__(self): 
    12031237        """