Documentation

CslibFrontier.Algorithms.Lean.MaxFlow.GreeneKleitman

Chain Decompositions: Greene–Kleitman, Cocomparability Perfection, and Infinite Dilworth #

Formalizes three classical results on chain and antichain decompositions of partially ordered sets, building on finite Mirsky (CslibFrontier.Foundations.Order.Mirsky), finite Dilworth (CslibFrontier.Algorithms.Lean.MaxFlow.Dilworth), and integral minimum-cost flows with complementary slackness (CslibFrontier.Algorithms.Lean.MaxFlow.MinCostFlow):

  1. Greene–Kleitman theorem (1976) ([GK76]; [Sch03], Chapter 14, locators not verified against primary sources): for every finite poset α and k : ℕ, the maximum size of a k-antichain family (IsKAntichainFamily k S, containing no (k + 1)-chain, equivalently a union of at most k antichains) equals the minimum k-norm ∑ C ∈ 𝒞, min |C| k over all partitions 𝒞 of α into nonempty chains (exists_isKAntichainFamily_and_chainPartition, exists_chainPartition_sum_min_le_iff).
  2. Greene's theorem (1976) (dual Greene–Kleitman theorem; [Gre76]; [Sch03], Chapter 14, locators not verified against primary sources): for every finite poset α and k : ℕ, the maximum size of a k-chain family (IsKChainFamily k S, containing no (k + 1)-antichain, equivalently a union of at most k chains) equals the minimum k-norm ∑ A ∈ 𝒜, min |A| k over all partitions 𝒜 of α into nonempty antichains (exists_isKChainFamily_and_antichainPartition, exists_antichainPartition_sum_min_le_iff). Both strong-duality theorems are proved uniformly from integral minimum-cost flows on the split poset network: complementary slackness yields strictly antitone integer potentials defining the antichain layers, while Fulkerson's matching-to-chains reduction turns the flow on the split poset into disjoint chains.
  3. Perfection of cocomparability graphs ([Dil50]; [Sch03], Chapter 65, locator not verified against primary source): (SimpleGraph.comparabilityGraph α)ᶜ is perfect (isPerfect_compl_comparabilityGraph), complementing SimpleGraph.isPerfect_comparabilityGraph.
  4. Infinite Dilworth's theorem ([Dil50], extended from the finite case by compactness): an arbitrary (possibly infinite) poset α can be covered by w chains if and only if every finite antichain in α has at most w elements (exists_chain_coloring_iff_forall_isAntichain_card_le), proved by Tychonoff compactness on α → Fin w with the discrete topology on Fin w.

Main definitions #

Main results #

References #

k-antichain families, k-chain families, and partitions #

A finite subset S of a poset is a k-antichain family (or k-family) if it contains no chain of size k + 1. By Mirsky's theorem (isKAntichainFamily_iff_exists_antichain_coloring), this is equivalent to S being a union of at most k antichains.

theorem Cslib.Algorithms.Lean.MaxFlow.isKAntichainFamily_iff {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} :
IsKAntichainFamily k S ↔ ∀ C ⊆ S, IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑C → C.card ≤ k

A finite subset S of a poset is a k-chain family if it contains no antichain of size k + 1. By Dilworth's theorem (isKChainFamily_iff_exists_chain_coloring), this is equivalent to S being a union of at most k chains.

theorem Cslib.Algorithms.Lean.MaxFlow.isKChainFamily_iff {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} :
IsKChainFamily k S ↔ ∀ A ⊆ S, IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) ↑A → A.card ≤ k
theorem Cslib.Algorithms.Lean.MaxFlow.isKAntichainFamily_one_iff {α : Type u_1} [PartialOrder α] {S : Finset α} :
IsKAntichainFamily 1 S ↔ IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) ↑S

A 1-antichain family is an antichain.

theorem Cslib.Algorithms.Lean.MaxFlow.isKChainFamily_one_iff {α : Type u_1} [PartialOrder α] {S : Finset α} :
IsKChainFamily 1 S ↔ IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑S

A 1-chain family is a chain.

theorem Cslib.Algorithms.Lean.MaxFlow.isKAntichainFamily_iff_exists_antichain_coloring {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} :
IsKAntichainFamily k S ↔ ∃ (f : ↥S → Fin k), ∀ (i : Fin k), IsAntichain (fun (x1 x2 : ↥S) => x1 ≤ x2) (f ⁻¹' {i})

S is a k-antichain family iff S is covered by k antichains (by Mirsky's theorem).

theorem Cslib.Algorithms.Lean.MaxFlow.isKChainFamily_iff_exists_chain_coloring {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} :
IsKChainFamily k S ↔ ∃ (f : ↥S → Fin k), ∀ (i : Fin k), IsChain (fun (x1 x2 : ↥S) => x1 ≤ x2) (f ⁻¹' {i})

S is a k-chain family iff S is covered by k chains (by Dilworth's theorem).

A partition of a poset α into pairwise disjoint nonempty chains.

  • isChain (C : Finset α) : C ∈ 𝒞 → IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑C

    Every part is a chain.

  • nonempty (C : Finset α) : C ∈ 𝒞 → C.Nonempty

    Every part is nonempty.

  • pairwiseDisjoint : (↑𝒞).PairwiseDisjoint id

    Distinct parts are disjoint.

  • cover (x : α) : ∃ C ∈ 𝒞, x ∈ C

    Every element belongs to some part.

A partition of a poset α into pairwise disjoint nonempty antichains.

  • isAntichain (A : Finset α) : A ∈ 𝒜 → IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) ↑A

    Every part is an antichain.

  • nonempty (A : Finset α) : A ∈ 𝒜 → A.Nonempty

    Every part is nonempty.

  • pairwiseDisjoint : (↑𝒜).PairwiseDisjoint id

    Distinct parts are disjoint.

  • cover (x : α) : ∃ A ∈ 𝒜, x ∈ A

    Every element belongs to some part.

theorem Cslib.Algorithms.Lean.MaxFlow.IsChainPartition.sum_min_one {α : Type u_1} [PartialOrder α] {𝒞 : Finset (Finset α)} (h𝒞 : IsChainPartition 𝒞) :
∑ C ∈ 𝒞, min C.card 1 = 𝒞.card

The 1-norm of a chain partition equals its number of chains.

theorem Cslib.Algorithms.Lean.MaxFlow.IsAntichainPartition.sum_min_one {α : Type u_1} [PartialOrder α] {𝒜 : Finset (Finset α)} (h𝒜 : IsAntichainPartition 𝒜) :
∑ A ∈ 𝒜, min A.card 1 = 𝒜.card

The 1-norm of an antichain partition equals its number of antichains.

theorem Cslib.Algorithms.Lean.MaxFlow.IsChainPartition.exists_chain_coloring {α : Type u_1} [PartialOrder α] {𝒞 : Finset (Finset α)} (h𝒞 : IsChainPartition 𝒞) :
∃ (f : α → Fin 𝒞.card), ∀ (i : Fin 𝒞.card), IsChain (fun (x1 x2 : α) => x1 ≤ x2) (f ⁻¹' {i})

A chain partition yields a chain colouring with 𝒞.card colours.

theorem Cslib.Algorithms.Lean.MaxFlow.IsAntichainPartition.exists_antichain_coloring {α : Type u_1} [PartialOrder α] {𝒜 : Finset (Finset α)} (h𝒜 : IsAntichainPartition 𝒜) :
∃ (f : α → Fin 𝒜.card), ∀ (i : Fin 𝒜.card), IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) (f ⁻¹' {i})

An antichain partition yields an antichain colouring with 𝒜.card colours.

theorem Cslib.Algorithms.Lean.MaxFlow.IsKAntichainFamily.card_le_sum_min {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} (hS : IsKAntichainFamily k S) {𝒞 : Finset (Finset α)} (hchain : ∀ C ∈ 𝒞, IsChain (fun (x1 x2 : α) => x1 ≤ x2) ↑C) (hcover : ∀ x ∈ S, ∃ C ∈ 𝒞, x ∈ C) :
S.card ≤ ∑ C ∈ 𝒞, min C.card k

Weak duality for k-antichain families: any k-antichain family S covered by a family 𝒞 of chains has size at most ∑ C ∈ 𝒞, min |C| k.

theorem Cslib.Algorithms.Lean.MaxFlow.IsKChainFamily.card_le_sum_min {α : Type u_1} [PartialOrder α] {k : ℕ} {S : Finset α} (hS : IsKChainFamily k S) {𝒜 : Finset (Finset α)} (hanti : ∀ A ∈ 𝒜, IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) ↑A) (hcover : ∀ x ∈ S, ∃ A ∈ 𝒜, x ∈ A) :
S.card ≤ ∑ A ∈ 𝒜, min A.card k

Weak duality for k-chain families: any k-chain family S covered by a family 𝒜 of antichains has size at most ∑ A ∈ 𝒜, min |A| k.

Shared flow-to-partition and duality helpers #

Greene–Kleitman theorem (k-antichain families vs chain partitions) #

Greene–Kleitman theorem ([GK76]; [Sch03], Chapter 14, locators not verified against primary sources): for every finite poset α and k : ℕ, there exist a k-antichain family S and a partition 𝒞 of α into nonempty chains such that |S| = ∑ C ∈ 𝒞, min |C| k. By weak duality (IsKAntichainFamily.card_le_sum_min), S is a maximum k-antichain family and 𝒞 minimizes ∑ C ∈ 𝒞, min |C| k over all chain covers.

theorem Cslib.Algorithms.Lean.MaxFlow.exists_chainPartition_sum_min_le_iff {α : Type u_1} [PartialOrder α] [Finite α] {k m : ℕ} :
(∃ (𝒞 : Finset (Finset α)), IsChainPartition 𝒞 ∧ ∑ C ∈ 𝒞, min C.card k ≤ m) ↔ ∀ (S : Finset α), IsKAntichainFamily k S → S.card ≤ m

Greene–Kleitman theorem, min–max form: a finite poset admits a chain partition of k-norm at most m iff every k-antichain family has at most m elements.

Greene's theorem (k-chain families vs antichain partitions) #

Greene's theorem (dual Greene–Kleitman theorem; [Gre76]; [Sch03], Chapter 14, locators not verified against primary sources): for every finite poset α and k : ℕ, there exist a k-chain family S and a partition 𝒜 of α into nonempty antichains such that |S| = ∑ A ∈ 𝒜, min |A| k. By weak duality (IsKChainFamily.card_le_sum_min), S is a maximum k-chain family and 𝒜 minimizes ∑ A ∈ 𝒜, min |A| k over all antichain covers.

theorem Cslib.Algorithms.Lean.MaxFlow.exists_antichainPartition_sum_min_le_iff {α : Type u_1} [PartialOrder α] [Finite α] {k m : ℕ} :
(∃ (𝒜 : Finset (Finset α)), IsAntichainPartition 𝒜 ∧ ∑ A ∈ 𝒜, min A.card k ≤ m) ↔ ∀ (S : Finset α), IsKChainFamily k S → S.card ≤ m

Greene's theorem, min–max form: a finite poset admits an antichain partition of k-norm at most m iff every k-chain family has at most m elements.

Perfection of cocomparability graphs #

Perfection of cocomparability graphs (from Dilworth's theorem [Dil50]; [Sch03], Chapter 65, locator not verified against primary source): the complement of the comparability graph of any partial order α (the incomparability or cocomparability graph) is perfect. Together with SimpleGraph.isPerfect_comparabilityGraph, both comparability graphs and their complements are perfect.

Infinite Dilworth's theorem by compactness #

theorem Cslib.Algorithms.Lean.MaxFlow.exists_chain_coloring_iff_forall_isAntichain_card_le {α : Type u_1} [PartialOrder α] {w : ℕ} :
(∃ (f : α → Fin w), ∀ (i : Fin w), IsChain (fun (x1 x2 : α) => x1 ≤ x2) (f ⁻¹' {i})) ↔ ∀ (A : Finset α), IsAntichain (fun (x1 x2 : α) => x1 ≤ x2) ↑A → A.card ≤ w

Infinite Dilworth's theorem ([Dil50], extended from the finite case by compactness): an arbitrary (possibly infinite) partial order α can be covered by w chains if and only if every finite antichain in α has at most w elements.