The areas / V30. Combinatorics
Mathlib.Combinatorics.Matroid.Sum
31 declarations. Mathlib docs · Source
Sums of matroids
The sum M of a collection M₁, M₂, .. of matroids is a matroid on the disjoint union of
the ground sets of the summands, in which the independent sets are precisely the unions of
independent sets of the summands.
We can ask for such a sum both for pairs and for arbitrary indexed collections of matroids, and we can also ask for the 'disjoint union' to be either set-theoretic or type-theoretic. To this end, we define five separate versions of the sum construction.
Main definitions
-
For an indexed collection
M : (i : ι) → Matroid (α i)of matroids on different types,Matroid.sigma Mis the sum of theM i, as a matroid on the sigma type(Σ i, α i). -
For an indexed collection
M : ι → Matroid αof matroids on the same type,Matroid.sum' Mis the sum of theM i, as a matroid on the product typeι × α. -
For an indexed collection
M : ι → Matroid αof matroids on the same type, and a proofh : Pairwise (Disjoint on fun i ↦ (M i).E)that they have disjoint ground sets,Matroid.disjointSigma M his the sum of theMas aMatroid αwith ground set⋃ i, (M i).E. -
Matroid.sum (M : Matroid α) (N : Matroid β)is the sum ofMandNas a matroid onα ⊕ β. -
If
M N : Matroid αandh : Disjoint M.E N.E, thenMatroid.disjointSum M N his the sum ofMandNas aMatroid αwith ground setM.E ∪ N.E.
Implementation notes
We only directly define a matroid for Matroid.sigma. All other versions of sum are
defined indirectly, using Matroid.sigma and the API in Matroid.map.
theorem Equiv.sumEquivSigmaBool.match_1.congr_eq_2 E1 #
∀ (α β : Type u_1) (motive : ((b : Bool) × bif b then β else α) → Sort u_2) (s : (b : Bool) × bif b then β else α)
(h_1 : (a : bif false then β else α) → motive ⟨false, a⟩) (h_2 : (b : bif true then β else α) → motive ⟨true, b⟩)
(b : bif true then β else α),
s = ⟨true, b⟩ →
(match s with
| ⟨false, a⟩ => h_1 a
| ⟨true, b⟩ => h_2 b) ≍
h_2 b
theorem Equiv.sumEquivSigmaBool.match_1.congr_eq_1 E1 #
∀ (α β : Type u_1) (motive : ((b : Bool) × bif b then β else α) → Sort u_2) (s : (b : Bool) × bif b then β else α)
(h_1 : (a : bif false then β else α) → motive ⟨false, a⟩) (h_2 : (b : bif true then β else α) → motive ⟨true, b⟩)
(a : bif false then β else α),
s = ⟨false, a⟩ →
(match s with
| ⟨false, a⟩ => h_1 a
| ⟨true, b⟩ => h_2 b) ≍
h_1 a
theorem Matroid.disjointSum.congr_simp E1 #
∀ {α : Type u_1} (M M_1 : Matroid α) (e_M : M = M_1) (N N_1 : Matroid α) (e_N : N = N_1) (h : Disjoint M.E N.E),
M.disjointSum N h = M_1.disjointSum N_1 ⋯
def Matroid.sigma E1 #
{ι : Type u_1} → {α : ι → Type u_2} → ((i : ι) → Matroid (α i)) → Matroid ((i : ι) × α i)
The sum of an indexed collection of matroids, as a matroid on the sigma-type.
theorem Matroid.sigma_indep_iff E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {M : (i : ι) → Matroid (α i)} {I : Set ((i : ι) × α i)},
(Matroid.sigma M).Indep I ↔ ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
theorem Matroid.sigma_isBase_iff E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {M : (i : ι) → Matroid (α i)} {B : Set ((i : ι) × α i)},
(Matroid.sigma M).IsBase B ↔ ∀ (i : ι), (M i).IsBase (Sigma.mk i ⁻¹' B)
theorem Matroid.sigma_ground_eq E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {M : (i : ι) → Matroid (α i)}, (Matroid.sigma M).E = Set.univ.sigma fun i ↦ (M i).E
theorem Matroid.sigma_isBasis_iff E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {M : (i : ι) → Matroid (α i)} {I X : Set ((i : ι) × α i)},
(Matroid.sigma M).IsBasis I X ↔ ∀ (i : ι), (M i).IsBasis (Sigma.mk i ⁻¹' I) (Sigma.mk i ⁻¹' X)
theorem Matroid.Finitary.sigma E1 #
∀ {ι : Type u_1} {α : ι → Type u_2} {M : (i : ι) → Matroid (α i)},
(∀ (i : ι), (M i).Finitary) → (Matroid.sigma M).Finitary
def Matroid.sum' E1 #
{α : Type u_1} → {ι : Type u_2} → (ι → Matroid α) → Matroid (ι × α)
The sum of an indexed family M : ι → Matroid α of matroids on the same type,
as a matroid on the product type ι × α.
theorem Matroid.sum'_indep_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {I : Set (ι × α)},
(Matroid.sum' M).Indep I ↔ ∀ (i : ι), (M i).Indep (Prod.mk i ⁻¹' I)
theorem Matroid.sum'_ground_eq E0 #
∀ {α : Type u_1} {ι : Type u_2} (M : ι → Matroid α), (Matroid.sum' M).E = ⋃ i, Prod.mk i '' (M i).E
theorem Matroid.sum'_isBase_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {B : Set (ι × α)},
(Matroid.sum' M).IsBase B ↔ ∀ (i : ι), (M i).IsBase (Prod.mk i ⁻¹' B)
theorem Matroid.sum'_isBasis_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {I X : Set (ι × α)},
(Matroid.sum' M).IsBasis I X ↔ ∀ (i : ι), (M i).IsBasis (Prod.mk i ⁻¹' I) (Prod.mk i ⁻¹' X)
theorem Matroid.Finitary.sum' E1 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α}, (∀ (i : ι), (M i).Finitary) → (Matroid.sum' M).Finitary
def Matroid.disjointSigma E1 #
{α : Type u_1} → {ι : Type u_2} → (M : ι → Matroid α) → Pairwise (Function.onFun Disjoint fun i ↦ (M i).E) → Matroid α
The sum of an indexed collection of matroids on α with pairwise disjoint ground sets,
as a matroid on α
theorem Matroid.disjointSigma_ground_eq E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {h : Pairwise (Function.onFun Disjoint fun i ↦ (M i).E)},
(Matroid.disjointSigma M h).E = ⋃ i, (M i).E
theorem Matroid.disjointSigma_indep_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {h : Pairwise (Function.onFun Disjoint fun i ↦ (M i).E)}
{I : Set α}, (Matroid.disjointSigma M h).Indep I ↔ (∀ (i : ι), (M i).Indep (I ∩ (M i).E)) ∧ I ⊆ ⋃ i, (M i).E
theorem Matroid.disjointSigma_isBase_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {h : Pairwise (Function.onFun Disjoint fun i ↦ (M i).E)}
{B : Set α}, (Matroid.disjointSigma M h).IsBase B ↔ (∀ (i : ι), (M i).IsBase (B ∩ (M i).E)) ∧ B ⊆ ⋃ i, (M i).E
theorem Matroid.disjointSigma_isBasis_iff E0 #
∀ {α : Type u_1} {ι : Type u_2} {M : ι → Matroid α} {h : Pairwise (Function.onFun Disjoint fun i ↦ (M i).E)}
{I X : Set α},
(Matroid.disjointSigma M h).IsBasis I X ↔
(∀ (i : ι), (M i).IsBasis (I ∩ (M i).E) (X ∩ (M i).E)) ∧ I ⊆ X ∧ X ⊆ ⋃ i, (M i).E
def Matroid.sum E1 #
{α : Type u} → {β : Type v} → Matroid α → Matroid β → Matroid (α ⊕ β)
The sum of two matroids as a matroid on the sum type.
theorem Matroid.sum_ground E0 #
∀ {α : Type u} {β : Type v} (M : Matroid α) (N : Matroid β), (M.sum N).E = Sum.inl '' M.E ∪ Sum.inr '' N.E
theorem Matroid.sum_indep_iff E0 #
∀ {α : Type u} {β : Type v} (M : Matroid α) (N : Matroid β) {I : Set (α ⊕ β)},
(M.sum N).Indep I ↔ M.Indep (Sum.inl ⁻¹' I) ∧ N.Indep (Sum.inr ⁻¹' I)
theorem Matroid.sum_isBase_iff E0 #
∀ {α : Type u} {β : Type v} {M : Matroid α} {N : Matroid β} {B : Set (α ⊕ β)},
(M.sum N).IsBase B ↔ M.IsBase (Sum.inl ⁻¹' B) ∧ N.IsBase (Sum.inr ⁻¹' B)
theorem Matroid.sum_isBasis_iff E0 #
∀ {α : Type u} {β : Type v} {M : Matroid α} {N : Matroid β} {I X : Set (α ⊕ β)},
(M.sum N).IsBasis I X ↔ M.IsBasis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.IsBasis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X)
def Matroid.disjointSum E1 #
{α : Type u_1} → (M N : Matroid α) → Disjoint M.E N.E → Matroid α
The sum of two matroids on α with disjoint ground sets, as a Matroid α.
theorem Matroid.disjointSum_ground_eq E0 #
∀ {α : Type u_1} {M N : Matroid α} {h : Disjoint M.E N.E}, (M.disjointSum N h).E = M.E ∪ N.E
theorem Matroid.disjointSum_indep_iff E0 #
∀ {α : Type u_1} {M N : Matroid α} {h : Disjoint M.E N.E} {I : Set α},
(M.disjointSum N h).Indep I ↔ M.Indep (I ∩ M.E) ∧ N.Indep (I ∩ N.E) ∧ I ⊆ M.E ∪ N.E
theorem Matroid.disjointSum_isBase_iff E0 #
∀ {α : Type u_1} {M N : Matroid α} {h : Disjoint M.E N.E} {B : Set α},
(M.disjointSum N h).IsBase B ↔ M.IsBase (B ∩ M.E) ∧ N.IsBase (B ∩ N.E) ∧ B ⊆ M.E ∪ N.E
theorem Matroid.disjointSum_isBasis_iff E0 #
∀ {α : Type u_1} {M N : Matroid α} {h : Disjoint M.E N.E} {I X : Set α},
(M.disjointSum N h).IsBasis I X ↔
M.IsBasis (I ∩ M.E) (X ∩ M.E) ∧ N.IsBasis (I ∩ N.E) (X ∩ N.E) ∧ I ⊆ X ∧ X ⊆ M.E ∪ N.E
theorem Matroid.disjointSum_comm E1 #
∀ {α : Type u_1} {M N : Matroid α} {h : Disjoint M.E N.E}, M.disjointSum N h = N.disjointSum M ⋯