Documentation

TauCeti.Combinatorics.Graph.Bipartition

Bipartitions of multigraphs #

A bipartition of a multigraph G : Graph α β is a pair of disjoint finite sets L and R of actual vertices, together covering V(G), such that every edge joins a vertex of L to a vertex of R. Parallel edges are allowed, isolated vertices may lie on either side, and either side may be empty; loops are excluded, since the two ends of a loop coincide.

The sides are finite sets of actual vertices, so that sums of vertex capacities over a side, or over a part of it, are finite sums; in particular a multigraph with a bipartition has finitely many actual vertices. Since every actual edge has exactly one end in each side, summing over one side the values of the edges incident with each vertex counts every actual edge exactly once, so the total usage of either side by edge multiplicities equals their sum.

Main definitions #

Main results #

structure Graph.IsBipartition {α : Type u} {β : Type v} (G : Graph α β) (L R : Finset ↑G.vertexSet) :

The finite sets L and R of actual vertices form a bipartition of the multigraph G: they are disjoint, every actual vertex lies in one of them, and every edge joins a vertex of L to a vertex of R.

Instances For
    theorem Graph.IsBipartition.symm {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) :

    Exchanging the two sides of a bipartition gives a bipartition.

    theorem Graph.IsBipartition.notMem_left_iff {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) {x : ↑G.vertexSet} :
    x ∉ L ↔ x ∈ R

    An actual vertex outside L lies in R.

    theorem Graph.IsBipartition.notMem_right_iff {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) {x : ↑G.vertexSet} :
    x ∉ R ↔ x ∈ L

    An actual vertex outside R lies in L.

    theorem Graph.IsBipartition.loopless {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) :

    A multigraph with a bipartition has no loops.

    theorem Graph.IsBipartition.finite {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) :

    A multigraph with a bipartition has finitely many actual vertices.

    theorem Graph.IsBipartition.deleteEdges {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) (F : Set β) :

    Deleting any set of edges preserves a displayed bipartition. The actual vertex set, including its isolated vertices, is unchanged.

    theorem Graph.IsBipartition.isVertexCover_left {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) :

    The side L of a bipartition is a vertex cover.

    theorem Graph.IsBipartition.isVertexCover_right {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) :

    The side R of a bipartition is a vertex cover.

    theorem Graph.IsBipartition.existsUnique_mem_left_inc {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) (e : ↑G.edgeSet) :
    ∃! x : ↑G.vertexSet, x ∈ L ∧ G.Inc ↑e ↑x

    Every actual edge has exactly one end in L.

    theorem Graph.IsBipartition.existsUnique_mem_right_inc {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (h : G.IsBipartition L R) (e : ↑G.edgeSet) :
    ∃! x : ↑G.vertexSet, x ∈ R ∧ G.Inc ↑e ↑x

    Every actual edge has exactly one end in R.

    theorem Graph.IsBipartition.sum_sum_incidentEdges_left {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} [Fintype ↑G.edgeSet] {M : Type u_1} [AddCommMonoid M] (h : G.IsBipartition L R) (f : ↑G.edgeSet → M) :
    ∑ x ∈ L, ∑ e ∈ G.incidentEdges {x}, f e = ∑ e : ↑G.edgeSet, f e

    Every actual edge has exactly one end in L, so summing over L the values of the edges incident with each vertex sums every actual edge once.

    theorem Graph.IsBipartition.sum_sum_incidentEdges_right {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} [Fintype ↑G.edgeSet] {M : Type u_1} [AddCommMonoid M] (h : G.IsBipartition L R) (f : ↑G.edgeSet → M) :
    ∑ x ∈ R, ∑ e ∈ G.incidentEdges {x}, f e = ∑ e : ↑G.edgeSet, f e

    Every actual edge has exactly one end in R, so summing over R the values of the edges incident with each vertex sums every actual edge once.

    theorem Graph.isBipartition_comm {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} :

    A bipartition is symmetric in its two sides.

    Bipartite arrow family #

    def Graph.BipartiteHom {α : Type u} {β : Type v} (G : Graph α β) (L : Finset ↑G.vertexSet) (x y : ↑G.vertexSet) :

    The arrow family obtained by directing every actual edge of G from its end in L to its other end. Under a bipartition by L, R, these are exactly the edges directed from L to R.

    Instances For
      instance Graph.instFiniteBipartiteHomOfElemEdgeSet {α : Type u} {β : Type v} {G : Graph α β} [Finite ↑G.edgeSet] (L : Finset ↑G.vertexSet) (x y : ↑G.vertexSet) :
      @[instance_reducible]
      noncomputable instance Graph.instFintypeBipartiteHomOfElemEdgeSet {α : Type u} {β : Type v} {G : Graph α β} [Fintype ↑G.edgeSet] (L : Finset ↑G.vertexSet) (x y : ↑G.vertexSet) :
      def Graph.BipartiteHom.edge {α : Type u} {β : Type v} {G : Graph α β} {L : Finset ↑G.vertexSet} {x y : ↑G.vertexSet} (e : G.BipartiteHom L x y) :
      ↑G.edgeSet

      The original edge underlying an arrow of the bipartite arrow family.

      Instances For
        @[simp]
        theorem Graph.BipartiteHom.edge_mk {α : Type u} {β : Type v} {G : Graph α β} {L : Finset ↑G.vertexSet} {x y : ↑G.vertexSet} (e : ↑G.edgeSet) (h : G.IsLink ↑e ↑x ↑y ∧ x ∈ L) :
        edge ⟨e, h⟩ = e
        theorem Graph.BipartiteHom.ext {α : Type u} {β : Type v} {G : Graph α β} {L : Finset ↑G.vertexSet} {x y : ↑G.vertexSet} {e e' : G.BipartiteHom L x y} (h : e.edge = e'.edge) :
        e = e'

        Bipartite arrows are equal when their underlying edges are equal.

        theorem Graph.BipartiteHom.ext_iff {α : Type u} {β : Type v} {G : Graph α β} {L : Finset ↑G.vertexSet} {x y : ↑G.vertexSet} {e e' : G.BipartiteHom L x y} :
        e = e' ↔ e.edge = e'.edge
        theorem Graph.BipartiteHom.source_mem {α : Type u} {β : Type v} {G : Graph α β} {L : Finset ↑G.vertexSet} {x y : ↑G.vertexSet} (e : G.BipartiteHom L x y) :
        x ∈ L

        The source of every bipartite arrow belongs to L.

        theorem Graph.BipartiteHom.target_mem {α : Type u} {β : Type v} {G : Graph α β} {L R : Finset ↑G.vertexSet} (hLR : G.IsBipartition L R) {x y : ↑G.vertexSet} (e : G.BipartiteHom L x y) :
        y ∈ R

        The target of every bipartite arrow belongs to R.

        Finite sets L and R form a covering bipartition of the multigraph associated to a simple graph H exactly when they are bipartition classes of H and cover its entire vertex type.

        The covering condition is separate because SimpleGraph.IsBipartiteWith permits isolated vertices outside both displayed sets, whereas Graph.IsBipartition partitions all actual vertices.