Beispiel #1
0
def MultiSkewTableau(x):
    """
    Returns a multi skew tableau object which is a tuple of skew
    tableau.
    
    EXAMPLES::
    
        sage: s = MultiSkewTableau([ [[None,1],[2,3]], [[1,2],[2]] ])
        sage: s.size()
        6
        sage: s.weight()
        [2, 3, 1]
        sage: s.shape()
        [[[2, 2], [1]], [[2, 1], []]]
    """
    if isinstance(x, MultiSkewTableau_class):
        return x

    return MultiSkewTableau_class([skew_tableau.SkewTableau(i) for i in x])
Beispiel #2
0
def insertion_tableau(skp, perm, evaluation, tableau, length):
    """
    INPUT:
    
    
    -  ``skp`` - skew partitions
    
    -  ``perm, evaluation`` - non-negative integers
    
    -  ``tableau`` - skew tableau
    
    -  ``length`` - integer
    
    
    TESTS::
    
        sage: from sage.combinat.ribbon_tableau import insertion_tableau
        sage: insertion_tableau([[1], []], [1], 1, [[], []], 1) 
        [[], [[1]]]
        sage: insertion_tableau([[2, 1], []], [1, 1], 2, [[], [[1]]], 1) 
        [[], [[2], [1, 2]]]
        sage: insertion_tableau([[2, 1], []], [0, 0], 3, [[], [[2], [1, 2]]], 1) 
        [[], [[2], [1, 2]]]
        sage: insertion_tableau([[1, 1], []], [1], 2, [[], [[1]]], 1) 
        [[], [[2], [1]]]
        sage: insertion_tableau([[2], []], [0, 1], 2, [[], [[1]]], 1) 
        [[], [[1, 2]]]
        sage: insertion_tableau([[2, 1], []], [0, 1], 3, [[], [[2], [1]]], 1) 
        [[], [[2], [1, 3]]]
        sage: insertion_tableau([[1, 1], []], [2], 1, [[], []], 2) 
        [[], [[1], [0]]]
        sage: insertion_tableau([[2], []], [2, 0], 1, [[], []], 2) 
        [[], [[1, 0]]]
        sage: insertion_tableau([[2, 2], []], [0, 2], 2, [[], [[1], [0]]], 2) 
        [[], [[1, 2], [0, 0]]]
        sage: insertion_tableau([[2, 2], []], [2, 0], 2, [[], [[1, 0]]], 2) 
        [[], [[2, 0], [1, 0]]]
        sage: insertion_tableau([[2, 2], [1]], [3, 0], 1, [[], []], 3) 
        [[1], [[1, 0], [0]]]
    """
    psave = partition.Partition(skp[1])
    partc = skp[1] + [0] * (len(skp[0]) - len(skp[1]))

    tableau = skew_tableau.SkewTableau(expr=tableau).to_expr()[1]

    for k in range(len(tableau)):
        tableau[-(k + 1)] += [0] * (skp[0][k] - partc[k] -
                                    len(tableau[-(k + 1)]))

    ## We construct a tableau from the southwest corner to the northeast one
    tableau = [[0] * (skp[0][k] - partc[k])
               for k in reversed(range(len(tableau), len(skp[0])))] + tableau

    tableau = skew_tableau.from_expr([skp[1], tableau]).conjugate()
    tableau = tableau.to_expr()[1]

    skp = skew_partition.SkewPartition(skp).conjugate().to_list()
    skp[1].extend([0] * (len(skp[0]) - len(skp[1])))

    if len(perm) > len(skp[0]):
        return None

    for k in range(len(perm)):
        if perm[-(k + 1)] != 0:
            tableau[len(tableau) - len(perm) +
                    k][skp[0][len(perm) - (k + 1)] -
                       skp[1][len(perm) - (k + 1)] - 1] = evaluation

    return skew_tableau.SkewTableau(
        expr=[psave.conjugate(), tableau]).conjugate().to_expr()