Documentation

Mathlib.Data.Matroid.Circuit

Matroid IsCircuits #

A 'Circuit' of a matroid M is a minimal set C that is dependent in M. A matroid is determined by its set of circuits, and often the circuits offer a more compact description of a matroid than the collection of independent sets or bases. In matroids arising from graphs, circuits correspond to graphical cycles.

Main Declarations #

Implementation Details #

Since Matroid.fundCircuit M e I is only sensible if I is independent and e ∈ M.closure I \ I, to avoid hypotheses being explicitly included in the definition, junk values need to be chosen if either hypothesis fails. The definition is chosen so that the junk values satisfy M.fundCircuit e I = {e} for e ∈ I or e ∉ M.E and M.fundCircuit e I = insert e I if e ∈ M.E \ M.closure I. These make the useful statement e ∈ M.fundCircuit e I ⊆ insert e I true unconditionally.

def Matroid.IsCircuit {α : Type u_1} (M : Matroid α) (x : Set α) :

A Circuit of M is a minimal dependent set in M

Equations
Instances For
    @[deprecated Matroid.IsCircuit (since := "2025-02-14")]
    def Matroid.Circuit {α : Type u_1} (M : Matroid α) (x : Set α) :

    Alias of Matroid.IsCircuit.


    A Circuit of M is a minimal dependent set in M

    Equations
    Instances For
      theorem Matroid.isCircuit_def {α : Type u_1} {M : Matroid α} {C : Set α} :
      theorem Matroid.IsCircuit.dep {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      M.Dep C
      theorem Matroid.IsCircuit.not_indep {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      theorem Matroid.IsCircuit.minimal {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      theorem Matroid.IsCircuit.subset_ground {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      C M.E
      theorem Matroid.IsCircuit.nonempty {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      theorem Matroid.isCircuit_iff {α : Type u_1} {M : Matroid α} {C : Set α} :
      M.IsCircuit C M.Dep C ∀ ⦃D : Set α⦄, M.Dep DD CD = C
      theorem Matroid.IsCircuit.ssubset_indep {α : Type u_1} {M : Matroid α} {C X : Set α} (hC : M.IsCircuit C) (hXC : X C) :
      M.Indep X
      theorem Matroid.IsCircuit.minimal_not_indep {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
      Minimal (fun (x : Set α) => ¬M.Indep x) C
      theorem Matroid.isCircuit_iff_minimal_not_indep {α : Type u_1} {M : Matroid α} {C : Set α} (hCE : C M.E) :
      M.IsCircuit C Minimal (fun (x : Set α) => ¬M.Indep x) C
      theorem Matroid.IsCircuit.diff_singleton_indep {α : Type u_1} {M : Matroid α} {C : Set α} {e : α} (hC : M.IsCircuit C) (he : e C) :
      M.Indep (C \ {e})
      theorem Matroid.isCircuit_iff_forall_ssubset {α : Type u_1} {M : Matroid α} {C : Set α} :
      M.IsCircuit C M.Dep C ∀ ⦃I : Set α⦄, I CM.Indep I
      theorem Matroid.isCircuit_antichain {α : Type u_1} {M : Matroid α} :
      IsAntichain (fun (x1 x2 : Set α) => x1 x2) (setOf M.IsCircuit)
      theorem Matroid.IsCircuit.eq_of_not_indep_subset {α : Type u_1} {M : Matroid α} {C X : Set α} (hC : M.IsCircuit C) (hX : ¬M.Indep X) (hXC : X C) :
      X = C
      theorem Matroid.IsCircuit.eq_of_dep_subset {α : Type u_1} {M : Matroid α} {C X : Set α} (hC : M.IsCircuit C) (hX : M.Dep X) (hXC : X C) :
      X = C
      theorem Matroid.IsCircuit.not_ssubset {α : Type u_1} {M : Matroid α} {C C' : Set α} (hC : M.IsCircuit C) (hC' : M.IsCircuit C') :
      ¬C' C
      theorem Matroid.IsCircuit.eq_of_subset_isCircuit {α : Type u_1} {M : Matroid α} {C C' : Set α} (hC : M.IsCircuit C) (hC' : M.IsCircuit C') (h : C C') :
      C = C'
      theorem Matroid.IsCircuit.eq_of_superset_isCircuit {α : Type u_1} {M : Matroid α} {C C' : Set α} (hC : M.IsCircuit C) (hC' : M.IsCircuit C') (h : C' C) :
      C = C'
      theorem Matroid.isCircuit_iff_dep_forall_diff_singleton_indep {α : Type u_1} {M : Matroid α} {C : Set α} :
      M.IsCircuit C M.Dep C eC, M.Indep (C \ {e})

      Independence and bases #

      theorem Matroid.Indep.insert_isCircuit_of_forall {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (hI : M.Indep I) (heI : eI) (he : e M.closure I) (h : fI, eM.closure (I \ {f})) :
      theorem Matroid.Indep.insert_isCircuit_of_forall_of_nontrivial {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (hI : M.Indep I) (hInt : I.Nontrivial) (he : e M.closure I) (h : fI, eM.closure (I \ {f})) :
      theorem Matroid.IsCircuit.diff_singleton_isBasis {α : Type u_1} {M : Matroid α} {C : Set α} {e : α} (hC : M.IsCircuit C) (he : e C) :
      M.IsBasis (C \ {e}) C
      theorem Matroid.IsCircuit.isBasis_iff_eq_diff_singleton {α : Type u_1} {M : Matroid α} {C I : Set α} (hC : M.IsCircuit C) :
      M.IsBasis I C eC, I = C \ {e}
      theorem Matroid.IsCircuit.isBasis_iff_insert_eq {α : Type u_1} {M : Matroid α} {C I : Set α} (hC : M.IsCircuit C) :
      M.IsBasis I C eC \ I, C = insert e I

      Restriction #

      theorem Matroid.IsCircuit.isCircuit_restrict_of_subset {α : Type u_1} {M : Matroid α} {C R : Set α} (hC : M.IsCircuit C) (hCR : C R) :
      theorem Matroid.restrict_isCircuit_iff {α : Type u_1} {M : Matroid α} {C R : Set α} (hR : R M.E := by aesop_mat) :

      Fundamental IsCircuits #

      def Matroid.fundCircuit {α : Type u_1} (M : Matroid α) (e : α) (I : Set α) :
      Set α

      For an independent set I and some e ∈ M.closure I \ I, M.fundCircuit e I is the unique isCircuit contained in insert e I. For the fact that this is a isCircuit, see Matroid.Indep.fundCircuit_isCircuit, and the fact that it is unique, see Matroid.IsCircuit.eq_fundCircuit_of_subset. Has the junk value {e} if e ∈ I or e ∉ M.E, and insert e I if e ∈ M.E \ M.closure I.

      Equations
      Instances For
        theorem Matroid.fundCircuit_eq_sInter {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (he : e M.closure I) :
        M.fundCircuit e I = insert e (⋂₀ {J : Set α | J I e M.closure J})
        theorem Matroid.fundCircuit_subset_insert {α : Type u_1} (M : Matroid α) (e : α) (I : Set α) :
        theorem Matroid.fundCircuit_subset_ground {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (he : e M.E) (hI : I M.E := by aesop_mat) :
        M.fundCircuit e I M.E
        theorem Matroid.mem_fundCircuit {α : Type u_1} (M : Matroid α) (e : α) (I : Set α) :
        theorem Matroid.fundCircuit_diff_eq_inter {α : Type u_1} {I : Set α} {e : α} (M : Matroid α) (heI : eI) :
        M.fundCircuit e I \ {e} = M.fundCircuit e I I
        theorem Matroid.fundCircuit_eq_of_mem {α : Type u_1} {M : Matroid α} {X : Set α} {e : α} (heX : e X) :

        The fundamental isCircuit of e and X has the junk value {e} if e ∈ X

        theorem Matroid.fundCircuit_eq_of_not_mem_ground {α : Type u_1} {M : Matroid α} {X : Set α} {e : α} (heX : eM.E) :
        theorem Matroid.Indep.fundCircuit_isCircuit {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (hI : M.Indep I) (hecl : e M.closure I) (heI : eI) :
        theorem Matroid.Indep.mem_fundCircuit_iff {α : Type u_1} {M : Matroid α} {I : Set α} {e x : α} (hI : M.Indep I) (hecl : e M.closure I) (heI : eI) :
        x M.fundCircuit e I M.Indep (insert e I \ {x})
        theorem Matroid.IsBase.fundCircuit_isCircuit {α : Type u_1} {M : Matroid α} {x : α} {B : Set α} (hB : M.IsBase B) (hxE : x M.E) (hxB : xB) :
        theorem Matroid.IsCircuit.eq_fundCircuit_of_subset {α : Type u_1} {M : Matroid α} {C I : Set α} {e : α} (hC : M.IsCircuit C) (hI : M.Indep I) (hCs : C insert e I) :
        C = M.fundCircuit e I

        For I independent, M.fundCircuit e I is the only circuit contained in insert e I.

        theorem Matroid.fundCircuit_restrict {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} {R : Set α} (hIR : I R) (heR : e R) (hR : R M.E) :
        @[simp]
        theorem Matroid.fundCircuit_restrict_univ {α : Type u_1} {I : Set α} {e : α} (M : Matroid α) :

        Dependence #

        theorem Matroid.Dep.exists_isCircuit_subset {α : Type u_1} {M : Matroid α} {X : Set α} (hX : M.Dep X) :
        CX, M.IsCircuit C
        theorem Matroid.dep_iff_superset_isCircuit {α : Type u_1} {M : Matroid α} {X : Set α} (hX : X M.E := by aesop_mat) :
        M.Dep X CX, M.IsCircuit C
        theorem Matroid.dep_iff_superset_isCircuit' {α : Type u_1} {M : Matroid α} {X : Set α} :
        M.Dep X (∃ CX, M.IsCircuit C) X M.E

        A version of Matroid.dep_iff_superset_isCircuit that has the supportedness hypothesis as part of the equivalence, rather than a hypothesis.

        theorem Matroid.indep_iff_forall_subset_not_isCircuit' {α : Type u_1} {M : Matroid α} {I : Set α} :
        M.Indep I (∀ CI, ¬M.IsCircuit C) I M.E

        A version of Matroid.indep_iff_forall_subset_not_isCircuit that has the supportedness hypothesis as part of the equivalence, rather than a hypothesis.

        theorem Matroid.indep_iff_forall_subset_not_isCircuit {α : Type u_1} {M : Matroid α} {I : Set α} (hI : I M.E := by aesop_mat) :
        M.Indep I CI, ¬M.IsCircuit C

        Closure #

        theorem Matroid.IsCircuit.closure_diff_singleton_eq {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) (e : α) :
        M.closure (C \ {e}) = M.closure C
        theorem Matroid.IsCircuit.subset_closure_diff_singleton {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) (e : α) :
        C M.closure (C \ {e})
        theorem Matroid.IsCircuit.mem_closure_diff_singleton_of_mem {α : Type u_1} {M : Matroid α} {C : Set α} {e : α} (hC : M.IsCircuit C) (heC : e C) :
        e M.closure (C \ {e})
        theorem Matroid.exists_isCircuit_of_mem_closure {α : Type u_1} {M : Matroid α} {X : Set α} {e : α} (he : e M.closure X) (heX : eX) :
        Cinsert e X, M.IsCircuit C e C
        theorem Matroid.mem_closure_iff_exists_isCircuit {α : Type u_1} {M : Matroid α} {X : Set α} {e : α} (he : eX) :
        e M.closure X Cinsert e X, M.IsCircuit C e C

        Extensionality #

        theorem Matroid.ext_isCircuit {α : Type u_1} {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E) (h : ∀ ⦃C : Set α⦄, C M₁.E → (M₁.IsCircuit C M₂.IsCircuit C)) :
        M₁ = M₂
        theorem Matroid.ext_isCircuit_not_indep {α : Type u_1} {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E) (h₁ : ∀ (C : Set α), M₁.IsCircuit C¬M₂.Indep C) (h₂ : ∀ (C : Set α), M₂.IsCircuit C¬M₁.Indep C) :
        M₁ = M₂

        A stronger version of Matroid.ext_isCircuit: two matroids on the same ground set are equal if no circuit of one is independent in the other.

        theorem Matroid.ext_iff_isCircuit {α : Type u_1} {M₁ M₂ : Matroid α} :
        M₁ = M₂ M₁.E = M₂.E ∀ (C : Set α), M₁.IsCircuit C M₂.IsCircuit C

        Circuit Elimination #

        theorem Matroid.IsCircuit.strong_multi_elimination_insert {α : Type u_1} {M : Matroid α} {ι : Type u_2} {J : Set α} (x : ια) (I : ιSet α) (z : α) (hxI : ∀ (i : ι), x iI i) (hC : ∀ (i : ι), M.IsCircuit (insert (x i) (I i))) (hJx : M.IsCircuit (J Set.range x)) (hzJ : z J) (hzI : ∀ (i : ι), zI i) :
        C'J ⋃ (i : ι), I i, M.IsCircuit C' z C'

        A version of Matroid.IsCircuit.strong_multi_elimination that is phrased using insertion.

        theorem Matroid.IsCircuit.strong_multi_elimination {α : Type u_1} {M : Matroid α} {ι : Type u_2} {C₀ : Set α} (hC₀ : M.IsCircuit C₀) (x : ια) (C : ιSet α) (z : α) (hC : ∀ (i : ι), M.IsCircuit (C i)) (h_mem_C₀ : ∀ (i : ι), x i C₀) (h_mem : ∀ (i : ι), x i C i) (h_unique : ∀ ⦃i i' : ι⦄, x i C i'i = i') (hzC₀ : z C₀) (hzC : ∀ (i : ι), zC i) :
        C' ⊆ (C₀ ⋃ (i : ι), C i) \ Set.range x, M.IsCircuit C' z C'

        A generalization of the strong circuit elimination axiom Matroid.IsCircuit.strong_elimination to an infinite collection of isCircuits.

        It states that, given a circuit C₀, a arbitrary collection C : ι → Set α of circuits, an element x i of C₀ ∩ C i for each i, and an element z ∈ C₀ outside all the C i, the union of C₀ and the C i contains a circuit containing z but none of the x i.

        This is one of the axioms when defining infinite matroids via circuits.

        TODO : A similar statement will hold even when all mentions of z are removed.

        theorem Matroid.IsCircuit.strong_multi_elimination_set {α : Type u_1} {M : Matroid α} {C₀ : Set α} (hC₀ : M.IsCircuit C₀) (X : Set α) (S : Set (Set α)) (z : α) (hCS : CS, M.IsCircuit C) (hXC₀ : X C₀) (hX : xX, CS, C X = {x}) (hzC₀ : z C₀) (hz : CS, zC) :
        C' ⊆ (C₀ ⋃₀ S) \ X, M.IsCircuit C' z C'

        A version of Circuit.strong_multi_elimination where the collection of circuits is a Set (Set α) and the distinguished elements are a Set α, rather than both being indexed.

        theorem Matroid.IsCircuit.strong_elimination {α : Type u_1} {M : Matroid α} {e f : α} {C₁ C₂ : Set α} (hC₁ : M.IsCircuit C₁) (hC₂ : M.IsCircuit C₂) (heC₁ : e C₁) (heC₂ : e C₂) (hfC₁ : f C₁) (hfC₂ : fC₂) :
        C ⊆ (C₁ C₂) \ {e}, M.IsCircuit C f C

        The strong isCircuit elimination axiom. For any pair of distinct circuits C₁, C₂ and all e ∈ C₁ ∩ C₂ and f ∈ C₁ \ C₂, there is a circuit C with f ∈ C ⊆ (C₁ ∪ C₂) \ {e}.

        theorem Matroid.IsCircuit.elimination {α : Type u_1} {M : Matroid α} {C₁ C₂ : Set α} (hC₁ : M.IsCircuit C₁) (hC₂ : M.IsCircuit C₂) (h : C₁ C₂) (e : α) :
        C ⊆ (C₁ C₂) \ {e}, M.IsCircuit C

        The circuit elimination axiom : for any pair of distinct isCircuits C₁, C₂ and any e, some circuit is contained in (C₁ ∪ C₂) \ {e}.

        This is one of the axioms when defining a finitary matroid via circuits; as an axiom, it is usually stated with the extra assumption that e ∈ C₁ ∩ C₂.

        Finitary Matroids #

        theorem Matroid.IsCircuit.finite {α : Type u_1} {M : Matroid α} {C : Set α} [M.Finitary] (hC : M.IsCircuit C) :
        theorem Matroid.finitary_iff_forall_isCircuit_finite {α : Type u_1} {M : Matroid α} :
        M.Finitary ∀ (C : Set α), M.IsCircuit CC.Finite
        theorem Matroid.exists_mem_finite_closure_of_mem_closure {α : Type u_1} {M : Matroid α} {X : Set α} {e : α} [M.Finitary] (he : e M.closure X) :
        IX, I.Finite M.Indep I e M.closure I

        In a finitary matroid, every element spanned by a set X is in fact spanned by a finite independent subset of X.

        theorem Matroid.exists_subset_finite_closure_of_subset_closure {α : Type u_1} {M : Matroid α} {X Y : Set α} [M.Finitary] (hX : X.Finite) (hXY : X M.closure Y) :
        IY, I.Finite M.Indep I X M.closure I

        In a finitary matroid, each finite set X spanned by a set Y is in fact spanned by a finite independent subset of Y.

        IsCocircuits #

        @[reducible, inline]
        abbrev Matroid.IsCocircuit {α : Type u_1} (M : Matroid α) (K : Set α) :

        A cocircuit is a circuit of the dual matroid, or equivalently the complement of a hyperplane.

        Equations
        Instances For
          theorem Matroid.isCocircuit_def {α : Type u_1} {M : Matroid α} {K : Set α} :
          theorem Matroid.IsCocircuit.isCircuit {α : Type u_1} {M : Matroid α} {K : Set α} (hK : M.IsCocircuit K) :
          theorem Matroid.IsCircuit.isCocircuit {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
          theorem Matroid.IsCocircuit.subset_ground {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCocircuit C) :
          C M.E
          @[simp]
          theorem Matroid.dual_isCocircuit_iff {α : Type u_1} {M : Matroid α} {C : Set α} :
          theorem Matroid.coindep_iff_forall_subset_not_isCocircuit {α : Type u_1} {M : Matroid α} {X : Set α} :
          M.Coindep X (∀ KX, ¬M.IsCocircuit K) X M.E
          theorem Matroid.isCocircuit_iff_minimal {α : Type u_1} {M : Matroid α} {K : Set α} :
          M.IsCocircuit K Minimal (fun (X : Set α) => ∀ (B : Set α), M.IsBase B(X B).Nonempty) K

          A cocircuit is a minimal set that intersects every base.

          theorem Matroid.isCocircuit_iff_minimal_compl_nonspanning {α : Type u_1} {M : Matroid α} {K : Set α} :
          M.IsCocircuit K Minimal (fun (X : Set α) => ¬M.Spanning (M.E \ X)) K

          A cocircuit is a minimal set whose complement is nonspanning.

          theorem Matroid.IsBase.compl_closure_diff_singleton_isCocircuit {α : Type u_1} {M : Matroid α} {e : α} {B : Set α} (hB : M.IsBase B) (he : e B) :
          M.IsCocircuit (M.E \ M.closure (B \ {e}))

          For an element e of a base B, the complement of the closure of B \ {e} is a cocircuit.

          theorem Matroid.isCocircuit_iff_minimal_compl_nonspanning' {α : Type u_1} {M : Matroid α} {K : Set α} :
          M.IsCocircuit K Minimal (fun (X : Set α) => ¬M.Spanning (M.E \ X) X M.E) K

          A version of cocircuit_iff_minimal_compl_nonspanning with a support assumption in the minimality

          theorem Matroid.IsCircuit.inter_isCocircuit_ne_singleton {α : Type u_1} {M : Matroid α} {C : Set α} {e : α} {K : Set α} (hC : M.IsCircuit C) (hK : M.IsCocircuit K) :
          C K {e}

          A cocircuit and a circuit cannot meet in exactly one element.

          theorem Matroid.IsCircuit.isCocircuit_inter_nontrivial {α : Type u_1} {M : Matroid α} {C K : Set α} (hC : M.IsCircuit C) (hK : M.IsCocircuit K) (hCK : (C K).Nonempty) :
          theorem Matroid.IsCircuit.dual_rankPos {α : Type u_1} {M : Matroid α} {C : Set α} (hC : M.IsCircuit C) :
          theorem Matroid.exists_isCircuit {α : Type u_1} {M : Matroid α} [M.RankPos] :
          ∃ (C : Set α), M.IsCircuit C
          theorem Matroid.rankPos_iff_exists_isCocircuit {α : Type u_1} {M : Matroid α} :
          M.RankPos ∃ (K : Set α), M.IsCocircuit K
          def Matroid.fundCocircuit {α : Type u_1} (M : Matroid α) (e : α) (B : Set α) :
          Set α

          The fundamental cocircuit for B and e: that is, the unique cocircuit K of M for which K ∩ B = {e}. Should be used when B is a base and e ∈ B. Has the junk value {e} if e ∉ B or e ∉ M.E.

          Equations
          Instances For
            theorem Matroid.fundCocircuit_isCocircuit {α : Type u_1} {M : Matroid α} {e : α} {B : Set α} (he : e B) (hB : M.IsBase B) :
            theorem Matroid.mem_fundCocircuit {α : Type u_1} (M : Matroid α) (e : α) (B : Set α) :
            theorem Matroid.fundCocircuit_subset_insert_compl {α : Type u_1} (M : Matroid α) (e : α) (B : Set α) :
            M.fundCocircuit e B insert e (M.E \ B)
            theorem Matroid.fundCocircuit_inter_eq {α : Type u_1} {e : α} (M : Matroid α) {B : Set α} (he : e B) :
            theorem Matroid.fundCocircuit_eq_of_not_mem_ground {α : Type u_1} {M : Matroid α} {e : α} (X : Set α) (he : eM.E) :

            The fundamental cocircuit of X and e has the junk value {e} if e ∉ M.E

            theorem Matroid.fundCocircuit_eq_of_not_mem {α : Type u_1} {X : Set α} {e : α} (M : Matroid α) (heX : eX) :

            The fundamental cocircuit of X and e has the junk value {e} if e ∉ X

            theorem Matroid.Indep.exists_isCocircuit_inter_eq_mem {α : Type u_1} {M : Matroid α} {I : Set α} {e : α} (hI : M.Indep I) (heI : e I) :
            ∃ (K : Set α), M.IsCocircuit K K I = {e}

            For every element e of an independent set I, there is a cocircuit whose intersection with I is {e}.

            theorem Matroid.IsBase.mem_fundCocircuit_iff_mem_fundCircuit {α : Type u_1} {M : Matroid α} {B : Set α} {e f : α} (hB : M.IsBase B) :

            Fundamental circuits and cocircuits of a base B play dual roles; e belongs to the fundamental cocircuit for B and f if and only if f belongs to the fundamental circuit for e and B. This statement isn't so reasonable unless f ∈ B and e ∉ B, but holds due to junk values even without these assumptions.