Ticket #13391: trac_13391weyl_characters.patch
File trac_13391weyl_characters.patch, 22.1 KB (added by , 9 years ago) 


doc/en/thematic_tutorials/lie/weyl_character_ring.rst
# HG changeset patch # User Daniel Bump <bump@match.stanford.edu> # Date 1345727661 25200 # Node ID 0987e9326876712a0544d9d241edee0a8753c2f7 # Parent e5ea7d3deb3577e0fbf0788c2c318c34d4968a8c #13391 Speedup: reimplement multiplication in WeylCharacterRings using BrauerKlimyk algorithm 100% doctest coverage in weyl_characters.py exterior_power, symmetric_power and adams_operation methods for WeylCharacterRing elements revision of the Lie thematic tutorial to reflect the new methods diff git a/doc/en/thematic_tutorials/lie/weyl_character_ring.rst b/doc/en/thematic_tutorials/lie/weyl_character_ring.rst
a b 305 305 symplectic, while those of `spin(7)` and `spin(9)` are orthogonal. 306 306 307 307 308 Symmetric and exterior square308 Symmetric and exterior powers 309 309  310 310 311 Sage can compute symmetric and exterior powers of a representation:: 312 313 sage: B3 = WeylCharacterRing("B3",style="coroots") 314 sage: spin=B3(0,0,1); spin.degree() 315 8 316 sage: spin.exterior_power(2) 317 B3(1,0,0) + B3(0,1,0) 318 sage: spin.exterior_square() 319 B3(1,0,0) + B3(0,1,0) 320 sage: spin.exterior_power(5) 321 B3(0,0,1) + B3(1,0,1) 322 sage: spin.symmetric_power(5) 323 B3(0,0,1) + B3(0,0,3) + B3(0,0,5) 324 325 The `k`th exterior square of a representation is zero if `k` 326 is greater than the degree of the representation. However the 327 `k`th symmetric power is nonzero for all `k`. 328 311 329 The tensor square of any representation decomposes as the direct sum 312 330 of the symmetric and exterior squares:: 313 331 … … 523 541 [1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796] 524 542 525 543 526 Symmetric and Exterior Powers527 528 529 We have seen that WeylCharacterRing elements have builtin530 methods for symmetric and exterior square. If you want to531 obtain higher symmetric or exterior powers, you may do it532 as follows. Let us consider the eight dimensional adjoint533 representation of `SL(3)`. We will compute the symmetric534 fifth power and the exterior fourth powers of this.535 The adjoint representation is a homomorphism from `SL(3)`536 to `SL(8)`, so the relevant WeylCharacterRings are `A2`537 and `A7`. First we construct the symmetric fifth power538 and exterior fourth power representations of `A7` ::539 540 sage: A2 = WeylCharacterRing("A2",style="coroots")541 sage: A7 = WeylCharacterRing("A7",style="coroots")542 sage: s = A7.fundamental_weights()[1]; s543 (1, 0, 0, 0, 0, 0, 0, 0)544 sage: e = A7.fundamental_weights()[4]; e545 (1, 1, 1, 1, 0, 0, 0, 0)546 sage: A7(5*s).degree()547 792548 sage: A7(e).degree()549 70550 551 Now we may branch these representations down to `SL(2)`552 along the adjoint representation. This computes the553 symmetric and exterior powers of `ad`.554 555 .. link556 557 ::558 559 sage: ad=A2(1,1); ad.degree()560 8561 sage: sym5 = A7(5*s).branch(A2,rule=branching_rule_from_plethysm(ad,"A7")); sym5 # long time562 A2(0,0) + A2(0,3) + 2*A2(1,1) + A2(3,0) + A2(1,4) + 2*A2(2,2) + A2(4,1) + A2(2,5) + 2*A2(3,3) + A2(5,2) + A2(4,4) + A2(5,5)563 sage: ext4 = A7(e).branch(A2,rule=branching_rule_from_plethysm(ad,"A7")); ext4564 2*A2(1,1) + 2*A2(2,2)565 566 544 Invariants and multiplicities 567 545  568 546 … … 574 552 575 553 :: 576 554 577 sage: sym5.invariant_degree() # long time 578 1 579 sage: ext4.invariant_degree() 580 0 555 sage: A2=WeylCharacterRing("A2",style="coroots") 556 sage: ad = A2(1,1) 557 sage: [ad.symmetric_power(k).invariant_degree() for k in [0..6]] 558 [1, 0, 1, 1, 1, 1, 2] 559 sage: [ad.exterior_power(k).invariant_degree() for k in [0..6]] 560 [1, 0, 0, 1, 0, 1, 0] 581 561 582 562 If we want the multiplicity of some other representation, we may 583 563 obtain that using the method ``multiplicity``:: … … 586 566 587 567 :: 588 568 589 sage: [rep.multiplicity(A2(3,3)) for rep in [sym5, ext4]] # long time 590 [2, 0] 569 sage: (ad^3).multiplicity(ad) 570 8 591 571 
sage/combinat/root_system/weyl_characters.py
diff git a/sage/combinat/root_system/weyl_characters.py b/sage/combinat/root_system/weyl_characters.py
a b 179 179 """ 180 180 The embedding of ``self`` into its weight ring 181 181 182 EXAMPLES 182 EXAMPLES:: 183 183 184 184 sage: A2 = WeylCharacterRing("A2") 185 185 sage: A2.lift … … 288 288 """ 289 289 EXAMPLES:: 290 290 291 sage: WeylCharacterRing("A3") 291 sage: WeylCharacterRing("A3") # indirect doctest 292 292 The Weyl Character Ring of Type ['A', 3] with Integer Ring coefficients 293 293 294 294 """ … … 374 374 return self.monomial(weight) 375 375 376 376 def product_on_basis(self, a, b): 377 """ 377 r""" 378 This computes the tensor product of two irreducible representations 379 using the BrauerKlimyk method. 380 378 381 EXAMPLES:: 379 382 380 383 sage: D4 = WeylCharacterRing(['D',4]) 381 384 sage: spin_plus = D4(1/2,1/2,1/2,1/2) 382 385 sage: spin_minus = D4(1/2,1/2,1/2,1/2) 383 sage: spin_plus*spin_minus 386 sage: spin_plus*spin_minus # indirect doctest 384 387 D4(1,0,0,0) + D4(1,1,1,0) 385 388 sage: spin_minus*spin_plus 386 389 D4(1,0,0,0) + D4(1,1,1,0) 387 390 """ 391 # The method is asymmetrical, and as a rule of thumb 392 # it is fastest to switch the factors so that the 393 # smaller character is the one that is decomposed 394 # into weights. 395 if sum(a.coefficients()) > sum(b.coefficients()): 396 a,b = b,a 397 return self._product_helper(self._irr_weights(a), b) 398 399 def _product_helper(self, d1, b): 400 """ 401 INPUT: 402 403  ``d1``  a dictionary of weight multiplicities 404  ``b``  a dominant weight 405 406 If ``d1`` is the dictionary of weight multiplicities of a character, 407 returns the product of that character by the irreducible character 408 with highest weight ``b``. 409 410 EXAMPLES:: 411 412 sage: A2 = WeylCharacterRing("A2") 413 sage: r = A2(1,0,0) 414 sage: [A2._product_helper(r.weight_multiplicities(),x) for x in A2.space().fundamental_weights()] 415 [A2(1,1,0) + A2(2,0,0), A2(1,1,1) + A2(2,1,0)] 416 """ 388 417 d = {} 389 d1 = self._irr_weights(a)390 d2 = self._irr_weights(b)391 418 for k in d1: 392 for l in d2: 393 m = k+l 394 if m in d: 395 d[m] += d1[k]*d2[l] 396 else: 397 d[m] = d1[k]*d2[l] 398 for k in d.keys(): 399 if d[k] == 0: 400 del d[k] 401 return self.char_from_weights(d) 419 [epsilon,g] = self.dot_reduce(b+k) 420 if epsilon == 1: 421 d[g] = d.get(g,0) + d1[k] 422 elif epsilon == 1: 423 d[g] = d.get(g,0) d1[k] 424 return self._from_dict(d) 425 426 def dot_reduce(self, a): 427 r""" 428 Auxiliary function for product_on_basis. 429 430 INPUT: 431 432  ``a``  a weight. 433 434 Returns a pair `[\epsilon,b]` where `b` is a dominant weight and 435 `\epsilon` is 0,1 or 1. To describe `b`, let `w` be an element of 436 the Weyl group such that `w(a+\rho)` is dominant. If 437 `w(a+\rho)\rho` is dominant, then `\epsilon` is the sign of 438 `w` and `b` is `w(a+\rho)\rho`. Otherwise, `\epsilon` is zero. 439 440 EXAMPLES:: 441 442 sage: A2=WeylCharacterRing("A2") 443 sage: weights=A2(2,1,0).weight_multiplicities().keys(); weights 444 [(1, 2, 0), (2, 1, 0), (0, 2, 1), (2, 0, 1), (0, 1, 2), (1, 1, 1), (1, 0, 2)] 445 sage: [A2.dot_reduce(x) for x in weights] 446 [[0, (0, 0, 0)], [1, (2, 1, 0)], [1, (1, 1, 1)], [0, (0, 0, 0)], [0, (0, 0, 0)], [1, (1, 1, 1)], [1, (1, 1, 1)]] 447 """ 448 alphacheck = self._space.simple_coroots() 449 alpha = self._space.simple_roots() 450 sr = self._space.weyl_group().simple_reflections() 451 [epsilon, ret] = [1,a] 452 done = False 453 while not done: 454 done = True 455 for i in self._space.index_set(): 456 c = ret.inner_product(alphacheck[i]) 457 if c == 1: 458 return [0, self._space.zero()] 459 elif c < 1: 460 epsilon = epsilon 461 ret = (1+c)*alpha[i] 462 done = False 463 break 464 return [epsilon, ret] 402 465 403 466 def some_elements(self): 404 467 """ 405 EXAMPLE ::468 EXAMPLES:: 406 469 407 470 sage: WeylCharacterRing("A3").some_elements() 408 471 [A3(1,0,0,0), A3(1,1,0,0), A3(1,1,1,0)] … … 412 475 413 476 def one_basis(self): 414 477 """ 415 EXAMPLE ::478 EXAMPLES:: 416 479 417 480 sage: WeylCharacterRing("A3").one_basis() 418 481 (0, 0, 0, 0) … … 429 492 with highest weight vector hwv. This method is cached 430 493 for efficiency. 431 494 432 EXAMPLE ::495 EXAMPLES:: 433 496 434 497 sage: A2=WeylCharacterRing("A2") 435 498 sage: v = A2.fundamental_weights()[1]; v … … 445 508 Produces the dictionary of weight multiplicities for the 446 509 WeylCharacter x. The character x does not have to be irreducible. 447 510 448 EXAMPLE ::511 EXAMPLES:: 449 512 450 513 sage: B2=WeylCharacterRing("B2",style="coroots") 451 514 sage: chi=2*B2(1,0) … … 509 572 """ 510 573 Representation of the monomial corresponding to a weight t. 511 574 512 EXAMPLES 513 514 sage: G2=WeylCharacterRing("G2") 575 EXAMPLES:: 576 577 sage: G2=WeylCharacterRing("G2") # indirect doctest 515 578 sage: [G2._repr_term(x) for x in G2.fundamental_weights()] 516 579 ['G2(1,0,1)', 'G2(2,1,1)'] 517 580 """ … … 556 619 557 620 EXAMPLES:: 558 621 559 sage: WeylCharacterRing("G2").simple_ roots()560 Finite family {1: (0, 1, 1), 2: (1 , 2, 1)}622 sage: WeylCharacterRing("G2").simple_coroots() 623 Finite family {1: (0, 1, 1), 2: (1/3, 2/3, 1/3)} 561 624 """ 562 625 return self._space.simple_coroots() 563 626 … … 650 713 651 714 OUTPUT: the corresponding Weyl character 652 715 653 EXAMPLES 716 EXAMPLES:: 654 717 655 718 sage: A2 = WeylCharacterRing("A2") 656 719 sage: v = A2._space([3,1,0]); v … … 732 795 733 796 INPUT: 734 797 735  ``S``  a Weyl character ring for a Lie subgroup or798  ``S``  a Weyl character ring for a Lie subgroup or 736 799 subalgebra 737 800 738  ``rule``  a branching rule.801  ``rule``  a branching rule. 739 802 740 803 See :func:`branch_weyl_character` for more information 741 804 about branching rules. … … 751 814 """ 752 815 return branch_weyl_character(self, self.parent(), S, rule=rule) 753 816 817 def __pow__(self, n): 818 """ 819 We override the method in monoids.py since using the BrauerKlimyk algorithm, 820 it is more efficient to compute a*(a*(a*a)) than (a*a)*(a*a). 821 822 EXAMPLES:: 823 824 sage: B4=WeylCharacterRing("B4",style="coroots") 825 sage: spin = B4(0,0,0,1) 826 sage: [spin^k for k in [0,1,3]] 827 [B4(0,0,0,0), B4(0,0,0,1), 5*B4(0,0,0,1) + 4*B4(1,0,0,1) + 3*B4(0,1,0,1) + 2*B4(0,0,1,1) + B4(0,0,0,3)] 828 """ 829 if n == 0: 830 return self.parent().one() 831 elif n == 1: 832 return self 833 else: 834 return self*self.__pow__(n1) 835 754 836 def is_irreducible(self): 755 837 """ 756 838 Returns whether ``self`` is an irreducible character. … … 765 847 """ 766 848 return self.coefficients() == [1] 767 849 850 @cached_method 851 def symmetric_power(self, k): 852 r""" 853 Returns the `k`th symmetric power of ``self``. 854 855 INPUT: 856 857  `k`  a nonnegative integer 858 859 The algorithm is based on the 860 identity `k h_k = \sum_{r=1}^k p_k h_{kr}` relating the powersum and 861 complete symmetric polynomials. Applying this to the eigenvalues of 862 an element of the parent Lie group in the representation ``self``, the 863 `h_k ` become symmetric powers and the `p_k` become adams operations, 864 giving an efficient recursive implementation. 865 866 EXAMPLES:: 867 868 sage: B3=WeylCharacterRing("B3",style="coroots") 869 sage: spin=B3(0,0,1) 870 sage: spin.symmetric_power(6) 871 B3(0,0,0) + B3(0,0,2) + B3(0,0,4) + B3(0,0,6) 872 """ 873 par = self.parent() 874 if k == 0: 875 return par.one() 876 if k == 1: 877 return self 878 ret = par.zero() 879 for r in range(1,k+1): 880 adam_r = self._adams_operation_helper(r) 881 ret += par.linear_combination( (par._product_helper(adam_r, l), c) for (l, c) in self.symmetric_power(kr)) 882 dd = {} 883 m = ret.weight_multiplicities() 884 for l in m: 885 dd[l] = m[l]/k 886 return self.parent().char_from_weights(dd) 887 888 @cached_method 889 def exterior_power(self, k): 890 r""" 891 Returns the `k`th exterior power of ``self``. 892 893 INPUT: 894 895  ``k``  a nonnegative integer 896 897 The algorithm is based on the 898 identity `k e_k = \sum_{r=1}^k (1)^{k1} p_k e_{kr}` relating the 899 powersum and elementary symmetric polynomials. Applying this to the eigenvalues of 900 an element of the parent Lie group in the representation self, the 901 `e_k ` become exterior powers and the `p_k` become adams operations, 902 giving an efficient recursive implementation. 903 904 EXAMPLES:: 905 906 sage: B3=WeylCharacterRing("B3",style="coroots") 907 sage: spin=B3(0,0,1) 908 sage: spin.exterior_power(6) 909 B3(1,0,0) + B3(0,1,0) 910 """ 911 par = self.parent() 912 if k == 0: 913 return par.one() 914 if k == 1: 915 return self 916 ret = par.zero() 917 for r in range(1,k+1): 918 adam_r = self._adams_operation_helper(r) 919 if is_even(r): 920 ret = par.linear_combination( (par._product_helper(adam_r, l), c) for (l, c) in self.exterior_power(kr)) 921 else: 922 ret += par.linear_combination( (par._product_helper(adam_r, l), c) for (l, c) in self.exterior_power(kr)) 923 dd = {} 924 m = ret.weight_multiplicities() 925 for l in m: 926 dd[l] = m[l]/k 927 return self.parent().char_from_weights(dd) 928 929 def adams_operation(self, r): 930 """ 931 Returns the `r`th Adams operation of ``self``. 932 933 INPUT: 934 935  ``r``  a positive integer 936 937 This is a virtual character, 938 whose weights are the weights of ``self``, each multiplied by `r`. 939 940 EXAMPLES:: 941 942 sage: A2=WeylCharacterRing("A2") 943 sage: A2(1,1,0).adams_operation(3) 944 A2(2,2,2)  A2(3,2,1) + A2(3,3,0) 945 """ 946 return self.parent().char_from_weights(self._adams_operation_helper(r)) 947 948 def _adams_operation_helper(self, r): 949 """ 950 Helper function for Adams operations. 951 952 INPUT: 953 954  ``r``  a positive integer 955 956 Returns the dictionary of weight multiplicities for the Adams operation, needed for 957 internal use by symmetric and exterior powers. 958 959 EXAMPLES:: 960 961 sage: A2=WeylCharacterRing("A2") 962 sage: A2(1,1,0)._adams_operation_helper(3) 963 {(3, 3, 0): 1, (0, 3, 3): 1, (3, 0, 3): 1} 964 """ 965 d = self.weight_multiplicities() 966 dd = {} 967 for k in d: 968 dd[r*k] = d[k] 969 return dd 970 768 971 def symmetric_square(self): 769 972 """ 770 973 Returns the symmetric square of the character. … … 776 979 A2(2,0) 777 980 """ 778 981 # Conceptually, this converts self to the weight ring, 779 # computes its square there, and convert the result back, 780 # similar to what is done by product_on_basis. So in 781 # principle, one could just return self^2. 982 # computes its square there, and converts the result back. 782 983 # 783 984 # This implementation uses that this is a squaring (and not 784 985 # a generic product) in the weight ring to optimize by 785 986 # running only through pairs of weights instead of couples. 786 # Worth it?787 987 c = self.weight_multiplicities() 788 988 ckeys = c.keys() 789 989 d = {} … … 879 1079 Produces the dictionary of weight multiplicities for the 880 1080 WeylCharacter self. The character does not have to be irreducible. 881 1081 882 EXAMPLE 1082 EXAMPLES:: 883 1083 884 1084 sage: B2=WeylCharacterRing("B2",style="coroots") 885 1085 sage: B2(0,1).weight_multiplicities() … … 895 1095 interpreted as functions on a compact Lie group, 896 1096 by Schur orthogonality. 897 1097 898 EXAMPLES 1098 EXAMPLES:: 899 1099 900 1100 sage: A2 = WeylCharacterRing("A2") 901 1101 sage: [f1,f2]=A2.fundamental_weights() … … 914 1114 in self. Multiplicities of other irreducibles may be 915 1115 obtained using the method ``multiplicity.`` 916 1116 917 EXAMPLE 1117 EXAMPLES:: 918 1118 919 1119 sage: A2 = WeylCharacterRing("A2",style="coroots") 920 1120 sage: rep = A2(1,0)^2*A2(0,1)^2; rep … … 932 1132 933 1133 Returns the multiplicity of the irreducible other in self. 934 1134 935 EXAMPLE ::1135 EXAMPLES:: 936 1136 937 1137 sage: B2 = WeylCharacterRing("B2",style="coroots") 938 1138 sage: rep = B2(1,1)^2; rep … … 962 1162  ``hwv``  a dominant weight in a weight lattice. 963 1163 964 1164  ``L``  the ambient space 1165 1166 EXAMPLES:: 1167 1168 sage: WeylCharacterRing("A2")(2,1,0).weight_multiplicities() # indirect doctest 1169 {(1, 2, 0): 1, (2, 1, 0): 1, (0, 2, 1): 1, (2, 0, 1): 1, (0, 1, 2): 1, (1, 1, 1): 2, (1, 0, 2): 1} 965 1170 """ 966 1171 rho = L.rho() 967 1172 mdict = {} … … 1646 1851 """ 1647 1852 INPUT: 1648 1853 1649  ``R``  the Weyl Character Ring of G1650 1651  ``S``  the Weyl Character Ring of H1652 1653  ``rule``  a string describing the branching rule as a map from1854  ``R``  the Weyl Character Ring of G 1855 1856  ``S``  the Weyl Character Ring of H 1857 1858  ``rule``  a string describing the branching rule as a map from 1654 1859 the weight space of S to the weight space of R. 1860 1861 EXAMPLES:: 1862 1863 sage: rule = get_branching_rule(CartanType("A3"),CartanType("C2"),"symmetric") 1864 sage: [rule(x) for x in WeylCharacterRing("A3").fundamental_weights()] 1865 [[1, 0], [1, 1], [1, 0]] 1655 1866 """ 1656 1867 r = Rtype.rank() 1657 1868 s = Stype.rank() … … 2057 2268 2058 2269 Returns a branching rule for this plethysm. 2059 2270 2060 EXAMPLE :2271 EXAMPLES: 2061 2272 2062 2273 The adjoint representation SL(3) > GL(8) factors 2063 2274 through SO(8). The branching rule in question will … … 2141 2352 is that one may conduct calculations in the WeightRing that 2142 2353 involve sums of weights that are not Weyl Group invariant. 2143 2354 2144 EXAMPLE ::2355 EXAMPLES:: 2145 2356 2146 2357 sage: A2 = WeylCharacterRing(['A',2]) 2147 2358 sage: a2 = WeightRing(A2) … … 2166 2377 @staticmethod 2167 2378 def __classcall__(cls, parent, prefix=None): 2168 2379 """ 2380 TESTS:: 2381 2382 sage: A3 = WeylCharacterRing("A3", style="coroots") 2383 sage: a3 = WeightRing(A3) 2384 sage: a3.cartan_type(), a3.base_ring(), a3.parent() 2385 (['A', 3], Integer Ring, The Weyl Character Ring of Type ['A', 3] with Integer Ring coefficients) 2169 2386 """ 2170 2387 return super(WeightRing, cls).__classcall__(cls, parent, prefix=prefix) 2171 2388 … … 2214 2431 2215 2432 sage: P.<q>=QQ[] 2216 2433 sage: G2 = WeylCharacterRing(['G',2], base_ring = P) 2217 sage: WeightRing(G2) 2434 sage: WeightRing(G2) # indirect doctest 2218 2435 The Weight ring attached to The Weyl Character Ring of Type ['G', 2] with Univariate Polynomial Ring in q over Rational Field coefficients 2219 2436 """ 2220 2437 return "The Weight ring attached to %s"%self._parent … … 2279 2496 2280 2497 def product_on_basis(self, a, b): 2281 2498 """ 2282 EXAMPLE ::2499 EXAMPLES:: 2283 2500 2284 2501 sage: A2=WeylCharacterRing("A2") 2285 2502 sage: a2=WeightRing(A2) 2286 sage: a2(1,0,0)*a2(0,1,0) 2503 sage: a2(1,0,0)*a2(0,1,0) # indirect doctest 2287 2504 a2(1,1,0) 2288 2505 """ 2289 2506 return self(a+b) 2290 2507 2291 2508 def some_elements(self): 2292 2509 """ 2293 EXAMPLE ::2510 EXAMPLES:: 2294 2511 2295 2512 sage: A3=WeylCharacterRing("A3") 2296 2513 sage: a3=WeightRing(A3) … … 2301 2518 2302 2519 def one_basis(self): 2303 2520 """ 2304 EXAMPLE ::2521 EXAMPLES:: 2305 2522 2306 2523 sage: A3=WeylCharacterRing("A3") 2307 2524 sage: WeightRing(A3).one_basis() … … 2315 2532 """ 2316 2533 Returns the parent Weyl Character Ring. 2317 2534 2318 EXAMPLE ::2535 EXAMPLES:: 2319 2536 2320 2537 sage: A2=WeylCharacterRing("A2") 2321 2538 sage: a2=WeightRing(A2) … … 2331 2548 """ 2332 2549 Returns the parent Weyl Character Ring. A synonym for self.parent(). 2333 2550 2334 EXAMPLE ::2551 EXAMPLES:: 2335 2552 2336 2553 sage: A2=WeylCharacterRing("A2") 2337 2554 sage: a2=WeightRing(A2) … … 2423 2640 2424 2641 sage: G2=WeylCharacterRing("G2") 2425 2642 sage: g2=WeightRing(G2) 2426 sage: [g2(x) for x in g2.fundamental_weights()] 2643 sage: [g2(x) for x in g2.fundamental_weights()] # indirect doctest 2427 2644 [g2(1,0,1), g2(2,1,1)] 2428 2645 """ 2429 2646 return self.wt_repr(t) … … 2435 2652 def cartan_type(self): 2436 2653 """ 2437 2654 Returns the Cartan type. 2655 2438 2656 EXAMPLES:: 2439 2657 2440 2658 sage: A2=WeylCharacterRing("A2")