Young diagrams #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A Young diagram is a finite set of up-left justified boxes:
□□□□□
□□□
□□□
□
This Young diagram corresponds to the [5, 3, 3, 1] partition of 12.
We represent it as a lower set in ℕ × ℕ
in the product partial order. We write (i, j) ∈ μ
to say that (i, j)
(in matrix coordinates) is in the Young diagram μ
.
Main definitions #
young_diagram
: Young diagramsyoung_diagram.card
: the number of cells in a Young diagram (its cardinality)young_diagram.distrib_lattice
: a distributive lattice instance for Young diagrams ordered by containment, with(⊥ : young_diagram)
the empty diagram.young_diagram.row
andyoung_diagram.row_len
: rows of a Young diagram and their lengthsyoung_diagram.col
andyoung_diagram.col_len
: columns of a Young diagram and their lengths
Notation #
In "English notation", a Young diagram is drawn so that (i1, j1) ≤ (i2, j2)
means (i1, j1) is weakly up-and-left of (i2, j2). This terminology is used
below, e.g. in young_diagram.up_left_mem
.
Tags #
Young diagram
References #
A Young diagram is a finite collection of cells on the ℕ × ℕ
grid such that whenever
a cell is present, so are all the ones above and to the left of it. Like matrices, an (i, j)
cell
is a cell in row i
and column j
, where rows are enumerated downward and columns rightward.
Young diagrams are modeled as finite sets in ℕ × ℕ
that are lower sets with respect to the
standard order on products.
Instances for young_diagram
Equations
- young_diagram.prod.set_like = {coe := ↑young_diagram.cells, coe_injective' := young_diagram.prod.set_like._proof_1}
Equations
- μ.decidable_mem = show decidable_pred (λ (_x : ℕ × ℕ), _x ∈ μ.cells), from λ (a : ℕ × ℕ), finset.decidable_mem a μ.cells
In "English notation", a Young diagram is drawn so that (i1, j1) ≤ (i2, j2) means (i1, j1) is weakly up-and-left of (i2, j2).
Equations
- young_diagram.has_sup = {sup := λ (μ ν : young_diagram), {cells := μ.cells ∪ ν.cells, is_lower_set := _}}
Equations
- young_diagram.has_inf = {inf := λ (μ ν : young_diagram), {cells := μ.cells ∩ ν.cells, is_lower_set := _}}
The empty Young diagram is (⊥ : young_diagram).
Equations
- young_diagram.order_bot = {bot := {cells := ∅, is_lower_set := young_diagram.order_bot._proof_1}, bot_le := young_diagram.order_bot._proof_2}
Equations
Equations
- young_diagram.distrib_lattice = function.injective.distrib_lattice young_diagram.cells young_diagram.distrib_lattice._proof_1 young_diagram.distrib_lattice._proof_2 young_diagram.distrib_lattice._proof_3
Cardinality of a Young diagram
The transpose
of a Young diagram is obtained by swapping i's with j's.
Equations
- μ.transpose = {cells := ⇑((equiv.prod_comm ℕ ℕ).finset_congr) μ.cells, is_lower_set := _}
Transposing Young diagrams is an order_iso
.
Equations
- young_diagram.transpose_order_iso = {to_equiv := {to_fun := young_diagram.transpose, inv_fun := young_diagram.transpose, left_inv := young_diagram.transpose_order_iso._proof_1, right_inv := young_diagram.transpose_order_iso._proof_2}, map_rel_iff' := young_diagram.transpose_order_iso._proof_3}
Rows and row lengths of Young diagrams. #
This section defines μ.row
and μ.row_len
, with the following API:
1. (i, j) ∈ μ ↔ j < μ.row_len i
2. μ.row i = {i} ×ˢ (finset.range (μ.row_len i))
3. μ.row_len i = (μ.row i).card
4. ∀ {i1 i2}, i1 ≤ i2 → μ.row_len i2 ≤ μ.row_len i1
Note: #3 is not convenient for defining μ.row_len
; instead, μ.row_len
is defined
as the smallest j
such that (i, j) ∉ μ
.
Length of a row of a Young diagram
Columns and column lengths of Young diagrams. #
This section has an identical API to the rows section.
Length of a column of a Young diagram
The list of row lengths of a Young diagram #
This section defines μ.row_lens : list ℕ
, the list of row lengths of a Young diagram μ
.
young_diagram.row_lens_sorted
: It is weakly decreasing (list.sorted (≥)
).young_diagram.row_lens_pos
: It is strictly positive.
List of row lengths of a Young diagram
Equivalence between Young diagrams and lists of natural numbers #
This section defines the equivalence between Young diagrams μ
and weakly decreasing lists w
of positive natural numbers, corresponding to row lengths of the diagram:
young_diagram.equiv_list_row_lens :
young_diagram ≃ {w : list ℕ // w.sorted (≥) ∧ ∀ x ∈ w, 0 < x}
The two directions are young_diagram.row_lens
(defined above) and young_diagram.of_row_lens
.
Young diagram from a sorted list
Equations
- young_diagram.of_row_lens w hw = {cells := young_diagram.cells_of_row_lens w, is_lower_set := _}
The length of the i
th row in of_row_lens w hw
is the i
th entry of w
The left_inv direction of the equivalence
The right_inv direction of the equivalence
Equivalence between Young diagrams and weakly decreasing lists of positive natural numbers.
A Young diagram μ
is equivalent to a list of row lengths.
Equations
- young_diagram.equiv_list_row_lens = {to_fun := λ (μ : young_diagram), ⟨μ.row_lens, _⟩, inv_fun := λ (ww : {w // list.sorted ge w ∧ ∀ (x : ℕ), x ∈ w → 0 < x}), young_diagram.of_row_lens ww.val _, left_inv := young_diagram.equiv_list_row_lens._proof_3, right_inv := young_diagram.equiv_list_row_lens._proof_4}