Documentation

CslibFrontier.Foundations.Order.Mirsky

Chain–antichain duality and Mirsky's theorem #

A colouring f : α → ι with antichain fibres (each f ⁻¹' {i} is an antichain) is a covering of α by antichains indexed by ι; one with chain fibres is a covering by chains. A chain meets each antichain at most once and vice versa, which gives weak duality in both directions (IsChain.card_le_of_isAntichain_fibre, IsAntichain.card_le_of_isChain_fibre).

Mirsky's theorem ([Mir71]; [Sch17], Theorem 7.5) is the strong duality for chains: in a finite poset, the maximum size of a chain equals the minimum number of antichains covering it. The proof colours each element by its height (Order.height), the length of the longest strictly increasing series ending there, which is strictly monotone; an element of maximal height ends a chain with one element per colour. The dual statement, Dilworth's theorem, is Cslib.Algorithms.Lean.MaxFlow.exists_isAntichain_and_chain_coloring.

Chains and antichains are Mathlib's IsChain (· ≤ ·) and IsAntichain (· ≤ ·), and finite chains are Finsets. Mirsky's theorem is stated for every finite partial order, including the empty one (the empty chain and the empty colouring).

Main results #

References #

theorem IsChain.injOn_of_isAntichain_fibre {α : Type u_1} {ι : Type u_2} {r : α → α → Prop} {s : Set α} {f : α → ι} (hs : IsChain r s) (hf : ∀ (i : ι), IsAntichain r (f ⁻¹' {i})) :

A chain meets every antichain fibre of f at most once, so f is injective on it.

theorem IsAntichain.injOn_of_isChain_fibre {α : Type u_1} {ι : Type u_2} {r : α → α → Prop} {s : Set α} {f : α → ι} (hs : IsAntichain r s) (hf : ∀ (i : ι), IsChain r (f ⁻¹' {i})) :

An antichain meets every chain fibre of f at most once, so f is injective on it.

theorem IsChain.card_le_of_isAntichain_fibre {α : Type u_1} {ι : Type u_2} {r : α → α → Prop} {f : α → ι} [Fintype ι] {t : Finset α} (ht : IsChain r ↑t) (hf : ∀ (i : ι), IsAntichain r (f ⁻¹' {i})) :

Weak duality for chains ([Sch17], display (17)): a finite chain has at most as many elements as there are colours in any colouring with antichain fibres.

theorem IsAntichain.card_le_of_isChain_fibre {α : Type u_1} {ι : Type u_2} {r : α → α → Prop} {f : α → ι} [Fintype ι] {t : Finset α} (ht : IsAntichain r ↑t) (hf : ∀ (i : ι), IsChain r (f ⁻¹' {i})) :

Weak duality for antichains ([Sch17], display (17)): a finite antichain has at most as many elements as there are colours in any colouring with chain fibres.

theorem Order.height_lt_top_of_finite {β : Type u_3} [Preorder β] [Finite β] (a : β) :

In a finite preorder every element has finite height: a strictly increasing series has fewer than Fintype.card β steps.

theorem exists_isChain_and_antichain_coloring {α : Type u_1} [PartialOrder α] [Finite α] :
∃ (C : Finset α) (f : α → Fin C.card), IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑C ∧ ∀ (i : Fin C.card), IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) (f ⁻¹' {i})

Mirsky's theorem ([Mir71]; [Sch17], Theorem 7.5): a finite poset has a chain C and a covering by |C| antichains. Colour by height: the colour classes are antichains, and an element of maximal height h ends a chain of h + 1 elements. By weak duality C is a longest chain and the colouring uses the fewest antichains.

theorem exists_antichain_coloring_iff {α : Type u_1} [PartialOrder α] [Finite α] {k : ℕ} :
(∃ (f : α → Fin k), ∀ (i : Fin k), IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) (f ⁻¹' {i})) ↔ ∀ (C : Finset α), IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑C → C.card ≤ k

Mirsky's theorem, min–max form ([Sch17], Theorem 7.5): a finite poset can be covered by k antichains if and only if every chain has at most k elements.