Ticket #9250: trac_9250-crystalbug-as.patch

File trac_9250-crystalbug-as.patch, 1.9 KB (added by aschilling, 12 years ago)
  • sage/combinat/crystals/kirillov_reshetikhin.py

    # 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 
    407407        [[-2], [-1]]
    408408        sage: b.e(0).e(0)
    409409        [[-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]]
    410415
    411416        sage: K = KirillovReshetikhinCrystal(['B',3,1], 1,1)
    412417        sage: [[b,b.f(0)] for b in K]
    class PMDiagram(CombinatorialObject): 
    14241429
    14251430    def intermediate_shape(self):
    14261431        """
    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)
    14281433
    14291434        EXAMPLES::
    14301435
    class PMDiagram(CombinatorialObject): 
    14401445            sage: pm=sage.combinat.crystals.kirillov_reshetikhin.PMDiagram([[1,0],[0,1],[2,0],[0,0],[0]])
    14411446            sage: pm.intermediate_shape()
    14421447            [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]
    14431451        """
    14441452        p = self.inner_shape()
    1445         p = p + [0,0]
     1453        p = p + [0 for i in range(self.n)]
    14461454        ll = list(reversed(self._list))
    14471455        p = [ p[i]+ll[2*i+1] for i in range(self.n) ]
    14481456        return Partition(p)