Documentation

CslibFrontier.Algorithms.Lean.Matroid.PSystem

p-Systems of Finite Sets #

A finite-set independence system indep : Finset α → Prop is a p-system if it contains ∅, is closed under subsets, and for every finite Y, any two maximal independent subsets A, B of Y satisfy |A| ≤ p * |B| ([CCPV11], Section 1, which follows [Jen76] and Korte and Hausmann (1978), cited there as [28]). Every matroid is a 1-system, and the intersection of k ≥ 1 matroids is a k-system. (The converse, that every 1-system is a matroid, holds but is not formalized here.) p-systems are the constraint families for which the Fisher–Nemhauser–Wolsey greedy algorithm achieves a 1/(p+1) approximation for monotone submodular maximization ([FNW78]; see CslibFrontier.Algorithms.Lean.Submodular.MatroidGreedy).

Main definitions #

Main results #

References #

structure Cslib.Algorithms.Lean.Matroid.IsPSystem {α : Type u_1} (indep : Finset α → Prop) (p : ℕ) :

IsPSystem indep p: the finite-set independence system indep contains ∅, is closed under subsets, and for every finite Y, any two maximal independent subsets A, B ⊆ Y satisfy A.card ≤ p * B.card ([CCPV11], Section 1).

  • indep_empty : indep ∅

    The empty set is independent.

  • indep_of_subset ⦃A B : Finset α⦄ : indep B → A ⊆ B → indep A

    Independence is inherited by subsets.

  • card_le_mul_card ⦃Y A B : Finset α⦄ : Maximal (fun (Z : Finset α) => Z ⊆ Y ∧ indep Z) A → Maximal (fun (Z : Finset α) => Z ⊆ Y ∧ indep Z) B → A.card ≤ p * B.card

    Maximal independent subsets of a common finite set have cardinality ratio at most p.

theorem Cslib.Algorithms.Lean.Matroid.IsPSystem.of_iff {α : Type u_1} {indep indep' : Finset α → Prop} {p : ℕ} (h : IsPSystem indep p) (hiff : ∀ (S : Finset α), indep' S ↔ indep S) :
IsPSystem indep' p

Transport the p-system property along a pointwise equivalence of independence predicates, e.g. from a Boolean independence test to the Indep predicate of a matroid it implements.

theorem Cslib.Algorithms.Lean.Matroid.IsPSystem.card_le_mul_card_of_blocked {α : Type u_1} [DecidableEq α] {indep : Finset α → Prop} {p : ℕ} (h : IsPSystem indep p) {S T : Finset α} (hS : indep S) (hT : indep T) (hblock : ∀ t ∈ T, t ∉ S → ¬indep (insert t S)) :
T.card ≤ p * S.card

Blocking form of the p-system bound. If S and T are independent and every element of T \ S is blocked by S (¬ indep (insert t S)), then T.card ≤ p * S.card: extend T to a maximal independent subset of S ∪ T, of which S is also maximal.

theorem Cslib.Algorithms.Lean.Matroid.isPSystem_iff_blocked {α : Type u_1} [DecidableEq α] {indep : Finset α → Prop} {p : ℕ} :
IsPSystem indep p ↔ indep ∅ ∧ (∀ ⦃A B : Finset α⦄, indep B → A ⊆ B → indep A) ∧ ∀ ⦃S T : Finset α⦄, indep S → indep T → (∀ t ∈ T, t ∉ S → ¬indep (insert t S)) → T.card ≤ p * S.card

The blocking form, together with indep ∅ and heredity, characterizes p-systems.

theorem Cslib.Algorithms.Lean.Matroid.isPSystem_matroid {α : Type u_1} (M : Matroid α) :
IsPSystem (fun (S : Finset α) => M.Indep ↑S) 1

Every Mathlib Matroid is a 1-system on finite sets: maximal independent subsets of a finite set are its bases, which are equicardinal.

theorem Cslib.Algorithms.Lean.Matroid.isPSystem_iInter_matroid {α : Type u_1} {ι : Type u_2} [Fintype ι] [Nonempty ι] (M : ι → Matroid α) :
IsPSystem (fun (S : Finset α) => ∀ (i : ι), (M i).Indep ↑S) (Fintype.card ι)

The intersection of a nonempty finite family of matroids M : ι → Matroid α is a Fintype.card ι-system on finite sets ([FNW78]; [CCPV11], Section 1). Nonemptiness of ι is necessary when α is nonempty: the empty intersection makes every set independent, which is then not a 0-system.