Documentation

CslibFrontier.Foundations.Combinatorics.Multidigraph.Connectivity

Directed paths, cuts, and separators in multidigraphs #

Pure graph-theoretic notions for Menger's theorem in directed multigraphs src tgt : E → V (where parallel arcs and self-loops are permitted):

Main definitions #

Main results #

References #

def Cslib.Multidigraph.IsDipath {V : Type u_1} {E : Type u_2} (src tgt : E → V) (s t : V) (q : List E) :

q is a simple directed s–t path of arcs in the multidigraph src tgt : E → V: each arc ends where the next begins, the path starts at s and ends at t, and the visited vertex list s :: q.map tgt is duplicate-free.

Instances For
    @[instance_reducible]
    instance Cslib.Multidigraph.instDecidableIsDipath {V : Type u_1} {E : Type u_2} (src tgt : E → V) [DecidableEq V] (s t : V) (q : List E) :
    Decidable (IsDipath src tgt s t q)
    theorem Cslib.Multidigraph.IsDipath.getLast?_vertices {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} {q : List E} (hq : IsDipath src tgt s t q) :
    (s :: List.map tgt q).getLast? = some t

    The visited vertex list s :: q.map tgt of an s–t dipath ends at t.

    theorem Cslib.Multidigraph.IsDipath.consecutivePairs_vertices {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} {q : List E} (hq : IsDipath src tgt s t q) :
    (s :: List.map tgt q).consecutivePairs = List.map (fun (e : E) => (src e, tgt e)) q

    Consecutive vertex pairs of s :: q.map tgt along a dipath q are (src e, tgt e).

    theorem Cslib.Multidigraph.IsDipath.isChain_toDigraph {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} {q : List E} (hq : IsDipath src tgt s t q) :
    List.IsChain (toDigraph src tgt).Adj (s :: List.map tgt q)

    The visited vertex list s :: q.map tgt of a multidigraph dipath forms a chain in toDigraph src tgt.

    theorem Cslib.Multidigraph.IsDipath.nodup {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} {q : List E} (hq : IsDipath src tgt s t q) :

    Every simple directed path IsDipath src tgt s t q uses each arc at most once (q.Nodup), because its visited target vertices q.map tgt are duplicate-free.

    theorem Cslib.Multidigraph.IsDipath.reflTransGen_toDigraph {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} {q : List E} (hq : IsDipath src tgt s t q) :

    Every multidigraph dipath from s to t witnesses reachability in toDigraph src tgt.

    theorem Cslib.Multidigraph.exists_isDipath_iff_reflTransGen {V : Type u_1} {E : Type u_2} {src tgt : E → V} {s t : V} :
    (∃ (q : List E), IsDipath src tgt s t q) ↔ Relation.ReflTransGen (toDigraph src tgt).Adj s t

    A simple directed s–t path of arcs exists in (src, tgt) if and only if t is reachable from s in toDigraph src tgt (loop removal shortcuts any directed walk to a simple dipath).

    theorem Cslib.Multidigraph.isDipath_pmap_zip_tail {V : Type u_1} {E : Type u_2} (src tgt : E → V) {S : V × V → Prop} (f : (e : V × V) → S e → E) (hf : ∀ (e : V × V) (he : S e), src (f e he) = e.1 ∧ tgt (f e he) = e.2) {p : List V} (hnd : p.Nodup) {s t : V} (hs : p.head? = some s) (ht : p.getLast? = some t) (hS : ∀ e ∈ p.zip p.tail, S e) :
    have q := List.pmap f (p.zip p.tail) hS; IsDipath src tgt s t q ∧ s :: List.map tgt q = p ∧ List.map (fun (e : E) => (src e, tgt e)) q = p.zip p.tail

    Lifting a duplicate-free vertex list p from s to t along arc witnesses f on p.zip p.tail produces a multidigraph dipath whose visited vertices are p.

    Arc cuts, vertex cuts, separators, and weak duality #

    def Cslib.Multidigraph.IsArcCut {V : Type u_1} {E : Type u_2} (src tgt : E → V) (s t : V) (C : Finset E) :

    C is an s–t arc cut in the multidigraph src tgt: every simple directed s–t path uses an arc of C.

    def Cslib.Multidigraph.outArcs {V : Type u_1} {E : Type u_2} (src tgt : E → V) [Fintype E] [DecidableEq V] (S : Finset V) :

    The arcs of the multidigraph src tgt leaving a vertex set S (δ^out(S)).

    theorem Cslib.Multidigraph.mem_outArcs {V : Type u_1} {E : Type u_2} (src tgt : E → V) [Fintype E] [DecidableEq V] {S : Finset V} {e : E} :
    e ∈ outArcs src tgt S ↔ src e ∈ S ∧ tgt e ∉ S
    theorem Cslib.Multidigraph.isArcCut_outArcs {V : Type u_1} {E : Type u_2} (src tgt : E → V) [Fintype E] [DecidableEq V] {s t : V} {S : Finset V} (hs : s ∈ S) (ht : t ∉ S) :
    IsArcCut src tgt s t (outArcs src tgt S)

    outArcs src tgt S is an s–t arc cut whenever s ∈ S and t ∉ S.

    theorem Cslib.Multidigraph.card_le_card_of_disjoint_of_isArcCut {V : Type u_1} {E : Type u_2} (src tgt : E → V) {s t : V} {k : ℕ} {Q : Fin k → List E} (hQ : ∀ (i : Fin k), IsDipath src tgt s t (Q i)) (hdisj : Pairwise fun (i j : Fin k) => (Q i).Disjoint (Q j)) {C : Finset E} (hC : IsArcCut src tgt s t C) :
    k ≤ C.card

    Weak duality for arc-disjoint paths in a multidigraph: k pairwise arc-disjoint simple s–t paths require at least k arcs in every s–t arc cut.

    def Cslib.Multidigraph.InternallyDisjoint {V : Type u_1} {E : Type u_2} (tgt : E → V) {ι : Type u_3} (s t : V) (Q : ι → List E) :

    The arc lists Q i are pairwise internally vertex-disjoint with respect to s and t: two distinct paths share no visited vertex in s :: (Q i).map tgt other than s and t.

    def Cslib.Multidigraph.IsSeparator {V : Type u_1} {E : Type u_2} (src tgt : E → V) (A B Y : Set V) :

    Y separates A from B in src tgt: every simple directed A–B path visits a vertex of Y.

    def Cslib.Multidigraph.IsVertexCut {V : Type u_1} {E : Type u_2} (src tgt : E → V) (s t : V) (T : Finset V) :

    T is an s–t vertex cut in src tgt: it avoids s and t, and every simple directed s–t path visits a vertex of T.

    theorem Cslib.Multidigraph.isVertexCut_iff_isSeparator {V : Type u_1} {E : Type u_2} (src tgt : E → V) {s t : V} {T : Finset V} :
    IsVertexCut src tgt s t T ↔ s ∉ T ∧ t ∉ T ∧ IsSeparator src tgt {s} {t} ↑T
    theorem Cslib.Multidigraph.isSeparator_of_forall_src_tgt {V : Type u_1} {E : Type u_2} (src tgt : E → V) {A B Y : Set V} (S : V → Prop) (hstep : ∀ (e : E), S (src e) → tgt e ∉ Y → S (tgt e)) (hA : ∀ a ∈ A, a ∉ Y → S a) (hB : ∀ b ∈ B, b ∉ Y → ¬S b) :
    IsSeparator src tgt A B Y

    Closed-set certificate for multidigraph separators: if S holds on A \ Y, fails on B \ Y, and every arc leaving S enters Y, then Y separates A from B.

    theorem Cslib.Multidigraph.isVertexCut_of_forall_src_tgt {V : Type u_1} {E : Type u_2} (src tgt : E → V) {s t : V} {S T : Finset V} (hs : s ∈ S) (ht : t ∉ S) (hsT : s ∉ T) (htT : t ∉ T) (hST : ∀ (e : E), src e ∈ S → tgt e ∉ S → tgt e ∈ T) :
    IsVertexCut src tgt s t T

    Closed-set certificate for a multidigraph vertex cut.

    theorem Cslib.Multidigraph.card_le_card_of_internallyDisjoint_of_isVertexCut {V : Type u_1} {E : Type u_2} (src tgt : E → V) {s t : V} {k : ℕ} {Q : Fin k → List E} (hQ : ∀ (i : Fin k), IsDipath src tgt s t (Q i)) (hdisj : InternallyDisjoint tgt s t Q) {T : Finset V} (hT : IsVertexCut src tgt s t T) :
    k ≤ T.card

    Weak duality for internally disjoint paths in a multidigraph: k pairwise internally disjoint simple s–t paths require at least k vertices in every s–t vertex cut.

    theorem Cslib.Multidigraph.card_le_card_of_disjoint_of_isSeparator {V : Type u_1} {E : Type u_2} (src tgt : E → V) {A B : Set V} {k : ℕ} {Q : Fin k → List E} {a b : Fin k → V} (ha : ∀ (i : Fin k), a i ∈ A) (hb : ∀ (i : Fin k), b i ∈ B) (hQ : ∀ (i : Fin k), IsDipath src tgt (a i) (b i) (Q i)) (hdisj : Pairwise fun (i j : Fin k) => (a i :: List.map tgt (Q i)).Disjoint (a j :: List.map tgt (Q j))) {Y : Finset V} (hY : IsSeparator src tgt A B ↑Y) :
    k ≤ Y.card

    Weak duality for vertex-disjoint A–B paths in a multidigraph.