Documentation

CslibFrontier.Foundations.Combinatorics.SetPartition.JoinMatrix

The join matrix of the partition lattice #

Partitions of a finite type α are equivalence relations Setoid α, ordered by refinement, so that the join P ⊔ Q is the finest partition coarser than both and ⊤ is the partition with one block. The join matrix has rows and columns indexed by the partitions, and entry $1$ at $P$ and $Q$ if $P \sqcup Q = \top$ and $0$ otherwise. It is nonsingular over any field of characteristic zero (rank_joinMatrix). Dowling and Wilson prove this over $\mathbb{Q}$ for every finite lattice whose Möbius function satisfies $\mu(a, \top) \ne 0$ for all $a$, which holds in geometric lattices [DowlingWilson1975, Lemma 1 and the proof of Theorem 2]; here it is proved for the partition lattice, the lattice of flats of the graphic matroid of a complete graph. In the terms of [LovaszSaks1993, Theorems 3.4 and 3.6] the join matrix is the span indicator of that matroid, and its rank is the number of partitions $x$ with $\mu(x, \top) \ne 0$, which is all of them. Lindström's determinant formula for meet semilattices [Lindstrom1969, Theorem], applied to the dual order with $f_i(x) = [x = \top]$, gives $\det J = \prod_x \mu(x, \top)$ directly.

The proof writes the join matrix as $J = Z \Delta Z^{\mathsf{T}}$, where $Z$ is the zeta matrix of the refinement order, which is triangular with unit diagonal when the partitions are ordered by their numbers of blocks, and $\Delta$ is diagonal with entry $c(b)$ at a partition with $b$ blocks. Here $c(b)$ is the derivative at $0$ of the falling factorial $X (X - 1) \cdots (X - b + 1)$, that is $(-1)^{b-1} (b-1)!$. Writing $b(z)$ for the number of blocks of $z$, the factorisation rests on the identity $\sum_{z \ge x} c(b(z)) = [x = \top]$, the values of the Möbius function of the partition lattice. It follows by differentiating at $0$ the polynomial identity $$\sum_{z \ge x} X (X - 1) \cdots (X - b(z) + 1) = X^{b(x)},$$ which holds at every natural number $t$ because both sides count the maps from α to Fin t that are constant on the blocks of $x$, grouped on the left by their kernels (sum_descFactorial_blocks). This classical counting argument avoids factorising intervals into products of smaller partition lattices, which Mathlib does not provide; mu_top identifies the values with Mathlib's IncidenceAlgebra.mu.

Partitions are Setoid α rather than Finpartition, since Mathlib's complete lattice on Setoid α provides the join, and the proof works with quotients and kernels (Setoid.ker). The number of blocks blocks s and the Finite (Setoid α) instance come from CslibFrontier.Foundations.Combinatorics.SetPartition.Basic; statements that sum over the partitions assume [Fintype (Setoid α)], which Fintype.ofFinite provides, and counts are stated with Nat.card.

Main definitions #

Main results #

References #

Counting maps by their kernels #

theorem Cslib.SetPartition.sum_descFactorial_blocks {α : Type u_1} [Finite α] (t : ℕ) [Fintype (Setoid α)] (x : Setoid α) :
∑ z : Setoid α with x ≤ z, t.descFactorial (blocks z) = t ^ blocks x

Counting the maps constant on the blocks of x by their kernels: $\sum_{z \ge x} t (t - 1) \cdots (t - b(z) + 1) = t^{b(x)}$, where $b(z)$ is the number of blocks of $z$.

The Möbius values #

noncomputable def Cslib.SetPartition.derivCoeff (b : ℕ) :

The derivative at $0$ of the falling factorial $X (X - 1) \cdots (X - b + 1)$, which is $(-1)^{b-1} (b-1)!$ for $b \ge 1$ (derivCoeff_succ).

The recurrence $c(b + 2) = -(b + 1) c(b + 1)$, from $X (X - 1) \cdots (X - b - 1) = X (X - 1) \cdots (X - b) \cdot (X - b - 1)$ and the vanishing of the first factor at $0$.

theorem Cslib.SetPartition.derivCoeff_succ (b : ℕ) :
derivCoeff (b + 1) = (-1) ^ b * ↑b.factorial

The closed form $c(b + 1) = (-1)^b b!$.

$c(b) \ne 0$ for $b \ge 1$.

The polynomial identity $\sum_{z \ge x} X (X - 1) \cdots (X - b(z) + 1) = X^{b(x)}$, where $b(z)$ is the number of blocks of $z$.

theorem Cslib.SetPartition.sum_derivCoeff_blocks {α : Type u_1} [Finite α] [Fintype (Setoid α)] [Nonempty α] (x : Setoid α) :
∑ z : Setoid α with x ≤ z, derivCoeff (blocks z) = if x = ⊤ then 1 else 0

The Möbius values of the partition lattice: $\sum_{z \ge x} c(b(z)) = [x = \top]$, where $b(z)$ is the number of blocks of $z$ and $c(b) = (-1)^{b-1} (b-1)!$ (derivCoeff).

The Möbius function of the partition lattice at the top: $\mu(x, \top) = c(b)$, which is $(-1)^{b-1} (b-1)!$, for a partition $x$ with $b$ blocks. The locally finite order on the partitions may be any instance, such as Fintype.toLocallyFiniteOrder.

The join matrix #

noncomputable def Cslib.SetPartition.joinMatrix (R : Type u_2) (α : Type u_3) [Zero R] [One R] :
Matrix (Setoid α) (Setoid α) R

The join matrix over R: entry $1$ at $P$ and $Q$ if $P \sqcup Q = \top$, and $0$ otherwise.

@[simp]
theorem Cslib.SetPartition.joinMatrix_apply {α : Type u_1} {R : Type u_2} [Zero R] [One R] (P Q : Setoid α) :
joinMatrix R α P Q = if P ⊔ Q = ⊤ then 1 else 0

The entries of the join matrix.

noncomputable def Cslib.SetPartition.zetaMatrix (R : Type u_2) (α : Type u_3) [Zero R] [One R] :
Matrix (Setoid α) (Setoid α) R

The zeta matrix of the refinement order over R, entry $1$ at $P$ and $z$ if $P \le z$: the matrix of Mathlib's IncidenceAlgebra.zeta.

@[simp]
theorem Cslib.SetPartition.zetaMatrix_apply {α : Type u_1} {R : Type u_2} [Zero R] [One R] (P z : Setoid α) :
zetaMatrix R α P z = if P ≤ z then 1 else 0

The entries of the zeta matrix.

theorem Cslib.SetPartition.joinMatrix_eq {α : Type u_1} [Finite α] [Fintype (Setoid α)] {R : Type u_2} [CommRing R] [Nonempty α] :
joinMatrix R α = (zetaMatrix R α * Matrix.diagonal fun (z : Setoid α) => ↑(derivCoeff (blocks z))) * (zetaMatrix R α).transpose

The factorisation $J = Z \Delta Z^{\mathsf{T}}$ of the join matrix, with $\Delta$ the diagonal of the Möbius values $\mu(z, \top) = c(b(z))$, where $b(z)$ is the number of blocks of $z$.

theorem Cslib.SetPartition.det_zetaMatrix {α : Type u_1} [Finite α] [Fintype (Setoid α)] {R : Type u_2} [CommRing R] :
(zetaMatrix R α).det = 1

The zeta matrix is unitriangular when the partitions are ordered by their numbers of blocks, so its determinant is $1$.

theorem Cslib.SetPartition.rank_joinMatrix {α : Type u_1} [Finite α] {R : Type u_2} [Field R] [CharZero R] :

Dowling–Wilson for the partition lattice: over a field of characteristic zero, the join matrix has full rank, the number of partitions [DowlingWilson1975, Lemma 1 and the proof of Theorem 2].