Skew Partitions

A skew partition skp of size \(n\) is a pair of partitions \([p_1, p_2]\) where \(p_1\) is a partition of the integer \(n_1\), \(p_2\) is a partition of the integer \(n_2\), \(p_2\) is an inner partition of \(p_1\), and \(n = n_1 - n_2\). We say that \(p_1\) and \(p_2\) are respectively the inner and outer partitions of skp.

A skew partition can be depicted by a diagram made of rows of cells, in the same way as a partition. Only the cells of the outer partition \(p_1\) which are not in the inner partition \(p_2\) appear in the picture. For example, this is the diagram of the skew partition [[5,4,3,1],[3,3,1]].

sage: print(SkewPartition([[5,4,3,1],[3,3,1]]).diagram())
   **
   *
 **
*
>>> from sage.all import *
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).diagram())
   **
   *
 **
*
print(SkewPartition([[5,4,3,1],[3,3,1]]).diagram())

A skew partition can be connected, which can easily be described in graphic terms: for each pair of consecutive rows, there are at least two cells (one in each row) which have a common edge. This is the diagram of the connected skew partition [[5,4,3,1],[3,1]]:

sage: print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
   **
 ***
***
*
sage: SkewPartition([[5,4,3,1],[3,1]]).is_connected()
True
>>> from sage.all import *
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).diagram())
   **
 ***
***
*
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).is_connected()
True
print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
SkewPartition([[5,4,3,1],[3,1]]).is_connected()

The first example of a skew partition is not a connected one.

Applying a reflection with respect to the main diagonal yields the diagram of the conjugate skew partition, here [[4,3,3,2,1],[3,3,2]]:

sage: SkewPartition([[5,4,3,1],[3,3,1]]).conjugate()
[4, 3, 3, 2, 1] / [3, 2, 2]
sage: print(SkewPartition([[5,4,3,1],[3,3,1]]).conjugate().diagram())
   *
  *
  *
**
*
>>> from sage.all import *
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).conjugate()
[4, 3, 3, 2, 1] / [3, 2, 2]
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).conjugate().diagram())
   *
  *
  *
**
*
SkewPartition([[5,4,3,1],[3,3,1]]).conjugate()
print(SkewPartition([[5,4,3,1],[3,3,1]]).conjugate().diagram())

The outer corners of a skew partition are the corners of its outer partition. The inner corners are the internal corners of the outer partition when the inner partition is taken off. Shown below are the coordinates of the inner and outer corners.

sage: SkewPartition([[5,4,3,1],[3,3,1]]).outer_corners()
[(0, 4), (1, 3), (2, 2), (3, 0)]
sage: SkewPartition([[5,4,3,1],[3,3,1]]).inner_corners()
[(0, 3), (2, 1), (3, 0)]
>>> from sage.all import *
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).outer_corners()
[(0, 4), (1, 3), (2, 2), (3, 0)]
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).inner_corners()
[(0, 3), (2, 1), (3, 0)]
SkewPartition([[5,4,3,1],[3,3,1]]).outer_corners()
SkewPartition([[5,4,3,1],[3,3,1]]).inner_corners()

EXAMPLES:

There are 9 skew partitions of size 3, with no empty row nor empty column:

sage: SkewPartitions(3).cardinality()
9
sage: SkewPartitions(3).list()
[[3] / [],
 [2, 1] / [],
 [3, 1] / [1],
 [2, 2] / [1],
 [3, 2] / [2],
 [1, 1, 1] / [],
 [2, 2, 1] / [1, 1],
 [2, 1, 1] / [1],
 [3, 2, 1] / [2, 1]]
>>> from sage.all import *
>>> SkewPartitions(Integer(3)).cardinality()
9
>>> SkewPartitions(Integer(3)).list()
[[3] / [],
 [2, 1] / [],
 [3, 1] / [1],
 [2, 2] / [1],
 [3, 2] / [2],
 [1, 1, 1] / [],
 [2, 2, 1] / [1, 1],
 [2, 1, 1] / [1],
 [3, 2, 1] / [2, 1]]
SkewPartitions(3).cardinality()
SkewPartitions(3).list()

There are 4 connected skew partitions of size 3:

sage: SkewPartitions(3, overlap=1).cardinality()
4
sage: SkewPartitions(3, overlap=1).list()
[[3] / [], [2, 1] / [], [2, 2] / [1], [1, 1, 1] / []]
>>> from sage.all import *
>>> SkewPartitions(Integer(3), overlap=Integer(1)).cardinality()
4
>>> SkewPartitions(Integer(3), overlap=Integer(1)).list()
[[3] / [], [2, 1] / [], [2, 2] / [1], [1, 1, 1] / []]
SkewPartitions(3, overlap=1).cardinality()
SkewPartitions(3, overlap=1).list()

This is the conjugate of the skew partition [[4,3,1], [2]]

sage: SkewPartition([[4,3,1], [2]]).conjugate()
[3, 2, 2, 1] / [1, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(4),Integer(3),Integer(1)], [Integer(2)]]).conjugate()
[3, 2, 2, 1] / [1, 1]
SkewPartition([[4,3,1], [2]]).conjugate()

Geometrically, we just applied a reflection with respect to the main diagonal on the diagram of the partition. Of course, this operation is an involution:

sage: SkewPartition([[4,3,1],[2]]).conjugate().conjugate()
[4, 3, 1] / [2]
>>> from sage.all import *
>>> SkewPartition([[Integer(4),Integer(3),Integer(1)],[Integer(2)]]).conjugate().conjugate()
[4, 3, 1] / [2]
SkewPartition([[4,3,1],[2]]).conjugate().conjugate()

The jacobi_trudi() method computes the Jacobi-Trudi matrix. See [Mac1995] for a definition and discussion.

sage: SkewPartition([[4,3,1],[2]]).jacobi_trudi()                                   # needs sage.modules
[h[2]  h[]    0]
[h[5] h[3]  h[]]
[h[6] h[4] h[1]]
>>> from sage.all import *
>>> SkewPartition([[Integer(4),Integer(3),Integer(1)],[Integer(2)]]).jacobi_trudi()                                   # needs sage.modules
[h[2]  h[]    0]
[h[5] h[3]  h[]]
[h[6] h[4] h[1]]
SkewPartition([[4,3,1],[2]]).jacobi_trudi()                                   # needs sage.modules

This example shows how to compute the corners of a skew partition.

sage: SkewPartition([[4,3,1],[2]]).inner_corners()
[(0, 2), (1, 0)]
sage: SkewPartition([[4,3,1],[2]]).outer_corners()
[(0, 3), (1, 2), (2, 0)]
>>> from sage.all import *
>>> SkewPartition([[Integer(4),Integer(3),Integer(1)],[Integer(2)]]).inner_corners()
[(0, 2), (1, 0)]
>>> SkewPartition([[Integer(4),Integer(3),Integer(1)],[Integer(2)]]).outer_corners()
[(0, 3), (1, 2), (2, 0)]
SkewPartition([[4,3,1],[2]]).inner_corners()
SkewPartition([[4,3,1],[2]]).outer_corners()

AUTHORS:

  • Mike Hansen: Initial version

  • Travis Scrimshaw (2013-02-11): Factored out CombinatorialClass

  • Trevor K. Karn (2022-08-03): Add outside_corners

class sage.combinat.skew_partition.SkewPartition(parent, skp)[source]

Bases: CombinatorialElement

A skew partition.

A skew partition of shape \(\lambda / \mu\) is the Young diagram from the partition \(\lambda\) and removing the partition \(\mu\) from the upper-left corner in English convention.

cell_poset(orientation='SE')[source]

Return the Young diagram of self as a poset. The optional keyword variable orientation determines the order relation of the poset.

The poset always uses the set of cells of the Young diagram of self as its ground set. The order relation of the poset depends on the orientation variable (which defaults to 'SE'). Concretely, orientation has to be specified to one of the strings 'NW', 'NE', 'SW', and 'SE', standing for “northwest”, “northeast”, “southwest” and “southeast”, respectively. If orientation is 'SE', then the order relation of the poset is such that a cell \(u\) is greater or equal to a cell \(v\) in the poset if and only if \(u\) lies weakly southeast of \(v\) (this means that \(u\) can be reached from \(v\) by a sequence of south and east steps; the sequence is allowed to consist of south steps only, or of east steps only, or even be empty). Similarly the order relation is defined for the other three orientations. The Young diagram is supposed to be drawn in English notation.

The elements of the poset are the cells of the Young diagram of self, written as tuples of zero-based coordinates (so that \((3, 7)\) stands for the \(8\)-th cell of the \(4\)-th row, etc.).

EXAMPLES:

sage: # needs sage.graphs
sage: p = SkewPartition([[3,3,1], [2,1]])
sage: Q = p.cell_poset(); Q
Finite poset containing 4 elements
sage: sorted(Q)
[(0, 2), (1, 1), (1, 2), (2, 0)]
sage: sorted(Q.maximal_elements())
[(1, 2), (2, 0)]
sage: sorted(Q.minimal_elements())
[(0, 2), (1, 1), (2, 0)]
sage: sorted(Q.upper_covers((1, 1)))
[(1, 2)]
sage: sorted(Q.upper_covers((0, 2)))
[(1, 2)]

sage: # needs sage.graphs
sage: P = p.cell_poset(orientation="NW"); P
Finite poset containing 4 elements
sage: sorted(P)
[(0, 2), (1, 1), (1, 2), (2, 0)]
sage: sorted(P.minimal_elements())
[(1, 2), (2, 0)]
sage: sorted(P.maximal_elements())
[(0, 2), (1, 1), (2, 0)]
sage: sorted(P.upper_covers((1, 2)))
[(0, 2), (1, 1)]

sage: # needs sage.graphs
sage: R = p.cell_poset(orientation="NE"); R
Finite poset containing 4 elements
sage: sorted(R)
[(0, 2), (1, 1), (1, 2), (2, 0)]
sage: R.maximal_elements()
[(0, 2)]
sage: R.minimal_elements()
[(2, 0)]
sage: R.upper_covers((2, 0))
[(1, 1)]
sage: sorted([len(R.upper_covers(v)) for v in R])
[0, 1, 1, 1]
>>> from sage.all import *
>>> # needs sage.graphs
>>> p = SkewPartition([[Integer(3),Integer(3),Integer(1)], [Integer(2),Integer(1)]])
>>> Q = p.cell_poset(); Q
Finite poset containing 4 elements
>>> sorted(Q)
[(0, 2), (1, 1), (1, 2), (2, 0)]
>>> sorted(Q.maximal_elements())
[(1, 2), (2, 0)]
>>> sorted(Q.minimal_elements())
[(0, 2), (1, 1), (2, 0)]
>>> sorted(Q.upper_covers((Integer(1), Integer(1))))
[(1, 2)]
>>> sorted(Q.upper_covers((Integer(0), Integer(2))))
[(1, 2)]

>>> # needs sage.graphs
>>> P = p.cell_poset(orientation="NW"); P
Finite poset containing 4 elements
>>> sorted(P)
[(0, 2), (1, 1), (1, 2), (2, 0)]
>>> sorted(P.minimal_elements())
[(1, 2), (2, 0)]
>>> sorted(P.maximal_elements())
[(0, 2), (1, 1), (2, 0)]
>>> sorted(P.upper_covers((Integer(1), Integer(2))))
[(0, 2), (1, 1)]

>>> # needs sage.graphs
>>> R = p.cell_poset(orientation="NE"); R
Finite poset containing 4 elements
>>> sorted(R)
[(0, 2), (1, 1), (1, 2), (2, 0)]
>>> R.maximal_elements()
[(0, 2)]
>>> R.minimal_elements()
[(2, 0)]
>>> R.upper_covers((Integer(2), Integer(0)))
[(1, 1)]
>>> sorted([len(R.upper_covers(v)) for v in R])
[0, 1, 1, 1]
# needs sage.graphs
p = SkewPartition([[3,3,1], [2,1]])
Q = p.cell_poset(); Q
sorted(Q)
sorted(Q.maximal_elements())
sorted(Q.minimal_elements())
sorted(Q.upper_covers((1, 1)))
sorted(Q.upper_covers((0, 2)))
# needs sage.graphs
P = p.cell_poset(orientation="NW"); P
sorted(P)
sorted(P.minimal_elements())
sorted(P.maximal_elements())
sorted(P.upper_covers((1, 2)))
# needs sage.graphs
R = p.cell_poset(orientation="NE"); R
sorted(R)
R.maximal_elements()
R.minimal_elements()
R.upper_covers((2, 0))
sorted([len(R.upper_covers(v)) for v in R])
cells()[source]

Return the coordinates of the cells of self. Coordinates are given as (row-index, column-index) and are 0 based.

EXAMPLES:

sage: SkewPartition([[4, 3, 1], [2]]).cells()
[(0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (2, 0)]
sage: SkewPartition([[4, 3, 1], []]).cells()
[(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (2, 0)]
sage: SkewPartition([[2], []]).cells()
[(0, 0), (0, 1)]
>>> from sage.all import *
>>> SkewPartition([[Integer(4), Integer(3), Integer(1)], [Integer(2)]]).cells()
[(0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (2, 0)]
>>> SkewPartition([[Integer(4), Integer(3), Integer(1)], []]).cells()
[(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (2, 0)]
>>> SkewPartition([[Integer(2)], []]).cells()
[(0, 0), (0, 1)]
SkewPartition([[4, 3, 1], [2]]).cells()
SkewPartition([[4, 3, 1], []]).cells()
SkewPartition([[2], []]).cells()
column_lengths()[source]

Return the column lengths of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[1,1]]).column_lengths()
[1, 2, 1]
sage: SkewPartition([[5,2,2,2],[2,1]]).column_lengths()
[2, 3, 1, 1, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(1),Integer(1)]]).column_lengths()
[1, 2, 1]
>>> SkewPartition([[Integer(5),Integer(2),Integer(2),Integer(2)],[Integer(2),Integer(1)]]).column_lengths()
[2, 3, 1, 1, 1]
SkewPartition([[3,2,1],[1,1]]).column_lengths()
SkewPartition([[5,2,2,2],[2,1]]).column_lengths()
columns_intersection_set()[source]

Return the set of cells in the columns of the outer shape of self which columns intersect the skew diagram of self.

EXAMPLES:

sage: skp = SkewPartition([[3,2,1],[2,1]])
sage: cells = Set([ (0,0), (0, 1), (0,2), (1, 0), (1, 1), (2, 0)])
sage: skp.columns_intersection_set() == cells
True
>>> from sage.all import *
>>> skp = SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]])
>>> cells = Set([ (Integer(0),Integer(0)), (Integer(0), Integer(1)), (Integer(0),Integer(2)), (Integer(1), Integer(0)), (Integer(1), Integer(1)), (Integer(2), Integer(0))])
>>> skp.columns_intersection_set() == cells
True
skp = SkewPartition([[3,2,1],[2,1]])
cells = Set([ (0,0), (0, 1), (0,2), (1, 0), (1, 1), (2, 0)])
skp.columns_intersection_set() == cells
conjugate()[source]

Return the conjugate of the skew partition skp.

EXAMPLES:

sage: SkewPartition([[3,2,1],[2]]).conjugate()
[3, 2, 1] / [1, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2)]]).conjugate()
[3, 2, 1] / [1, 1]
SkewPartition([[3,2,1],[2]]).conjugate()
diagram()[source]

Return the Ferrers diagram of self.

EXAMPLES:

sage: print(SkewPartition([[5,4,3,1],[3,3,1]]).ferrers_diagram())
   **
   *
 **
*
sage: print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
   **
 ***
***
*
sage: SkewPartitions.options(diagram_str='#', convention='French')
sage: print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
#
###
 ###
   ##
sage: SkewPartitions.options._reset()
>>> from sage.all import *
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).ferrers_diagram())
   **
   *
 **
*
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).diagram())
   **
 ***
***
*
>>> SkewPartitions.options(diagram_str='#', convention='French')
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).diagram())
#
###
 ###
   ##
>>> SkewPartitions.options._reset()
print(SkewPartition([[5,4,3,1],[3,3,1]]).ferrers_diagram())
print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
SkewPartitions.options(diagram_str='#', convention='French')
print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
SkewPartitions.options._reset()
ferrers_diagram()[source]

Return the Ferrers diagram of self.

EXAMPLES:

sage: print(SkewPartition([[5,4,3,1],[3,3,1]]).ferrers_diagram())
   **
   *
 **
*
sage: print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
   **
 ***
***
*
sage: SkewPartitions.options(diagram_str='#', convention='French')
sage: print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
#
###
 ###
   ##
sage: SkewPartitions.options._reset()
>>> from sage.all import *
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).ferrers_diagram())
   **
   *
 **
*
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).diagram())
   **
 ***
***
*
>>> SkewPartitions.options(diagram_str='#', convention='French')
>>> print(SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).diagram())
#
###
 ###
   ##
>>> SkewPartitions.options._reset()
print(SkewPartition([[5,4,3,1],[3,3,1]]).ferrers_diagram())
print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
SkewPartitions.options(diagram_str='#', convention='French')
print(SkewPartition([[5,4,3,1],[3,1]]).diagram())
SkewPartitions.options._reset()
frobenius_rank()[source]

Return the Frobenius rank of the skew partition self.

The Frobenius rank of a skew partition \(\lambda / \mu\) can be defined in various ways. The quickest one is probably the following: Writing \(\lambda\) as \((\lambda_1, \lambda_2, \cdots , \lambda_N)\), and writing \(\mu\) as \((\mu_1, \mu_2, \cdots , \mu_N)\), we define the Frobenius rank of \(\lambda / \mu\) to be the number of all \(1 \leq i \leq N\) such that

\[\lambda_i - i \not\in \{ \mu_1 - 1, \mu_2 - 2, \cdots , \mu_N - N \}.\]

In other words, the Frobenius rank of \(\lambda / \mu\) is the number of rows in the Jacobi-Trudi matrix of \(\lambda / \mu\) which don’t contain \(h_0\). Further definitions have been considered in [Sta2002] (where Frobenius rank is just being called rank).

If \(\mu\) is the empty shape, then the Frobenius rank of \(\lambda / \mu\) is just the usual Frobenius rank of the partition \(\lambda\) (see frobenius_rank()).

EXAMPLES:

sage: SkewPartition([[8,8,7,4], [4,1,1]]).frobenius_rank()
4
sage: SkewPartition([[2,1], [1]]).frobenius_rank()
2
sage: SkewPartition([[2,1,1], [1]]).frobenius_rank()
2
sage: SkewPartition([[2,1,1], [1,1]]).frobenius_rank()
2
sage: SkewPartition([[5,4,3,2], [2,1,1]]).frobenius_rank()
3
sage: SkewPartition([[4,2,1], [3,1,1]]).frobenius_rank()
2
sage: SkewPartition([[4,2,1], [3,2,1]]).frobenius_rank()
1
>>> from sage.all import *
>>> SkewPartition([[Integer(8),Integer(8),Integer(7),Integer(4)], [Integer(4),Integer(1),Integer(1)]]).frobenius_rank()
4
>>> SkewPartition([[Integer(2),Integer(1)], [Integer(1)]]).frobenius_rank()
2
>>> SkewPartition([[Integer(2),Integer(1),Integer(1)], [Integer(1)]]).frobenius_rank()
2
>>> SkewPartition([[Integer(2),Integer(1),Integer(1)], [Integer(1),Integer(1)]]).frobenius_rank()
2
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(2)], [Integer(2),Integer(1),Integer(1)]]).frobenius_rank()
3
>>> SkewPartition([[Integer(4),Integer(2),Integer(1)], [Integer(3),Integer(1),Integer(1)]]).frobenius_rank()
2
>>> SkewPartition([[Integer(4),Integer(2),Integer(1)], [Integer(3),Integer(2),Integer(1)]]).frobenius_rank()
1
SkewPartition([[8,8,7,4], [4,1,1]]).frobenius_rank()
SkewPartition([[2,1], [1]]).frobenius_rank()
SkewPartition([[2,1,1], [1]]).frobenius_rank()
SkewPartition([[2,1,1], [1,1]]).frobenius_rank()
SkewPartition([[5,4,3,2], [2,1,1]]).frobenius_rank()
SkewPartition([[4,2,1], [3,1,1]]).frobenius_rank()
SkewPartition([[4,2,1], [3,2,1]]).frobenius_rank()

If the inner shape is empty, then the Frobenius rank of the skew partition is just the standard Frobenius rank of the partition:

sage: all( SkewPartition([lam, Partition([])]).frobenius_rank()
....:      == lam.frobenius_rank() for i in range(6)
....:      for lam in Partitions(i) )
True
>>> from sage.all import *
>>> all( SkewPartition([lam, Partition([])]).frobenius_rank()
...      == lam.frobenius_rank() for i in range(Integer(6))
...      for lam in Partitions(i) )
True
all( SkewPartition([lam, Partition([])]).frobenius_rank()
     == lam.frobenius_rank() for i in range(6)
     for lam in Partitions(i) )

If the inner and outer shapes are equal, then the Frobenius rank is zero:

sage: all( SkewPartition([lam, lam]).frobenius_rank() == 0
....:      for i in range(6) for lam in Partitions(i) )
True
>>> from sage.all import *
>>> all( SkewPartition([lam, lam]).frobenius_rank() == Integer(0)
...      for i in range(Integer(6)) for lam in Partitions(i) )
True
all( SkewPartition([lam, lam]).frobenius_rank() == 0
     for i in range(6) for lam in Partitions(i) )
inner()[source]

Return the inner partition of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[1,1]]).inner()
[1, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(1),Integer(1)]]).inner()
[1, 1]
SkewPartition([[3,2,1],[1,1]]).inner()
inner_corners()[source]

Return a list of the inner corners of self.

EXAMPLES:

sage: SkewPartition([[4, 3, 1], [2]]).inner_corners()
[(0, 2), (1, 0)]
sage: SkewPartition([[4, 3, 1], []]).inner_corners()
[(0, 0)]
>>> from sage.all import *
>>> SkewPartition([[Integer(4), Integer(3), Integer(1)], [Integer(2)]]).inner_corners()
[(0, 2), (1, 0)]
>>> SkewPartition([[Integer(4), Integer(3), Integer(1)], []]).inner_corners()
[(0, 0)]
SkewPartition([[4, 3, 1], [2]]).inner_corners()
SkewPartition([[4, 3, 1], []]).inner_corners()
is_connected()[source]

Return True if self is a connected skew partition.

A skew partition is said to be connected if for each pair of consecutive rows, there are at least two cells (one in each row) which have a common edge.

EXAMPLES:

sage: SkewPartition([[5,4,3,1],[3,3,1]]).is_connected()
False
sage: SkewPartition([[5,4,3,1],[3,1]]).is_connected()
True
>>> from sage.all import *
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).is_connected()
False
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).is_connected()
True
SkewPartition([[5,4,3,1],[3,3,1]]).is_connected()
SkewPartition([[5,4,3,1],[3,1]]).is_connected()
is_overlap(n)[source]

Return True if the overlap of self is at most n.

See also

overlap()

EXAMPLES:

sage: SkewPartition([[5,4,3,1],[3,1]]).is_overlap(1)
True
>>> from sage.all import *
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]]).is_overlap(Integer(1))
True
SkewPartition([[5,4,3,1],[3,1]]).is_overlap(1)
is_ribbon()[source]

Return True if and only if self is a ribbon.

This means that if it has exactly one cell in each of \(q\) consecutive diagonals for some nonnegative integer \(q\).

EXAMPLES:

sage: P = SkewPartition([[4,4,3,3],[3,2,2]])
sage: P.pp()
   *
  **
  *
***
sage: P.is_ribbon()
True

sage: P = SkewPartition([[4,3,3],[1,1]])
sage: P.pp()
 ***
 **
***
sage: P.is_ribbon()
False

sage: P = SkewPartition([[4,4,3,2],[3,2,2]])
sage: P.pp()
   *
  **
  *
**
sage: P.is_ribbon()
False

sage: P = SkewPartition([[4,4,3,3],[4,2,2,1]])
sage: P.pp()

  **
  *
 **
sage: P.is_ribbon()
True

sage: P = SkewPartition([[4,4,3,3],[4,2,2]])
sage: P.pp()

  **
  *
***
sage: P.is_ribbon()
True

sage: SkewPartition([[2,2,1],[2,2,1]]).is_ribbon()
True
>>> from sage.all import *
>>> P = SkewPartition([[Integer(4),Integer(4),Integer(3),Integer(3)],[Integer(3),Integer(2),Integer(2)]])
>>> P.pp()
   *
  **
  *
***
>>> P.is_ribbon()
True

>>> P = SkewPartition([[Integer(4),Integer(3),Integer(3)],[Integer(1),Integer(1)]])
>>> P.pp()
 ***
 **
***
>>> P.is_ribbon()
False

>>> P = SkewPartition([[Integer(4),Integer(4),Integer(3),Integer(2)],[Integer(3),Integer(2),Integer(2)]])
>>> P.pp()
   *
  **
  *
**
>>> P.is_ribbon()
False

>>> P = SkewPartition([[Integer(4),Integer(4),Integer(3),Integer(3)],[Integer(4),Integer(2),Integer(2),Integer(1)]])
>>> P.pp()
<BLANKLINE>
  **
  *
 **
>>> P.is_ribbon()
True

>>> P = SkewPartition([[Integer(4),Integer(4),Integer(3),Integer(3)],[Integer(4),Integer(2),Integer(2)]])
>>> P.pp()
<BLANKLINE>
  **
  *
***
>>> P.is_ribbon()
True

>>> SkewPartition([[Integer(2),Integer(2),Integer(1)],[Integer(2),Integer(2),Integer(1)]]).is_ribbon()
True
P = SkewPartition([[4,4,3,3],[3,2,2]])
P.pp()
P.is_ribbon()
P = SkewPartition([[4,3,3],[1,1]])
P.pp()
P.is_ribbon()
P = SkewPartition([[4,4,3,2],[3,2,2]])
P.pp()
P.is_ribbon()
P = SkewPartition([[4,4,3,3],[4,2,2,1]])
P.pp()
P.is_ribbon()
P = SkewPartition([[4,4,3,3],[4,2,2]])
P.pp()
P.is_ribbon()
SkewPartition([[2,2,1],[2,2,1]]).is_ribbon()
jacobi_trudi()[source]

Return the Jacobi-Trudi matrix of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[2,1]]).jacobi_trudi()                         # needs sage.modules
[h[1]    0    0]
[h[3] h[1]    0]
[h[5] h[3] h[1]]
sage: SkewPartition([[4,3,2],[2,1]]).jacobi_trudi()                         # needs sage.modules
[h[2]  h[]    0]
[h[4] h[2]  h[]]
[h[6] h[4] h[2]]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]]).jacobi_trudi()                         # needs sage.modules
[h[1]    0    0]
[h[3] h[1]    0]
[h[5] h[3] h[1]]
>>> SkewPartition([[Integer(4),Integer(3),Integer(2)],[Integer(2),Integer(1)]]).jacobi_trudi()                         # needs sage.modules
[h[2]  h[]    0]
[h[4] h[2]  h[]]
[h[6] h[4] h[2]]
SkewPartition([[3,2,1],[2,1]]).jacobi_trudi()                         # needs sage.modules
SkewPartition([[4,3,2],[2,1]]).jacobi_trudi()                         # needs sage.modules
k_conjugate(k)[source]

Return the \(k\)-conjugate of the skew partition.

EXAMPLES:

sage: SkewPartition([[3,2,1],[2,1]]).k_conjugate(3)
[2, 1, 1, 1, 1] / [2, 1]
sage: SkewPartition([[3,2,1],[2,1]]).k_conjugate(4)
[2, 2, 1, 1] / [2, 1]
sage: SkewPartition([[3,2,1],[2,1]]).k_conjugate(5)
[3, 2, 1] / [2, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]]).k_conjugate(Integer(3))
[2, 1, 1, 1, 1] / [2, 1]
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]]).k_conjugate(Integer(4))
[2, 2, 1, 1] / [2, 1]
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]]).k_conjugate(Integer(5))
[3, 2, 1] / [2, 1]
SkewPartition([[3,2,1],[2,1]]).k_conjugate(3)
SkewPartition([[3,2,1],[2,1]]).k_conjugate(4)
SkewPartition([[3,2,1],[2,1]]).k_conjugate(5)
outer()[source]

Return the outer partition of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[1,1]]).outer()
[3, 2, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(1),Integer(1)]]).outer()
[3, 2, 1]
SkewPartition([[3,2,1],[1,1]]).outer()
outer_corners()[source]

Return a list of the outer corners of self.

These are corners that are contained inside of the shape. For the corners which are outside of the shape, use outside_corners().

Warning

In the case that self is an honest (rather than skew) partition, these are the corners() of the outer partition. In the language of [Sag2001] these would be the “inner corners” of the outer partition.

EXAMPLES:

sage: SkewPartition([[4, 3, 1], [2]]).outer_corners()
[(0, 3), (1, 2), (2, 0)]
>>> from sage.all import *
>>> SkewPartition([[Integer(4), Integer(3), Integer(1)], [Integer(2)]]).outer_corners()
[(0, 3), (1, 2), (2, 0)]
SkewPartition([[4, 3, 1], [2]]).outer_corners()
outside_corners()[source]

Return the outside corners of self.

The outside corners are corners which are outside of the shape. This should not be confused with outer_corners() which consists of corners inside the shape. It returns a result analogous to the .outside_corners() method on (non-skew) Partitions.

EXAMPLES:

sage: mu = SkewPartition([[3,2,1],[2,1]])
sage: mu.pp()
  *
 *
*
sage: mu.outside_corners()
[(0, 3), (1, 2), (2, 1), (3, 0)]
>>> from sage.all import *
>>> mu = SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]])
>>> mu.pp()
  *
 *
*
>>> mu.outside_corners()
[(0, 3), (1, 2), (2, 1), (3, 0)]
mu = SkewPartition([[3,2,1],[2,1]])
mu.pp()
mu.outside_corners()
overlap()[source]

Return the overlap of self.

The overlap of two consecutive rows in a skew partition is the number of pairs of cells (one in each row) that share a common edge. This number can be positive, zero, or negative.

The overlap of a skew partition is the minimum of the overlap of the consecutive rows, or infinity in the case of at most one row. If the overlap is positive, then the skew partition is called connected.

EXAMPLES:

sage: SkewPartition([[],[]]).overlap()
+Infinity
sage: SkewPartition([[1],[]]).overlap()
+Infinity
sage: SkewPartition([[10],[]]).overlap()
+Infinity
sage: SkewPartition([[10],[2]]).overlap()
+Infinity
sage: SkewPartition([[10,1],[2]]).overlap()
-1
sage: SkewPartition([[10,10],[1]]).overlap()
9
>>> from sage.all import *
>>> SkewPartition([[],[]]).overlap()
+Infinity
>>> SkewPartition([[Integer(1)],[]]).overlap()
+Infinity
>>> SkewPartition([[Integer(10)],[]]).overlap()
+Infinity
>>> SkewPartition([[Integer(10)],[Integer(2)]]).overlap()
+Infinity
>>> SkewPartition([[Integer(10),Integer(1)],[Integer(2)]]).overlap()
-1
>>> SkewPartition([[Integer(10),Integer(10)],[Integer(1)]]).overlap()
9
SkewPartition([[],[]]).overlap()
SkewPartition([[1],[]]).overlap()
SkewPartition([[10],[]]).overlap()
SkewPartition([[10],[2]]).overlap()
SkewPartition([[10,1],[2]]).overlap()
SkewPartition([[10,10],[1]]).overlap()
pieri_macdonald_coeffs()[source]

Computation of the coefficients which appear in the Pieri formula for Macdonald polynomials given in his book ( Chapter 6.6 formula 6.24(ii) )

EXAMPLES:

sage: SkewPartition([[3,2,1],[2,1]]).pieri_macdonald_coeffs()
1
sage: SkewPartition([[3,2,1],[2,2]]).pieri_macdonald_coeffs()
(q^2*t^3 - q^2*t - t^2 + 1)/(q^2*t^3 - q*t^2 - q*t + 1)
sage: SkewPartition([[3,2,1],[2,2,1]]).pieri_macdonald_coeffs()
(q^6*t^8 - q^6*t^6 - q^4*t^7 - q^5*t^5 + q^4*t^5 - q^3*t^6 + q^5*t^3 + 2*q^3*t^4 + q*t^5 - q^3*t^2 + q^2*t^3 - q*t^3 - q^2*t - t^2 + 1)/(q^6*t^8 - q^5*t^7 - q^5*t^6 - q^4*t^6 + q^3*t^5 + 2*q^3*t^4 + q^3*t^3 - q^2*t^2 - q*t^2 - q*t + 1)
sage: SkewPartition([[3,3,2,2],[3,2,2,1]]).pieri_macdonald_coeffs()
(q^5*t^6 - q^5*t^5 + q^4*t^6 - q^4*t^5 - q^4*t^3 + q^4*t^2 - q^3*t^3 - q^2*t^4 + q^3*t^2 + q^2*t^3 - q*t^4 + q*t^3 + q*t - q + t - 1)/(q^5*t^6 - q^4*t^5 - q^3*t^4 - q^3*t^3 + q^2*t^3 + q^2*t^2 + q*t - 1)
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]]).pieri_macdonald_coeffs()
1
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(2)]]).pieri_macdonald_coeffs()
(q^2*t^3 - q^2*t - t^2 + 1)/(q^2*t^3 - q*t^2 - q*t + 1)
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(2),Integer(1)]]).pieri_macdonald_coeffs()
(q^6*t^8 - q^6*t^6 - q^4*t^7 - q^5*t^5 + q^4*t^5 - q^3*t^6 + q^5*t^3 + 2*q^3*t^4 + q*t^5 - q^3*t^2 + q^2*t^3 - q*t^3 - q^2*t - t^2 + 1)/(q^6*t^8 - q^5*t^7 - q^5*t^6 - q^4*t^6 + q^3*t^5 + 2*q^3*t^4 + q^3*t^3 - q^2*t^2 - q*t^2 - q*t + 1)
>>> SkewPartition([[Integer(3),Integer(3),Integer(2),Integer(2)],[Integer(3),Integer(2),Integer(2),Integer(1)]]).pieri_macdonald_coeffs()
(q^5*t^6 - q^5*t^5 + q^4*t^6 - q^4*t^5 - q^4*t^3 + q^4*t^2 - q^3*t^3 - q^2*t^4 + q^3*t^2 + q^2*t^3 - q*t^4 + q*t^3 + q*t - q + t - 1)/(q^5*t^6 - q^4*t^5 - q^3*t^4 - q^3*t^3 + q^2*t^3 + q^2*t^2 + q*t - 1)
SkewPartition([[3,2,1],[2,1]]).pieri_macdonald_coeffs()
SkewPartition([[3,2,1],[2,2]]).pieri_macdonald_coeffs()
SkewPartition([[3,2,1],[2,2,1]]).pieri_macdonald_coeffs()
SkewPartition([[3,3,2,2],[3,2,2,1]]).pieri_macdonald_coeffs()
pp()[source]

Pretty-print self.

EXAMPLES:

sage: SkewPartition([[5,4,3,1],[3,3,1]]).pp()
   **
   *
 **
*
>>> from sage.all import *
>>> SkewPartition([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]]).pp()
   **
   *
 **
*
SkewPartition([[5,4,3,1],[3,3,1]]).pp()
quotient(k)[source]

The quotient map extended to skew partitions.

EXAMPLES:

sage: SkewPartition([[3, 3, 2, 1], [2, 1]]).quotient(2)
[[3] / [], [] / []]
>>> from sage.all import *
>>> SkewPartition([[Integer(3), Integer(3), Integer(2), Integer(1)], [Integer(2), Integer(1)]]).quotient(Integer(2))
[[3] / [], [] / []]
SkewPartition([[3, 3, 2, 1], [2, 1]]).quotient(2)
row_lengths()[source]

Return the row lengths of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[1,1]]).row_lengths()
[2, 1, 1]
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(1),Integer(1)]]).row_lengths()
[2, 1, 1]
SkewPartition([[3,2,1],[1,1]]).row_lengths()
rows_intersection_set()[source]

Return the set of cells in the rows of the outer shape of self which rows intersect the skew diagram of self.

EXAMPLES:

sage: skp = SkewPartition([[3,2,1],[2,1]])
sage: cells = Set([ (0,0), (0, 1), (0,2), (1, 0), (1, 1), (2, 0)])
sage: skp.rows_intersection_set() == cells
True
>>> from sage.all import *
>>> skp = SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(2),Integer(1)]])
>>> cells = Set([ (Integer(0),Integer(0)), (Integer(0), Integer(1)), (Integer(0),Integer(2)), (Integer(1), Integer(0)), (Integer(1), Integer(1)), (Integer(2), Integer(0))])
>>> skp.rows_intersection_set() == cells
True
skp = SkewPartition([[3,2,1],[2,1]])
cells = Set([ (0,0), (0, 1), (0,2), (1, 0), (1, 1), (2, 0)])
skp.rows_intersection_set() == cells
size()[source]

Return the size of self.

EXAMPLES:

sage: SkewPartition([[3,2,1],[1,1]]).size()
4
>>> from sage.all import *
>>> SkewPartition([[Integer(3),Integer(2),Integer(1)],[Integer(1),Integer(1)]]).size()
4
SkewPartition([[3,2,1],[1,1]]).size()
specht_module(base_ring=None)[source]

Return the Specht module corresponding to self.

EXAMPLES:

sage: mu = SkewPartition([[3,2,1], [2]])
sage: SM = mu.specht_module(QQ)                                             # needs sage.modules
sage: s = SymmetricFunctions(QQ).s()                                        # needs sage.modules
sage: s(SM.frobenius_image())                                               # needs sage.modules
s[2, 1, 1] + s[2, 2] + s[3, 1]
>>> from sage.all import *
>>> mu = SkewPartition([[Integer(3),Integer(2),Integer(1)], [Integer(2)]])
>>> SM = mu.specht_module(QQ)                                             # needs sage.modules
>>> s = SymmetricFunctions(QQ).s()                                        # needs sage.modules
>>> s(SM.frobenius_image())                                               # needs sage.modules
s[2, 1, 1] + s[2, 2] + s[3, 1]
mu = SkewPartition([[3,2,1], [2]])
SM = mu.specht_module(QQ)                                             # needs sage.modules
s = SymmetricFunctions(QQ).s()                                        # needs sage.modules
s(SM.frobenius_image())                                               # needs sage.modules

We verify that the Frobenius image is the corresponding skew Schur function:

sage: s[3,2,1].skew_by(s[2])                                                # needs sage.modules
s[2, 1, 1] + s[2, 2] + s[3, 1]
>>> from sage.all import *
>>> s[Integer(3),Integer(2),Integer(1)].skew_by(s[Integer(2)])                                                # needs sage.modules
s[2, 1, 1] + s[2, 2] + s[3, 1]
s[3,2,1].skew_by(s[2])                                                # needs sage.modules
sage: mu = SkewPartition([[4,2,1], [2,1]])
sage: SM = mu.specht_module(QQ)                                             # needs sage.modules
sage: s(SM.frobenius_image())                                               # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
sage: s(mu)                                                                 # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
>>> from sage.all import *
>>> mu = SkewPartition([[Integer(4),Integer(2),Integer(1)], [Integer(2),Integer(1)]])
>>> SM = mu.specht_module(QQ)                                             # needs sage.modules
>>> s(SM.frobenius_image())                                               # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
>>> s(mu)                                                                 # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
mu = SkewPartition([[4,2,1], [2,1]])
SM = mu.specht_module(QQ)                                             # needs sage.modules
s(SM.frobenius_image())                                               # needs sage.modules
s(mu)                                                                 # needs sage.modules
>>> from sage.all import *
>>> mu = SkewPartition([[Integer(4),Integer(2),Integer(1)], [Integer(2),Integer(1)]])
>>> SM = mu.specht_module(QQ)                                             # needs sage.modules
>>> s(SM.frobenius_image())                                               # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
>>> s(mu)                                                                 # needs sage.modules
s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4]
mu = SkewPartition([[4,2,1], [2,1]])
SM = mu.specht_module(QQ)                                             # needs sage.modules
s(SM.frobenius_image())                                               # needs sage.modules
s(mu)                                                                 # needs sage.modules
specht_module_dimension(base_ring=None)[source]

Return the dimension of the Specht module corresponding to self.

This is equal to the number of standard (skew) tableaux of shape self.

EXAMPLES:

sage: mu = SkewPartition([[3,2,1], [2]])
sage: mu.specht_module_dimension()                                          # needs sage.modules
8
sage: mu.specht_module_dimension(GF(2))                                     # needs sage.modules sage.rings.finite_rings
8
>>> from sage.all import *
>>> mu = SkewPartition([[Integer(3),Integer(2),Integer(1)], [Integer(2)]])
>>> mu.specht_module_dimension()                                          # needs sage.modules
8
>>> mu.specht_module_dimension(GF(Integer(2)))                                     # needs sage.modules sage.rings.finite_rings
8
mu = SkewPartition([[3,2,1], [2]])
mu.specht_module_dimension()                                          # needs sage.modules
mu.specht_module_dimension(GF(2))                                     # needs sage.modules sage.rings.finite_rings
to_dag(format='string')[source]

Return a directed acyclic graph corresponding to the skew partition self.

The directed acyclic graph corresponding to a skew partition \(p\) is the digraph whose vertices are the cells of \(p\), and whose edges go from each cell to its lower and right neighbors (in English notation).

INPUT:

  • format – either 'string' or 'tuple' (default: 'string'); determines whether the vertices of the resulting dag will be strings or 2-tuples of coordinates

EXAMPLES:

sage: # needs sage.graphs
sage: dag = SkewPartition([[3, 3, 1], [1, 1]]).to_dag()
sage: dag.edges(sort=True)
[('0,1', '0,2', None),
('0,1', '1,1', None),
('0,2', '1,2', None),
('1,1', '1,2', None)]
sage: dag.vertices(sort=True)
['0,1', '0,2', '1,1', '1,2', '2,0']
sage: dag = SkewPartition([[3, 2, 1], [1, 1]]).to_dag(format='tuple')
sage: dag.edges(sort=True)
[((0, 1), (0, 2), None), ((0, 1), (1, 1), None)]
sage: dag.vertices(sort=True)
[(0, 1), (0, 2), (1, 1), (2, 0)]
>>> from sage.all import *
>>> # needs sage.graphs
>>> dag = SkewPartition([[Integer(3), Integer(3), Integer(1)], [Integer(1), Integer(1)]]).to_dag()
>>> dag.edges(sort=True)
[('0,1', '0,2', None),
('0,1', '1,1', None),
('0,2', '1,2', None),
('1,1', '1,2', None)]
>>> dag.vertices(sort=True)
['0,1', '0,2', '1,1', '1,2', '2,0']
>>> dag = SkewPartition([[Integer(3), Integer(2), Integer(1)], [Integer(1), Integer(1)]]).to_dag(format='tuple')
>>> dag.edges(sort=True)
[((0, 1), (0, 2), None), ((0, 1), (1, 1), None)]
>>> dag.vertices(sort=True)
[(0, 1), (0, 2), (1, 1), (2, 0)]
# needs sage.graphs
dag = SkewPartition([[3, 3, 1], [1, 1]]).to_dag()
dag.edges(sort=True)
dag.vertices(sort=True)
dag = SkewPartition([[3, 2, 1], [1, 1]]).to_dag(format='tuple')
dag.edges(sort=True)
dag.vertices(sort=True)
to_list()[source]

Return self as a list of lists.

EXAMPLES:

sage: s = SkewPartition([[4,3,1],[2]])
sage: s.to_list()
[[4, 3, 1], [2]]
sage: type(s.to_list())
<class 'list'>
>>> from sage.all import *
>>> s = SkewPartition([[Integer(4),Integer(3),Integer(1)],[Integer(2)]])
>>> s.to_list()
[[4, 3, 1], [2]]
>>> type(s.to_list())
<class 'list'>
s = SkewPartition([[4,3,1],[2]])
s.to_list()
type(s.to_list())
class sage.combinat.skew_partition.SkewPartitions(is_infinite=False)[source]

Bases: UniqueRepresentation, Parent

Skew partitions.

Warning

The iterator of this class only yields skew partitions which are 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.

EXAMPLES:

sage: SkewPartitions(4)
Skew partitions of 4
sage: SkewPartitions(4).cardinality()
28
sage: SkewPartitions(row_lengths=[2,1,2])
Skew partitions with row lengths [2, 1, 2]
sage: SkewPartitions(4, overlap=2)
Skew partitions of 4 with a minimum overlap of 2
sage: SkewPartitions(4, overlap=2).list()
[[4] / [], [2, 2] / []]
>>> from sage.all import *
>>> SkewPartitions(Integer(4))
Skew partitions of 4
>>> SkewPartitions(Integer(4)).cardinality()
28
>>> SkewPartitions(row_lengths=[Integer(2),Integer(1),Integer(2)])
Skew partitions with row lengths [2, 1, 2]
>>> SkewPartitions(Integer(4), overlap=Integer(2))
Skew partitions of 4 with a minimum overlap of 2
>>> SkewPartitions(Integer(4), overlap=Integer(2)).list()
[[4] / [], [2, 2] / []]
SkewPartitions(4)
SkewPartitions(4).cardinality()
SkewPartitions(row_lengths=[2,1,2])
SkewPartitions(4, overlap=2)
SkewPartitions(4, overlap=2).list()
Element[source]

alias of SkewPartition

from_row_and_column_length(rowL, colL)[source]

Construct a partition from its row lengths and column lengths.

INPUT:

  • rowL – a composition or a list of positive integers

  • colL – a composition or a list of positive integers

OUTPUT:

  • If it exists the unique skew-partitions with row lengths rowL and column lengths colL.

  • Raise a ValueError if rowL and colL are not compatible.

EXAMPLES:

sage: S = SkewPartitions()
sage: print(S.from_row_and_column_length([3,1,2,2],[2,3,1,1,1]).diagram())
  ***
 *
**
**
sage: S.from_row_and_column_length([],[])
[] / []
sage: S.from_row_and_column_length([1],[1])
[1] / []
sage: S.from_row_and_column_length([2,1],[2,1])
[2, 1] / []
sage: S.from_row_and_column_length([1,2],[1,2])
[2, 2] / [1]
sage: S.from_row_and_column_length([1,2],[1,3])
Traceback (most recent call last):
...
ValueError: sum mismatch: [1, 2] and [1, 3]
sage: S.from_row_and_column_length([3,2,1,2],[2,3,1,1,1])
Traceback (most recent call last):
...
ValueError: incompatible row and column length : [3, 2, 1, 2] and [2, 3, 1, 1, 1]
>>> from sage.all import *
>>> S = SkewPartitions()
>>> print(S.from_row_and_column_length([Integer(3),Integer(1),Integer(2),Integer(2)],[Integer(2),Integer(3),Integer(1),Integer(1),Integer(1)]).diagram())
  ***
 *
**
**
>>> S.from_row_and_column_length([],[])
[] / []
>>> S.from_row_and_column_length([Integer(1)],[Integer(1)])
[1] / []
>>> S.from_row_and_column_length([Integer(2),Integer(1)],[Integer(2),Integer(1)])
[2, 1] / []
>>> S.from_row_and_column_length([Integer(1),Integer(2)],[Integer(1),Integer(2)])
[2, 2] / [1]
>>> S.from_row_and_column_length([Integer(1),Integer(2)],[Integer(1),Integer(3)])
Traceback (most recent call last):
...
ValueError: sum mismatch: [1, 2] and [1, 3]
>>> S.from_row_and_column_length([Integer(3),Integer(2),Integer(1),Integer(2)],[Integer(2),Integer(3),Integer(1),Integer(1),Integer(1)])
Traceback (most recent call last):
...
ValueError: incompatible row and column length : [3, 2, 1, 2] and [2, 3, 1, 1, 1]
S = SkewPartitions()
print(S.from_row_and_column_length([3,1,2,2],[2,3,1,1,1]).diagram())
S.from_row_and_column_length([],[])
S.from_row_and_column_length([1],[1])
S.from_row_and_column_length([2,1],[2,1])
S.from_row_and_column_length([1,2],[1,2])
S.from_row_and_column_length([1,2],[1,3])
S.from_row_and_column_length([3,2,1,2],[2,3,1,1,1])

Warning

If some rows and columns have length zero, there is no way to retrieve unambiguously the skew partition. We therefore raise a ValueError. For examples here are two skew partitions with the same row and column lengths:

sage: skp1 = SkewPartition([[2,2],[2,2]])
sage: skp2 = SkewPartition([[2,1],[2,1]])
sage: skp1.row_lengths(), skp1.column_lengths()
([0, 0], [0, 0])
sage: skp2.row_lengths(), skp2.column_lengths()
([0, 0], [0, 0])
sage: SkewPartitions().from_row_and_column_length([0,0], [0,0])
Traceback (most recent call last):
...
ValueError: row and column length must be positive
>>> from sage.all import *
>>> skp1 = SkewPartition([[Integer(2),Integer(2)],[Integer(2),Integer(2)]])
>>> skp2 = SkewPartition([[Integer(2),Integer(1)],[Integer(2),Integer(1)]])
>>> skp1.row_lengths(), skp1.column_lengths()
([0, 0], [0, 0])
>>> skp2.row_lengths(), skp2.column_lengths()
([0, 0], [0, 0])
>>> SkewPartitions().from_row_and_column_length([Integer(0),Integer(0)], [Integer(0),Integer(0)])
Traceback (most recent call last):
...
ValueError: row and column length must be positive
skp1 = SkewPartition([[2,2],[2,2]])
skp2 = SkewPartition([[2,1],[2,1]])
skp1.row_lengths(), skp1.column_lengths()
skp2.row_lengths(), skp2.column_lengths()
SkewPartitions().from_row_and_column_length([0,0], [0,0])
options = Current options for SkewPartitions   - convention:        English   - diagram_str:       *   - display:           quotient   - latex:             young_diagram   - latex_diagram_str: \ast   - latex_marking_str: X[source]
class sage.combinat.skew_partition.SkewPartitions_all[source]

Bases: SkewPartitions

Class of all skew partitions.

class sage.combinat.skew_partition.SkewPartitions_n(n, overlap)[source]

Bases: SkewPartitions

The set of skew partitions of n with overlap at least overlap and no empty row.

INPUT:

  • n – nonnegative integer

  • overlap – integer (default: \(0\))

Caveat: this set is stable under conjugation only for overlap equal to 0 or 1. What exactly happens for negative overlaps is not yet well specified and subject to change (we may want to introduce vertical overlap constraints as well).

Todo

As is, this set is essentially the composition of Compositions(n) (which give the row lengths) and SkewPartition(n, row_lengths=...), and one would want to “inherit” list and cardinality from this composition.

cardinality()[source]

Return the number of skew partitions of the integer \(n\) (with given overlap, if specified; and with no empty rows before the last row).

EXAMPLES:

sage: SkewPartitions(0).cardinality()
1
sage: SkewPartitions(4).cardinality()
28
sage: SkewPartitions(5).cardinality()
87
sage: SkewPartitions(4, overlap=1).cardinality()
9
sage: SkewPartitions(5, overlap=1).cardinality()
20
sage: s = SkewPartitions(5, overlap=-1)
sage: s.cardinality() == len(s.list())
True
>>> from sage.all import *
>>> SkewPartitions(Integer(0)).cardinality()
1
>>> SkewPartitions(Integer(4)).cardinality()
28
>>> SkewPartitions(Integer(5)).cardinality()
87
>>> SkewPartitions(Integer(4), overlap=Integer(1)).cardinality()
9
>>> SkewPartitions(Integer(5), overlap=Integer(1)).cardinality()
20
>>> s = SkewPartitions(Integer(5), overlap=-Integer(1))
>>> s.cardinality() == len(s.list())
True
SkewPartitions(0).cardinality()
SkewPartitions(4).cardinality()
SkewPartitions(5).cardinality()
SkewPartitions(4, overlap=1).cardinality()
SkewPartitions(5, overlap=1).cardinality()
s = SkewPartitions(5, overlap=-1)
s.cardinality() == len(s.list())
class sage.combinat.skew_partition.SkewPartitions_rowlengths(co, overlap)[source]

Bases: SkewPartitions

All skew partitions with given row lengths.

sage.combinat.skew_partition.row_lengths_aux(skp)[source]

EXAMPLES:

sage: from sage.combinat.skew_partition import row_lengths_aux
sage: row_lengths_aux([[5,4,3,1],[3,3,1]])
[2, 1, 2]
sage: row_lengths_aux([[5,4,3,1],[3,1]])
[2, 3]
>>> from sage.all import *
>>> from sage.combinat.skew_partition import row_lengths_aux
>>> row_lengths_aux([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(3),Integer(1)]])
[2, 1, 2]
>>> row_lengths_aux([[Integer(5),Integer(4),Integer(3),Integer(1)],[Integer(3),Integer(1)]])
[2, 3]
from sage.combinat.skew_partition import row_lengths_aux
row_lengths_aux([[5,4,3,1],[3,3,1]])
row_lengths_aux([[5,4,3,1],[3,1]])