Ticket #5790: partition-update-AM.patch

File partition-update-AM.patch, 21.5 KB (added by andrew.mathas, 11 months ago)
  • sage/combinat/ktableau.py

    diff -r 5d1094576a01 sage/combinat/ktableau.py
    a b  
    2424 
    2525def KCore(part, k): 
    2626    part = Partition(part) 
    27     if part != part.k_core(k): 
     27    if part != part.core(k): 
    2828        raise ValueError, "%s is not a %s-core"%(part, k) 
    2929    return KCore_class(part._list, k) 
    3030 
     
    6060 
    6161def KCores(n, k): 
    6262    from sage.combinat.all import Partitions 
    63     k_cores = Partitions(n).filter(lambda x: x == x.r_core(k)) 
     63    k_cores = Partitions(n).filter(lambda x: x == x.core(k)) 
    6464    k_cores = k_cores.map(lambda x: KCore(x, k)) 
    6565    k_cores._name = "%s-Cores of size %s"%(k,n) 
    6666    return k_cores 
  • sage/combinat/partition.py

    diff -r 5d1094576a01 sage/combinat/partition.py
    a b  
    186186    sage: Partition([4,3,1]).corners() 
    187187    [[0, 3], [1, 2], [2, 0]] 
    188188 
    189 We can compute the r-core and r-quotient of a partition and build 
     189We can compute the core and quotient of a partition and build 
    190190the partition back up from them. 
    191191 
    192192:: 
    193193 
    194     sage: Partition([6,3,2,2]).r_core(3) 
     194    sage: Partition([6,3,2,2]).core(3) 
    195195    [2, 1, 1] 
    196     sage: Partition([7,7,5,3,3,3,1]).r_quotient(3) 
     196    sage: Partition([7,7,5,3,3,3,1]).quotient(3) 
    197197    [[2], [1], [2, 2, 2]] 
    198198    sage: p = Partition([11,5,5,3,2,2,2]) 
    199     sage: p.r_core(3) 
     199    sage: p.core(3) 
    200200    [] 
    201     sage: p.r_quotient(3) 
     201    sage: p.quotient(3) 
    202202    [[2, 1], [4], [1, 1, 1]] 
    203     sage: Partition(core_and_quotient=([],[[2, 1], [4], [1, 1, 1]])) 
     203    sage: Partition(core=[],quotient=[[2, 1], [4], [1, 1, 1]]) 
    204204    [11, 5, 5, 3, 2, 2, 2] 
    205205""" 
    206206#***************************************************************************** 
     
    239239from integer_list import IntegerListsLex 
    240240from sage.combinat.root_system.weyl_group import WeylGroup 
    241241 
    242 def Partition(l=None, exp=None, core_and_quotient=None): 
    243     """ 
    244     Returns a partition object. 
    245      
    246     Note that Sage uses the English convention for partitions and 
    247     tableaux. 
    248      
    249     EXAMPLES:: 
    250      
     242def Partition(mu=None, **key_word): 
     243    """ 
     244    A partition is a weakly decreasing ordered sequence of non-negative 
     245    integers. This function returns a Sage partition object which can 
     246    be specified in one of the following ways::  
     247      * a list (the default) 
     248      * using exponential notation 
     249      * by beta numbers (TODO) 
     250      * specifying the core and the quotient 
     251      * specifying the core and the canonical quotient (TODO) 
     252    See the examples below. 
     253     
     254    Sage follows the usual python conventions when dealing with partitions, 
     255    so that the first part of the partition ``mu=Partition([4,3,2,2])`` is 
     256    ``mu[0]``, the second part is ``mu[1]`` and so on. As is usual, Sage ignores 
     257    trailing zeros at the end of partitions. 
     258     
     259    EXAMPLES:: 
     260     
     261        sage: Partition([3,2,1]) 
     262        [3, 2, 1] 
     263        sage: Partition([3,2,1,0]) 
     264        [3, 2, 1] 
    251265        sage: Partition(exp=[2,1,1]) 
    252266        [3, 2, 1, 1] 
    253         sage: Partition(core_and_quotient=([2,1], [[2,1],[3],[1,1,1]])) 
     267        sage: Partition(core=[2,1], quotient=[[2,1],[3],[1,1,1]]) 
    254268        [11, 5, 5, 3, 2, 2, 2] 
    255         sage: Partition([3,2,1]) 
    256         [3, 2, 1] 
    257269        sage: [2,1] in Partitions() 
    258270        True 
    259271        sage: [2,1,0] in Partitions() 
    260272        False 
    261         sage: Partition([2,1,0]) 
    262         [2, 1] 
    263273        sage: Partition([1,2,3]) 
    264274        Traceback (most recent call last): 
    265275        ... 
    266276        ValueError: [1, 2, 3] is not a valid partition 
    267277    """ 
    268     number_of_arguments = 0 
    269     for arg in ['l', 'exp', 'core_and_quotient']: 
    270         if locals()[arg] is not None: 
    271             number_of_arguments += 1 
    272  
    273     if number_of_arguments != 1: 
    274         raise ValueError, "you must specify exactly one argument" 
    275  
    276     if l is not None: 
    277         l = [i for i in l if i != 0] 
    278         if l in Partitions_all(): 
    279             return Partition_class(l) 
    280         else: 
    281             raise ValueError, "%s is not a valid partition"%l 
    282     elif exp is not None: 
    283         return from_exp(exp) 
    284     else: 
    285         return from_core_and_quotient(*core_and_quotient) 
    286      
    287  
     278    if mu is not None and len(key_word)==0: 
     279        mu = [i for i in mu if i != 0] 
     280        if mu in Partitions_all(): 
     281            return Partition_class(mu) 
     282        else: 
     283            raise ValueError, "%s is not a valid partition"%mu 
     284    elif 'beta_numbers' in key_word and len(key_word)==1: 
     285        raise NotImplementedError 
     286    elif 'exp' in key_word and len(key_word)==1: 
     287        return Partition_class([]).from_exp(key_word['exp']) 
     288    elif 'core' in key_word and 'quotient' in key_word and len(key_word)==2: 
     289        return Partition_class([]).from_core_and_quotient(key_word['core'], key_word['quotient']) 
     290    elif 'core' in key_word and 'canonical_quotient' in key_word and len(key_word)==2: 
     291        raise NotImplementedError 
     292    elif 'core_and_quotient' in key_word and len(key_word)==1: 
     293        from sage.misc.misc import deprecation 
     294        deprecation('"core_and_quotient=(*)" is deprecated. Use "core=[*], quotient=[*]" instead.') 
     295        return Partition_class([]).from_core_and_quotient(*key_word['core_and_quotient']) 
     296    else: 
     297        raise ValueError, 'incorrect syntax for Partition()' 
     298     
    288299def from_exp(a): 
    289300    """ 
     301    ** This function is being deprecated - use Partition(exp=*) instead ** 
     302     
    290303    Returns a partition from its list of multiplicities. 
    291304     
    292305    EXAMPLES:: 
    293306     
    294         sage: partition.from_exp([1,2,1]) 
     307        sage: Partition(exp=[1,2,1]) 
    295308        [3, 2, 2, 1] 
    296309    """ 
    297  
    298     p = [] 
    299     for i in reversed(range(len(a))): 
    300         p += [i+1]*a[i] 
    301  
    302     return Partition(p) 
     310    from sage.misc.misc import deprecation 
     311    deprecation('"from_exp" is deprecated. Use "Partition(exp=[*])" instead.') 
     312    return Partition(exp=a) 
    303313 
    304314 
    305315def from_core_and_quotient(core, quotient): 
    306316    """ 
    307     Returns a partition from its r-core and r-quotient. 
     317    ** This function is being deprecated - use Partition(core=*, quotient=*) instead ** 
     318     
     319    Returns a partition from its core and quotient. 
    308320     
    309321    Algorithm from mupad-combinat. 
    310322     
    311323    EXAMPLES:: 
    312324     
    313         sage: partition.from_core_and_quotient([2,1], [[2,1],[3],[1,1,1]]) 
     325        sage: Partition(core=[2,1], quotient=[[2,1],[3],[1,1,1]]) 
    314326        [11, 5, 5, 3, 2, 2, 2] 
    315327    """ 
    316     length = len(quotient) 
    317     k = length*max( [ceil(len(core)/length),len(core)] + [len(q) for q in quotient] ) + length 
    318     v = [ core[i]-(i+1)+1 for i in range(len(core))] + [ -i + 1 for i in range(len(core)+1,k+1) ] 
    319     w = [ filter(lambda x: (x-i) % length == 0, v) for i in range(1, length+1) ] 
    320     new_w = [] 
    321     for i in range(length): 
    322         new_w += [ w[i][j] + length*quotient[i][j] for j in range(len(quotient[i]))] 
    323         new_w += [ w[i][j] for j in range(len(quotient[i]), len(w[i])) ] 
    324     new_w.sort() 
    325     new_w.reverse() 
    326     return filter(lambda x: x != 0, [new_w[i-1]+i-1 for i in range(1, len(new_w)+1)]) 
    327  
     328    from sage.misc.misc import deprecation 
     329    deprecation('"from_core_and_quotient" is deprecated. Use "Partition(core=[*],quotient=[*])" instead.') 
     330    return Partition(core=core,quotient=quotient) 
    328331     
    329332class Partition_class(CombinatorialObject): 
     333    def from_exp(self,exp): 
     334        """ 
     335        Returns a partition from its list of multiplicities. 
     336         
     337        EXAMPLES:: 
     338         
     339            sage: Partition(exp=[1,2,1]) 
     340            [3, 2, 2, 1] 
     341        """ 
     342        p = [] 
     343        for i in reversed(range(len(exp))): 
     344            p += [i+1]*exp[i] 
     345        return Partition(p) 
     346 
     347    def from_core_and_quotient(self, core, quotient): 
     348        """ 
     349        Returns a partition from its core and quotient. 
     350         
     351        Algorithm from mupad-combinat. 
     352         
     353        EXAMPLES:: 
     354         
     355            sage: Partition(core=[2,1], quotient=[[2,1],[3],[1,1,1]]) 
     356            [11, 5, 5, 3, 2, 2, 2] 
     357        """ 
     358        length = len(quotient) 
     359        k = length*max( [ceil(len(core)/length),len(core)] + [len(q) for q in quotient] ) + length 
     360        v = [ core[i]-(i+1)+1 for i in range(len(core))] + [ -i + 1 for i in range(len(core)+1,k+1) ] 
     361        w = [ filter(lambda x: (x-i) % length == 0, v) for i in range(1, length+1) ] 
     362        new_w = [] 
     363        for i in range(length): 
     364            new_w += [ w[i][j] + length*quotient[i][j] for j in range(len(quotient[i]))] 
     365            new_w += [ w[i][j] for j in range(len(quotient[i]), len(w[i])) ] 
     366        new_w.sort() 
     367        new_w.reverse() 
     368        return Partition([new_w[i-1]+i-1 for i in range(1, len(new_w)+1)]) 
     369 
    330370    def ferrers_diagram(self): 
    331371        """ 
    332372        Return the Ferrers diagram of pi. 
     
    344384            ***** 
    345385            ** 
    346386            *         
    347             sage: pi = Partitions(10).list()[11] ## [6,1,1,1,1] 
    348             sage: print pi.ferrers_diagram() 
    349             ****** 
    350             * 
    351             * 
    352             * 
    353             * 
    354             sage: pi = Partitions(10).list()[8] ## [6, 3, 1] 
    355             sage: print pi.ferrers_diagram() 
    356             ****** 
    357             *** 
    358             * 
    359387        """ 
    360388        return '\n'.join(['*'*p for p in self]) 
    361389 
     
    507535 
    508536    def sign(self): 
    509537        r""" 
    510         partition_sign( pi ) returns the sign of a permutation with cycle 
    511         structure given by the partition pi. 
     538        Returns the sign of a permutation with cycle type of the partition. 
    512539         
    513540        This function corresponds to a homomorphism from the symmetric 
    514541        group `S_n` into the cyclic group of order 2, whose kernel 
     
    516543        `1` are called even partitions while partitions of sign 
    517544        `-1` are called odd. 
    518545         
    519         Wraps GAP's SignPartition. 
    520          
    521546        EXAMPLES:: 
    522547         
    523548            sage: Partition([5,3]).sign() 
     
    577602 
    578603        - http://en.wikipedia.org/wiki/Zolotarev's_lemma 
    579604        """ 
    580         ans=gap.eval("SignPartition(%s)"%(self)) 
    581         return sage_eval(ans) 
     605        return (-1)**(self.size()-self.length()) 
    582606 
    583607    def up(self): 
    584608        r""" 
     
    791815            sage: Partition([5,4,2,1,1,1]).associated().associated() 
    792816            [5, 4, 2, 1, 1, 1] 
    793817        """ 
    794  
    795818        return self.conjugate() 
    796819 
    797820    def arm(self, i, j): 
     
    14611484        return kshape.KShape(self, k) 
    14621485 
    14631486    def r_core(self, length): 
    1464         """ 
    1465         Returns the r-core of the partition p. The construction of the 
    1466         r-core can be visualized by repeatedly removing border strips of 
    1467         size r from p until this is no longer possible. The remaining 
    1468         partition is the r-core. 
    1469          
    1470         EXAMPLES:: 
    1471          
    1472             sage: Partition([6,3,2,2]).r_core(3) 
     1487      """ *** deprecate *** """ 
     1488      from sage.misc.misc import deprecation 
     1489      deprecation('r_core is deprecated. Use core instead.') 
     1490      return self.core(self, length) 
     1491 
     1492    k_core = r_core 
     1493 
     1494    def core(self, length): 
     1495        """ 
     1496        Returns the core of the partition -- in the literature the core is 
     1497        commonly referred to as the k-core, p-core, r-core, ... . The 
     1498        construction of the core can be visualized by repeatedly removing 
     1499        border strips of size r from p until this is no longer possible. 
     1500        The remaining partition is the core. 
     1501         
     1502        EXAMPLES:: 
     1503         
     1504            sage: Partition([6,3,2,2]).core(3) 
    14731505            [2, 1, 1] 
    1474             sage: Partition([]).r_core(3) 
    1475             [] 
    1476             sage: Partition([8,7,7,4,1,1,1,1,1]).r_core(3) 
     1506            sage: Partition([]).core(3) 
     1507            [] 
     1508            sage: Partition([8,7,7,4,1,1,1,1,1]).core(3) 
    14771509            [2, 1, 1] 
    14781510         
    14791511        TESTS:: 
    14801512         
    1481             sage: Partition([3,3,3,2,1]).r_core(3) 
    1482             [] 
    1483             sage: Partition([10,8,7,7]).r_core(4) 
    1484             [] 
    1485             sage: Partition([21,15,15,9,6,6,6,3,3]).r_core(3) 
     1513            sage: Partition([3,3,3,2,1]).core(3) 
     1514            [] 
     1515            sage: Partition([10,8,7,7]).core(4) 
     1516            [] 
     1517            sage: Partition([21,15,15,9,6,6,6,3,3]).core(3) 
    14861518            [] 
    14871519        """ 
    14881520        p = self 
     
    15041536 
    15051537        #Remove the canonical vector 
    15061538        part = [part[i-1]-len(part)+i for i in range(1, len(part)+1)] 
    1507         #Select the r-core 
    1508         return filter(lambda x: x != 0, part) 
    1509  
    1510     k_core = r_core 
     1539        return Partition(part) 
    15111540 
    15121541    def r_quotient(self, length): 
    1513         """ 
    1514         Returns the r-quotient of the partition p. The r-quotient is a list 
    1515         of r partitions, constructed in the following way. Label each cell 
    1516         in p with its content, modulo r. Let R_i be the set of rows ending 
    1517         in a box labelled i, and C_i be the set of columns ending in a box 
    1518         labelled i. Then the jth component of the r-quotient of p is the 
    1519         partition defined by intersecting R_j with C_j+1. 
    1520          
    1521         EXAMPLES:: 
    1522          
    1523             sage: Partition([7,7,5,3,3,3,1]).r_quotient(3) 
     1542      """ *** deprecate *** """ 
     1543      from sage.misc.misc import deprecation 
     1544      deprecation('r_quotient is deprecated. Use quotient instead.') 
     1545      return self.quotient(self,length) 
     1546 
     1547    k_quotient = r_quotient 
     1548 
     1549    def quotient(self, length): 
     1550        """ 
     1551        Returns the quotient of the partition  -- in the literature the 
     1552        core is commonly referred to as the k-core, p-core, r-core, ... . The 
     1553        quotient is a list of r partitions, constructed in the following 
     1554        way. Label each cell in p with its content, modulo r. Let R_i be 
     1555        the set of rows ending in a box labelled i, and C_i be the set of 
     1556        columns ending in a box labelled i. Then the jth component of the 
     1557        quotient of p is the partition defined by intersecting R_j with 
     1558        C_j+1. 
     1559         
     1560        EXAMPLES:: 
     1561         
     1562            sage: Partition([7,7,5,3,3,3,1]).quotient(3) 
    15241563            [[2], [1], [2, 2, 2]] 
    15251564         
    15261565        TESTS:: 
    15271566         
    1528             sage: Partition([8,7,7,4,1,1,1,1,1]).r_quotient(3) 
     1567            sage: Partition([8,7,7,4,1,1,1,1,1]).quotient(3) 
    15291568            [[2, 1], [2, 2], [2]] 
    1530             sage: Partition([10,8,7,7]).r_quotient(4) 
     1569            sage: Partition([10,8,7,7]).quotient(4) 
    15311570            [[2], [3], [2], [1]] 
    1532             sage: Partition([6,3,3]).r_quotient(3) 
     1571            sage: Partition([6,3,3]).quotient(3) 
    15331572            [[1], [1], [2]] 
    1534             sage: Partition([3,3,3,2,1]).r_quotient(3) 
     1573            sage: Partition([3,3,3,2,1]).quotient(3) 
    15351574            [[1], [1, 1], [1]] 
    1536             sage: Partition([6,6,6,3,3,3]).r_quotient(3) 
     1575            sage: Partition([6,6,6,3,3,3]).quotient(3) 
    15371576            [[2, 1], [2, 1], [2, 1]] 
    1538             sage: Partition([21,15,15,9,6,6,6,3,3]).r_quotient(3) 
     1577            sage: Partition([21,15,15,9,6,6,6,3,3]).quotient(3) 
    15391578            [[5, 2, 1], [5, 2, 1], [7, 3, 2]] 
    1540             sage: Partition([21,15,15,9,6,6,3,3]).r_quotient(3) 
     1579            sage: Partition([21,15,15,9,6,6,3,3]).quotient(3) 
    15411580            [[5, 2], [5, 2, 1], [7, 3, 1]] 
    1542             sage: Partition([14,12,11,10,10,10,10,9,6,4,3,3,2,1]).r_quotient(5) 
     1581            sage: Partition([14,12,11,10,10,10,10,9,6,4,3,3,2,1]).quotient(5) 
    15431582            [[3, 3], [2, 2, 1], [], [3, 3, 3], [1]] 
    15441583        """ 
    15451584        p = self 
     
    15671606 
    15681607        return result 
    15691608 
    1570     k_quotient = r_quotient 
    1571  
    15721609    def add_box(self, i, j = None): 
    15731610        r""" 
    15741611        Returns a partition corresponding to self with a box added in row 
     
    40734110     
    40744111    EXAMPLES:: 
    40754112     
    4076         sage: print ferrers_diagram([5,5,2,1]) 
     4113        sage: print Partition([5,5,2,1]).ferrers_diagram() 
    40774114        ***** 
    40784115        ***** 
    40794116        ** 
    40804117        *         
    4081         sage: pi = partitions_list(10)[30] ## [6,1,1,1,1] 
    4082         sage: print ferrers_diagram(pi) 
    4083         ****** 
    4084         * 
    4085         * 
    4086         * 
    4087         * 
    4088         sage: pi = partitions_list(10)[33] ## [6, 3, 1] 
    4089         sage: print ferrers_diagram(pi) 
    4090         ****** 
    4091         *** 
    4092         * 
    4093     """ 
    4094     return '\n'.join(['*'*p for p in pi]) 
     4118    """ 
     4119    from sage.misc.misc import deprecation 
     4120    deprecation('"ferrers_diagram deprecated. Use Partition(pi).ferrers_diagram() instead') 
     4121    return Partition(pi).ferrers_diagram() 
    40954122 
    40964123 
    40974124def ordered_partitions(n,k=None): 
     
    43664393 
    43674394def partition_sign(pi): 
    43684395    r""" 
    4369     partition_sign( pi ) returns the sign of a permutation with cycle 
     4396    ** This function is being deprecated -- use Partition(*).sign() instead.  ** 
     4397 
     4398    Partition( pi ).sign() returns the sign of a permutation with cycle 
    43704399    structure given by the partition pi. 
    43714400     
    43724401    This function corresponds to a homomorphism from the symmetric 
     
    43744403    is exactly the alternating group `A_n`. Partitions of sign 
    43754404    `1` are called even partitions while partitions of sign 
    43764405    `-1` are called odd. 
    4377      
    4378     Wraps GAP's SignPartition. 
    4379      
    4380     EXAMPLES:: 
    4381      
    4382         sage: partition_sign([5,3]) 
     4406    
     4407    This function is deprecated: use Partition( pi ).sign() instead. 
     4408 
     4409    EXAMPLES:: 
     4410     
     4411        sage: Partition([5,3]).sign() 
    43834412        1 
    4384         sage: partition_sign([5,2]) 
     4413        sage: Partition([5,2]).sign() 
    43854414        -1 
    43864415     
    43874416    Zolotarev's lemma states that the Legendre symbol 
     
    44114440        sage: p = PermutationGroupElement('(1, 2, 4, 8, 5, 10, 9, 7, 3, 6)') 
    44124441        sage: p.sign() 
    44134442        -1 
    4414         sage: partition_sign([10]) 
     4443        sage: Partition([10]).sign() 
    44154444        -1 
    44164445        sage: kronecker_symbol(11,2) 
    44174446        -1 
     
    44274456        1 
    44284457        sage: kronecker_symbol(3,11) 
    44294458        1 
    4430         sage: partition_sign([5,1,1,1,1,1]) 
     4459        sage: Partition([5,1,1,1,1,1]).sign() 
    44314460        1 
    44324461     
    44334462    In both cases, Zolotarev holds. 
     
    44364465 
    44374466    - http://en.wikipedia.org/wiki/Zolotarev's_lemma 
    44384467    """ 
    4439     ans=gap.eval("SignPartition(%s)"%(pi)) 
    4440     return sage_eval(ans) 
     4468    from sage.misc.misc import deprecation 
     4469    deprecation('"partition_sign deprecated. Use Partition(pi).sign() instead') 
     4470    return Partition(pi).sign() 
    44414471 
    44424472def partition_associated(pi): 
    44434473    """ 
     4474    ** This function is being deprecated -- use Partition(*).conjugate() instead.  ** 
     4475 
    44444476    partition_associated( pi ) returns the "associated" (also called 
    44454477    "conjugate" in the literature) partition of the partition pi which 
    44464478    is obtained by transposing the corresponding Ferrers diagram. 
    44474479     
    44484480    EXAMPLES:: 
    44494481     
    4450         sage: partition_associated([2,2]) 
     4482        sage: Partition([2,2]).conjugate() 
    44514483        [2, 2] 
    4452         sage: partition_associated([6,3,1]) 
     4484        sage: Partition([6,3,1]).conjugate() 
    44534485        [3, 2, 2, 1, 1, 1] 
    4454         sage: print ferrers_diagram([6,3,1]) 
     4486        sage: print Partition([6,3,1]).ferrers_diagram() 
    44554487        ****** 
    44564488        *** 
    44574489        * 
    4458         sage: print ferrers_diagram([3,2,2,1,1,1]) 
     4490        sage: print Partition([6,3,1]).conjugate().ferrers_diagram() 
    44594491        *** 
    44604492        ** 
    44614493        ** 
     
    44634495        * 
    44644496        * 
    44654497    """ 
    4466     return list(Partition(pi).conjugate()) 
    4467              
     4498    from sage.misc.misc import deprecation 
     4499    deprecation('"partition_associated deprecated. Use Partition(pi).conjugte() instead') 
     4500    return Partition(pi).conjugate() 
     4501             
  • sage/combinat/ribbon_tableau.py

    diff -r 5d1094576a01 sage/combinat/ribbon_tableau.py
    a b  
    143143    """ 
    144144    if shape in partition.Partitions(): 
    145145        shape = partition.Partition(shape) 
    146         shape = skew_partition.SkewPartition([shape, shape.r_core(length)]) 
     146        shape = skew_partition.SkewPartition([shape, shape.core(length)]) 
    147147    else: 
    148148        shape = skew_partition.SkewPartition(shape) 
    149149 
     
    880880            sage: a = SkewPartition([[8,7,6,5,1,1],[2,1,1]]) 
    881881            sage: weight = [3,3,2] 
    882882            sage: k = 3 
    883             sage: s = SemistandardMultiSkewTableaux(a.r_quotient(k),weight) 
     883            sage: s = SemistandardMultiSkewTableaux(a.quotient(k),weight) 
    884884            sage: len(s.list()) 
    885885            34 
    886886            sage: RibbonTableaux(a,weight,k).cardinality() 
  • sage/combinat/skew_partition.py

    diff -r 5d1094576a01 sage/combinat/skew_partition.py
    a b  
    451451        return G 
    452452 
    453453 
    454     def r_quotient(self, k): 
     454    def r_quotient(self, length): 
     455      """ *** deprecate *** """ 
     456      from sage.misc.misc import deprecation 
     457      deprecation('r_quotient is deprecated. Use quotient instead.') 
     458      return self.quotient(self,length) 
     459 
     460    def quotient(self, k): 
    455461        """ 
    456462        The quotient map extended to skew partitions. 
    457463         
    458464        EXAMPLES:: 
    459465         
    460             sage: SkewPartition([[3, 3, 2, 1], [2, 1]]).r_quotient(2) 
     466            sage: SkewPartition([[3, 3, 2, 1], [2, 1]]).quotient(2) 
    461467            [[[3], []], [[], []]] 
    462468        """ 
    463469        ## k-th element is the skew partition built using the k-th partition of the 
    464470        ## k-quotient of the outer and the inner partition. 
    465471        ## This bijection is only defined if the inner and the outer partition 
    466472        ## have the same core 
    467         if self.inner().r_core(k) == self.outer().r_core(k): 
    468             rqinner = self.inner().r_quotient(k) 
    469             rqouter = self.outer().r_quotient(k) 
     473        if self.inner().core(k) == self.outer().core(k): 
     474            rqinner = self.inner().quotient(k) 
     475            rqouter = self.outer().quotient(k) 
    470476            return [ SkewPartition_class([rqouter[i],rqinner[i]]) for i in range(k) ] 
    471477        else: 
    472478            raise ValueError, "quotient map is only defined for skew partitions with inner and outer partitions having the same core"