The areas / V30. Combinatorics
Mathlib.Combinatorics.Matroid.IndepAxioms
58 declarations. Mathlib docs · Source
Matroid Independence and Basis axioms
Matroids in mathlib are defined axiomatically in terms of bases,
but can be described just as naturally via their collections of independent sets,
and in fact such a description, being more 'verbose', can often be useful.
As well as this, the definition of a Matroid uses an unwieldy 'maximality'
axiom that can be dropped in cases where there is some finiteness assumption.
This file provides several ways to do define a matroid in terms of its independence or base
predicates, using axiom sets that are appropriate in different settings,
and often much simpler than the general definition.
It also contains simp lemmas and typeclasses as appropriate.
All the independence axiom sets need nontriviality (the empty set is independent),
monotonicity (subsets of independent sets are independent),
and some form of 'augmentation' axiom, which allows one to enlarge a non-maximal independent set.
This augmentation axiom is still required when there are finiteness assumptions, but is simpler.
It just states that if I is a finite independent set and J is a larger finite
independent set, then there exists e ∈ J \ I for which insert e I is independent.
This is the axiom that appears in most of the definitions.
Implementation notes
To facilitate building a matroid from its independent sets, we define a structure IndepMatroid
which has a ground set E, an independence predicate Indep, and some axioms as its fields.
This structure is another encoding of the data in a Matroid; the function IndepMatroid.matroid
constructs a Matroid from an IndepMatroid.
This is convenient because if one wants to define M : Matroid α from a known independence
predicate Ind, it is easier to define an M' : IndepMatroid α so that M'.Indep = Ind and
then set M = M'.matroid than it is to directly define M with the base axioms.
The simp lemma IndepMatroid.matroid_indep_iff is important here; it shows that M.Indep = Ind,
so the Matroid constructed is the right one, and the intermediate IndepMatroid can be
made essentially invisible by the simplifier when working with M.
Because of this setup, we don't define any API for IndepMatroid, as it would be
a redundant copy of the existing API for Matroid.Indep.
(In particular, one could define a natural equivalence e : IndepMatroid α ≃ Matroid α
with e.toFun = IndepMatroid.matroid, but this would be pointless, as there is no need
for the inverse of e).
Main definitions
-
IndepMatroid αis a matroid structure onαdescribed in terms of its independent sets in full generality, using infinite versions of the axioms. -
IndepMatroid.matroidturnsM' : IndepMatroid αintoM : Matroid αwithM'.Indep = M.Indep. -
IndepMatroid.ofFinitaryconstructs anIndepMatroidwhose associatedMatroidisFinitaryin the special case where independence of a set is determined only by that of its finite subsets. This construction uses Zorn's lemma. -
IndepMatroid.ofFinitaryCardAugmentis a variant ofIndepMatroid.ofFinitarywhere the augmentation axiom resembles the finite augmentation axiom. -
IndepMatroid.ofBddconstructs anIndepMatroidin the case where there is some known absolute upper bound on the size of an independent set. This uses the infinite version of the augmentation axiom; the correspondingMatroidisRankFinite. -
IndepMatroid.ofBddAugmentis the same as the above, but with a finite augmentation axiom. -
IndepMatroid.ofFiniteconstructs anIndepMatroidfrom a finite ground set in terms of its independent sets. -
IndepMatroid.ofFinsetconstructs anIndepMatroid αwhose corresponding matroid isFinitaryfrom an independence predicate onFinset α. -
Matroid.ofExistsMatroidconstructs a 'copy' of a matroid that is known only existentially, but whose independence predicate is known explicitly. -
Matroid.ofExistsFiniteIsBaseconstructs a matroid from its bases, if it is known that one of them is finite. This gives aRankFinitematroid. -
Matroid.ofIsBaseOfFiniteconstructs aFinitematroid from its bases.
theorem IndepMatroid.mk.inj E1 #
∀ {α : Type u_2} {E : Set α} {Indep : Set α → Prop} {indep_empty : Indep ∅}
{indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I}
{indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I)}
{indep_maximal : ∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X}
{subset_ground : ∀ (I : Set α), Indep I → I ⊆ E} {E_1 : Set α} {Indep_1 : Set α → Prop} {indep_empty_1 : Indep_1 ∅}
{indep_subset_1 : ∀ ⦃I J : Set α⦄, Indep_1 J → I ⊆ J → Indep_1 I}
{indep_aug_1 :
∀ ⦃I B : Set α⦄, Indep_1 I → ¬Maximal Indep_1 I → Maximal Indep_1 B → ∃ x ∈ B \ I, Indep_1 (insert x I)}
{indep_maximal_1 : ∀ X ⊆ E_1, Matroid.ExistsMaximalSubsetProperty Indep_1 X}
{subset_ground_1 : ∀ (I : Set α), Indep_1 I → I ⊆ E_1},
{ E := E, Indep := Indep, indep_empty := indep_empty, indep_subset := indep_subset, indep_aug := indep_aug,
indep_maximal := indep_maximal, subset_ground := subset_ground } =
{ E := E_1, Indep := Indep_1, indep_empty := indep_empty_1, indep_subset := indep_subset_1,
indep_aug := indep_aug_1, indep_maximal := indep_maximal_1, subset_ground := subset_ground_1 } →
E = E_1 ∧ Indep = Indep_1
theorem IndepMatroid.ofBdd.congr_simp E1 #
∀ {α : Type u_1} (E E_1 : Set α) (e_E : E = E_1) (Indep Indep_1 : Set α → Prop) (e_Indep : Indep = Indep_1)
(indep_empty : Indep ∅) (indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E) (indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n),
IndepMatroid.ofBdd E Indep indep_empty indep_subset indep_aug subset_ground indep_bdd =
IndepMatroid.ofBdd E_1 Indep_1 ⋯ ⋯ ⋯ ⋯ ⋯
theorem IndepMatroid.ofFinitaryCardAugment.congr_simp E1 #
∀ {α : Type u_1} (E E_1 : Set α) (e_E : E = E_1) (Indep Indep_1 : Set α → Prop) (e_Indep : Indep = Indep_1)
(indep_empty : Indep ∅) (indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug :
∀ ⦃I J : Set α⦄, Indep I → I.Finite → Indep J → J.Finite → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
IndepMatroid.ofFinitaryCardAugment E Indep indep_empty indep_subset indep_aug indep_compact subset_ground =
IndepMatroid.ofFinitaryCardAugment E_1 Indep_1 ⋯ ⋯ ⋯ ⋯ ⋯
def IndepMatroid.ctorIdx E1 #
{α : Type u_2} → IndepMatroid α → ℕ
theorem Matroid.ofExistsFiniteIsBase.congr_simp E1 #
∀ {α : Type u_1} (E E_1 : Set α) (e_E : E = E_1) (IsBase IsBase_1 : Set α → Prop) (e_IsBase : IsBase = IsBase_1)
(exists_finite_base : ∃ B, IsBase B ∧ B.Finite) (isBase_exchange : Matroid.ExchangeProperty IsBase)
(subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
Matroid.ofExistsFiniteIsBase E IsBase exists_finite_base isBase_exchange subset_ground =
Matroid.ofExistsFiniteIsBase E_1 IsBase_1 ⋯ ⋯ ⋯
theorem IndepMatroid.mk.injEq E0 #
∀ {α : Type u_2} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(indep_maximal : ∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E) (E_1 : Set α) (Indep_1 : Set α → Prop) (indep_empty_1 : Indep_1 ∅)
(indep_subset_1 : ∀ ⦃I J : Set α⦄, Indep_1 J → I ⊆ J → Indep_1 I)
(indep_aug_1 :
∀ ⦃I B : Set α⦄, Indep_1 I → ¬Maximal Indep_1 I → Maximal Indep_1 B → ∃ x ∈ B \ I, Indep_1 (insert x I))
(indep_maximal_1 : ∀ X ⊆ E_1, Matroid.ExistsMaximalSubsetProperty Indep_1 X)
(subset_ground_1 : ∀ (I : Set α), Indep_1 I → I ⊆ E_1),
({ E := E, Indep := Indep, indep_empty := indep_empty, indep_subset := indep_subset, indep_aug := indep_aug,
indep_maximal := indep_maximal, subset_ground := subset_ground } =
{ E := E_1, Indep := Indep_1, indep_empty := indep_empty_1, indep_subset := indep_subset_1,
indep_aug := indep_aug_1, indep_maximal := indep_maximal_1, subset_ground := subset_ground_1 }) =
(E = E_1 ∧ Indep = Indep_1)
theorem IndepMatroid.ofFinitary.congr_simp E1 #
∀ {α : Type u_1} (E E_1 : Set α) (e_E : E = E_1) (Indep Indep_1 : Set α → Prop) (e_Indep : Indep = Indep_1)
(indep_empty : Indep ∅) (indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
IndepMatroid.ofFinitary E Indep indep_empty indep_subset indep_aug indep_compact subset_ground =
IndepMatroid.ofFinitary E_1 Indep_1 ⋯ ⋯ ⋯ ⋯ ⋯
structure IndepMatroid E3 #
Type u_2 → Type u_2
A matroid as defined by a ground set and an independence predicate.
This definition is an implementation detail whose purpose is to organize the multiple
different versions of the independence axioms;
usually, terms of type IndepMatroid should either be directly piped into IndepMatroid.matroid,
or should be constructed as a private definition
which is then converted into a matroid via IndepMatroid.matroid.
To define a Matroid α from a known independence predicate
MyIndep : Set α → Prop and ground set E : Set α, one can either write
def myMatroid (…) : Matroid α :=
IndepMatroid.matroid <| IndepMatroid.ofFoo E MyIndep _ _ … _
or, slightly more indirectly,
private def myIndepMatroid (…) : IndepMatroid α := IndepMatroid.ofFoo E MyIndep _ _ … _
def myMatroid (…) : Matroid α := (myIndepMatroid …).matroid
In both cases, IndepMatroid.ofFoo is either IndepMatroid.mk,
or one of the several other available constructors for IndepMatroid,
and the _ represent the proofs that this constructor requires.
After such a definition is made, the facts that myMatroid.Indep = myIndep and myMatroid.E = E
are true by either rfl or simp [myMatroid], and can be made directly into @[simp] lemmas.
ctor IndepMatroid.mk E0 #
{α : Type u_2} →
(E : Set α) →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I)) →
(∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X) → (∀ (I : Set α), Indep I → I ⊆ E) → IndepMatroid α
abbrev IndepMatroid.E E1 #
{α : Type u_2} → IndepMatroid α → Set α
The ground set
abbrev IndepMatroid.Indep E1 #
{α : Type u_2} → IndepMatroid α → Set α → Prop
The independence predicate
theorem IndepMatroid.indep_empty E1 #
∀ {α : Type u_2} (self : IndepMatroid α), self.Indep ∅
theorem IndepMatroid.indep_subset E1 #
∀ {α : Type u_2} (self : IndepMatroid α) ⦃I J : Set α⦄, self.Indep J → I ⊆ J → self.Indep I
theorem IndepMatroid.indep_aug E1 #
∀ {α : Type u_2} (self : IndepMatroid α) ⦃I B : Set α⦄,
self.Indep I → ¬Maximal self.Indep I → Maximal self.Indep B → ∃ x ∈ B \ I, self.Indep (insert x I)
theorem IndepMatroid.indep_maximal E1 #
∀ {α : Type u_2} (self : IndepMatroid α), ∀ X ⊆ self.E, Matroid.ExistsMaximalSubsetProperty self.Indep X
theorem IndepMatroid.subset_ground E1 #
∀ {α : Type u_2} (self : IndepMatroid α) (I : Set α), self.Indep I → I ⊆ self.E
def IndepMatroid.matroid E3 #
{α : Type u_1} → IndepMatroid α → Matroid α
An M : IndepMatroid α gives a Matroid α whose bases are the maximal M-independent sets.
theorem IndepMatroid.matroid_IsBase E0 #
∀ {α : Type u_1} (M : IndepMatroid α) (x : Set α), M.matroid.IsBase x = Maximal M.Indep x
theorem IndepMatroid.matroid_E E0 #
∀ {α : Type u_1} (M : IndepMatroid α), M.matroid.E = M.E
theorem IndepMatroid.matroid_Indep E0 #
∀ {α : Type u_1} (M : IndepMatroid α) (a : Set α), M.matroid.Indep a = M.Indep a
theorem IndepMatroid.matroid_indep_iff E0 #
∀ {α : Type u_1} {M : IndepMatroid α} {I : Set α}, M.matroid.Indep I ↔ M.Indep I
def IndepMatroid.ofFinitary E3 #
{α : Type u_1} →
(E : Set α) →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I)) →
(∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I) → (∀ (I : Set α), Indep I → I ⊆ E) → IndepMatroid α
If Indep has the 'compactness' property that each set I satisfies Indep I if and only if
Indep J for every finite subset J of I,
then an IndepMatroid can be constructed without proving the maximality axiom.
This needs choice, since it can be used to prove that every vector space has a basis.
theorem IndepMatroid.ofFinitary_E E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitary E Indep indep_empty indep_subset indep_aug indep_compact subset_ground).E = E
theorem IndepMatroid.ofFinitary_indep E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitary E Indep indep_empty indep_subset indep_aug indep_compact subset_ground).Indep = Indep
instance IndepMatroid.ofFinitary_finitary E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitary E Indep indep_empty indep_subset indep_aug indep_compact subset_ground).matroid.Finitary
def IndepMatroid.ofFinitaryCardAugment E3 #
{α : Type u_1} →
(E : Set α) →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I J : Set α⦄,
Indep I → I.Finite → Indep J → J.Finite → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I)) →
(∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I) → (∀ (I : Set α), Indep I → I ⊆ E) → IndepMatroid α
An independence predicate satisfying the finite matroid axioms determines a matroid, provided independence is determined by its behaviour on finite sets.
theorem IndepMatroid.ofFinitaryCardAugment_E E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug :
∀ ⦃I J : Set α⦄, Indep I → I.Finite → Indep J → J.Finite → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitaryCardAugment E Indep indep_empty indep_subset indep_aug indep_compact subset_ground).E = E
theorem IndepMatroid.ofFinitaryCardAugment_indep E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug :
∀ ⦃I J : Set α⦄, Indep I → I.Finite → Indep J → J.Finite → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitaryCardAugment E Indep indep_empty indep_subset indep_aug indep_compact subset_ground).Indep =
Indep
instance IndepMatroid.ofFinitaryCardAugment_finitary E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug :
∀ ⦃I J : Set α⦄, Indep I → I.Finite → Indep J → J.Finite → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_compact : ∀ (I : Set α), (∀ J ⊆ I, J.Finite → Indep J) → Indep I)
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofFinitaryCardAugment E Indep indep_empty indep_subset indep_aug indep_compact
subset_ground).matroid.Finitary
theorem Matroid.existsMaximalSubsetProperty_of_bdd E1 #
∀ {α : Type u_1} {P : Set α → Prop},
(∃ n, ∀ (Y : Set α), P Y → Y.encard ≤ ↑n) → ∀ (X : Set α), Matroid.ExistsMaximalSubsetProperty P X
If there is an absolute upper bound on the size of a set satisfying P, then the
maximal subset property always holds.
def IndepMatroid.ofBdd E3 #
{α : Type u_1} →
(E : Set α) →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I)) →
(∀ (I : Set α), Indep I → I ⊆ E) → (∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n) → IndepMatroid α
If there is an absolute upper bound on the size of an independent set, then the maximality axiom isn't needed to define a matroid by independent sets.
theorem IndepMatroid.ofBdd_E E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E) (indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n),
(IndepMatroid.ofBdd E Indep indep_empty indep_subset indep_aug subset_ground indep_bdd).E = E
theorem IndepMatroid.ofBdd_indep E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E) (h_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n),
(IndepMatroid.ofBdd E Indep indep_empty indep_subset indep_aug subset_ground h_bdd).Indep = Indep
instance IndepMatroid.instRankFiniteMatroidOfBdd E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I B : Set α⦄, Indep I → ¬Maximal Indep I → Maximal Indep B → ∃ x ∈ B \ I, Indep (insert x I))
(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E) (h_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n),
(IndepMatroid.ofBdd E Indep indep_empty indep_subset indep_aug subset_ground h_bdd).matroid.RankFinite
IndepMatroid.ofBdd constructs a RankFinite matroid.
def IndepMatroid.ofBddAugment E3 #
{α : Type u_1} →
(E : Set α) →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I)) →
(∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n) → (∀ (I : Set α), Indep I → I ⊆ E) → IndepMatroid α
If there is an absolute upper bound on the size of an independent set, then matroids can be defined using an 'augmentation' axiom similar to the standard definition of finite matroids for independent sets.
theorem IndepMatroid.ofBddAugment_E E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n) (subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofBddAugment E Indep indep_empty indep_subset indep_aug indep_bdd subset_ground).E = E
theorem IndepMatroid.ofBddAugment_indep E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n) (subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofBddAugment E Indep indep_empty indep_subset indep_aug indep_bdd subset_ground).Indep = Indep
instance IndepMatroid.ofBddAugment_rankFinite E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n) (subset_ground : ∀ (I : Set α), Indep I → I ⊆ E),
(IndepMatroid.ofBddAugment E Indep indep_empty indep_subset indep_aug indep_bdd subset_ground).matroid.RankFinite
def IndepMatroid.ofFinite E3 #
{α : Type u_1} →
{E : Set α} →
E.Finite →
(Indep : Set α → Prop) →
Indep ∅ →
(∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I J : Set α⦄, Indep I → Indep J → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I)) →
(∀ ⦃I : Set α⦄, Indep I → I ⊆ E) → IndepMatroid α
If E is finite, then any collection of subsets of E satisfying
the usual independence axioms determines a matroid
theorem IndepMatroid.ofFinite_E E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Set α⦄, Indep I → I ⊆ E),
(IndepMatroid.ofFinite hE Indep indep_empty indep_subset indep_aug subset_ground).E = E
theorem IndepMatroid.ofFinite_indep E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Set α⦄, Indep I → I ⊆ E),
(IndepMatroid.ofFinite hE Indep indep_empty indep_subset indep_aug subset_ground).Indep = Indep
instance IndepMatroid.ofFinite_finite E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (Indep : Set α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Set α⦄, Indep I → I ⊆ E),
(IndepMatroid.ofFinite hE Indep indep_empty indep_subset indep_aug subset_ground).matroid.Finite
def IndepMatroid.ofFinset E3 #
{α : Type u_1} →
[inst : DecidableEq α] →
(E : Set α) →
(Indep : Finset α → Prop) →
Indep ∅ →
(∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I) →
(∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I)) →
(∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E) → IndepMatroid α
An independence predicate on Finset α that obeys the finite matroid axioms determines a
finitary matroid on α.
theorem IndepMatroid.ofFinset_E E0 #
∀ {α : Type u_1} [inst : DecidableEq α] (E : Set α) (Indep : Finset α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E),
(IndepMatroid.ofFinset E Indep indep_empty indep_subset indep_aug subset_ground).E = E
theorem IndepMatroid.ofFinset_indep E0 #
∀ {α : Type u_1} [inst : DecidableEq α] (E : Set α) (Indep : Finset α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E) {I : Finset α},
(IndepMatroid.ofFinset E Indep indep_empty indep_subset indep_aug subset_ground).Indep ↑I ↔ Indep I
theorem IndepMatroid.ofFinset_indep' E1 #
∀ {α : Type u_1} [inst : DecidableEq α] (E : Set α) (Indep : Finset α → Prop) (indep_empty : Indep ∅)
(indep_subset : ∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I)
(indep_aug : ∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))
(subset_ground : ∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E) {I : Set α},
(IndepMatroid.ofFinset E Indep indep_empty indep_subset indep_aug subset_ground).Indep I ↔
∀ (J : Finset α), ↑J ⊆ I → Indep J
This can't be @[simp], because it would cause the more useful
Matroid.ofIndepFinset_apply not to be in simp normal form.
def Matroid.ofExistsMatroid E3 #
{α : Type u_1} → (E : Set α) → (Indep : Set α → Prop) → (∃ M, E = M.E ∧ ∀ (I : Set α), M.Indep I ↔ Indep I) → Matroid α
Construct an Matroid from an independence predicate that agrees with that of some matroid M.
This is computable even if M is only known existentially, or when M exists for different
reasons in different cases. This can also be used to change the independence predicate to a
more useful definitional form.
theorem Matroid.ofExistsMatroid_E E0 #
∀ {α : Type u_1} (E : Set α) (Indep : Set α → Prop) (hM : ∃ M, E = M.E ∧ ∀ (I : Set α), M.Indep I ↔ Indep I),
(Matroid.ofExistsMatroid E Indep hM).E = E
def Matroid.ofBase E1 #
{α : Type u_1} →
(E : Set α) →
(IsBase : Set α → Prop) →
(∃ B, IsBase B) →
Matroid.ExchangeProperty IsBase →
(∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty (fun x ↦ ∃ B, IsBase B ∧ x ⊆ B) X) →
(∀ (B : Set α), IsBase B → B ⊆ E) → Matroid α
A matroid defined purely in terms of its bases.
theorem Matroid.ofBase_E E0 #
∀ {α : Type u_1} (E : Set α) (IsBase : Set α → Prop) (exists_isBase : ∃ B, IsBase B)
(isBase_exchange : Matroid.ExchangeProperty IsBase)
(maximality : ∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty (fun x ↦ ∃ B, IsBase B ∧ x ⊆ B) X)
(subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofBase E IsBase exists_isBase isBase_exchange maximality subset_ground).E = E
def Matroid.ofExistsFiniteIsBase E3 #
{α : Type u_1} →
(E : Set α) →
(IsBase : Set α → Prop) →
(∃ B, IsBase B ∧ B.Finite) → Matroid.ExchangeProperty IsBase → (∀ (B : Set α), IsBase B → B ⊆ E) → Matroid α
A collection of bases with the exchange property and at least one finite member is a matroid
theorem Matroid.ofExistsFiniteIsBase_E E0 #
∀ {α : Type u_1} (E : Set α) (IsBase : Set α → Prop) (exists_finite_base : ∃ B, IsBase B ∧ B.Finite)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofExistsFiniteIsBase E IsBase exists_finite_base isBase_exchange subset_ground).E = E
theorem Matroid.ofExistsFiniteIsBase_isBase E0 #
∀ {α : Type u_1} (E : Set α) (IsBase : Set α → Prop) (exists_finite_base : ∃ B, IsBase B ∧ B.Finite)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofExistsFiniteIsBase E IsBase exists_finite_base isBase_exchange subset_ground).IsBase = IsBase
instance Matroid.ofExistsFiniteIsBase_rankFinite E0 #
∀ {α : Type u_1} (E : Set α) (IsBase : Set α → Prop) (exists_finite_base : ∃ B, IsBase B ∧ B.Finite)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofExistsFiniteIsBase E IsBase exists_finite_base isBase_exchange subset_ground).RankFinite
def Matroid.ofIsBaseOfFinite E3 #
{α : Type u_1} →
{E : Set α} →
E.Finite →
(IsBase : Set α → Prop) →
(∃ B, IsBase B) → Matroid.ExchangeProperty IsBase → (∀ (B : Set α), IsBase B → B ⊆ E) → Matroid α
If E is finite, then any nonempty collection of its subsets
with the exchange property is the collection of bases of a matroid on E.
theorem Matroid.ofIsBaseOfFinite_E E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (IsBase : Set α → Prop) (exists_isBase : ∃ B, IsBase B)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofIsBaseOfFinite hE IsBase exists_isBase isBase_exchange subset_ground).E = E
theorem Matroid.ofIsBaseOfFinite_isBase E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (IsBase : Set α → Prop) (exists_isBase : ∃ B, IsBase B)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofIsBaseOfFinite hE IsBase exists_isBase isBase_exchange subset_ground).IsBase = IsBase
instance Matroid.ofBaseOfFinite_finite E0 #
∀ {α : Type u_1} {E : Set α} (hE : E.Finite) (IsBase : Set α → Prop) (exists_isBase : ∃ B, IsBase B)
(isBase_exchange : Matroid.ExchangeProperty IsBase) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E),
(Matroid.ofIsBaseOfFinite hE IsBase exists_isBase isBase_exchange subset_ground).Finite