Documentation

Mathlib.Combinatorics.Quiver.ConnectedComponent

Weakly and strongly connected components #

For a quiver V, define the type WeaklyConnectedComponent V as the quotient of V by the relation which identifies a with b if there is a path from a to b in Symmetrify V. (These zigzags can be seen as a proof-relevant analogue of EqvGen.)

We define:

These concepts relate strong and weak connectivity and let us reason about strongly connected components in directed graphs.

def Quiver.zigzagSetoid (V : Type u_1) [Quiver V] :

Two vertices are related in the zigzag setoid if there is a zigzag of arrows from one to the other.

Equations
Instances For

    The type of weakly connected components of a directed graph. Two vertices are in the same weakly connected component if there is a zigzag of arrows from one to the other.

    Equations
    Instances For

      The weakly connected component corresponding to a vertex.

      Equations
      Instances For

        A wide subquiver H of Symmetrify V determines a wide subquiver of V, containing an arrow e if either e or its reversal is in H.

        Equations
        Instances For

          Strongly connected components (directed connectivity) #

          We define strong connectivity (IsStronglyConnected), its positive-length refinement (IsSStronglyConnected), and strongly connected components.

          Strong connectivity: every ordered pair of vertices is joined by a (possibly empty) directed path.

          Equations
          Instances For

            Positive strong connectivity: every ordered pair of vertices is joined by a directed path of positive length.

            Equations
            Instances For
              @[simp]
              theorem Quiver.isStronglyConnected_iff (V : Type u_2) [Quiver V] :
              IsStronglyConnected V ∀ (i j : V), Nonempty (Path i j)
              @[simp]
              theorem Quiver.isSStronglyConnected_iff (V : Type u_2) [Quiver V] :
              IsSStronglyConnected V ∀ (i j : V), (p : Path i j), 0 < p.length

              Equivalence relation identifying vertices connected by directed paths in both directions.

              Equations
              Instances For

                The type of strongly connected components (bidirectional reachability classes).

                Equations
                Instances For

                  The canonical map from a vertex to its strongly connected component.

                  Equations
                  Instances For
                    theorem Quiver.stronglyConnectedComponent_singleton_iff {V : Type u_2} [Quiver V] (v : V) :
                    (∀ (w : V), StronglyConnectedComponent.mk w = StronglyConnectedComponent.mk vw = v) ∀ (w : V), w v¬(Nonempty (Path v w) Nonempty (Path w v))
                    theorem Quiver.IsStronglyConnected.isSStronglyConnected_of_hom {V : Type u_2} [Quiver V] (h_sc : IsStronglyConnected V) {i₀ j₀ : V} (e₀ : i₀ j₀) :