# HG changeset patch
# User Anne Schilling <anne@math.ucdavis.edu>
# Date 1276725028 25200
# Node ID 33c03f3612f6b7aa70bfde697bad4d3379a4ed24
# Parent e8f39627cf65d04e99034320f957994cb7d147b4
trac #9250: Fixed a bug in the method intermediate_shape in plus/minus diagrams for Kirillov-Reshetikhin crystals
diff --git a/sage/combinat/crystals/kirillov_reshetikhin.py b/sage/combinat/crystals/kirillov_reshetikhin.py
a
|
b
|
class KR_type_vertical(KirillovReshetikh |
407 | 407 | [[-2], [-1]] |
408 | 408 | sage: b.e(0).e(0) |
409 | 409 | [[-2, -2], [-1, -1]] |
| 410 | |
| 411 | sage: K = KirillovReshetikhinCrystal(['D',5,1], 3,1) |
| 412 | sage: b = K(rows=[[1]]) |
| 413 | sage: b.e(0) |
| 414 | [[3], [-3], [-2]] |
410 | 415 | |
411 | 416 | sage: K = KirillovReshetikhinCrystal(['B',3,1], 1,1) |
412 | 417 | sage: [[b,b.f(0)] for b in K] |
… |
… |
class PMDiagram(CombinatorialObject): |
1424 | 1429 | |
1425 | 1430 | def intermediate_shape(self): |
1426 | 1431 | """ |
1427 | | Returns the intermediate shape of the pm diagram (innner shape plus positions of plusses) |
| 1432 | Returns the intermediate shape of the pm diagram (inner shape plus positions of plusses) |
1428 | 1433 | |
1429 | 1434 | EXAMPLES:: |
1430 | 1435 | |
… |
… |
class PMDiagram(CombinatorialObject): |
1440 | 1445 | sage: pm=sage.combinat.crystals.kirillov_reshetikhin.PMDiagram([[1,0],[0,1],[2,0],[0,0],[0]]) |
1441 | 1446 | sage: pm.intermediate_shape() |
1442 | 1447 | [4, 2, 2] |
| 1448 | sage: pm=sage.combinat.crystals.kirillov_reshetikhin.PMDiagram([[1, 0], [0, 0], [0, 0], [0, 0], [0]]) |
| 1449 | sage: pm.intermediate_shape() |
| 1450 | [1] |
1443 | 1451 | """ |
1444 | 1452 | p = self.inner_shape() |
1445 | | p = p + [0,0] |
| 1453 | p = p + [0 for i in range(self.n)] |
1446 | 1454 | ll = list(reversed(self._list)) |
1447 | 1455 | p = [ p[i]+ll[2*i+1] for i in range(self.n) ] |
1448 | 1456 | return Partition(p) |