Documentation

Mathlib.Data.Matroid.Closure

Matroid Closure #

A IsFlat of a matroid M is a combinatorial analogue of a subspace of a vector space, and is defined to be a subset F of the ground set of M such that for each isBasis I for M, every set having I as a isBasis is contained in F.

The closure of a set X in a matroid M is the intersection of all flats of M containing X. This is a combinatorial analogue of the linear span of a set of vectors.

For M : Matroid α, this file defines a predicate M.IsFlat : Set α → Prop and a function M.closure : Set α → Set α corresponding to these notions, and develops API for the latter. API for Matroid.IsFlat will appear in another file; we include the definition here since it is used in the definition of Matroid.closure.

We also define a predicate Spanning, to describe a set whose closure is the entire ground set.

Main definitions #

Implementation details #

If X : Set α satisfies X ⊆ M.E, then it is clear how M.closure X should be defined. But M.closure X also needs to be defined for all X : Set α, so a convention is needed for how it handles sets containing junk elements outside M.E. All such choices come with tradeoffs. Provided that M.closure X has already been defined for X ⊆ M.E, the two best candidates for extending it to all X seem to be:

(1) The function for which M.closure X = M.closure (X ∩ M.E) for all X : Set α

(2) The function for which M.closure X = M.closure (X ∩ M.E) ∪ X for all X : Set α

For both options, the function closure is monotone and idempotent with no assumptions on X.

Choice (1) has the advantage that M.closure X ⊆ M.E holds for all X without the assumption that X ⊆ M.E, which is very nice for aesop_mat. It is also fairly convenient to rewrite M.closure X to M.closure (X ∩ M.E) when one needs to work with a subset of the ground set. Its disadvantage is that the statement X ⊆ M.closure X is only true provided that X ⊆ M.E.

Choice (2) has the reverse property: we would have X ⊆ M.closure X for all X, but the condition M.closure X ⊆ M.E requires X ⊆ M.E to hold. It has a couple of other advantages too: it is actually the closure function of a matroid on α with ground set univ (specifically, the direct sum of M and a free matroid on M.Eᶜ), and because of this, it is an example of a ClosureOperator on α, which in turn gives access to nice existing API for both ClosureOperator and GaloisInsertion. This also relates to flats; F ⊆ M.E ∧ ClosureOperator.IsClosed F is equivalent to M.IsFlat F. (All of this fails for choice (1), since X ⊆ M.closure X is required for a ClosureOperator, but isn't true for non-subsets of M.E)

The API that choice (2) would offer is very beguiling, but after extensive experimentation in an external repo, it seems that (1) is far less rough around the edges in practice, so we go with (1). It may be helpful at some point to define a primed version Matroid.closure' : ClosureOperator (Set α) corresponding to choice (2). Failing that, the ClosureOperator/GaloisInsertion API is still available on the subtype ↑(Iic M.E) via Matroid.SubtypeClosure, albeit less elegantly.

Naming conventions #

In lemma names, the words spanning and isFlat are used as suffixes, for instance we have ground_spanning rather than spanning_ground.

structure Matroid.IsFlat {α : Type u_2} (M : Matroid α) (F : Set α) :

A flat is a maximal set having a given basis

Instances For
    theorem Matroid.isFlat_iff {α : Type u_2} (M : Matroid α) (F : Set α) :
    M.IsFlat F (∀ ⦃I X : Set α⦄, M.IsBasis I FM.IsBasis I XX F) F M.E
    @[deprecated Matroid.IsFlat (since := "2025-02-14")]
    def Matroid.Flat {α : Type u_2} (M : Matroid α) (F : Set α) :

    Alias of Matroid.IsFlat.


    A flat is a maximal set having a given basis

    Equations
    Instances For
      @[simp]
      theorem Matroid.ground_isFlat {α : Type u_2} (M : Matroid α) :
      M.IsFlat M.E
      theorem Matroid.IsFlat.iInter {α : Type u_2} {M : Matroid α} {ι : Type u_3} [Nonempty ι] {Fs : ιSet α} (hFs : ∀ (i : ι), M.IsFlat (Fs i)) :
      M.IsFlat (⋂ (i : ι), Fs i)

      The property of being a flat gives rise to a ClosureOperator on the subsets of M.E, in which the IsClosed sets correspond to flats. (We can't define such an operator on all of Set α, since this would incorrectly force univ to always be a flat.)

      Equations
      Instances For
        theorem Matroid.isFlat_iff_isClosed {α : Type u_2} {M : Matroid α} {F : Set α} :
        M.IsFlat F ∃ (h : F M.E), M.subtypeClosure.IsClosed F, h
        theorem Matroid.isClosed_iff_isFlat {α : Type u_2} {M : Matroid α} {F : (Set.Iic M.E)} :
        def Matroid.closure {α : Type u_2} (M : Matroid α) (X : Set α) :
        Set α

        The closure of X ⊆ M.E is the intersection of all the flats of M containing X. A set X that doesn't satisfy X ⊆ M.E has the junk value M.closure X := M.closure (X ∩ M.E).

        Equations
        Instances For
          theorem Matroid.closure_def {α : Type u_2} (M : Matroid α) (X : Set α) :
          M.closure X = ⋂₀ {F : Set α | M.IsFlat F X M.E F}
          theorem Matroid.closure_def' {α : Type u_2} (M : Matroid α) (X : Set α) (hX : X M.E := by aesop_mat) :
          M.closure X = ⋂₀ {F : Set α | M.IsFlat F X F}
          theorem Matroid.closure_eq_subtypeClosure {α : Type u_2} (M : Matroid α) (X : Set α) :
          M.closure X = (M.subtypeClosure X M.E, )
          theorem Matroid.closure_subset_ground {α : Type u_2} (M : Matroid α) (X : Set α) :
          M.closure X M.E
          @[simp]
          theorem Matroid.ground_subset_closure_iff {α : Type u_2} {M : Matroid α} {X : Set α} :
          M.E M.closure X M.closure X = M.E
          @[simp]
          theorem Matroid.closure_inter_ground {α : Type u_2} (M : Matroid α) (X : Set α) :
          M.closure (X M.E) = M.closure X
          theorem Matroid.inter_ground_subset_closure {α : Type u_2} (M : Matroid α) (X : Set α) :
          X M.E M.closure X
          theorem Matroid.mem_closure_iff_forall_mem_isFlat {α : Type u_2} {M : Matroid α} {e : α} (X : Set α) (hX : X M.E := by aesop_mat) :
          e M.closure X ∀ (F : Set α), M.IsFlat FX Fe F
          theorem Matroid.subset_closure_iff_forall_subset_isFlat {α : Type u_2} {M : Matroid α} {Y : Set α} (X : Set α) (hX : X M.E := by aesop_mat) :
          Y M.closure X ∀ (F : Set α), M.IsFlat FX FY F
          theorem Matroid.subset_closure {α : Type u_2} (M : Matroid α) (X : Set α) (hX : X M.E := by aesop_mat) :
          X M.closure X
          theorem Matroid.IsFlat.closure {α : Type u_2} {M : Matroid α} {F : Set α} (hF : M.IsFlat F) :
          M.closure F = F
          @[simp]
          theorem Matroid.isFlat_closure {α : Type u_2} {M : Matroid α} (X : Set α) :
          M.IsFlat (M.closure X)
          theorem Matroid.isFlat_iff_closure_eq {α : Type u_2} {M : Matroid α} {F : Set α} :
          M.IsFlat F M.closure F = F
          @[simp]
          theorem Matroid.closure_ground {α : Type u_2} (M : Matroid α) :
          M.closure M.E = M.E
          @[simp]
          theorem Matroid.closure_univ {α : Type u_2} (M : Matroid α) :
          theorem Matroid.closure_subset_closure {α : Type u_2} {X Y : Set α} (M : Matroid α) (h : X Y) :
          theorem Matroid.closure_mono {α : Type u_2} (M : Matroid α) :
          @[simp]
          theorem Matroid.closure_closure {α : Type u_2} (M : Matroid α) (X : Set α) :
          M.closure (M.closure X) = M.closure X
          theorem Matroid.closure_subset_closure_of_subset_closure {α : Type u_2} {M : Matroid α} {X Y : Set α} (hXY : X M.closure Y) :
          theorem Matroid.closure_subset_closure_iff_subset_closure {α : Type u_2} {M : Matroid α} {X Y : Set α} (hX : X M.E := by aesop_mat) :
          theorem Matroid.subset_closure_of_subset {α : Type u_2} {X Y : Set α} (M : Matroid α) (hXY : X Y) (hY : Y M.E := by aesop_mat) :
          X M.closure Y
          theorem Matroid.subset_closure_of_subset' {α : Type u_2} {X Y : Set α} (M : Matroid α) (hXY : X Y) (hX : X M.E := by aesop_mat) :
          X M.closure Y
          theorem Matroid.exists_of_closure_ssubset {α : Type u_2} {M : Matroid α} {X Y : Set α} (hXY : M.closure X M.closure Y) :
          eY, eM.closure X
          theorem Matroid.mem_closure_of_mem {α : Type u_2} {X : Set α} {e : α} (M : Matroid α) (h : e X) (hX : X M.E := by aesop_mat) :
          e M.closure X
          theorem Matroid.mem_closure_of_mem' {α : Type u_2} {X : Set α} {e : α} (M : Matroid α) (heX : e X) (h : e M.E := by aesop_mat) :
          e M.closure X
          theorem Matroid.not_mem_of_mem_diff_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} (he : e M.E \ M.closure X) :
          eX
          theorem Matroid.mem_ground_of_mem_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} (he : e M.closure X) :
          e M.E
          theorem Matroid.closure_iUnion_closure_eq_closure_iUnion {ι : Type u_1} {α : Type u_2} (M : Matroid α) (Xs : ιSet α) :
          M.closure (⋃ (i : ι), M.closure (Xs i)) = M.closure (⋃ (i : ι), Xs i)
          theorem Matroid.closure_iUnion_congr {ι : Type u_1} {α : Type u_2} {M : Matroid α} (Xs Ys : ιSet α) (h : ∀ (i : ι), M.closure (Xs i) = M.closure (Ys i)) :
          M.closure (⋃ (i : ι), Xs i) = M.closure (⋃ (i : ι), Ys i)
          theorem Matroid.closure_biUnion_closure_eq_closure_sUnion {α : Type u_2} (M : Matroid α) (Xs : Set (Set α)) :
          M.closure (⋃ XXs, M.closure X) = M.closure (⋃₀ Xs)
          theorem Matroid.closure_biUnion_closure_eq_closure_biUnion {ι : Type u_1} {α : Type u_2} (M : Matroid α) (Xs : ιSet α) (A : Set ι) :
          M.closure (⋃ iA, M.closure (Xs i)) = M.closure (⋃ iA, Xs i)
          theorem Matroid.closure_biUnion_congr {ι : Type u_1} {α : Type u_2} (M : Matroid α) (Xs Ys : ιSet α) (A : Set ι) (h : iA, M.closure (Xs i) = M.closure (Ys i)) :
          M.closure (⋃ iA, Xs i) = M.closure (⋃ iA, Ys i)
          @[simp]
          theorem Matroid.closure_union_closure_right_eq {α : Type u_2} (M : Matroid α) (X Y : Set α) :
          M.closure (X M.closure Y) = M.closure (X Y)
          @[simp]
          theorem Matroid.closure_union_closure_left_eq {α : Type u_2} (M : Matroid α) (X Y : Set α) :
          M.closure (M.closure X Y) = M.closure (X Y)
          @[simp]
          theorem Matroid.closure_insert_closure_eq_closure_insert {α : Type u_2} (M : Matroid α) (e : α) (X : Set α) :
          M.closure (insert e (M.closure X)) = M.closure (insert e X)
          theorem Matroid.closure_union_congr_left {α : Type u_2} {M : Matroid α} {X Y X' : Set α} (h : M.closure X = M.closure X') :
          M.closure (X Y) = M.closure (X' Y)
          theorem Matroid.closure_union_congr_right {α : Type u_2} {M : Matroid α} {X Y Y' : Set α} (h : M.closure Y = M.closure Y') :
          M.closure (X Y) = M.closure (X Y')
          theorem Matroid.closure_insert_congr_right {α : Type u_2} {M : Matroid α} {X Y : Set α} {e : α} (h : M.closure X = M.closure Y) :
          M.closure (insert e X) = M.closure (insert e Y)
          @[simp]
          theorem Matroid.closure_union_closure_empty_eq {α : Type u_2} (M : Matroid α) (X : Set α) :
          @[simp]
          theorem Matroid.closure_empty_union_closure_eq {α : Type u_2} (M : Matroid α) (X : Set α) :
          theorem Matroid.closure_insert_eq_of_mem_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} (he : e M.closure X) :
          M.closure (insert e X) = M.closure X
          theorem Matroid.mem_closure_self {α : Type u_2} (M : Matroid α) (e : α) (he : e M.E := by aesop_mat) :
          theorem Matroid.Indep.closure_eq_setOf_isBasis_insert {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Indep I) :
          M.closure I = {x : α | M.IsBasis I (insert x I)}
          theorem Matroid.Indep.insert_isBasis_iff_mem_closure {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) :
          M.IsBasis I (insert e I) e M.closure I
          theorem Matroid.Indep.isBasis_closure {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Indep I) :
          M.IsBasis I (M.closure I)
          theorem Matroid.IsBasis.closure_eq_closure {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis I X) :
          M.closure I = M.closure X
          theorem Matroid.IsBasis.closure_eq_right {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis I (M.closure X)) :
          M.closure I = M.closure X
          theorem Matroid.IsBasis'.closure_eq_closure {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis' I X) :
          M.closure I = M.closure X
          theorem Matroid.IsBasis.subset_closure {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis I X) :
          X M.closure I
          theorem Matroid.IsBasis'.isBasis_closure_right {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis' I X) :
          M.IsBasis I (M.closure X)
          theorem Matroid.IsBasis.isBasis_closure_right {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis I X) :
          M.IsBasis I (M.closure X)
          theorem Matroid.Indep.mem_closure_iff {α : Type u_2} {M : Matroid α} {I : Set α} {x : α} (hI : M.Indep I) :
          x M.closure I M.Dep (insert x I) x I
          theorem Matroid.Indep.mem_closure_iff' {α : Type u_2} {M : Matroid α} {I : Set α} {x : α} (hI : M.Indep I) :
          x M.closure I x M.E (M.Indep (insert x I)x I)
          theorem Matroid.Indep.insert_dep_iff {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) :
          M.Dep (insert e I) e M.closure I \ I
          theorem Matroid.Indep.mem_closure_iff_of_not_mem {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (heI : eI) :
          e M.closure I M.Dep (insert e I)
          theorem Matroid.Indep.not_mem_closure_iff {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (he : e M.E := by aesop_mat) :
          eM.closure I M.Indep (insert e I) eI
          theorem Matroid.Indep.not_mem_closure_iff_of_not_mem {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (heI : eI) (he : e M.E := by aesop_mat) :
          eM.closure I M.Indep (insert e I)
          theorem Matroid.Indep.insert_indep_iff_of_not_mem {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (heI : eI) :
          M.Indep (insert e I) e M.E \ M.closure I
          theorem Matroid.Indep.insert_indep_iff {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) :
          M.Indep (insert e I) e M.E \ M.closure I e I
          theorem Matroid.insert_indep_iff {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} :
          M.Indep (insert e I) M.Indep I (eIe M.E \ M.closure I)
          theorem Matroid.Indep.insert_diff_indep_iff {α : Type u_2} {M : Matroid α} {e f : α} {I : Set α} (hI : M.Indep (I \ {e})) (heI : e I) :
          M.Indep (insert f I \ {e}) f M.E \ M.closure (I \ {e}) f I

          This can be used for rewriting if the LHS is inside a binder and it is unknown whether f = e.

          theorem Matroid.Indep.isBasis_of_subset_of_subset_closure {α : Type u_2} {M : Matroid α} {X I : Set α} (hI : M.Indep I) (hIX : I X) (hXI : X M.closure I) :
          M.IsBasis I X
          theorem Matroid.isBasis_iff_indep_subset_closure {α : Type u_2} {M : Matroid α} {X I : Set α} :
          M.IsBasis I X M.Indep I I X X M.closure I
          theorem Matroid.Indep.isBase_of_ground_subset_closure {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Indep I) (h : M.E M.closure I) :
          M.IsBase I
          theorem Matroid.IsBase.closure_eq {α : Type u_2} {M : Matroid α} {B : Set α} (hB : M.IsBase B) :
          M.closure B = M.E
          theorem Matroid.IsBase.closure_of_superset {α : Type u_2} {M : Matroid α} {X B : Set α} (hB : M.IsBase B) (hBX : B X) :
          M.closure X = M.E
          theorem Matroid.isBase_iff_indep_closure_eq {α : Type u_2} {M : Matroid α} {B : Set α} :
          M.IsBase B M.Indep B M.closure B = M.E
          theorem Matroid.Indep.isBase_iff_ground_subset_closure {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Indep I) :
          M.IsBase I M.E M.closure I
          theorem Matroid.Indep.closure_inter_eq_self_of_subset {α : Type u_2} {M : Matroid α} {I J : Set α} (hI : M.Indep I) (hJI : J I) :
          M.closure J I = J
          theorem Matroid.Indep.closure_sInter_eq_biInter_closure_of_forall_subset {α : Type u_2} {M : Matroid α} {I : Set α} {Js : Set (Set α)} (hI : M.Indep I) (hne : Js.Nonempty) (hIs : JJs, J I) :
          M.closure (⋂₀ Js) = JJs, M.closure J

          For a nonempty collection of subsets of a given independent set, the closure of the intersection is the intersection of the closure.

          theorem Matroid.closure_iInter_eq_iInter_closure_of_iUnion_indep {α : Type u_2} {M : Matroid α} {ι : Sort u_3} [hι : Nonempty ι] (Is : ιSet α) (h : M.Indep (⋃ (i : ι), Is i)) :
          M.closure (⋂ (i : ι), Is i) = ⋂ (i : ι), M.closure (Is i)
          theorem Matroid.closure_sInter_eq_biInter_closure_of_sUnion_indep {α : Type u_2} {M : Matroid α} (Is : Set (Set α)) (hIs : Is.Nonempty) (h : M.Indep (⋃₀ Is)) :
          M.closure (⋂₀ Is) = IIs, M.closure I
          theorem Matroid.closure_biInter_eq_biInter_closure_of_biUnion_indep {α : Type u_2} {M : Matroid α} {ι : Type u_4} {A : Set ι} (hA : A.Nonempty) {I : ιSet α} (h : M.Indep (⋃ iA, I i)) :
          M.closure (⋂ iA, I i) = iA, M.closure (I i)
          theorem Matroid.Indep.closure_iInter_eq_biInter_closure_of_forall_subset {α : Type u_2} {M : Matroid α} {ι : Sort u_3} {I : Set α} [Nonempty ι] {Js : ιSet α} (hI : M.Indep I) (hJs : ∀ (i : ι), Js i I) :
          M.closure (⋂ (i : ι), Js i) = ⋂ (i : ι), M.closure (Js i)
          theorem Matroid.Indep.closure_inter_eq_inter_closure {α : Type u_2} {M : Matroid α} {I J : Set α} (h : M.Indep (I J)) :
          M.closure (I J) = M.closure I M.closure J
          theorem Matroid.Indep.inter_isBasis_biInter {α : Type u_2} {M : Matroid α} {I : Set α} {ι : Type u_4} (hI : M.Indep I) {X : ιSet α} {A : Set ι} (hA : A.Nonempty) (h : iA, M.IsBasis (X i I) (X i)) :
          M.IsBasis ((⋂ iA, X i) I) (⋂ iA, X i)
          theorem Matroid.Indep.inter_isBasis_iInter {α : Type u_2} {M : Matroid α} {ι : Sort u_3} {I : Set α} [Nonempty ι] {X : ιSet α} (hI : M.Indep I) (h : ∀ (i : ι), M.IsBasis (X i I) (X i)) :
          M.IsBasis ((⋂ (i : ι), X i) I) (⋂ (i : ι), X i)
          theorem Matroid.Indep.inter_isBasis_sInter {α : Type u_2} {M : Matroid α} {I : Set α} {Xs : Set (Set α)} (hI : M.Indep I) (hXs : Xs.Nonempty) (h : XXs, M.IsBasis (X I) X) :
          M.IsBasis (⋂₀ Xs I) (⋂₀ Xs)
          theorem Matroid.isBasis_iff_isBasis_closure_of_subset {α : Type u_2} {M : Matroid α} {X I : Set α} (hIX : I X) (hX : X M.E := by aesop_mat) :
          M.IsBasis I X M.IsBasis I (M.closure X)
          theorem Matroid.isBasis_iff_isBasis_closure_of_subset' {α : Type u_2} {M : Matroid α} {X I : Set α} (hIX : I X) :
          M.IsBasis I X M.IsBasis I (M.closure X) X M.E
          theorem Matroid.isBasis'_iff_isBasis_closure {α : Type u_2} {M : Matroid α} {X I : Set α} :
          M.IsBasis' I X M.IsBasis I (M.closure X) I X
          theorem Matroid.exists_isBasis_inter_ground_isBasis_closure {α : Type u_2} (M : Matroid α) (X : Set α) :
          ∃ (I : Set α), M.IsBasis I (X M.E) M.IsBasis I (M.closure X)
          theorem Matroid.IsBasis.isBasis_of_closure_eq_closure {α : Type u_2} {M : Matroid α} {X Y I : Set α} (hI : M.IsBasis I X) (hY : I Y) (h : M.closure X = M.closure Y) (hYE : Y M.E := by aesop_mat) :
          M.IsBasis I Y
          theorem Matroid.isBasis_union_iff_indep_closure {α : Type u_2} {M : Matroid α} {X I : Set α} :
          M.IsBasis I (I X) M.Indep I X M.closure I
          theorem Matroid.isBasis_iff_indep_closure {α : Type u_2} {M : Matroid α} {X I : Set α} :
          M.IsBasis I X M.Indep I X M.closure I I X
          theorem Matroid.Indep.inter_isBasis_closure_iff_subset_closure_inter {α : Type u_2} {M : Matroid α} {I X : Set α} (hI : M.Indep I) :
          M.IsBasis (X I) X X M.closure (X I)
          theorem Matroid.IsBasis.closure_inter_isBasis_closure {α : Type u_2} {M : Matroid α} {X I : Set α} (h : M.IsBasis (X I) X) (hI : M.Indep I) :
          M.IsBasis (M.closure X I) (M.closure X)
          theorem Matroid.IsBasis.eq_of_closure_subset {α : Type u_2} {M : Matroid α} {X I J : Set α} (hI : M.IsBasis I X) (hJI : J I) (hJ : X M.closure J) :
          J = I
          theorem Matroid.IsBasis.insert_isBasis_insert_of_not_mem_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} {I : Set α} (hIX : M.IsBasis I X) (heI : eM.closure I) (heE : e M.E := by aesop_mat) :
          M.IsBasis (insert e I) (insert e X)
          @[simp]
          theorem Matroid.empty_isBasis_iff {α : Type u_2} {M : Matroid α} {X : Set α} :
          theorem Matroid.indep_iff_forall_not_mem_closure_diff {α : Type u_2} {M : Matroid α} {I : Set α} (hI : I M.E := by aesop_mat) :
          M.Indep I ∀ ⦃e : α⦄, e IeM.closure (I \ {e})
          theorem Matroid.indep_iff_forall_not_mem_closure_diff' {α : Type u_2} {M : Matroid α} {I : Set α} :
          M.Indep I I M.E eI, eM.closure (I \ {e})

          An alternative version of Matroid.indep_iff_forall_not_mem_closure_diff where the hypothesis that I ⊆ M.E is contained in the RHS rather than the hypothesis.

          theorem Matroid.Indep.not_mem_closure_diff_of_mem {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (he : e I) :
          eM.closure (I \ {e})
          theorem Matroid.indep_iff_forall_closure_diff_ne {α : Type u_2} {M : Matroid α} {I : Set α} :
          M.Indep I ∀ ⦃e : α⦄, e IM.closure (I \ {e}) M.closure I
          theorem Matroid.Indep.union_indep_iff_forall_not_mem_closure_right {α : Type u_2} {M : Matroid α} {I J : Set α} (hI : M.Indep I) (hJ : M.Indep J) :
          M.Indep (I J) eJ \ I, eM.closure (I J \ {e})
          theorem Matroid.Indep.union_indep_iff_forall_not_mem_closure_left {α : Type u_2} {M : Matroid α} {I J : Set α} (hI : M.Indep I) (hJ : M.Indep J) :
          M.Indep (I J) eI \ J, eM.closure (I \ {e} J)
          theorem Matroid.Indep.closure_ssubset_closure {α : Type u_2} {M : Matroid α} {I J : Set α} (hI : M.Indep I) (hJI : J I) :
          theorem Matroid.indep_iff_forall_closure_ssubset_of_ssubset {α : Type u_2} {M : Matroid α} {I : Set α} (hI : I M.E := by aesop_mat) :
          M.Indep I ∀ ⦃J : Set α⦄, J IM.closure J M.closure I
          theorem Matroid.Indep.closure_diff_ssubset {α : Type u_2} {M : Matroid α} {X I : Set α} (hI : M.Indep I) (hX : (I X).Nonempty) :
          M.closure (I \ X) M.closure I
          theorem Matroid.Indep.closure_diff_singleton_ssubset {α : Type u_2} {M : Matroid α} {e : α} {I : Set α} (hI : M.Indep I) (he : e I) :
          M.closure (I \ {e}) M.closure I
          theorem Matroid.mem_closure_insert {α : Type u_2} {M : Matroid α} {X : Set α} {e f : α} (he : eM.closure X) (hef : e M.closure (insert f X)) :
          f M.closure (insert e X)
          theorem Matroid.closure_exchange {α : Type u_2} {M : Matroid α} {X : Set α} {e f : α} (he : e M.closure (insert f X) \ M.closure X) :
          f M.closure (insert e X) \ M.closure X
          theorem Matroid.closure_exchange_iff {α : Type u_2} {M : Matroid α} {X : Set α} {e f : α} :
          e M.closure (insert f X) \ M.closure X f M.closure (insert e X) \ M.closure X
          theorem Matroid.closure_insert_congr {α : Type u_2} {M : Matroid α} {X : Set α} {e f : α} (he : e M.closure (insert f X) \ M.closure X) :
          M.closure (insert e X) = M.closure (insert f X)
          theorem Matroid.closure_diff_eq_self {α : Type u_2} {M : Matroid α} {X Y : Set α} (h : Y M.closure (X \ Y)) :
          M.closure (X \ Y) = M.closure X
          theorem Matroid.closure_diff_singleton_eq_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} (h : e M.closure (X \ {e})) :
          M.closure (X \ {e}) = M.closure X
          theorem Matroid.subset_closure_diff_iff_closure_eq {α : Type u_2} {M : Matroid α} {X Y : Set α} (h : Y X) (hY : Y M.E := by aesop_mat) :
          Y M.closure (X \ Y) M.closure (X \ Y) = M.closure X
          theorem Matroid.mem_closure_diff_singleton_iff_closure {α : Type u_2} {M : Matroid α} {X : Set α} {e : α} (he : e X) (heE : e M.E := by aesop_mat) :
          e M.closure (X \ {e}) M.closure (X \ {e}) = M.closure X
          theorem Matroid.ext_closure {α : Type u_2} {M₁ M₂ : Matroid α} (h : ∀ (X : Set α), M₁.closure X = M₂.closure X) :
          M₁ = M₂
          structure Matroid.Spanning {α : Type u_2} (M : Matroid α) (S : Set α) :

          A set is spanning in M if its closure is equal to M.E, or equivalently if it contains a base of M.

          Instances For
            theorem Matroid.spanning_iff {α : Type u_2} (M : Matroid α) (S : Set α) :
            M.Spanning S M.closure S = M.E S M.E
            theorem Matroid.spanning_iff_closure_eq {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            M.Spanning S M.closure S = M.E
            @[simp]
            theorem Matroid.closure_spanning_iff {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            theorem Matroid.spanning_iff_ground_subset_closure {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            theorem Matroid.not_spanning_iff_closure_ssubset {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            theorem Matroid.Spanning.superset {α : Type u_2} {M : Matroid α} {S T : Set α} (hS : M.Spanning S) (hST : S T) (hT : T M.E := by aesop_mat) :
            theorem Matroid.Spanning.closure_eq_of_superset {α : Type u_2} {M : Matroid α} {S T : Set α} (hS : M.Spanning S) (hST : S T) :
            M.closure T = M.E
            theorem Matroid.Spanning.union_left {α : Type u_2} {M : Matroid α} {X S : Set α} (hS : M.Spanning S) (hX : X M.E := by aesop_mat) :
            M.Spanning (S X)
            theorem Matroid.Spanning.union_right {α : Type u_2} {M : Matroid α} {X S : Set α} (hS : M.Spanning S) (hX : X M.E := by aesop_mat) :
            M.Spanning (X S)
            theorem Matroid.IsBase.spanning {α : Type u_2} {M : Matroid α} {B : Set α} (hB : M.IsBase B) :
            theorem Matroid.ground_spanning {α : Type u_2} (M : Matroid α) :
            theorem Matroid.IsBase.spanning_of_superset {α : Type u_2} {M : Matroid α} {X B : Set α} (hB : M.IsBase B) (hBX : B X) (hX : X M.E := by aesop_mat) :
            theorem Matroid.spanning_iff_exists_isBase_subset' {α : Type u_2} {M : Matroid α} {S : Set α} :
            M.Spanning S (∃ (B : Set α), M.IsBase B B S) S M.E

            A version of Matroid.spanning_iff_exists_isBase_subset in which the S ⊆ M.E condition appears in the RHS of the equivalence rather than as a hypothesis.

            theorem Matroid.spanning_iff_exists_isBase_subset {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            M.Spanning S ∃ (B : Set α), M.IsBase B B S
            theorem Matroid.Spanning.exists_isBase_subset {α : Type u_2} {M : Matroid α} {S : Set α} (hS : M.Spanning S) :
            ∃ (B : Set α), M.IsBase B B S
            theorem Matroid.coindep_iff_compl_spanning {α : Type u_2} {M : Matroid α} {I : Set α} (hI : I M.E := by aesop_mat) :
            M.Coindep I M.Spanning (M.E \ I)
            theorem Matroid.spanning_iff_compl_coindep {α : Type u_2} {M : Matroid α} {S : Set α} (hS : S M.E := by aesop_mat) :
            M.Spanning S M.Coindep (M.E \ S)
            theorem Matroid.Coindep.compl_spanning {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Coindep I) :
            M.Spanning (M.E \ I)
            theorem Matroid.coindep_iff_closure_compl_eq_ground {α : Type u_2} {M : Matroid α} {X : Set α} (hK : X M.E := by aesop_mat) :
            M.Coindep X M.closure (M.E \ X) = M.E
            theorem Matroid.Coindep.closure_compl {α : Type u_2} {M : Matroid α} {X : Set α} (hX : M.Coindep X) :
            M.closure (M.E \ X) = M.E
            theorem Matroid.Indep.isBase_of_spanning {α : Type u_2} {M : Matroid α} {I : Set α} (hI : M.Indep I) (hIs : M.Spanning I) :
            M.IsBase I
            theorem Matroid.Spanning.isBase_of_indep {α : Type u_2} {M : Matroid α} {I : Set α} (hIs : M.Spanning I) (hI : M.Indep I) :
            M.IsBase I
            theorem Matroid.Indep.eq_of_spanning_subset {α : Type u_2} {M : Matroid α} {S I : Set α} (hI : M.Indep I) (hS : M.Spanning S) (hSI : S I) :
            S = I
            theorem Matroid.IsBasis.spanning_iff_spanning {α : Type u_2} {M : Matroid α} {X I : Set α} (hIX : M.IsBasis I X) :
            theorem Matroid.Spanning.isBase_restrict_iff {α : Type u_2} {M : Matroid α} {S B : Set α} (hS : M.Spanning S) :
            (M.restrict S).IsBase B M.IsBase B B S
            theorem Matroid.Spanning.compl_coindep {α : Type u_2} {M : Matroid α} {S : Set α} (hS : M.Spanning S) :
            M.Coindep (M.E \ S)
            theorem Matroid.IsBasis.isBase_of_spanning {α : Type u_2} {M : Matroid α} {X I : Set α} (hIX : M.IsBasis I X) (hX : M.Spanning X) :
            M.IsBase I
            theorem Matroid.Indep.exists_isBase_subset_spanning {α : Type u_2} {M : Matroid α} {S I : Set α} (hI : M.Indep I) (hS : M.Spanning S) (hIS : I S) :
            ∃ (B : Set α), M.IsBase B I B B S
            theorem Matroid.Restriction.isBase_iff_of_spanning {α : Type u_2} {M : Matroid α} {B : Set α} {N : Matroid α} (hR : N.IsRestriction M) (hN : M.Spanning N.E) :
            N.IsBase B M.IsBase B B N.E
            theorem Matroid.ext_spanning {α : Type u_2} {M M' : Matroid α} (h : M.E = M'.E) (hsp : SM.E, M.Spanning S M'.Spanning S) :
            M = M'
            theorem Matroid.IsBase.eq_of_superset_spanning {α : Type u_2} {M : Matroid α} {X B : Set α} (hB : M.IsBase B) (hX : M.Spanning X) (hXB : X B) :
            B = X
            theorem Matroid.isBase_iff_minimal_spanning {α : Type u_2} {M : Matroid α} {B : Set α} :
            theorem Matroid.Spanning.isBase_of_minimal {α : Type u_2} {M : Matroid α} {X : Set α} (hX : M.Spanning X) (h : ∀ ⦃Y : Set α⦄, M.Spanning YY XX = Y) :
            M.IsBase X
            @[simp]
            theorem Matroid.restrict_closure_eq' {α : Type u_2} (M : Matroid α) (X R : Set α) :
            (M.restrict R).closure X = M.closure (X R) R R \ M.E
            theorem Matroid.restrict_closure_eq {α : Type u_2} {X R : Set α} (M : Matroid α) (hXR : X R) (hR : R M.E := by aesop_mat) :
            (M.restrict R).closure X = M.closure X R
            @[simp]
            theorem Matroid.emptyOn_closure_eq {α : Type u_2} (X : Set α) :
            @[simp]
            theorem Matroid.loopyOn_closure_eq {α : Type u_2} (E X : Set α) :
            (loopyOn E).closure X = E
            @[simp]
            theorem Matroid.loopyOn_spanning_iff {α : Type u_2} {X E : Set α} :
            @[simp]
            theorem Matroid.freeOn_closure_eq {α : Type u_2} (E X : Set α) :
            (freeOn E).closure X = X E
            @[simp]
            theorem Matroid.uniqueBaseOn_closure_eq {α : Type u_2} (I E X : Set α) :
            (uniqueBaseOn I E).closure X = X I E E \ I
            @[simp]
            theorem Matroid.comap_closure_eq {α : Type u_2} {β : Type u_3} (M : Matroid β) (f : αβ) (X : Set α) :
            (M.comap f).closure X = f ⁻¹' M.closure (f '' X)
            @[simp]
            theorem Matroid.map_closure_eq {α : Type u_2} {β : Type u_3} (M : Matroid α) (f : αβ) (hf : Set.InjOn f M.E) (X : Set β) :
            (M.map f hf).closure X = f '' M.closure (f ⁻¹' X)
            theorem Matroid.restrict_spanning_iff {α : Type u_2} {M : Matroid α} {R S : Set α} (hSR : S R) (hR : R M.E := by aesop_mat) :
            theorem Matroid.restrict_spanning_iff' {α : Type u_2} {M : Matroid α} {R S : Set α} :
            (M.restrict R).Spanning S R M.E M.closure S S R