Cores#

A \(k\)-core is a partition from which no rim hook of size \(k\) can be removed. Alternatively, a \(k\)-core is an integer partition such that the Ferrers diagram for the partition contains no cells with a hook of size (a multiple of) \(k\).

Authors:

  • Anne Schilling and Mike Zabrocki (2011): initial version

  • Travis Scrimshaw (2012): Added latex output for Core class

class sage.combinat.core.Core(parent, core)[source]#

Bases: CombinatorialElement

A \(k\)-core is an integer partition from which no rim hook of size \(k\) can be removed.

EXAMPLES:

sage: c = Core([2,1],4); c
[2, 1]
sage: c = Core([3,1],4); c
Traceback (most recent call last):
...
ValueError: [3, 1] is not a 4-core
>>> from sage.all import *
>>> c = Core([Integer(2),Integer(1)],Integer(4)); c
[2, 1]
>>> c = Core([Integer(3),Integer(1)],Integer(4)); c
Traceback (most recent call last):
...
ValueError: [3, 1] is not a 4-core
affine_symmetric_group_action(w, transposition=False)[source]#

Return the (left) action of the affine symmetric group on self.

INPUT:

  • w is a tuple of integers \([w_1,\ldots,w_m]\) with \(0\le w_j<k\). If transposition is set to be True, then \(w = [w_0,w_1]\) is interpreted as a transposition \(t_{w_0, w_1}\) (see _transposition_to_reduced_word()).

The output is the (left) action of the product of the corresponding simple transpositions on self, that is \(s_{w_1} \cdots s_{w_m}(self)\). See affine_symmetric_group_simple_action().

EXAMPLES:

sage: c = Core([4,2],3)
sage: c.affine_symmetric_group_action([0,1,0,2,1])
[8, 6, 4, 2]
sage: c.affine_symmetric_group_action([0,2], transposition=True)
[4, 2, 1, 1]

sage: c = Core([11,8,5,5,3,3,1,1,1],4)
sage: c.affine_symmetric_group_action([2,5],transposition=True)
[11, 8, 7, 6, 5, 4, 3, 2, 1]
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> c.affine_symmetric_group_action([Integer(0),Integer(1),Integer(0),Integer(2),Integer(1)])
[8, 6, 4, 2]
>>> c.affine_symmetric_group_action([Integer(0),Integer(2)], transposition=True)
[4, 2, 1, 1]

>>> c = Core([Integer(11),Integer(8),Integer(5),Integer(5),Integer(3),Integer(3),Integer(1),Integer(1),Integer(1)],Integer(4))
>>> c.affine_symmetric_group_action([Integer(2),Integer(5)],transposition=True)
[11, 8, 7, 6, 5, 4, 3, 2, 1]
affine_symmetric_group_simple_action(i)[source]#

Return the action of the simple transposition \(s_i\) of the affine symmetric group on self.

This gives the action of the affine symmetric group of type \(A_k^{(1)}\) on the \(k\)-core self. If self has outside (resp. inside) corners of content \(i\) modulo \(k\), then these corners are added (resp. removed). Otherwise the action is trivial.

EXAMPLES:

sage: c = Core([4,2],3)
sage: c.affine_symmetric_group_simple_action(0)                             # needs sage.modules
[3, 1]
sage: c.affine_symmetric_group_simple_action(1)                             # needs sage.modules
[5, 3, 1]
sage: c.affine_symmetric_group_simple_action(2)                             # needs sage.modules
[4, 2]
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> c.affine_symmetric_group_simple_action(Integer(0))                             # needs sage.modules
[3, 1]
>>> c.affine_symmetric_group_simple_action(Integer(1))                             # needs sage.modules
[5, 3, 1]
>>> c.affine_symmetric_group_simple_action(Integer(2))                             # needs sage.modules
[4, 2]

This action corresponds to the left action by the \(i\)-th simple reflection in the affine symmetric group:

sage: c = Core([4,2],3)
sage: W = c.to_grassmannian().parent()                                      # needs sage.modules
sage: i = 0
sage: (c.affine_symmetric_group_simple_action(i).to_grassmannian()          # needs sage.modules
....:     == W.simple_reflection(i)*c.to_grassmannian())
True
sage: i = 1
sage: (c.affine_symmetric_group_simple_action(i).to_grassmannian()          # needs sage.modules
....:     == W.simple_reflection(i)*c.to_grassmannian())
True
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> W = c.to_grassmannian().parent()                                      # needs sage.modules
>>> i = Integer(0)
>>> (c.affine_symmetric_group_simple_action(i).to_grassmannian()          # needs sage.modules
...     == W.simple_reflection(i)*c.to_grassmannian())
True
>>> i = Integer(1)
>>> (c.affine_symmetric_group_simple_action(i).to_grassmannian()          # needs sage.modules
...     == W.simple_reflection(i)*c.to_grassmannian())
True
contains(other)[source]#

Checks whether self contains other.

INPUT:

  • other – another \(k\)-core or a list

OUTPUT: a boolean

This returns True if the Ferrers diagram of self contains the Ferrers diagram of other.

EXAMPLES:

sage: c = Core([4,2],3)
sage: x = Core([4,2,2,1,1],3)
sage: x.contains(c)
True
sage: c.contains(x)
False
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> x = Core([Integer(4),Integer(2),Integer(2),Integer(1),Integer(1)],Integer(3))
>>> x.contains(c)
True
>>> c.contains(x)
False
k()[source]#

Return \(k\) of the \(k\)-core self.

EXAMPLES:

sage: c = Core([2,1],4)
sage: c.k()
4
>>> from sage.all import *
>>> c = Core([Integer(2),Integer(1)],Integer(4))
>>> c.k()
4
length()[source]#

Return the length of self.

The length of a \(k\)-core is the size of the corresponding \((k-1)\)-bounded partition which agrees with the length of the corresponding Grassmannian element, see to_grassmannian().

EXAMPLES:

sage: c = Core([4,2],3); c.length()
4
sage: c.to_grassmannian().length()                                          # needs sage.modules
4

sage: Core([9,5,3,2,1,1], 5).length()
13
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3)); c.length()
4
>>> c.to_grassmannian().length()                                          # needs sage.modules
4

>>> Core([Integer(9),Integer(5),Integer(3),Integer(2),Integer(1),Integer(1)], Integer(5)).length()
13
size()[source]#

Return the size of self as a partition.

EXAMPLES:

sage: Core([2,1],4).size()
3
sage: Core([4,2],3).size()
6
>>> from sage.all import *
>>> Core([Integer(2),Integer(1)],Integer(4)).size()
3
>>> Core([Integer(4),Integer(2)],Integer(3)).size()
6
strong_covers()[source]#

Return a list of all elements that cover self in strong order.

EXAMPLES:

sage: c = Core([1],3)
sage: c.strong_covers()
[[2], [1, 1]]
sage: c = Core([4,2],3)
sage: c.strong_covers()
[[5, 3, 1], [4, 2, 1, 1]]
>>> from sage.all import *
>>> c = Core([Integer(1)],Integer(3))
>>> c.strong_covers()
[[2], [1, 1]]
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> c.strong_covers()
[[5, 3, 1], [4, 2, 1, 1]]
strong_down_list()[source]#

Return a list of all elements that are covered by self in strong order.

EXAMPLES:

sage: c = Core([1],3)
sage: c.strong_down_list()
[[]]
sage: c = Core([5,3,1],3)
sage: c.strong_down_list()
[[4, 2], [3, 1, 1]]
>>> from sage.all import *
>>> c = Core([Integer(1)],Integer(3))
>>> c.strong_down_list()
[[]]
>>> c = Core([Integer(5),Integer(3),Integer(1)],Integer(3))
>>> c.strong_down_list()
[[4, 2], [3, 1, 1]]
strong_le(other)[source]#

Strong order (Bruhat) comparison on cores.

INPUT:

  • other – another \(k\)-core

OUTPUT: a boolean

This returns whether self <= other in Bruhat (or strong) order.

EXAMPLES:

sage: c = Core([4,2],3)
sage: x = Core([4,2,2,1,1],3)
sage: c.strong_le(x)
True
sage: c.strong_le([4,2,2,1,1])
True

sage: x = Core([4,1],4)
sage: c.strong_le(x)
Traceback (most recent call last):
...
ValueError: the two cores do not have the same k
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> x = Core([Integer(4),Integer(2),Integer(2),Integer(1),Integer(1)],Integer(3))
>>> c.strong_le(x)
True
>>> c.strong_le([Integer(4),Integer(2),Integer(2),Integer(1),Integer(1)])
True

>>> x = Core([Integer(4),Integer(1)],Integer(4))
>>> c.strong_le(x)
Traceback (most recent call last):
...
ValueError: the two cores do not have the same k
to_bounded_partition()[source]#

Bijection between \(k\)-cores and \((k-1)\)-bounded partitions.

This maps the \(k\)-core self to the corresponding \((k-1)\)-bounded partition. This bijection is achieved by deleting all cells in self of hook length greater than \(k\).

EXAMPLES:

sage: gamma = Core([9,5,3,2,1,1], 5)
sage: gamma.to_bounded_partition()
[4, 3, 2, 2, 1, 1]
>>> from sage.all import *
>>> gamma = Core([Integer(9),Integer(5),Integer(3),Integer(2),Integer(1),Integer(1)], Integer(5))
>>> gamma.to_bounded_partition()
[4, 3, 2, 2, 1, 1]
to_grassmannian()[source]#

Bijection between \(k\)-cores and Grassmannian elements in the affine Weyl group of type \(A_{k-1}^{(1)}\).

For further details, see the documentation of the method from_kbounded_to_reduced_word() and from_kbounded_to_grassmannian().

EXAMPLES:

sage: c = Core([3,1,1],3)
sage: w = c.to_grassmannian(); w                                            # needs sage.modules
[-1  1  1]
[-2  2  1]
[-2  1  2]
sage: c.parent()
3-Cores of length 4
sage: w.parent()                                                            # needs sage.modules
Weyl Group of type ['A', 2, 1] (as a matrix group acting on the root space)

sage: c = Core([],3)
sage: c.to_grassmannian()                                                   # needs sage.modules
[1 0 0]
[0 1 0]
[0 0 1]
>>> from sage.all import *
>>> c = Core([Integer(3),Integer(1),Integer(1)],Integer(3))
>>> w = c.to_grassmannian(); w                                            # needs sage.modules
[-1  1  1]
[-2  2  1]
[-2  1  2]
>>> c.parent()
3-Cores of length 4
>>> w.parent()                                                            # needs sage.modules
Weyl Group of type ['A', 2, 1] (as a matrix group acting on the root space)

>>> c = Core([],Integer(3))
>>> c.to_grassmannian()                                                   # needs sage.modules
[1 0 0]
[0 1 0]
[0 0 1]
to_partition()[source]#

Turn the core self into the partition identical to self.

EXAMPLES:

sage: mu = Core([2,1,1],3)
sage: mu.to_partition()
[2, 1, 1]
>>> from sage.all import *
>>> mu = Core([Integer(2),Integer(1),Integer(1)],Integer(3))
>>> mu.to_partition()
[2, 1, 1]
weak_covers()[source]#

Return a list of all elements that cover self in weak order.

EXAMPLES:

sage: c = Core([1],3)
sage: c.weak_covers()                                                       # needs sage.modules
[[1, 1], [2]]

sage: c = Core([4,2],3)
sage: c.weak_covers()                                                       # needs sage.modules
[[5, 3, 1]]
>>> from sage.all import *
>>> c = Core([Integer(1)],Integer(3))
>>> c.weak_covers()                                                       # needs sage.modules
[[1, 1], [2]]

>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> c.weak_covers()                                                       # needs sage.modules
[[5, 3, 1]]
weak_le(other)[source]#

Weak order comparison on cores.

INPUT:

  • other – another \(k\)-core

OUTPUT: a boolean

This returns whether self <= other in weak order.

EXAMPLES:

sage: c = Core([4,2],3)
sage: x = Core([5,3,1],3)
sage: c.weak_le(x)                                                          # needs sage.modules
True
sage: c.weak_le([5,3,1])                                                    # needs sage.modules
True

sage: x = Core([4,2,2,1,1],3)
sage: c.weak_le(x)                                                          # needs sage.modules
False

sage: x = Core([5,3,1],6)
sage: c.weak_le(x)
Traceback (most recent call last):
...
ValueError: the two cores do not have the same k
>>> from sage.all import *
>>> c = Core([Integer(4),Integer(2)],Integer(3))
>>> x = Core([Integer(5),Integer(3),Integer(1)],Integer(3))
>>> c.weak_le(x)                                                          # needs sage.modules
True
>>> c.weak_le([Integer(5),Integer(3),Integer(1)])                                                    # needs sage.modules
True

>>> x = Core([Integer(4),Integer(2),Integer(2),Integer(1),Integer(1)],Integer(3))
>>> c.weak_le(x)                                                          # needs sage.modules
False

>>> x = Core([Integer(5),Integer(3),Integer(1)],Integer(6))
>>> c.weak_le(x)
Traceback (most recent call last):
...
ValueError: the two cores do not have the same k
sage.combinat.core.Cores(k, length=None, **kwargs)[source]#

A \(k\)-core is a partition from which no rim hook of size \(k\) can be removed. Alternatively, a \(k\)-core is an integer partition such that the Ferrers diagram for the partition contains no cells with a hook of size (a multiple of) \(k\).

The \(k\)-cores generally have two notions of size which are useful for different applications. One is the number of cells in the Ferrers diagram with hook less than \(k\), the other is the total number of cells of the Ferrers diagram. In the implementation in Sage, the first of notion is referred to as the length of the \(k\)-core and the second is the size of the \(k\)-core. The class of Cores requires that either the size or the length of the elements in the class is specified.

EXAMPLES:

We create the set of the \(4\)-cores of length \(6\). Here the length of a \(k\)-core is the size of the corresponding \((k-1)\)-bounded partition, see also length():

sage: C = Cores(4, 6); C
4-Cores of length 6
sage: C.list()
[[6, 3], [5, 2, 1], [4, 1, 1, 1], [4, 2, 2], [3, 3, 1, 1], [3, 2, 1, 1, 1], [2, 2, 2, 1, 1, 1]]
sage: C.cardinality()
7
sage: C.an_element()
[6, 3]
>>> from sage.all import *
>>> C = Cores(Integer(4), Integer(6)); C
4-Cores of length 6
>>> C.list()
[[6, 3], [5, 2, 1], [4, 1, 1, 1], [4, 2, 2], [3, 3, 1, 1], [3, 2, 1, 1, 1], [2, 2, 2, 1, 1, 1]]
>>> C.cardinality()
7
>>> C.an_element()
[6, 3]

We may also list the set of \(4\)-cores of size \(6\), where the size is the number of boxes in the core, see also size():

sage: C = Cores(4, size=6); C
4-Cores of size 6
sage: C.list()
[[4, 1, 1], [3, 2, 1], [3, 1, 1, 1]]
sage: C.cardinality()
3
sage: C.an_element()
[4, 1, 1]
>>> from sage.all import *
>>> C = Cores(Integer(4), size=Integer(6)); C
4-Cores of size 6
>>> C.list()
[[4, 1, 1], [3, 2, 1], [3, 1, 1, 1]]
>>> C.cardinality()
3
>>> C.an_element()
[4, 1, 1]
class sage.combinat.core.Cores_length(k, n)[source]#

Bases: UniqueRepresentation, Parent

The class of \(k\)-cores of length \(n\).

Element[source]#

alias of Core

from_partition(part)[source]#

Converts the partition part into a core (as the identity map).

This is the inverse method to to_partition().

EXAMPLES:

sage: C = Cores(3,4)
sage: c = C.from_partition([4,2]); c
[4, 2]

sage: mu = Partition([2,1,1])
sage: C = Cores(3,3)
sage: C.from_partition(mu).to_partition() == mu
True

sage: mu = Partition([])
sage: C = Cores(3,0)
sage: C.from_partition(mu).to_partition() == mu
True
>>> from sage.all import *
>>> C = Cores(Integer(3),Integer(4))
>>> c = C.from_partition([Integer(4),Integer(2)]); c
[4, 2]

>>> mu = Partition([Integer(2),Integer(1),Integer(1)])
>>> C = Cores(Integer(3),Integer(3))
>>> C.from_partition(mu).to_partition() == mu
True

>>> mu = Partition([])
>>> C = Cores(Integer(3),Integer(0))
>>> C.from_partition(mu).to_partition() == mu
True
list()[source]#

Return the list of all \(k\)-cores of length \(n\).

EXAMPLES:

sage: C = Cores(3,4)
sage: C.list()
[[4, 2], [3, 1, 1], [2, 2, 1, 1]]
>>> from sage.all import *
>>> C = Cores(Integer(3),Integer(4))
>>> C.list()
[[4, 2], [3, 1, 1], [2, 2, 1, 1]]
class sage.combinat.core.Cores_size(k, n)[source]#

Bases: UniqueRepresentation, Parent

The class of \(k\)-cores of size \(n\).

Element[source]#

alias of Core

from_partition(part)[source]#

Convert the partition part into a core (as the identity map).

This is the inverse method to to_partition().

EXAMPLES:

sage: C = Cores(3,size=4)
sage: c = C.from_partition([2,1,1]); c
[2, 1, 1]

sage: mu = Partition([2,1,1])
sage: C = Cores(3,size=4)
sage: C.from_partition(mu).to_partition() == mu
True

sage: mu = Partition([])
sage: C = Cores(3,size=0)
sage: C.from_partition(mu).to_partition() == mu
True
>>> from sage.all import *
>>> C = Cores(Integer(3),size=Integer(4))
>>> c = C.from_partition([Integer(2),Integer(1),Integer(1)]); c
[2, 1, 1]

>>> mu = Partition([Integer(2),Integer(1),Integer(1)])
>>> C = Cores(Integer(3),size=Integer(4))
>>> C.from_partition(mu).to_partition() == mu
True

>>> mu = Partition([])
>>> C = Cores(Integer(3),size=Integer(0))
>>> C.from_partition(mu).to_partition() == mu
True
list()[source]#

Return the list of all \(k\)-cores of size \(n\).

EXAMPLES:

sage: C = Cores(3, size = 4)
sage: C.list()
[[3, 1], [2, 1, 1]]
>>> from sage.all import *
>>> C = Cores(Integer(3), size = Integer(4))
>>> C.list()
[[3, 1], [2, 1, 1]]