Ticket #5794: trac_5794longtiment.patch
File trac_5794longtiment.patch, 10.1 KB (added by , 13 years ago) 


sage/combinat/root_system/weyl_characters.py
# HG changeset patch # User Nicolas M. Thiery <nthiery@users.sf.net> # Date 1258629791 3600 # Node ID d568eaeefdf91ddbf9f3a8283e3049fa9d0bc986 # Parent 142e64bbdd963ed7af7e35f77f8c07ab2090813e [mq]: trac_5794longtiment.patch diff git a/sage/combinat/root_system/weyl_characters.py b/sage/combinat/root_system/weyl_characters.py
a b class WeylCharacter(AlgebraElement): 114 114 115 115 sage: R = WeylCharacterRing("B3", prefix = "R") 116 116 sage: r = R(1,1,0) 117 sage: r == loads(dumps(r)) 118 True 117 sage: TestSuite(r).run() 119 118 """ 120 119 AlgebraElement.__init__(self, A) 121 120 self._hdict = hdict … … class WeylCharacterRing_class(Algebra): 621 620 EXAMPLES:: 622 621 623 622 sage: R = WeylCharacterRing(['A',3]) 624 sage: R == loads(dumps(R)) 625 True 623 sage: TestSuite(R).run() 626 624 """ 627 625 sage.structure.parent_base.ParentWithBase.__init__(self, base_ring) 628 626 … … def branch_weyl_character(chi, R, S, rul 1285 1283 sage: D4 = WeylCharacterRing("D4") 1286 1284 sage: D5 = WeylCharacterRing("D5") 1287 1285 sage: G2 = WeylCharacterRing("G2") 1288 sage: F4 = WeylCharacterRing("F4",style="coroots") # long time1286 sage: F4 = WeylCharacterRing("F4",style="coroots") 1289 1287 sage: E6=WeylCharacterRing("E6",style="coroots") 1290 1288 sage: D5=WeylCharacterRing("D5",style="coroots") 1291 1289 sage: [B3(w).branch(A2,rule="levi") for w in B3.fundamental_weights()] … … def branch_weyl_character(chi, R, S, rul 1328 1326 D4(1/2,1/2,1/2,1/2) + D4(1/2,1/2,1/2,1/2)] 1329 1327 sage: G2(1,0,1).branch(A1,rule="levi") 1330 1328 A1(0,1) + A1(1,1) + A1(1,0) 1331 sage: E6=WeylCharacterRing("E6",style="coroots") # long time1332 sage: D5=WeylCharacterRing("D5",style="coroots") # long time1333 sage: fw = E6.fundamental_weights() # long time1334 sage: [E6(fw[i]).branch(D5,rule="levi") for i in [1,2,6]] # long time 1329 sage: E6=WeylCharacterRing("E6",style="coroots") 1330 sage: D5=WeylCharacterRing("D5",style="coroots") 1331 sage: fw = E6.fundamental_weights() 1332 sage: [E6(fw[i]).branch(D5,rule="levi") for i in [1,2,6]] # long time (3s) 1335 1333 [D5(0,0,0,0,0) + D5(0,0,0,0,1) + D5(1,0,0,0,0), 1336 1334 D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(0,0,0,0,1) + D5(0,1,0,0,0), 1337 1335 D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(1,0,0,0,0)] 1338 sage: E7=WeylCharacterRing("E7",style="coroots") # long time1339 sage: D6=WeylCharacterRing("D6",style="coroots") # long time1340 sage: fw = E7.fundamental_weights() # long time1341 sage: [E7(fw[i]).branch(D6,rule="levi") for i in [1,2,7]] # long time 1336 sage: E7=WeylCharacterRing("E7",style="coroots") 1337 sage: D6=WeylCharacterRing("D6",style="coroots") 1338 sage: fw = E7.fundamental_weights() 1339 sage: [E7(fw[i]).branch(D6,rule="levi") for i in [1,2,7]] # long time (26s) 1342 1340 [3*D6(0,0,0,0,0,0) + 2*D6(0,0,0,0,1,0) + D6(0,1,0,0,0,0), 1343 1341 3*D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0) + 2*D6(0,0,1,0,0,0) + D6(1,0,0,0,1,0), 1344 1342 D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0)] 1345 sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time1346 sage: E8=WeylCharacterRing("E8",style="coroots",cache=True) # long time1347 sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time1348 sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule="levi") # long time1343 sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) 1344 sage: E8=WeylCharacterRing("E8",style="coroots",cache=True) 1345 sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) 1346 sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule="levi") # not tested (very long time) (160s) 1349 1347 3*D7(0,0,0,0,0,0,0) + 2*D7(0,0,0,0,0,1,0) + 2*D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) 1350 1348 + D7(0,1,0,0,0,0,0) + 2*D7(0,0,1,0,0,0,0) + D7(0,0,0,1,0,0,0) + D7(1,0,0,0,0,1,0) + D7(1,0,0,0,0,0,1) + D7(2,0,0,0,0,0,0) 1351 sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule="levi") # long time 1349 sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule="levi") # long time (3s) 1352 1350 D7(0,0,0,0,0,0,0) + D7(0,0,0,0,0,1,0) + D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) 1353 sage: [F4(fw).branch(B3,rule="levi") for fw in F4.fundamental_weights()] # long time 1351 sage: [F4(fw).branch(B3,rule="levi") for fw in F4.fundamental_weights()] # long time (36s) 1354 1352 [B3(0,0,0) + 2*B3(1/2,1/2,1/2) + 2*B3(1,0,0) + B3(1,1,0), 1355 1353 B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 5*B3(1,0,0) + 7*B3(1,1,0) + 3*B3(1,1,1) 1356 1354 + 6*B3(3/2,1/2,1/2) + 2*B3(3/2,3/2,1/2) + B3(2,0,0) + 2*B3(2,1,0) + B3(2,1,1), 1357 1355 3*B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 4*B3(1,0,0) + 3*B3(1,1,0) + B3(1,1,1) + 2*B3(3/2,1/2,1/2), 1358 1356 3*B3(0,0,0) + 2*B3(1/2,1/2,1/2) + B3(1,0,0)] 1359 sage: [F4(fw).branch(C3,rule="levi") for fw in F4.fundamental_weights()] # long time 1357 sage: [F4(fw).branch(C3,rule="levi") for fw in F4.fundamental_weights()] # long time (6s) 1360 1358 [3*C3(0,0,0) + 2*C3(1,1,1) + C3(2,0,0), 1361 1359 3*C3(0,0,0) + 6*C3(1,1,1) + 4*C3(2,0,0) + 2*C3(2,1,0) + 3*C3(2,2,0) + C3(2,2,2) + C3(3,1,0) + 2*C3(3,1,1), 1362 1360 2*C3(1,0,0) + 3*C3(1,1,0) + C3(2,0,0) + 2*C3(2,1,0) + C3(2,1,1), … … def branch_weyl_character(chi, R, S, rul 1397 1395 [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] 1398 1396 sage: [D4(x).branch(G2,rule="symmetric") for x in D4.fundamental_weights()] 1399 1397 [G2(0,0,0) + G2(1,0,1), 2*G2(1,0,1) + G2(2,1,1), G2(0,0,0) + G2(1,0,1), G2(0,0,0) + G2(1,0,1)] 1400 sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] # long time 1398 sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] # long time (36s) 1401 1399 [F4(0,0,0,0) + F4(0,0,0,1), 1402 1400 F4(0,0,0,1) + F4(1,0,0,0), 1403 1401 F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), … … def branch_weyl_character(chi, R, S, rul 1416 1414 sage: [G2(w).branch(A2, rule="extended") for w in G2.fundamental_weights()] 1417 1415 [A2(0,0,0) + A2(1/3,1/3,2/3) + A2(2/3,1/3,1/3), 1418 1416 A2(1/3,1/3,2/3) + A2(2/3,1/3,1/3) + A2(1,0,1)] 1419 sage: [F4(fw).branch(B4,rule="extended") for fw in F4.fundamental_weights()] # long time 1417 sage: [F4(fw).branch(B4,rule="extended") for fw in F4.fundamental_weights()] # long time (9s) 1420 1418 [B4(1/2,1/2,1/2,1/2) + B4(1,1,0,0), 1421 1419 B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2) + B4(3/2,3/2,1/2,1/2) + B4(2,1,1,0), 1422 1420 B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0) + B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2), 1423 1421 B4(0,0,0,0) + B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0)] 1424 1422 1425 sage: E6 = WeylCharacterRing("E6", style="coroots") # long time1423 sage: E6 = WeylCharacterRing("E6", style="coroots") 1426 1424 sage: A2xA2xA2=WeylCharacterRing("A2xA2xA2",style="coroots") 1427 1425 sage: A5xA1=WeylCharacterRing("A5xA1",style="coroots") 1428 1426 sage: G2 = WeylCharacterRing("G2", style="coroots") … … def branch_weyl_character(chi, R, S, rul 1432 1430 sage: A2xA2 = WeylCharacterRing("A2xA2", style="coroots") 1433 1431 sage: A1xC3 = WeylCharacterRing("A1xC3",style="coroots") 1434 1432 1435 sage: E6(1,0,0,0,0,0).branch(A5xA1,rule="extended") # long time1433 sage: E6(1,0,0,0,0,0).branch(A5xA1,rule="extended") # (0.7s) 1436 1434 A5xA1(0,0,0,1,0,0) + A5xA1(1,0,0,0,0,1) 1437 sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule="extended") # long time1435 sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule="extended") # (0.7s) 1438 1436 A2xA2xA2(0,0,0,1,1,0) + A2xA2xA2(0,1,1,0,0,0) + A2xA2xA2(1,0,0,0,0,1) 1439 sage: E7=WeylCharacterRing("E7",style="coroots") # long time1440 sage: A7=WeylCharacterRing("A7",style="coroots") # long time1441 sage: E7(1,0,0,0,0,0,0).branch(A7,rule="extended") # long time 1437 sage: E7=WeylCharacterRing("E7",style="coroots") 1438 sage: A7=WeylCharacterRing("A7",style="coroots") 1439 sage: E7(1,0,0,0,0,0,0).branch(A7,rule="extended") # long time (5s) 1442 1440 A7(0,0,0,1,0,0,0) + A7(1,0,0,0,0,0,1) 1443 sage: E8=WeylCharacterRing("E8",cache=true,style="coroots") # long time1444 sage: D8=WeylCharacterRing("D8",cache=true,style="coroots") # long time1445 sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule="extended") # long time 1441 sage: E8=WeylCharacterRing("E8",cache=true,style="coroots") 1442 sage: D8=WeylCharacterRing("D8",cache=true,style="coroots") 1443 sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule="extended") # long time (19s) 1446 1444 D8(0,0,0,0,0,0,1,0) + D8(0,1,0,0,0,0,0,0) 1447 sage: F4(1,0,0,0).branch(A1xC3,rule="extended") # long time1445 sage: F4(1,0,0,0).branch(A1xC3,rule="extended") # (0.7s) 1448 1446 A1xC3(0,2,0,0) + A1xC3(1,0,0,1) + A1xC3(2,0,0,0) 1449 1447 sage: G2(0,1).branch(A1xA1, rule="extended") 1450 1448 A1xA1(0,2) + A1xA1(2,0) + A1xA1(3,1) 1451 sage: F4(0,0,0,1).branch(A2xA2, rule="extended") # long time1449 sage: F4(0,0,0,1).branch(A2xA2, rule="extended") # (0.4s) 1452 1450 A2xA2(0,0,1,1) + A2xA2(0,1,0,1) + A2xA2(1,0,1,0) 1453 sage: F4(0,0,0,1).branch(A3xA1,rule="extended") # long time1451 sage: F4(0,0,0,1).branch(A3xA1,rule="extended") # (0.34s) 1454 1452 A3xA1(0,0,0,0) + A3xA1(0,0,0,2) + A3xA1(0,0,1,1) + A3xA1(0,1,0,0) + A3xA1(1,0,0,1) 1455 1453 sage: D4=WeylCharacterRing("D4",style="coroots") 1456 1454 sage: D2xD2=WeylCharacterRing("D2xD2",style="coroots") # We get D4 => A1xA1xA1xA1 by remembering that A1xA1 = D2. … … class WeightRingElement(AlgebraElement): 2217 2215 2218 2216 sage: A2 = WeylCharacterRing(['A',2]) 2219 2217 sage: a2 = WeightRing(A2) 2220 sage: a2 == loads(dumps(a2)) 2221 True 2218 sage: TestSuite(a2).run() 2222 2219 """ 2223 2220 AlgebraElement.__init__(self, A) 2224 2221 self._mdict = mdict … … class WeightRing(Algebra): 2506 2503 2507 2504 sage: R = WeylCharacterRing(['G',2], prefix = "R", base_ring = QQ) 2508 2505 sage: S = WeightRing(R, prefix = "S") 2509 sage: S == loads(dumps(S)) 2510 True 2506 sage: TestSuite(S).run() 2511 2507 """ 2512 2508 self._parent = A 2513 2509 self._cartan_type = self._parent._cartan_type