Skew Tableaux¶
AUTHORS:
 Mike Hansen: Initial version
 Travis Scrimshaw, Arthur Lubovsky (20130211):
Factored out
CombinatorialClass

class
sage.combinat.skew_tableau.
SemistandardSkewTableaux
(category=None)¶ Bases:
sage.combinat.skew_tableau.SkewTableaux
Semistandard skew tableaux.
This class can be initialized with several optional variables: the size of the skew tableaux (as a nameless integer variable), their shape (as a nameless skew partition variable), their weight (
weight()
, as a nameless second variable after either the size or the shape) and their maximum entry (as an optional keyword variable calledmax_entry
, unless the weight has been specified). If neither the weight nor the maximum entry is specified, the maximum entry defaults to the size of the tableau.Note that “maximum entry” does not literally mean the highest entry; instead it is just an upper bound that no entry is allowed to surpass.
EXAMPLES:
The (infinite) class of all semistandard skew tableaux:
sage: SemistandardSkewTableaux() Semistandard skew tableaux
The (still infinite) class of all semistandard skew tableaux with maximum entry \(2\):
sage: SemistandardSkewTableaux(max_entry=2) Semistandard skew tableaux with maximum entry 2
The class of all semistandard skew tableaux of given size \(3\) and maximum entry \(3\):
sage: SemistandardSkewTableaux(3) Semistandard skew tableaux of size 3 and maximum entry 3
To set a different maximum entry:
sage: SemistandardSkewTableaux(3, max_entry = 7) Semistandard skew tableaux of size 3 and maximum entry 7
Specifying a shape:
sage: SemistandardSkewTableaux([[2,1],[]]) Semistandard skew tableaux of shape [2, 1] / [] and maximum entry 3
Specifying both a shape and a maximum entry:
sage: S = SemistandardSkewTableaux([[2,1],[1]], max_entry = 3); S Semistandard skew tableaux of shape [2, 1] / [1] and maximum entry 3 sage: S.list() [[[None, 1], [1]], [[None, 2], [1]], [[None, 1], [2]], [[None, 3], [1]], [[None, 1], [3]], [[None, 2], [2]], [[None, 3], [2]], [[None, 2], [3]], [[None, 3], [3]]] sage: for n in range(5): ....: print("{} {}".format(n, len(SemistandardSkewTableaux([[2,2,1],[1]], max_entry = n)))) 0 0 1 0 2 1 3 9 4 35
Specifying a shape and a weight:
sage: SemistandardSkewTableaux([[2,1],[]],[2,1]) Semistandard skew tableaux of shape [2, 1] / [] and weight [2, 1]
(the maximum entry is redundant in this case and thus is ignored).
Specifying a size and a weight:
sage: SemistandardSkewTableaux(3, [2,1]) Semistandard skew tableaux of size 3 and weight [2, 1]
Warning
If the shape is not specified, the iterator of this class yields only skew tableaux whose shape is reduced, in the sense that there are no empty rows before the last nonempty row, and there are no empty columns before the last nonempty column. (Otherwise it would go on indefinitely.)
Warning
This class acts as a factory. The resulting classes are mainly useful for iteration. Do not rely on their containment tests, as they are not correct, e. g.:
sage: SkewTableau([[None]]) in SemistandardSkewTableaux(2) True

class
sage.combinat.skew_tableau.
SemistandardSkewTableaux_all
(max_entry)¶ Bases:
sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of all semistandard skew tableaux, possibly with a given maximum entry.

class
sage.combinat.skew_tableau.
SemistandardSkewTableaux_shape
(p, max_entry)¶ Bases:
sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard skew tableaux of a fixed skew shape \(\lambda / \mu\) with a given max entry.
A semistandard skew tableau with max entry \(i\) is required to have all its entries less or equal to \(i\). It is not required to actually contain an entry \(i\).
INPUT:
p
– A skew partitionmax_entry
– The max entry; defaults to the size ofp
.
Warning
Input is not checked; please use
SemistandardSkewTableaux
to ensure the options are properly parsed.
cardinality
()¶ EXAMPLES:
sage: SemistandardSkewTableaux([[2,1],[]]).cardinality() 8 sage: SemistandardSkewTableaux([[2,1],[]], max_entry=2).cardinality() 2

class
sage.combinat.skew_tableau.
SemistandardSkewTableaux_shape_weight
(p, mu)¶ Bases:
sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard skew tableaux of a fixed skew shape \(\lambda / \nu\) and weight \(\mu\).

class
sage.combinat.skew_tableau.
SemistandardSkewTableaux_size
(n, max_entry)¶ Bases:
sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of all semistandard skew tableaux of a fixed size \(n\), possibly with a given maximum entry.

cardinality
()¶ EXAMPLES:
sage: SemistandardSkewTableaux(2).cardinality() 8


class
sage.combinat.skew_tableau.
SemistandardSkewTableaux_size_weight
(n, mu)¶ Bases:
sage.combinat.skew_tableau.SemistandardSkewTableaux
Class of semistandard tableaux of a fixed size \(n\) and weight \(\mu\).

cardinality
()¶ EXAMPLES:
sage: SemistandardSkewTableaux(2,[1,1]).cardinality() 4


class
sage.combinat.skew_tableau.
SkewTableau
(parent, st)¶ Bases:
sage.structure.list_clone.ClonableList
A skew tableau.
Note that Sage by default uses the English convention for partitions and tableaux. To change this, see
Tableaux.options()
.EXAMPLES:
sage: st = SkewTableau([[None, 1],[2,3]]); st [[None, 1], [2, 3]] sage: st.inner_shape() [1] sage: st.outer_shape() [2, 2]
The
expr
form of a skew tableau consists of the inner partition followed by a list of the entries in each row from bottom to top:sage: SkewTableau(expr=[[1,1],[[5],[3,4],[1,2]]]) [[None, 1, 2], [None, 3, 4], [5]]
The
chain
form of a skew tableau consists of a list of partitions \(\lambda_1,\lambda_2,\ldots,\), such that all cells in \(\lambda_{i+1}\) that are not in \(\lambda_i\) have entry \(i\):sage: SkewTableau(chain=[[2], [2, 1], [3, 1], [4, 3, 2, 1]]) [[None, None, 2, 3], [1, 3, 3], [3, 3], [3]]

bender_knuth_involution
(k, rows=None, check=True)¶ Return the image of
self
under the \(k\)th Bender–Knuth involution, assumingself
is a skew semistandard tableau.Let \(T\) be a tableau, then a lower free `k` in `T` means a cell of \(T\) which is filled with the integer \(k\) and whose direct lower neighbor is not filled with the integer \(k + 1\) (in particular, this lower neighbor might not exist at all). Let an upper free `k + 1` in `T` mean a cell of \(T\) which is filled with the integer \(k + 1\) and whose direct upper neighbor is not filled with the integer \(k\) (in particular, this neighbor might not exist at all). It is clear that for any row \(r\) of \(T\), the lower free \(k\)‘s and the upper free \(k + 1\)‘s in \(r\) together form a contiguous interval or \(r\).
The `k`th Bender–Knuth switch at row `i` changes the entries of the cells in this interval in such a way that if it used to have \(a\) entries of \(k\) and \(b\) entries of \(k + 1\), it will now have \(b\) entries of \(k\) and \(a\) entries of \(k + 1\). For fixed \(k\), the \(k\)th Bender–Knuth switches for different \(i\) commute. The composition of the \(k\)th Bender–Knuth switches for all rows is called the `k`th Bender–Knuth involution. This is used to show that the Schur functions defined by semistandard (skew) tableaux are symmetric functions.
INPUT:
k
– an integerrows
– (DefaultNone
) When set toNone
, the method computes the \(k\)th Bender–Knuth involution as defined above. When an iterable, this computes the composition of the \(k\)th Bender–Knuth switches at row \(i\) over all \(i\) inrows
. When set to an integer \(i\), the method computes the \(k\)th Bender–Knuth switch at row \(i\). Note the indexing of the rows starts with \(1\).check
– (Default:True
) Check to make sureself
is semistandard. Set toFalse
to avoid this check.
OUTPUT:
The image of
self
under either the \(k\)th Bender–Knuth involution, the \(k\)th Bender–Knuth switch at a certain row, or the composition of such switches, as detailed in the INPUT section.EXAMPLES:
sage: t = SkewTableau([[None,None,None,4,4,5,6,7],[None,2,4,6,7,7,7],[None,4,5,8,8,9],[None,6,7,10],[None,8,8,11],[None],[4]]) sage: t [[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]] sage: t.bender_knuth_involution(1) [[None, None, None, 4, 4, 5, 6, 7], [None, 1, 4, 6, 7, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]] sage: t.bender_knuth_involution(4) [[None, None, None, 4, 5, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 5, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [5]] sage: t.bender_knuth_involution(5) [[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 5, 7, 7, 7], [None, 4, 6, 8, 8, 9], [None, 5, 7, 10], [None, 8, 8, 11], [None], [4]] sage: t.bender_knuth_involution(6) [[None, None, None, 4, 4, 5, 6, 6], [None, 2, 4, 6, 6, 7, 7], [None, 4, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]] sage: t.bender_knuth_involution(666) == t True sage: t.bender_knuth_involution(4, 2) == t True sage: t.bender_knuth_involution(4, 3) [[None, None, None, 4, 4, 5, 6, 7], [None, 2, 4, 6, 7, 7, 7], [None, 5, 5, 8, 8, 9], [None, 6, 7, 10], [None, 8, 8, 11], [None], [4]]
The Bender–Knuth involution is an involution:
sage: t = SkewTableau([[None,3,4,4],[None,6,10],[7,7,11],[18]]) sage: all(t.bender_knuth_involution(k).bender_knuth_involution(k) == t for k in range(1,4)) True
The same for the single switches:
sage: all(t.bender_knuth_involution(k, j).bender_knuth_involution(k, j) == t for k in range(1,5) for j in range(1, 5)) True
Locality of the Bender–Knuth involutions:
sage: all(t.bender_knuth_involution(k).bender_knuth_involution(l) == t.bender_knuth_involution(l).bender_knuth_involution(k) for k in range(1,5) for l in range(1,5) if abs(k  l) > 1) True
AUTHORS:
 Darij Grinberg (20130514)

cells
()¶ Return the cells in
self
.EXAMPLES:
sage: s = SkewTableau([[None,1,2],[3],[6]]) sage: s.cells() [(0, 1), (0, 2), (1, 0), (2, 0)]

cells_by_content
(c)¶ Return the coordinates of the cells in
self
with contentc
.EXAMPLES:
sage: s = SkewTableau([[None,1,2],[3,4,5],[6]]) sage: s.cells_by_content(0) [(1, 1)] sage: s.cells_by_content(1) [(0, 1), (1, 2)] sage: s.cells_by_content(2) [(0, 2)] sage: s.cells_by_content(1) [(1, 0)] sage: s.cells_by_content(2) [(2, 0)]

cells_containing
(i)¶ Return the list of cells in which the letter
i
appears in the tableauself
. The list is ordered with cells appearing from left to right.Cells are given as pairs of coordinates \((a, b)\), where both rows and columns are counted from \(0\) (so \(a = 0\) means the cell lies in the leftmost column of the tableau, etc.).
EXAMPLES:
sage: t = SkewTableau([[None,None,3],[None,3,5],[4,5]]) sage: t.cells_containing(5) [(2, 1), (1, 2)] sage: t.cells_containing(4) [(2, 0)] sage: t.cells_containing(2) [] sage: t = SkewTableau([[None,None,None,None],[None,4,5],[None,5,6],[None,9],[None]]) sage: t.cells_containing(2) [] sage: t.cells_containing(4) [(1, 1)] sage: t.cells_containing(5) [(2, 1), (1, 2)] sage: SkewTableau([]).cells_containing(3) [] sage: SkewTableau([[None,None],[None]]).cells_containing(3) []

check
()¶ Check that
self
is a valid skew tableau. This is currently far too liberal, and only checks some trivial things.EXAMPLES:
sage: t = SkewTableau([[None,1,1],[2]]) sage: t.check() sage: t = SkewTableau([[None, None, 1], [2, 4], [], [3, 4, 5]]) Traceback (most recent call last): ... TypeError: a skew tableau cannot have an empty list for a row

conjugate
()¶ Return the conjugate of
self
.EXAMPLES:
sage: SkewTableau([[None,1],[2,3]]).conjugate() [[None, 2], [1, 3]]

entries_by_content
(c)¶ Return the entries in
self
with contentc
.EXAMPLES:
sage: s = SkewTableau([[None,1,2],[3,4,5],[6]]) sage: s.entries_by_content(0) [4] sage: s.entries_by_content(1) [1, 5] sage: s.entries_by_content(2) [2] sage: s.entries_by_content(1) [3] sage: s.entries_by_content(2) [6]

evaluation
()¶ Return the weight (aka evaluation) of the tableau
self
. Trailing zeroes are omitted when returning the weight.The weight of a skew tableau \(T\) is the sequence \((a_1, a_2, a_3, \ldots )\), where \(a_k\) is the number of entries of \(T\) equal to \(k\). This sequence contains only finitely many nonzero entries.
The weight of a skew tableau \(T\) is the same as the weight of the reading word of \(T\), for any reading order.
evaluation()
is a synonym for this method.EXAMPLES:
sage: SkewTableau([[1,2],[3,4]]).weight() [1, 1, 1, 1] sage: SkewTableau([[None,2],[None,4],[None,5],[None]]).weight() [0, 1, 0, 1, 1] sage: SkewTableau([]).weight() [] sage: SkewTableau([[None,None,None],[None]]).weight() [] sage: SkewTableau([[None,3,4],[None,6,7],[4,8],[5,13],[6],[7]]).weight() [0, 0, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0, 1]

filling
()¶ Return a list of the nonempty entries in
self
.EXAMPLES:
sage: t = SkewTableau([[None,1],[2,3]]) sage: t.filling() [[1], [2, 3]]

inner_shape
()¶ Return the inner shape of
self
.EXAMPLES:
sage: SkewTableau([[None,1,2],[None,3],[4]]).inner_shape() [1, 1] sage: SkewTableau([[1,2],[3,4],[7]]).inner_shape() [] sage: SkewTableau([[None,None,None,2,3],[None,1],[None],[2]]).inner_shape() [3, 1, 1]

inner_size
()¶ Return the size of the inner shape of
self
.EXAMPLES:
sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).inner_size() 2 sage: SkewTableau([[None, 2], [1, 3]]).inner_size() 1

is_k_tableau
(k)¶ Checks whether
self
is a valid skew weak \(k\)tableau.EXAMPLES:
sage: t = SkewTableau([[None,2,3],[2,3],[3]]) sage: t.is_k_tableau(3) True sage: t = SkewTableau([[None,1,3],[2,2],[3]]) sage: t.is_k_tableau(3) False

is_ribbon
()¶ Return
True
if and only if the shape ofself
is a ribbon, that is, if it has exactly one cell in each of \(q\) consecutive diagonals for some nonnegative integer \(q\).EXAMPLES:
sage: S=SkewTableau([[None, None, 1, 2],[None, None, 3],[1, 3, 4]]) sage: S.pp() . . 1 2 . . 3 1 3 4 sage: S.is_ribbon() True sage: S=SkewTableau([[None, 1, 1, 2],[None, 2, 3],[1, 3, 4]]) sage: S.pp() . 1 1 2 . 2 3 1 3 4 sage: S.is_ribbon() False sage: S=SkewTableau([[None, None, 1, 2],[None, None, 3],[1]]) sage: S.pp() . . 1 2 . . 3 1 sage: S.is_ribbon() False sage: S=SkewTableau([[None, None, None, None],[None, None, 3],[1, 2, 4]]) sage: S.pp() . . . . . . 3 1 2 4 sage: S.is_ribbon() True sage: S=SkewTableau([[None, None, None, None],[None, None, 3],[None, 2, 4]]) sage: S.pp() . . . . . . 3 . 2 4 sage: S.is_ribbon() True sage: S=SkewTableau([[None, None],[None]]) sage: S.pp() . . . sage: S.is_ribbon() True

is_semistandard
()¶ Return
True
ifself
is a semistandard skew tableau andFalse
otherwise.EXAMPLES:
sage: SkewTableau([[None, 2, 2], [1, 3]]).is_semistandard() True sage: SkewTableau([[None, 2], [2, 4]]).is_semistandard() True sage: SkewTableau([[None, 3], [2, 4]]).is_semistandard() True sage: SkewTableau([[None, 2], [1, 2]]).is_semistandard() False sage: SkewTableau([[None, 2, 3]]).is_semistandard() True sage: SkewTableau([[None, 3, 2]]).is_semistandard() False sage: SkewTableau([[None, 2, 3], [1, 4]]).is_semistandard() True sage: SkewTableau([[None, 2, 3], [1, 2]]).is_semistandard() False sage: SkewTableau([[None, 2, 3], [None, None, 4]]).is_semistandard() False

is_standard
()¶ Return
True
ifself
is a standard skew tableau andFalse
otherwise.EXAMPLES:
sage: SkewTableau([[None, 2], [1, 3]]).is_standard() True sage: SkewTableau([[None, 2], [2, 4]]).is_standard() False sage: SkewTableau([[None, 3], [2, 4]]).is_standard() False sage: SkewTableau([[None, 2], [2, 4]]).is_standard() False

outer_shape
()¶ Return the outer shape of
self
.EXAMPLES:
sage: SkewTableau([[None,1,2],[None,3],[4]]).outer_shape() [3, 2, 1]

outer_size
()¶ Return the size of the outer shape of
self
.EXAMPLES:
sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).outer_size() 6 sage: SkewTableau([[None, 2], [1, 3]]).outer_size() 4

pp
()¶ Return a pretty print string of the tableau.
EXAMPLES:
sage: SkewTableau([[None,2,3],[None,4],[5]]).pp() . 2 3 . 4 5

rectify
(algorithm=None)¶ Return a
StandardTableau
,SemistandardTableau
, or justTableau
formed by applying the jeu de taquin process toself
.See page 15 of [Fulton97].
INPUT:
algorithm
– optional: if set to'jdt'
, rectifies by jeu de taquin; if set to'schensted'
, rectifies by Schensted insertion of the reading word; otherwise, guesses which will be faster.
EXAMPLES:
sage: S = SkewTableau([[None,1],[2,3]]) sage: S.rectify() [[1, 3], [2]] sage: T = SkewTableau([[None, None, None, 4],[None,None,1,6],[None,None,5],[2,3]]) sage: T.rectify() [[1, 3, 4, 6], [2, 5]] sage: T.rectify(algorithm='jdt') [[1, 3, 4, 6], [2, 5]] sage: T.rectify(algorithm='schensted') [[1, 3, 4, 6], [2, 5]] sage: T.rectify(algorithm='spaghetti') Traceback (most recent call last): ... ValueError: algorithm must be 'jdt', 'schensted', or None
REFERENCES:
[Fulton97] (1, 2) William Fulton, Young Tableaux, Cambridge University Press 1997.

restrict
(n)¶ Return the restriction of the (semi)standard skew tableau to all the numbers less than or equal to
n
.Note
If only the outer shape of the restriction, rather than the whole restriction, is needed, then the faster method
restriction_outer_shape()
is preferred. Similarly if only the skew shape is needed, userestriction_shape()
.EXAMPLES:
sage: SkewTableau([[None,1],[2],[3]]).restrict(2) [[None, 1], [2]] sage: SkewTableau([[None,1],[2],[3]]).restrict(1) [[None, 1]] sage: SkewTableau([[None,1],[1],[2]]).restrict(1) [[None, 1], [1]]

restriction_outer_shape
(n)¶ Return the outer shape of the restriction of the semistandard skew tableau
self
to \(n\).If \(T\) is a semistandard skew tableau and \(n\) is a nonnegative integer, then the restriction of \(T\) to \(n\) is defined as the (semistandard) skew tableau obtained by removing all cells filled with entries greater than \(n\) from \(T\).
This method computes merely the outer shape of the restriction. For the restriction itself, use
restrict()
.EXAMPLES:
sage: SkewTableau([[None,None],[2,3],[3,4]]).restriction_outer_shape(3) [2, 2, 1] sage: SkewTableau([[None,2],[None],[4],[5]]).restriction_outer_shape(2) [2, 1] sage: T = SkewTableau([[None,None,3,5],[None,4,4],[17]]) sage: T.restriction_outer_shape(0) [2, 1] sage: T.restriction_outer_shape(2) [2, 1] sage: T.restriction_outer_shape(3) [3, 1] sage: T.restriction_outer_shape(4) [3, 3] sage: T.restriction_outer_shape(19) [4, 3, 1]

restriction_shape
(n)¶ Return the skew shape of the restriction of the semistandard skew tableau
self
ton
.If \(T\) is a semistandard skew tableau and \(n\) is a nonnegative integer, then the restriction of \(T\) to \(n\) is defined as the (semistandard) skew tableau obtained by removing all cells filled with entries greater than \(n\) from \(T\).
This method computes merely the skew shape of the restriction. For the restriction itself, use
restrict()
.EXAMPLES:
sage: SkewTableau([[None,None],[2,3],[3,4]]).restriction_shape(3) [2, 2, 1] / [2] sage: SkewTableau([[None,2],[None],[4],[5]]).restriction_shape(2) [2, 1] / [1, 1] sage: T = SkewTableau([[None,None,3,5],[None,4,4],[17]]) sage: T.restriction_shape(0) [2, 1] / [2, 1] sage: T.restriction_shape(2) [2, 1] / [2, 1] sage: T.restriction_shape(3) [3, 1] / [2, 1] sage: T.restriction_shape(4) [3, 3] / [2, 1]

shape
()¶ Return the shape of
self
.EXAMPLES:
sage: SkewTableau([[None,1,2],[None,3],[4]]).shape() [3, 2, 1] / [1, 1]

shuffle
(t2)¶ Shuffle the standard tableaux
self
andt2
.Let
t1 = self
. The shape oft2
must extend the shape oft1
, that is,self.outer_shape() == t2.inner_shape()
. Then this function computes the pair of tableaux(t2_new, t1_new)
obtained by using jeu de taquin slides to move the boxes oft2
behind the boxes ofself
.The entries of
t2_new
are obtained by performing successive inwards jeu de taquin slides ont2
in the order indicated by the entries oft1
, from largest to smallest. The entries oft1
then slide outwards one by one and land in the squares vacated successively byt2
, formingt1_new
.Note
Equivalently, the entries of
t1_new
are obtained by performing outer jeu de taquin slides ont1
in the order indicated by the entries oft2
, from smallest to largest. In this case the entries oft2
slide backwards and fill the squares successively vacated byt1
and so formt2_new
. (This is not how the algorithm is implemented.)INPUT:
self
,t2
– a pair of standard SkewTableaux withself.outer_shape() == t2.inner_shape()
OUTPUT:
t2_new, t1_new
– a pair of standardSkewTableaux
witht2_new.outer_shape() == t1_new.inner_shape()
EXAMPLES:
sage: t1 = SkewTableau([[None, 1, 2], [3, 4]]) sage: t2 = SkewTableau([[None, None, None, 3], [None, None, 4], [1, 2, 5]]) sage: (t2_new, t1_new) = t1.shuffle(t2) sage: t1_new [[None, None, None, 2], [None, None, 1], [None, 3, 4]] sage: t2_new [[None, 2, 3], [1, 4], [5]] sage: t1_new.outer_shape() == t2.outer_shape() True sage: t2_new.inner_shape() == t1.inner_shape() True
Shuffling is an involution:
sage: t1 = SkewTableau([[None, 1, 2], [3, 4]]) sage: t2 = SkewTableau([[None, None, None, 3], [None, None, 4], [1, 2, 5]]) sage: sh = lambda x,y : x.shuffle(y) sage: (t1, t2) == sh(*sh(t1, t2)) True
Both tableaux must be standard:
sage: t1 = SkewTableau([[None, 1, 2], [2, 4]]) sage: t2 = SkewTableau([[None, None, None, 3], [None, None, 4], [1, 2, 5]]) sage: t1.shuffle(t2) Traceback (most recent call last): ... ValueError: the tableaux must be standard sage: t1 = SkewTableau([[None, 1, 2], [3, 4]]) sage: t2 = SkewTableau([[None, None, None, 3], [None, None, 4], [1, 2, 6]]) sage: t1.shuffle(t2) Traceback (most recent call last): ... ValueError: the tableaux must be standard
The shapes (not just the nonempty cells) must be adjacent:
sage: t1 = SkewTableau([[None, None, None], [1]]) sage: t2 = SkewTableau([[None], [None], [1]]) sage: t1.shuffle(t2) Traceback (most recent call last): ... ValueError: the shapes must be adjacent

size
()¶ Return the number of cells in
self
.EXAMPLES:
sage: SkewTableau([[None, 2, 4], [None, 3], [1]]).size() 4 sage: SkewTableau([[None, 2], [1, 3]]).size() 3

slide
(corner=None, return_vacated=False)¶ Apply a jeudetaquin slide to
self
on the specified inner corner and return the resulting tableau.If no corner is given, the topmost inner corner is chosen.
The optional parameter
return_vacated=True
causes the output to be the pair(t, (i, j))
wheret
is the new tableau and(i, j)
are the coordinates of the vacated square.See [Fulton97] p1213.
EXAMPLES:
sage: st = SkewTableau([[None, None, None, None, 2], [None, None, None, None, 6], [None, 2, 4, 4], [2, 3, 6], [5, 5]]) sage: st.slide((2, 0)) [[None, None, None, None, 2], [None, None, None, None, 6], [2, 2, 4, 4], [3, 5, 6], [5]] sage: st2 = SkewTableau([[None, None, 3], [None, 2, 4], [1, 5]]) sage: st2.slide((1, 0), True) ([[None, None, 3], [1, 2, 4], [5]], (2, 1))

standardization
(check=True)¶ Return the standardization of
self
, assumingself
is a semistandard skew tableau.The standardization of a semistandard skew tableau \(T\) is the standard skew tableau \(\mathrm{st}(T)\) of the same shape as \(T\) whose reversed reading word is the standardization of the reversed reading word of \(T\).
The standardization of a word \(w\) can be formed by replacing all \(1\)‘s in \(w\) by \(1, 2, \ldots, k_1\) from left to right, all \(2\)‘s in \(w\) by \(k_1 + 1, k_1 + 2, \ldots, k_2\), and repeating for all letters that appear in \(w\). See also
Word.standard_permutation()
.INPUT:
check
– (Default:True
) Check to make sureself
is semistandard. Set toFalse
to avoid this check.
EXAMPLES:
sage: t = SkewTableau([[None,None,3,4,7,19],[None,4,4,8],[None,5,16,17],[None],[2],[3]]) sage: t.standardization() [[None, None, 3, 6, 8, 12], [None, 4, 5, 9], [None, 7, 10, 11], [None], [1], [2]]
Standard skew tableaux are fixed under standardization:
sage: p = Partition([4,3,3,2]) sage: q = Partitions(3).random_element() sage: all((t == t.standardization() for t in StandardSkewTableaux([p, q]))) True
The reading word of the standardization is the standardization of the reading word:
sage: t = SkewTableau([[None,3,4,4],[None,6,10],[7,7,11],[18]]) sage: t.to_word().standard_permutation() == t.standardization().to_permutation() True

to_chain
(max_entry=None)¶ Return the chain of partitions corresponding to the (semi)standard skew tableau
self
.The optional keyword parameter
max_entry
can be used to customize the length of the chain. Specifically, if this parameter is set to a nonnegative integern
, then the chain is constructed from the positions of the letters \(1, 2, \ldots, n\) in the tableau.EXAMPLES:
sage: SkewTableau([[None,1],[2],[3]]).to_chain() [[1], [2], [2, 1], [2, 1, 1]] sage: SkewTableau([[None,1],[1],[2]]).to_chain() [[1], [2, 1], [2, 1, 1]] sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=2) [[1], [2, 1], [2, 1, 1]] sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=3) [[1], [2, 1], [2, 1, 1], [2, 1, 1]] sage: SkewTableau([[None,1],[1],[2]]).to_chain(max_entry=1) [[1], [2, 1]] sage: SkewTableau([[None,None,2],[None,3],[None,5]]).to_chain(max_entry=6) [[2, 1, 1], [2, 1, 1], [3, 1, 1], [3, 2, 1], [3, 2, 1], [3, 2, 2], [3, 2, 2]] sage: SkewTableau([]).to_chain() [[]] sage: SkewTableau([]).to_chain(max_entry=1) [[], []]

to_expr
()¶ The first list in a result corresponds to the inner partition of the skew shape. The second list is a list of the rows in the skew tableau read from the bottom up.
Provided for compatibility with MuPADCombinat. In MuPADCombinat, if
t
is a skew tableau, then to_expr gives the same result asexpr(t)
would give in MuPADCombinat.EXAMPLES:
sage: SkewTableau([[None,1,1,3],[None,2,2],[1]]).to_expr() [[1, 1], [[1], [2, 2], [1, 1, 3]]] sage: SkewTableau([]).to_expr() [[], []]

to_list
()¶ Return a (mutable) list representation of
self
.EXAMPLES:
sage: stlist = [[None, None, 3], [None, 1, 3], [2, 2]] sage: st = SkewTableau(stlist) sage: st.to_list() [[None, None, 3], [None, 1, 3], [2, 2]] sage: st.to_list() == stlist True

to_permutation
()¶ Return a permutation with the entries of
self
obtained by readingself
row by row, from the bottommost to the topmost row, with each row being read from left to right, in English convention. Seeto_word_by_row()
.EXAMPLES:
sage: SkewTableau([[None,2],[3,4],[None],[1]]).to_permutation() [1, 3, 4, 2] sage: SkewTableau([[None,2],[None,4],[1],[3]]).to_permutation() [3, 1, 4, 2] sage: SkewTableau([[None]]).to_permutation() []

to_ribbon
(check_input=True)¶ Return
self
as a ribbonshaped tableau (RibbonShapedTableau
), provided that the shape ofself
is a ribbon.INPUT:
check_input
– (default:True
) whether or not to check thatself
indeed has ribbon shape
EXAMPLES:
sage: SkewTableau([[None,1],[2,3]]).to_ribbon() [[None, 1], [2, 3]]

to_tableau
()¶ Returns a tableau with the same filling. This only works if the inner shape of the skew tableau has size zero.
EXAMPLES:
sage: SkewTableau([[1,2],[3,4]]).to_tableau() [[1, 2], [3, 4]]

to_word
()¶ Return a word obtained from a row reading of
self
.This is the word obtained by concatenating the rows from the bottommost one (in English notation) to the topmost one.
EXAMPLES:
sage: s = SkewTableau([[None,1],[2,3]]) sage: s.pp() . 1 2 3 sage: s.to_word_by_row() word: 231 sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]]) sage: s.pp() . 2 4 . 3 1 sage: s.to_word_by_row() word: 1324

to_word_by_column
()¶ Return the word obtained from a column reading of the skew tableau.
This is the word obtained by concatenating the columns from the rightmost one (in English notation) to the leftmost one.
EXAMPLES:
sage: s = SkewTableau([[None,1],[2,3]]) sage: s.pp() . 1 2 3 sage: s.to_word_by_column() word: 132
sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]]) sage: s.pp() . 2 4 . 3 1 sage: s.to_word_by_column() word: 4231

to_word_by_row
()¶ Return a word obtained from a row reading of
self
.This is the word obtained by concatenating the rows from the bottommost one (in English notation) to the topmost one.
EXAMPLES:
sage: s = SkewTableau([[None,1],[2,3]]) sage: s.pp() . 1 2 3 sage: s.to_word_by_row() word: 231 sage: s = SkewTableau([[None, 2, 4], [None, 3], [1]]) sage: s.pp() . 2 4 . 3 1 sage: s.to_word_by_row() word: 1324

weight
()¶ Return the weight (aka evaluation) of the tableau
self
. Trailing zeroes are omitted when returning the weight.The weight of a skew tableau \(T\) is the sequence \((a_1, a_2, a_3, \ldots )\), where \(a_k\) is the number of entries of \(T\) equal to \(k\). This sequence contains only finitely many nonzero entries.
The weight of a skew tableau \(T\) is the same as the weight of the reading word of \(T\), for any reading order.
evaluation()
is a synonym for this method.EXAMPLES:
sage: SkewTableau([[1,2],[3,4]]).weight() [1, 1, 1, 1] sage: SkewTableau([[None,2],[None,4],[None,5],[None]]).weight() [0, 1, 0, 1, 1] sage: SkewTableau([]).weight() [] sage: SkewTableau([[None,None,None],[None]]).weight() [] sage: SkewTableau([[None,3,4],[None,6,7],[4,8],[5,13],[6],[7]]).weight() [0, 0, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0, 1]


class
sage.combinat.skew_tableau.
SkewTableau_class
(parent, st)¶ Bases:
sage.combinat.skew_tableau.SkewTableau
This exists solely for unpickling
SkewTableau_class
objects.

class
sage.combinat.skew_tableau.
SkewTableaux
(category=None)¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.structure.parent.Parent
Class of all skew tableaux.

Element
¶ alias of
SkewTableau

from_chain
(chain)¶ Return the tableau corresponding to the chain of partitions.
EXAMPLES:
sage: SkewTableaux().from_chain([[1,1],[2,1],[3,1],[3,2],[3,3],[3,3,1]]) [[None, 1, 2], [None, 3, 4], [5]]

from_expr
(expr)¶ Return a
SkewTableau
from a MuPADCombinat expr for a skew tableau. The first list inexpr
is the inner shape of the skew tableau. The second list are the entries in the rows of the skew tableau from bottom to top.Provided primarily for compatibility with MuPADCombinat.
EXAMPLES:
sage: SkewTableaux().from_expr([[1,1],[[5],[3,4],[1,2]]]) [[None, 1, 2], [None, 3, 4], [5]]

from_shape_and_word
(shape, word)¶ Return the skew tableau corresponding to the skew partition
shape
and the wordword
obtained from the row reading.EXAMPLES:
sage: t = SkewTableau([[None, 1, 3], [None, 2], [4]]) sage: shape = t.shape() sage: word = t.to_word() sage: SkewTableaux().from_shape_and_word(shape, word) [[None, 1, 3], [None, 2], [4]]

global_options
(*args, **kwds)¶ Deprecated: Use
options()
instead. See trac ticket #18555 for details.

options
(*get_value, **set_value)¶ Sets the global options for elements of the tableau, skew_tableau, and tableau tuple classes. The defaults are for tableau to be displayed as a list, latexed as a Young diagram using the English convention.
OPTIONS:
ascii_art
– (default:repr
) Controls the ascii art output for tableauxcompact
– minimal length ascii artrepr
– display using the diagram string representationtable
– display as a table
convention
– (default:English
) Sets the convention used for displaying tableaux and partitionsEnglish
– use the English conventionFrench
– use the French convention
display
– (default:list
) Controls the way in which tableaux are printedarray
– alias fordiagram
compact
– minimal length string representationdiagram
– display as Young diagram (similar topp()
ferrers_diagram
– alias fordiagram
list
– print tableaux as listsyoung_diagram
– alias fordiagram
latex
– (default:diagram
) Controls the way in which tableaux are latexedarray
– alias fordiagram
diagram
– as a Young diagramferrers_diagram
– alias fordiagram
list
– as a listyoung_diagram
– alias fordiagram
notation
– alternative name forconvention
Note
Changing the
convention
for tableaux also changes theconvention
for partitions.If no parameters are set, then the function returns a copy of the options dictionary.
EXAMPLES:
sage: T = Tableau([[1,2,3],[4,5]]) sage: T [[1, 2, 3], [4, 5]] sage: Tableaux.options.display="array" sage: T 1 2 3 4 5 sage: Tableaux.options.convention="french" sage: T 4 5 1 2 3
Changing the
convention
for tableaux also changes theconvention
for partitions and vice versa:sage: P = Partition([3,3,1]) sage: print(P.ferrers_diagram()) * *** *** sage: Partitions.options.convention="english" sage: print(P.ferrers_diagram()) *** *** * sage: T 1 2 3 4 5
The ASCII art can also be changed:
sage: t = Tableau([[1,2,3],[4,5]]) sage: ascii_art(t) 1 2 3 4 5 sage: Tableaux.options.ascii_art = "table" sage: ascii_art(t) ++++  1  2  3  ++++  4  5  +++ sage: Tableaux.options.ascii_art = "compact" sage: ascii_art(t) 123 45 sage: Tableaux.options._reset()
See
GlobalOptions
for more features of these options.


class
sage.combinat.skew_tableau.
StandardSkewTableaux
(category=None)¶ Bases:
sage.combinat.skew_tableau.SkewTableaux
Standard skew tableaux.
EXAMPLES:
sage: S = StandardSkewTableaux(); S Standard skew tableaux sage: S.cardinality() +Infinity
sage: S = StandardSkewTableaux(2); S Standard skew tableaux of size 2 sage: S.cardinality() 4
sage: StandardSkewTableaux([[3, 2, 1], [1, 1]]).list() [[[None, 2, 3], [None, 4], [1]], [[None, 1, 2], [None, 3], [4]], [[None, 1, 2], [None, 4], [3]], [[None, 1, 3], [None, 4], [2]], [[None, 1, 4], [None, 3], [2]], [[None, 1, 4], [None, 2], [3]], [[None, 1, 3], [None, 2], [4]], [[None, 2, 4], [None, 3], [1]]]

class
sage.combinat.skew_tableau.
StandardSkewTableaux_all
¶ Bases:
sage.combinat.skew_tableau.StandardSkewTableaux
Class of all standard skew tableaux.

class
sage.combinat.skew_tableau.
StandardSkewTableaux_shape
(skp)¶ Bases:
sage.combinat.skew_tableau.StandardSkewTableaux
Standard skew tableaux of a fixed skew shape \(\lambda / \mu\).

class
sage.combinat.skew_tableau.
StandardSkewTableaux_size
(n)¶ Bases:
sage.combinat.skew_tableau.StandardSkewTableaux
Standard skew tableaux of a fixed size \(n\).

cardinality
()¶ EXAMPLES:
sage: StandardSkewTableaux(1).cardinality() 1 sage: StandardSkewTableaux(2).cardinality() 4 sage: StandardSkewTableaux(3).cardinality() 24 sage: StandardSkewTableaux(4).cardinality() 194
