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 4 4 from coxeter_matrix import coxeter_matrix 5 5 from root_system import RootSystem, WeylDim 6 6 from weyl_group import WeylGroup, WeylGroupElement 7 from weyl_characters import WeylCharacter, WeylCharacterRing, branch_weyl_character, WeightRing, Weight 7 from 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 28 28 from sage.algebras.algebra_element import AlgebraElement 29 29 30 30 class 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 33 69 dictionaries. The mdict is a dictionary of weight multiplicities. The 34 70 hdict is a dictionary of highest weight vectors of the irreducible 35 71 characters that occur in its decomposition into irreducibles, with the 36 72 multiplicities in this decomposition. 37 73 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. 44 84 """ 45 85 def __init__(self, A, hdict, mdict): 46 86 """ … … def irreducible_character_freudenthal(hw 506 546 hwv - a dominant weight in a weight lattice. 507 547 L - the ambient lattice 508 548 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. 520 558 """ 521 559 rank = L.ct[1] 522 560 VS = VectorSpace(QQ, L.n) … … def branch_weyl_character(chi, R, S, rul 875 913 876 914 877 915 878 class Weight (AlgebraElement):916 class WeightRingElement(AlgebraElement): 879 917 """ 880 A class for weights, and linear combinations of weights. See Weight Algebra?918 A class for weights, and linear combinations of weights. See WeightRing? 881 919 for more information. 882 INPUT:883 A - the Weight Ring884 mdict - a dictionary of weights.885 Produces an element of the Weight ring.886 920 """ 887 921 def __init__(self, A, mdict): 888 922 """ … … class Weight(AlgebraElement): 961 995 for k in y._mdict: 962 996 if not k in self._mdict: 963 997 mdict[k] = y._mdict[k] 964 return Weight (self._parent, mdict)998 return WeightRingElement(self._parent, mdict) 965 999 966 1000 def _neg_(self): 967 1001 """ … … class Weight(AlgebraElement): 974 1008 mdict = self._mdict.copy() 975 1009 for k in self._mdict: 976 1010 mdict[k] = - mdict[k] 977 return Weight (self._parent, mdict)1011 return WeightRingElement(self._parent, mdict) 978 1012 979 1013 def _sub_(self, y): 980 1014 """ … … class Weight(AlgebraElement): 1012 1046 for k in mdict.keys(): 1013 1047 if mdict[k] == 0: 1014 1048 del mdict[k] 1015 return Weight (self._parent, mdict)1049 return WeightRingElement(self._parent, mdict) 1016 1050 1017 1051 def __pow__(self, n): 1018 1052 """ … … class Weight(AlgebraElement): 1061 1095 sage: sum(g2(fw2).weyl_group_action(w) for w in L.weyl_group()) 1062 1096 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") 1063 1097 """ 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()])) 1065 1099 1066 1100 def character(self): 1067 1101 """ … … class WeightRing(Algebra): 1172 1206 True 1173 1207 """ 1174 1208 if x == 0: 1175 return Weight (self, {})1209 return WeightRingElement(self, {}) 1176 1210 if x in ZZ: 1177 1211 mdict = {self._origin: x} 1178 return Weight (self, mdict)1212 return WeightRingElement(self, mdict) 1179 1213 if is_Element(x): 1180 1214 P = x.parent() 1181 1215 if P is self: 1182 1216 return x 1183 1217 elif x in self.base_ring(): 1184 1218 mdict = {self._origin: x} 1185 return Weight (self, mdict)1219 return WeightRingElement(self, mdict) 1186 1220 try: 1187 1221 if x.parent() == self._parent: 1188 return Weight (self, x._mdict)1222 return WeightRingElement(self, x._mdict) 1189 1223 except AttributeError: 1190 1224 pass 1191 1225 if type(x) == str: … … class WeightRing(Algebra): 1197 1231 x = tuple(eval(i) for i in x) 1198 1232 x = self.VS(x) 1199 1233 mdict = {tuple(x): 1} 1200 return Weight (self, mdict)1234 return WeightRingElement(self, mdict) 1201 1235 1202 1236 def __repr__(self): 1203 1237 """
