The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.Matroid.Basic

201 declarations and 14 deprecated aliases. Mathlib docs · Source

Matroids

A Matroid is a structure that combinatorially abstracts the notion of linear independence and dependence; matroids have connections with graph theory, discrete optimization, additive combinatorics and algebraic geometry. Mathematically, a matroid M is a structure on a set E comprising a collection of subsets of E called the bases of M, where the bases are required to obey certain axioms.

This file gives a definition of a matroid M in terms of its bases, and some API relating independent sets (subsets of bases) and the notion of a basis of a set X (a maximal independent subset of X).

Main definitions

  • a Matroid α on a type α is a structure comprising a 'ground set' and a suitably behaved 'base' predicate.

Given M : Matroid α ...

  • M.E denotes the ground set of M, which has type Set α

  • For B : Set α, M.IsBase B means that B is a base of M.

  • For I : Set α, M.Indep I means that I is independent in M (that is, I is contained in a base of M).

  • For D : Set α, M.Dep D means that D is contained in the ground set of M but isn't independent.

  • For I : Set α and X : Set α, M.IsBasis I X means that I is a maximal independent subset of X.

  • M.Finite means that M has finite ground set.

  • M.Nonempty means that the ground set of M is nonempty.

  • RankFinite M means that the bases of M are finite.

  • RankInfinite M means that the bases of M are infinite.

  • RankPos M means that the bases of M are nonempty.

  • Finitary M means that a set is independent if and only if all its finite subsets are independent.

  • aesop_mat : a tactic designed to prove X ⊆ M.E for some set X and matroid M.

Implementation notes

There are a few design decisions worth discussing.

Finiteness

The first is that our matroids are allowed to be infinite. Unlike with many mathematical structures, this isn't such an obvious choice. Finite matroids have been studied since the 1930's, and there was never controversy as to what is and isn't an example of a finite matroid - in fact, surprisingly many apparently different definitions of a matroid give rise to the same class of objects.

However, generalizing different definitions of a finite matroid to the infinite in the obvious way (i.e. by simply allowing the ground set to be infinite) gives a number of different notions of 'infinite matroid' that disagree with each other, and that all lack nice properties. Many different competing notions of infinite matroid were studied through the years; in fact, the problem of which definition is the best was only really solved in 2013, when Bruhn et al. [2] showed that there is a unique 'reasonable' notion of an infinite matroid (these objects had previously defined by Higgs under the name 'B-matroid'). These are defined by adding one carefully chosen axiom to the standard set, and adapting existing axioms to not mention set cardinalities; they enjoy nearly all the nice properties of standard finite matroids.

Even though at least 90% of the literature is on finite matroids, B-matroids are the definition we use, because they allow for additional generality, nearly all theorems are still true and just as easy to state, and (hopefully) the more general definition will prevent the need for a costly future refactor. The disadvantage is that developing API for the finite case is harder work (for instance, it is harder to prove that something is a matroid in the first place, and one must deal with ℕ∞ rather than ℕ). For serious work on finite matroids, we provide the typeclasses [M.Finite] and [RankFinite M] and associated API.

Cardinality

Just as with bases of a vector space, all bases of a finite matroid M are finite and have the same cardinality; this cardinality is an important invariant known as the 'rank' of M. For infinite matroids, bases are not in general equicardinal; in fact the equicardinality of bases of infinite matroids is independent of ZFC [3]. What is still true is that either all bases are finite and equicardinal, or all bases are infinite. This means that the natural notion of 'size' for a set in matroid theory is given by the function Set.encard, which is the cardinality as a term in ℕ∞. We use this function extensively in building the API; it is preferable to both Set.ncard and Finset.card because it allows infinite sets to be handled without splitting into cases.

The ground Set

A last place where we make a consequential choice is making the ground set of a matroid a structure field of type Set α (where α is the type of 'possible matroid elements') rather than just having a type α of all the matroid elements. This is because of how common it is to simultaneously consider a number of matroids on different but related ground sets. For example, a matroid M on ground set E can have its structure 'restricted' to some subset R ⊆ E to give a smaller matroid M ↾ R with ground set R. A statement like (M ↾ R₁) ↾ R₂ = M ↾ R₂ is mathematically obvious. But if the ground set of a matroid is a type, this doesn't typecheck, and is only true up to canonical isomorphism. Restriction is just the tip of the iceberg here; one can also 'contract' and 'delete' elements and sets of elements in a matroid to give a smaller matroid, and in practice it is common to make statements like M₁.E = M₂.E ∩ M₃.E and ((M ⟋ e) ↾ R) ⟋ C = M ⟋ (C ∪ {e}) ↾ R. Such things are a nightmare to work with unless = is actually propositional equality (especially because the relevant coercions are usually between sets and not just elements).

So the solution is that the ground set M.E has type Set α, and there are elements of type α that aren't in the matroid. The tradeoff is that for many statements, one now has to add hypotheses of the form X ⊆ M.E to make sure than X is actually 'in the matroid', rather than letting a 'type of matroid elements' take care of this invisibly. It still seems that this is worth it. The tactic aesop_mat exists specifically to discharge such goals with minimal fuss (using default values). The tactic works fairly well, but has room for improvement.

A related decision is to not have matroids themselves be a typeclass. This would make things be notationally simpler (having Base in the presence of [Matroid α] rather than M.Base for a term M : Matroid α) but is again just too awkward when one has multiple matroids on the same type. In fact, in regular written mathematics, it is normal to explicitly indicate which matroid something is happening in, so our notation mirrors common practice.

Notation

We use a few nonstandard conventions in theorem names that are related to the above. First, we mirror common informal practice by referring explicitly to the ground set rather than the notation E. (Writing ground everywhere in a proof term would be unwieldy, and writing E in theorem names would be unnatural to read.)

Second, because we are typically interested in subsets of the ground set M.E, using Set.compl is inconvenient, since Xᶜ ⊆ M.E is typically false for X ⊆ M.E. On the other hand (especially when duals arise), it is common to complement a set X ⊆ M.E within the ground set, giving M.E \ X. For this reason, we use the term compl in theorem names to refer to taking a set difference with respect to the ground set, rather than a complement within a type. The lemma compl_isBase_dual is one of the many examples of this.

Finally, in theorem names, matroid predicates that apply to sets (such as Base, Indep, IsBasis) are typically used as suffixes rather than prefixes. For instance, we have ground_indep_iff_isBase rather than indep_ground_iff_isBase.

References

  • [J. Oxley, Matroid Theory][oxley2011]
  • [H. Bruhn, R. Diestel, M. Kriesell, R. Pendavingh, P. Wollan, Axioms for infinite matroids, Adv. Math 239 (2013), 18-46][bruhnDiestelKriesellPendavinghWollan2013]
  • [N. Bowler, S. Geschke, Self-dual uniform matroids on infinite sets, Proc. Amer. Math. Soc. 144 (2016), 459-471][bowlerGeschke2015]

theorem Matroid.mk.injEq E0 #

∀ {α : Type u_1} (E : Set α) (IsBase Indep : Set α → Prop) (indep_iff' : ∀ ⦃I : Set α⦄, Indep I ↔ ∃ B, IsBase B ∧ I ⊆ B)
  (exists_isBase : ∃ B, IsBase B) (isBase_exchange : Matroid.ExchangeProperty IsBase)
  (maximality : ∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X) (subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E)
  (E_1 : Set α) (IsBase_1 Indep_1 : Set α → Prop) (indep_iff'_1 : ∀ ⦃I : Set α⦄, Indep_1 I ↔ ∃ B, IsBase_1 B ∧ I ⊆ B)
  (exists_isBase_1 : ∃ B, IsBase_1 B) (isBase_exchange_1 : Matroid.ExchangeProperty IsBase_1)
  (maximality_1 : ∀ X ⊆ E_1, Matroid.ExistsMaximalSubsetProperty Indep_1 X)
  (subset_ground_1 : ∀ (B : Set α), IsBase_1 B → B ⊆ E_1),
  ({ E := E, IsBase := IsBase, Indep := Indep, indep_iff' := indep_iff', exists_isBase := exists_isBase,
        isBase_exchange := isBase_exchange, maximality := maximality, subset_ground := subset_ground } =
      { E := E_1, IsBase := IsBase_1, Indep := Indep_1, indep_iff' := indep_iff'_1, exists_isBase := exists_isBase_1,
        isBase_exchange := isBase_exchange_1, maximality := maximality_1, subset_ground := subset_ground_1 }) =
    (E = E_1 ∧ IsBase = IsBase_1 ∧ Indep = Indep_1)

theorem Matroid.mk.inj E1 #

∀ {α : Type u_1} {E : Set α} {IsBase Indep : Set α → Prop} {indep_iff' : ∀ ⦃I : Set α⦄, Indep I ↔ ∃ B, IsBase B ∧ I ⊆ B}
  {exists_isBase : ∃ B, IsBase B} {isBase_exchange : Matroid.ExchangeProperty IsBase}
  {maximality : ∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X} {subset_ground : ∀ (B : Set α), IsBase B → B ⊆ E}
  {E_1 : Set α} {IsBase_1 Indep_1 : Set α → Prop} {indep_iff'_1 : ∀ ⦃I : Set α⦄, Indep_1 I ↔ ∃ B, IsBase_1 B ∧ I ⊆ B}
  {exists_isBase_1 : ∃ B, IsBase_1 B} {isBase_exchange_1 : Matroid.ExchangeProperty IsBase_1}
  {maximality_1 : ∀ X ⊆ E_1, Matroid.ExistsMaximalSubsetProperty Indep_1 X}
  {subset_ground_1 : ∀ (B : Set α), IsBase_1 B → B ⊆ E_1},
  { E := E, IsBase := IsBase, Indep := Indep, indep_iff' := indep_iff', exists_isBase := exists_isBase,
        isBase_exchange := isBase_exchange, maximality := maximality, subset_ground := subset_ground } =
      { E := E_1, IsBase := IsBase_1, Indep := Indep_1, indep_iff' := indep_iff'_1, exists_isBase := exists_isBase_1,
        isBase_exchange := isBase_exchange_1, maximality := maximality_1, subset_ground := subset_ground_1 } →
    E = E_1 ∧ IsBase = IsBase_1 ∧ Indep = Indep_1

def Matroid.ctorIdx E1 #

{α : Type u_1} → Matroid α → ℕ

def Matroid.ExchangeProperty E1 #

{α : Type u_1} → (Set α → Prop) → Prop

A predicate P on sets satisfies the exchange property if, for all X and Y satisfying P and all a ∈ X \ Y, there exists b ∈ Y \ X so that swapping a for b in X maintains P.

def Matroid.ExistsMaximalSubsetProperty E1 #

{α : Type u_1} → (Set α → Prop) → Set α → Prop

A set X has the maximal subset property for a predicate P if every subset of X satisfying P is contained in a maximal subset of X satisfying P.

structure Matroid E3 #

Type u_1 → Type u_1

A Matroid α is a ground set E of type Set α, and a nonempty collection of its subsets satisfying the exchange property and the maximal subset property. Each such set is called a Base of M. An Independent set is just a set contained in a base, but we include this predicate as a structure field for better definitional properties.

In most cases, using this definition directly is not the best way to construct a matroid, since it requires specifying both the bases and independent sets. If the bases are known, use Matroid.ofBase or a variant. If just the independent sets are known, define an IndepMatroid, and then use IndepMatroid.matroid.

ctor Matroid.mk E0 #

{α : Type u_1} →
  (E : Set α) →
    (IsBase Indep : Set α → Prop) →
      (∀ ⦃I : Set α⦄, Indep I ↔ ∃ B, IsBase B ∧ I ⊆ B) →
        (∃ B, IsBase B) →
          Matroid.ExchangeProperty IsBase →
            (∀ X ⊆ E, Matroid.ExistsMaximalSubsetProperty Indep X) → (∀ (B : Set α), IsBase B → B ⊆ E) → Matroid α

abbrev Matroid.E E1 #

{α : Type u_1} → Matroid α → Set α

M has a ground set E.

abbrev Matroid.IsBase E1 #

{α : Type u_1} → Matroid α → Set α → Prop

M has a predicate Base defining its bases.

abbrev Matroid.Indep E1 #

{α : Type u_1} → Matroid α → Set α → Prop

M has a predicate Indep defining its independent sets.

theorem Matroid.indep_iff' E1 #

∀ {α : Type u_1} (self : Matroid α) ⦃I : Set α⦄, self.Indep I ↔ ∃ B, self.IsBase B ∧ I ⊆ B

The Independent sets are those contained in Bases.

theorem Matroid.exists_isBase E1 #

∀ {α : Type u_1} (self : Matroid α), ∃ B, self.IsBase B

There is at least one Base.

theorem Matroid.isBase_exchange E1 #

∀ {α : Type u_1} (self : Matroid α), Matroid.ExchangeProperty self.IsBase

For any bases B, B' and e ∈ B \ B', there is some f ∈ B' \ B for which B-e+f is a base.

theorem Matroid.maximality E1 #

∀ {α : Type u_1} (self : Matroid α), ∀ X ⊆ self.E, Matroid.ExistsMaximalSubsetProperty self.Indep X

Every independent subset I of a set X for is contained in a maximal independent subset of X.

theorem Matroid.subset_ground E1 #

∀ {α : Type u_1} (self : Matroid α) (B : Set α), self.IsBase B → B ⊆ self.E

Every base is contained in the ground set.

theorem Matroid.ext_iff E0 #

∀ {α : Type u_1} {x y : Matroid α}, x = y ↔ x.E = y.E ∧ x.IsBase = y.IsBase ∧ x.Indep = y.Indep

theorem Matroid.ext E1 #

∀ {α : Type u_1} {x y : Matroid α}, x.E = y.E → x.IsBase = y.IsBase → x.Indep = y.Indep → x = y

instance Matroid.instNonemptySubtypeSetIsBase E0 #

∀ {α : Type u_1} (M : Matroid α), Nonempty { B // M.IsBase B }

class Matroid.Finite E1 #

{α : Type u_1} → Matroid α → Prop

Typeclass for a matroid having finite ground set. Just a wrapper for M.E.Finite.

ctor Matroid.Finite.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, M.E.Finite → M.Finite

theorem Matroid.finite_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.Finite ↔ M.E.Finite

theorem Matroid.Finite.ground_finite E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.Finite], M.E.Finite

The ground set is finite

class Matroid.Nonempty E1 #

{α : Type u_1} → Matroid α → Prop

Typeclass for a matroid having nonempty ground set. Just a wrapper for M.E.Nonempty.

ctor Matroid.Nonempty.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, M.E.Nonempty → M.Nonempty

theorem Matroid.Nonempty.ground_nonempty E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.Nonempty], M.E.Nonempty

The ground set is nonempty

theorem Matroid.ground_nonempty E1 #

∀ {α : Type u_1} (M : Matroid α) [M.Nonempty], M.E.Nonempty

theorem Matroid.ground_nonempty_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.E.Nonempty ↔ M.Nonempty

theorem Matroid.nonempty_type E1 #

∀ {α : Type u_1} (M : Matroid α) [h : M.Nonempty], Nonempty α

theorem Matroid.ground_finite E1 #

∀ {α : Type u_1} (M : Matroid α) [M.Finite], M.E.Finite

theorem Matroid.set_finite E1 #

∀ {α : Type u_1} (M : Matroid α) [M.Finite] (X : Set α), autoParam (X ⊆ M.E) Matroid.set_finite._auto_1 → X.Finite

instance Matroid.finite_of_finite E0 #

∀ {α : Type u_1} [Finite α] {M : Matroid α}, M.Finite

class Matroid.RankFinite E1 #

{α : Type u_1} → Matroid α → Prop

A RankFinite matroid is one whose bases are finite

ctor Matroid.RankFinite.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, (∃ B, M.IsBase B ∧ B.Finite) → M.RankFinite

theorem Matroid.rankFinite_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.RankFinite ↔ ∃ B, M.IsBase B ∧ B.Finite

theorem Matroid.RankFinite.exists_finite_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.RankFinite], ∃ B, M.IsBase B ∧ B.Finite

There is a finite base

instance Matroid.rankFinite_of_finite E0 #

∀ {α : Type u_1} (M : Matroid α) [M.Finite], M.RankFinite

class Matroid.RankInfinite E1 #

{α : Type u_1} → Matroid α → Prop

An RankInfinite matroid is one whose bases are infinite.

ctor Matroid.RankInfinite.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, (∃ B, M.IsBase B ∧ B.Infinite) → M.RankInfinite

theorem Matroid.rankInfinite_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.RankInfinite ↔ ∃ B, M.IsBase B ∧ B.Infinite

theorem Matroid.RankInfinite.exists_infinite_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.RankInfinite], ∃ B, M.IsBase B ∧ B.Infinite

There is an infinite base

class Matroid.RankPos E1 #

{α : Type u_1} → Matroid α → Prop

A RankPos matroid is one whose bases are nonempty.

theorem Matroid.rankPos_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.RankPos ↔ ¬M.IsBase ∅

ctor Matroid.RankPos.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, ¬M.IsBase ∅ → M.RankPos

theorem Matroid.RankPos.empty_not_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.RankPos], ¬M.IsBase ∅

The empty set isn't a base

instance Matroid.rankPos_nonempty E0 #

∀ {α : Type u_1} {M : Matroid α} [M.RankPos], M.Nonempty

theorem Matroid.ExchangeProperty.antichain E1 #

∀ {α : Type u_1} {IsBase : Set α → Prop} {B B' : Set α},
  Matroid.ExchangeProperty IsBase → IsBase B → IsBase B' → B ⊆ B' → B = B'

A family of sets with the exchange property is an antichain.

theorem Matroid.ExchangeProperty.encard_sdiff_le_aux E0 #

∀ {α : Type u_1} {IsBase : Set α → Prop} {B₁ B₂ : Set α},
  Matroid.ExchangeProperty IsBase → IsBase B₁ → IsBase B₂ → (B₁ \ B₂).encard ≤ (B₂ \ B₁).encard

theorem Matroid.ExchangeProperty.encard_sdiff_eq E0 #

∀ {α : Type u_1} {IsBase : Set α → Prop} {B₁ B₂ : Set α},
  Matroid.ExchangeProperty IsBase → IsBase B₁ → IsBase B₂ → (B₁ \ B₂).encard = (B₂ \ B₁).encard

For any two sets B₁, B₂ in a family with the exchange property, the differences B₁ \ B₂ and B₂ \ B₁ have the same ℕ∞-cardinality.

theorem Matroid.ExchangeProperty.encard_isBase_eq E0 #

∀ {α : Type u_1} {IsBase : Set α → Prop} {B₁ B₂ : Set α},
  Matroid.ExchangeProperty IsBase → IsBase B₁ → IsBase B₂ → B₁.encard = B₂.encard

Any two sets B₁, B₂ in a family with the exchange property have the same ℕ∞-cardinality.

def Matroid.aesop_mat E3 #

Lean.ParserDescr

The aesop_mat tactic attempts to prove a set is contained in the ground set of a matroid. It uses a [Matroid] ruleset, and is allowed to fail.

theorem Matroid.IsBase.subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → B ⊆ M.E

theorem Matroid.IsBase.exchange E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α} {e : α},
  M.IsBase B₁ → M.IsBase B₂ → e ∈ B₁ \ B₂ → ∃ y ∈ B₂ \ B₁, M.IsBase (insert y (B₁ \ {e}))

theorem Matroid.IsBase.exchange_mem E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α} {e : α},
  M.IsBase B₁ → M.IsBase B₂ → e ∈ B₁ → e ∉ B₂ → ∃ y, (y ∈ B₂ ∧ y ∉ B₁) ∧ M.IsBase (insert y (B₁ \ {e}))

theorem Matroid.IsBase.not_isBase_of_ssubset E1 #

∀ {α : Type u_1} {M : Matroid α} {B X : Set α}, M.IsBase B → X ⊂ B → ¬M.IsBase X

theorem Matroid.IsBase.insert_not_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e : α}, M.IsBase B → e ∉ B → ¬M.IsBase (insert e B)

theorem Matroid.IsBase.encard_sdiff_comm E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → (B₁ \ B₂).encard = (B₂ \ B₁).encard

theorem Matroid.IsBase.ncard_sdiff_comm E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → (B₁ \ B₂).ncard = (B₂ \ B₁).ncard

theorem Matroid.IsBase.encard_eq_encard_of_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → B₁.encard = B₂.encard

theorem Matroid.IsBase.ncard_eq_ncard_of_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → B₁.ncard = B₂.ncard

theorem Matroid.IsBase.finite_of_finite E1 #

∀ {α : Type u_1} {M : Matroid α} {B B' : Set α}, M.IsBase B → B.Finite → M.IsBase B' → B'.Finite

theorem Matroid.IsBase.infinite_of_infinite E1 #

∀ {α : Type u_1} {M : Matroid α} {B B₁ : Set α}, M.IsBase B → B.Infinite → M.IsBase B₁ → B₁.Infinite

theorem Matroid.IsBase.finite E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} [M.RankFinite], M.IsBase B → B.Finite

theorem Matroid.IsBase.infinite E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} [M.RankInfinite], M.IsBase B → B.Infinite

theorem Matroid.empty_not_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} [h : M.RankPos], ¬M.IsBase ∅

theorem Matroid.IsBase.nonempty E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} [M.RankPos], M.IsBase B → B.Nonempty

theorem Matroid.IsBase.rankPos_of_nonempty E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → B.Nonempty → M.RankPos

theorem Matroid.IsBase.rankFinite_of_finite E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → B.Finite → M.RankFinite

theorem Matroid.IsBase.rankInfinite_of_infinite E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → B.Infinite → M.RankInfinite

theorem Matroid.not_rankFinite E1 #

∀ {α : Type u_1} (M : Matroid α) [M.RankInfinite], ¬M.RankFinite

theorem Matroid.not_rankInfinite E1 #

∀ {α : Type u_1} (M : Matroid α) [M.RankFinite], ¬M.RankInfinite

theorem Matroid.rankFinite_or_rankInfinite E1 #

∀ {α : Type u_1} (M : Matroid α), M.RankFinite ∨ M.RankInfinite

theorem Matroid.not_rankFinite_iff E0 #

∀ {α : Type u_1} (M : Matroid α), ¬M.RankFinite ↔ M.RankInfinite

theorem Matroid.not_rankInfinite_iff E0 #

∀ {α : Type u_1} (M : Matroid α), ¬M.RankInfinite ↔ M.RankFinite

theorem Matroid.IsBase.sdiff_finite_comm E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → ((B₁ \ B₂).Finite ↔ (B₂ \ B₁).Finite)

theorem Matroid.IsBase.sdiff_infinite_comm E1 #

∀ {α : Type u_1} {M : Matroid α} {B₁ B₂ : Set α}, M.IsBase B₁ → M.IsBase B₂ → ((B₁ \ B₂).Infinite ↔ (B₂ \ B₁).Infinite)

theorem Matroid.ext_isBase E1 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α}, M₁.E = M₂.E → (∀ ⦃B : Set α⦄, B ⊆ M₁.E → (M₁.IsBase B ↔ M₂.IsBase B)) → M₁ = M₂

theorem Matroid.ext_iff_isBase E1 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α}, M₁ = M₂ ↔ M₁.E = M₂.E ∧ ∀ ⦃B : Set α⦄, B ⊆ M₁.E → (M₁.IsBase B ↔ M₂.IsBase B)

theorem Matroid.isBase_compl_iff_maximal_disjoint_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α},
  autoParam (B ⊆ M.E) Matroid.isBase_compl_iff_maximal_disjoint_isBase._auto_1 →
    (M.IsBase (M.E \ B) ↔ Maximal (fun I ↦ I ⊆ M.E ∧ ∃ B, M.IsBase B ∧ Disjoint I B) B)

def Matroid.Dep E1 #

{α : Type u_1} → Matroid α → Set α → Prop

A subset of M.E is Dependent if it is not Independent .

theorem Matroid.indep_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I ↔ ∃ B, M.IsBase B ∧ I ⊆ B

theorem Matroid.setOfPred_indep_eq E0 #

∀ {α : Type u_1} (M : Matroid α), {I | M.Indep I} = ↑(lowerClosure {B | M.IsBase B})

theorem Matroid.Indep.exists_isBase_superset E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → ∃ B, M.IsBase B ∧ I ⊆ B

theorem Matroid.dep_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {D : Set α}, M.Dep D ↔ ¬M.Indep D ∧ D ⊆ M.E

theorem Matroid.setOfPred_dep_eq E0 #

∀ {α : Type u_1} (M : Matroid α), {D | M.Dep D} = {I | M.Indep I}ᶜ ∩ Set.Iic M.E

theorem Matroid.Indep.subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → I ⊆ M.E

theorem Matroid.Dep.subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {D : Set α}, M.Dep D → D ⊆ M.E

theorem Matroid.indep_or_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {X : Set α}, autoParam (X ⊆ M.E) Matroid.indep_or_dep._auto_1 → M.Indep X ∨ M.Dep X

theorem Matroid.Indep.not_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → ¬M.Dep I

theorem Matroid.Dep.not_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {D : Set α}, M.Dep D → ¬M.Indep D

theorem Matroid.dep_of_not_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {D : Set α},
  ¬M.Indep D → autoParam (D ⊆ M.E) Matroid.dep_of_not_indep._auto_1 → M.Dep D

theorem Matroid.indep_of_not_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α},
  ¬M.Dep I → autoParam (I ⊆ M.E) Matroid.indep_of_not_dep._auto_1 → M.Indep I

theorem Matroid.not_dep_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {X : Set α}, autoParam (X ⊆ M.E) Matroid.not_dep_iff._auto_1 → (¬M.Dep X ↔ M.Indep X)

theorem Matroid.not_indep_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {X : Set α}, autoParam (X ⊆ M.E) Matroid.not_indep_iff._auto_1 → (¬M.Indep X ↔ M.Dep X)

theorem Matroid.indep_iff_not_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I ↔ ¬M.Dep I ∧ I ⊆ M.E

theorem Matroid.Indep.subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I J : Set α}, M.Indep J → I ⊆ J → M.Indep I

theorem Matroid.Dep.superset E1 #

∀ {α : Type u_1} {M : Matroid α} {D X : Set α},
  M.Dep D → D ⊆ X → autoParam (X ⊆ M.E) Matroid.Dep.superset._auto_1 → M.Dep X

theorem Matroid.IsBase.indep E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → M.Indep B

theorem Matroid.empty_indep E0 #

∀ {α : Type u_1} (M : Matroid α), M.Indep ∅

theorem Matroid.Dep.nonempty E1 #

∀ {α : Type u_1} {M : Matroid α} {D : Set α}, M.Dep D → D.Nonempty

theorem Matroid.Indep.finite E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α} [M.RankFinite], M.Indep I → I.Finite

theorem Matroid.Indep.rankPos_of_nonempty E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → I.Nonempty → M.RankPos

theorem Matroid.Indep.inter_right E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → ∀ (X : Set α), M.Indep (I ∩ X)

theorem Matroid.Indep.inter_left E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → ∀ (X : Set α), M.Indep (X ∩ I)

theorem Matroid.Indep.sdiff E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → ∀ (X : Set α), M.Indep (I \ X)

theorem Matroid.isBase_iff_maximal_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B ↔ Maximal M.Indep B

theorem Matroid.Indep.isBase_of_maximal E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → (∀ ⦃J : Set α⦄, M.Indep J → I ⊆ J → I = J) → M.IsBase I

theorem Matroid.IsBase.dep_of_ssubset E1 #

∀ {α : Type u_1} {M : Matroid α} {B X : Set α},
  M.IsBase B → B ⊂ X → autoParam (X ⊆ M.E) Matroid.IsBase.dep_of_ssubset._auto_1 → M.Dep X

theorem Matroid.IsBase.dep_of_insert E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e : α},
  M.IsBase B → e ∉ B → autoParam (e ∈ M.E) Matroid.IsBase.dep_of_insert._auto_1 → M.Dep (insert e B)

theorem Matroid.IsBase.mem_of_insert_indep E0 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e : α}, M.IsBase B → M.Indep (insert e B) → e ∈ B

theorem Matroid.IsBase.exchange_isBase_of_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e f : α},
  M.IsBase B → f ∉ B → M.Indep (insert f (B \ {e})) → M.IsBase (insert f (B \ {e}))

theorem Matroid.IsBase.exchange_isBase_of_indep' E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e f : α},
  M.IsBase B → e ∈ B → f ∉ B → M.Indep (insert f B \ {e}) → M.IsBase (insert f B \ {e})

theorem Matroid.insert_isBase_of_insert_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α} {e f : α},
  e ∉ I → f ∉ I → M.IsBase (insert e I) → M.Indep (insert f I) → M.IsBase (insert f I)

theorem Matroid.IsBase.insert_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α} {e : α}, M.IsBase B → e ∈ M.E \ B → M.Dep (insert e B)

theorem Matroid.Indep.exists_insert_of_not_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B I : Set α}, M.Indep I → ¬M.IsBase I → M.IsBase B → ∃ e ∈ B \ I, M.Indep (insert e I)

theorem Matroid.Indep.exists_insert_of_not_maximal E1 #

∀ {α : Type u_1} (M : Matroid α) ⦃I B : Set α⦄,
  M.Indep I → ¬Maximal M.Indep I → Maximal M.Indep B → ∃ x ∈ B \ I, M.Indep (insert x I)

This is the same as Indep.exists_insert_of_not_isBase, but phrased so that it is defeq to the augmentation axiom for independent sets.

theorem Matroid.Indep.isBase_of_forall_insert E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.Indep B → (∀ e ∈ M.E \ B, ¬M.Indep (insert e B)) → M.IsBase B

theorem Matroid.ground_indep_iff_isBase E1 #

∀ {α : Type u_1} {M : Matroid α}, M.Indep M.E ↔ M.IsBase M.E

theorem Matroid.IsBase.exists_insert_of_ssubset E1 #

∀ {α : Type u_1} {M : Matroid α} {B B' I : Set α}, M.IsBase B → I ⊂ B → M.IsBase B' → ∃ e ∈ B' \ I, M.Indep (insert e I)

theorem Matroid.ext_indep_iff E0 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α}, M₁ = M₂ ↔ M₁.E = M₂.E ∧ ∀ ⦃I : Set α⦄, I ⊆ M₁.E → (M₁.Indep I ↔ M₂.Indep I)

theorem Matroid.ext_indep E1 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α}, M₁.E = M₂.E → (∀ ⦃I : Set α⦄, I ⊆ M₁.E → (M₁.Indep I ↔ M₂.Indep I)) → M₁ = M₂

theorem Matroid.ext_iff_indep E1 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α}, M₁ = M₂ ↔ M₁.E = M₂.E ∧ ∀ ⦃I : Set α⦄, I ⊆ M₁.E → (M₁.Indep I ↔ M₂.Indep I)

theorem Matroid.ext_isBase_indep E1 #

∀ {α : Type u_1} {M₁ M₂ : Matroid α},
  M₁.E = M₂.E → (∀ ⦃B : Set α⦄, M₁.IsBase B → M₂.Indep B) → (∀ ⦃B : Set α⦄, M₂.IsBase B → M₁.Indep B) → M₁ = M₂

If every base of M₁ is independent in M₂ and vice versa, then M₁ = M₂.

class Matroid.Finitary E1 #

{α : Type u_1} → Matroid α → Prop

A Finitary matroid is one where a set is independent if and only if it all its finite subsets are independent, or equivalently a matroid whose circuits are finite.

theorem Matroid.finitary_iff E0 #

∀ {α : Type u_1} (M : Matroid α), M.Finitary ↔ ∀ (I : Set α), (∀ J ⊆ I, J.Finite → M.Indep J) → M.Indep I

ctor Matroid.Finitary.mk E0 #

∀ {α : Type u_1} {M : Matroid α}, (∀ (I : Set α), (∀ J ⊆ I, J.Finite → M.Indep J) → M.Indep I) → M.Finitary

theorem Matroid.Finitary.indep_of_forall_finite E1 #

∀ {α : Type u_1} {M : Matroid α} [self : M.Finitary] (I : Set α), (∀ J ⊆ I, J.Finite → M.Indep J) → M.Indep I

I is independent if all its finite subsets are independent.

theorem Matroid.indep_of_forall_finite_subset_indep E1 #

∀ {α : Type u_1} {M : Matroid α} [M.Finitary] (I : Set α), (∀ J ⊆ I, J.Finite → M.Indep J) → M.Indep I

theorem Matroid.indep_iff_forall_finite_subset_indep E1 #

∀ {α : Type u_1} {I : Set α} {M : Matroid α} [M.Finitary], M.Indep I ↔ ∀ J ⊆ I, J.Finite → M.Indep J

instance Matroid.finitary_of_rankFinite E0 #

∀ {α : Type u_1} {M : Matroid α} [M.RankFinite], M.Finitary

theorem Matroid.existsMaximalSubsetProperty_indep E1 #

∀ {α : Type u_1} (M : Matroid α), ∀ X ⊆ M.E, Matroid.ExistsMaximalSubsetProperty M.Indep X

Matroids obey the maximality axiom

def Matroid.copy E1 #

{α : Type u_1} →
  (M : Matroid α) →
    (E : Set α) →
      (IsBase Indep : Set α → Prop) →
        E = M.E → (∀ (B : Set α), IsBase B ↔ M.IsBase B) → (∀ (I : Set α), Indep I ↔ M.Indep I) → Matroid α

create a copy of M : Matroid α with independence and base predicates and ground set defeq to supplied arguments that are provably equal to those of M.

theorem Matroid.copy_IsBase E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase Indep : Set α → Prop) (hE : E = M.E)
  (hB : ∀ (B : Set α), IsBase B ↔ M.IsBase B) (hI : ∀ (I : Set α), Indep I ↔ M.Indep I) (a : Set α),
  (M.copy E IsBase Indep hE hB hI).IsBase a = IsBase a

theorem Matroid.copy_E E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase Indep : Set α → Prop) (hE : E = M.E)
  (hB : ∀ (B : Set α), IsBase B ↔ M.IsBase B) (hI : ∀ (I : Set α), Indep I ↔ M.Indep I),
  (M.copy E IsBase Indep hE hB hI).E = E

theorem Matroid.copy_Indep E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase Indep : Set α → Prop) (hE : E = M.E)
  (hB : ∀ (B : Set α), IsBase B ↔ M.IsBase B) (hI : ∀ (I : Set α), Indep I ↔ M.Indep I) (a : Set α),
  (M.copy E IsBase Indep hE hB hI).Indep a = Indep a

def Matroid.copyIndep E1 #

{α : Type u_1} →
  (M : Matroid α) → (E : Set α) → (Indep : Set α → Prop) → E = M.E → (∀ (I : Set α), Indep I ↔ M.Indep I) → Matroid α

create a copy of M : Matroid α with an independence predicate and ground set defeq to supplied arguments that are provably equal to those of M.

theorem Matroid.copyIndep_IsBase E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (Indep : Set α → Prop) (hE : E = M.E)
  (h : ∀ (I : Set α), Indep I ↔ M.Indep I) (a : Set α), (M.copyIndep E Indep hE h).IsBase a = M.IsBase a

theorem Matroid.copyIndep_E E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (Indep : Set α → Prop) (hE : E = M.E)
  (h : ∀ (I : Set α), Indep I ↔ M.Indep I), (M.copyIndep E Indep hE h).E = E

theorem Matroid.copyIndep_Indep E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (Indep : Set α → Prop) (hE : E = M.E)
  (h : ∀ (I : Set α), Indep I ↔ M.Indep I) (a : Set α), (M.copyIndep E Indep hE h).Indep a = Indep a

def Matroid.copyBase E1 #

{α : Type u_1} →
  (M : Matroid α) → (E : Set α) → (IsBase : Set α → Prop) → E = M.E → (∀ (B : Set α), IsBase B ↔ M.IsBase B) → Matroid α

create a copy of M : Matroid α with a base predicate and ground set defeq to supplied arguments that are provably equal to those of M.

theorem Matroid.copyBase_E E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase : Set α → Prop) (hE : E = M.E)
  (h : ∀ (B : Set α), IsBase B ↔ M.IsBase B), (M.copyBase E IsBase hE h).E = E

theorem Matroid.copyBase_Indep E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase : Set α → Prop) (hE : E = M.E)
  (h : ∀ (B : Set α), IsBase B ↔ M.IsBase B) (a : Set α), (M.copyBase E IsBase hE h).Indep a = M.Indep a

theorem Matroid.copyBase_IsBase E0 #

∀ {α : Type u_1} (M : Matroid α) (E : Set α) (IsBase : Set α → Prop) (hE : E = M.E)
  (h : ∀ (B : Set α), IsBase B ↔ M.IsBase B) (a : Set α), (M.copyBase E IsBase hE h).IsBase a = IsBase a

def Matroid.IsBasis E1 #

{α : Type u_1} → Matroid α → Set α → Set α → Prop

A Basis for a set X ⊆ M.E is a maximal independent subset of X (Often in the literature, the word 'Basis' is used to refer to what we call a 'Base').

def Matroid.IsBasis' E1 #

{α : Type u_1} → Matroid α → Set α → Set α → Prop

Matroid.IsBasis' I X is the same as Matroid.IsBasis I X, without the requirement that X ⊆ M.E. This is convenient for some API building, especially when working with rank and closure.

theorem Matroid.IsBasis'.indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis' I X → M.Indep I

theorem Matroid.IsBasis.indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → M.Indep I

theorem Matroid.IsBasis.subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → I ⊆ X

theorem Matroid.IsBasis.isBasis' E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → M.IsBasis' I X

theorem Matroid.IsBasis'.isBasis E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  M.IsBasis' I X → autoParam (X ⊆ M.E) Matroid.IsBasis'.isBasis._auto_1 → M.IsBasis I X

theorem Matroid.IsBasis'.subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis' I X → I ⊆ X

theorem Matroid.IsBasis.subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → X ⊆ M.E

theorem Matroid.IsBasis.isBasis_inter_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → M.IsBasis I (X ∩ M.E)

theorem Matroid.IsBasis.left_subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → I ⊆ M.E

theorem Matroid.IsBasis.Finite E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → ∀ [M.RankFinite], I.Finite

theorem Matroid.isBasis_iff' E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  M.IsBasis I X ↔ (M.Indep I ∧ I ⊆ X ∧ ∀ ⦃J : Set α⦄, M.Indep J → I ⊆ J → J ⊆ X → I = J) ∧ X ⊆ M.E

theorem Matroid.isBasis_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  autoParam (X ⊆ M.E) Matroid.isBasis_iff._auto_1 →
    (M.IsBasis I X ↔ M.Indep I ∧ I ⊆ X ∧ ∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ X → I = J)

theorem Matroid.isBasis'_iff_isBasis_inter_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis' I X ↔ M.IsBasis I (X ∩ M.E)

theorem Matroid.isBasis'_iff_isBasis E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  autoParam (X ⊆ M.E) Matroid.isBasis'_iff_isBasis._auto_1 → (M.IsBasis' I X ↔ M.IsBasis I X)

theorem Matroid.isBasis_iff_isBasis'_subset_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X ↔ M.IsBasis' I X ∧ X ⊆ M.E

theorem Matroid.IsBasis'.isBasis_inter_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis' I X → M.IsBasis I (X ∩ M.E)

theorem Matroid.IsBasis'.insert_not_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α} {e : α}, M.IsBasis' I X → e ∈ X \ I → ¬M.Indep (insert e I)

theorem Matroid.isBasis_iff_maximal E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  autoParam (X ⊆ M.E) Matroid.isBasis_iff_maximal._auto_1 → (M.IsBasis I X ↔ Maximal (fun I ↦ M.Indep I ∧ I ⊆ X) I)

theorem Matroid.Indep.isBasis_of_maximal_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  M.Indep I →
    I ⊆ X →
      (∀ ⦃J : Set α⦄, M.Indep J → I ⊆ J → J ⊆ X → J ⊆ I) →
        autoParam (X ⊆ M.E) Matroid.Indep.isBasis_of_maximal_subset._auto_1 → M.IsBasis I X

theorem Matroid.IsBasis.isBasis_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X Y : Set α}, M.IsBasis I X → I ⊆ Y → Y ⊆ X → M.IsBasis I Y

theorem Matroid.isBasis_self_iff_indep E0 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.IsBasis I I ↔ M.Indep I

theorem Matroid.Indep.isBasis_self E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → M.IsBasis I I

theorem Matroid.isBasis_empty_iff E0 #

∀ {α : Type u_1} {I : Set α} (M : Matroid α), M.IsBasis I ∅ ↔ I = ∅

theorem Matroid.IsBasis.dep_of_ssubset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X Y : Set α}, M.IsBasis I X → I ⊂ Y → Y ⊆ X → M.Dep Y

theorem Matroid.IsBasis.insert_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α} {e : α}, M.IsBasis I X → e ∈ X \ I → M.Dep (insert e I)

theorem Matroid.IsBasis.mem_of_insert_indep E0 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α} {e : α}, M.IsBasis I X → e ∈ X → M.Indep (insert e I) → e ∈ I

theorem Matroid.IsBasis'.mem_of_insert_indep E0 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α} {e : α}, M.IsBasis' I X → e ∈ X → M.Indep (insert e I) → e ∈ I

theorem Matroid.IsBasis.not_isBasis_of_ssubset E1 #

∀ {α : Type u_1} {M : Matroid α} {I J X : Set α}, M.IsBasis I X → J ⊂ I → ¬M.IsBasis J X

theorem Matroid.Indep.subset_isBasis_of_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α},
  M.Indep I → I ⊆ X → autoParam (X ⊆ M.E) Matroid.Indep.subset_isBasis_of_subset._auto_1 → ∃ J, M.IsBasis J X ∧ I ⊆ J

theorem Matroid.Indep.subset_isBasis'_of_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.Indep I → I ⊆ X → ∃ J, M.IsBasis' J X ∧ I ⊆ J

theorem Matroid.exists_isBasis E1 #

∀ {α : Type u_1} (M : Matroid α) (X : Set α), autoParam (X ⊆ M.E) Matroid.exists_isBasis._auto_1 → ∃ I, M.IsBasis I X

theorem Matroid.exists_isBasis' E1 #

∀ {α : Type u_1} (M : Matroid α) (X : Set α), ∃ I, M.IsBasis' I X

theorem Matroid.exists_isBasis_subset_isBasis E1 #

∀ {α : Type u_1} {X Y : Set α} (M : Matroid α),
  X ⊆ Y →
    autoParam (Y ⊆ M.E) Matroid.exists_isBasis_subset_isBasis._auto_1 → ∃ I J, M.IsBasis I X ∧ M.IsBasis J Y ∧ I ⊆ J

theorem Matroid.IsBasis.exists_isBasis_inter_eq_of_superset E1 #

∀ {α : Type u_1} {M : Matroid α} {I X Y : Set α},
  M.IsBasis I X →
    X ⊆ Y →
      autoParam (Y ⊆ M.E) Matroid.IsBasis.exists_isBasis_inter_eq_of_superset._auto_1 → ∃ J, M.IsBasis J Y ∧ J ∩ X = I

theorem Matroid.exists_isBasis_union_inter_isBasis E1 #

∀ {α : Type u_1} (M : Matroid α) (X Y : Set α),
  autoParam (X ⊆ M.E) Matroid.exists_isBasis_union_inter_isBasis._auto_1 →
    autoParam (Y ⊆ M.E) Matroid.exists_isBasis_union_inter_isBasis._auto_3 →
      ∃ I, M.IsBasis I (X ∪ Y) ∧ M.IsBasis (I ∩ Y) Y

theorem Matroid.IsBasis.exists_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.IsBasis I X → ∃ B, M.IsBase B ∧ I = B ∩ X

theorem Matroid.isBasis_ground_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBasis B M.E ↔ M.IsBase B

theorem Matroid.IsBase.isBasis_ground E1 #

∀ {α : Type u_1} {M : Matroid α} {B : Set α}, M.IsBase B → M.IsBasis B M.E

theorem Matroid.Indep.isBasis_iff_forall_insert_dep E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.Indep I → I ⊆ X → (M.IsBasis I X ↔ ∀ e ∈ X \ I, M.Dep (insert e I))

theorem Matroid.Indep.isBasis_of_forall_insert E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α}, M.Indep I → I ⊆ X → (∀ e ∈ X \ I, M.Dep (insert e I)) → M.IsBasis I X

theorem Matroid.Indep.isBasis_insert_iff E0 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α} {e : α},
  M.Indep I → (M.IsBasis I (insert e I) ↔ M.Dep (insert e I) ∨ e ∈ I)

theorem Matroid.IsBasis.iUnion_isBasis_iUnion E1 #

∀ {α : Type u_1} {M : Matroid α} {ι : Type u_2} (X I : ι → Set α),
  (∀ (i : ι), M.IsBasis (I i) (X i)) → M.Indep (⋃ i, I i) → M.IsBasis (⋃ i, I i) (⋃ i, X i)

theorem Matroid.IsBasis.isBasis_iUnion E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α} {ι : Type u_2} [Nonempty ι] (X : ι → Set α),
  (∀ (i : ι), M.IsBasis I (X i)) → M.IsBasis I (⋃ i, X i)

theorem Matroid.IsBasis.isBasis_sUnion E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α} {Xs : Set (Set α)},
  Xs.Nonempty → (∀ X ∈ Xs, M.IsBasis I X) → M.IsBasis I (⋃₀ Xs)

theorem Matroid.Indep.isBasis_setOfPred_insert_isBasis E1 #

∀ {α : Type u_1} {M : Matroid α} {I : Set α}, M.Indep I → M.IsBasis I {x | M.IsBasis I (insert x I)}

theorem Matroid.IsBasis.union_isBasis_union E1 #

∀ {α : Type u_1} {M : Matroid α} {I J X Y : Set α},
  M.IsBasis I X → M.IsBasis J Y → M.Indep (I ∪ J) → M.IsBasis (I ∪ J) (X ∪ Y)

theorem Matroid.IsBasis.isBasis_union E1 #

∀ {α : Type u_1} {M : Matroid α} {I X Y : Set α}, M.IsBasis I X → M.IsBasis I Y → M.IsBasis I (X ∪ Y)

theorem Matroid.IsBasis.isBasis_union_of_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {I J X : Set α}, M.IsBasis I X → M.Indep J → I ⊆ J → M.IsBasis J (J ∪ X)

theorem Matroid.IsBasis.insert_isBasis_insert E1 #

∀ {α : Type u_1} {M : Matroid α} {I X : Set α} {e : α},
  M.IsBasis I X → M.Indep (insert e I) → M.IsBasis (insert e I) (insert e X)

theorem Matroid.IsBase.isBase_of_isBasis_superset E1 #

∀ {α : Type u_1} {M : Matroid α} {B I X : Set α}, M.IsBase B → B ⊆ X → M.IsBasis I X → M.IsBase I

theorem Matroid.Indep.exists_isBase_subset_union_isBase E1 #

∀ {α : Type u_1} {M : Matroid α} {B I : Set α}, M.Indep I → M.IsBase B → ∃ B', M.IsBase B' ∧ I ⊆ B' ∧ B' ⊆ I ∪ B

theorem Matroid.IsBasis.inter_eq_of_subset_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I J X : Set α}, M.IsBasis I X → I ⊆ J → M.Indep J → J ∩ X = I

theorem Matroid.IsBasis'.inter_eq_of_subset_indep E1 #

∀ {α : Type u_1} {M : Matroid α} {I J X : Set α}, M.IsBasis' I X → I ⊆ J → M.Indep J → J ∩ X = I

theorem Matroid.IsBase.isBasis_of_subset E1 #

∀ {α : Type u_1} {M : Matroid α} {B X : Set α},
  autoParam (X ⊆ M.E) Matroid.IsBase.isBasis_of_subset._auto_1 → M.IsBase B → B ⊆ X → M.IsBasis B X

theorem Matroid.exists_isBasis_disjoint_isBasis_of_subset E1 #

∀ {α : Type u_1} (M : Matroid α) {X Y : Set α},
  X ⊆ Y →
    autoParam (Y ⊆ M.E) Matroid.exists_isBasis_disjoint_isBasis_of_subset._auto_1 →
      ∃ I J, M.IsBasis I X ∧ M.IsBasis (I ∪ J) Y ∧ Disjoint X J

theorem Matroid.finite_setOfPred_matroid E1 #

∀ {α : Type u_1} {E : Set α}, E.Finite → {M | M.E ⊆ E}.Finite

For finite E, finitely many matroids have ground set contained in E.

theorem Matroid.finite_setOfPred_matroid' E1 #

∀ {α : Type u_1} {E : Set α}, E.Finite → {M | M.E = E}.Finite

For finite E, finitely many matroids have ground set E.

Deprecated aliases

NameNew nameSince
Matroid.ExchangeProperty.encard_diff_eqMatroid.ExchangeProperty.encard_sdiff_eq2026-06-03
Matroid.ExchangeProperty.encard_diff_le_auxMatroid.ExchangeProperty.encard_sdiff_le_aux2026-06-03
Matroid.Indep.diffMatroid.Indep.sdiff2026-06-03
Matroid.Indep.isBasis_setOf_insert_isBasisMatroid.Indep.isBasis_setOfPred_insert_isBasis2026-07-09
Matroid.IsBase.diff_finite_commMatroid.IsBase.sdiff_finite_comm2026-06-03
Matroid.IsBase.diff_infinite_commMatroid.IsBase.sdiff_infinite_comm2026-06-03
Matroid.IsBase.encard_diff_commMatroid.IsBase.encard_sdiff_comm2026-06-03
Matroid.IsBase.ncard_diff_commMatroid.IsBase.ncard_sdiff_comm2026-06-03
Matroid.diff_subset_ground_private.Mathlib.Combinatorics.Matroid.Basic.0.Matroid.sdiff_subset_ground2026-06-03
Matroid.finite_setOf_matroidMatroid.finite_setOfPred_matroid2026-07-09
Matroid.finite_setOf_matroid'Matroid.finite_setOfPred_matroid'2026-07-09
Matroid.ground_diff_subset_ground_private.Mathlib.Combinatorics.Matroid.Basic.0.Matroid.ground_sdiff_subset_ground2026-06-03
Matroid.setOf_dep_eqMatroid.setOfPred_dep_eq2026-07-09
Matroid.setOf_indep_eqMatroid.setOfPred_indep_eq2026-07-09