Documentation

CslibFrontier.Foundations.Combinatorics.Multigraph.CutSpace

The cut space of a multigraph #

Taking edge cuts turns symmetric differences of sets of vertices into symmetric differences of sets of edges (Cslib.Multigraph.edgeCut_symmDiff): an edge leaves S βˆ† T exactly when it leaves one of S and T but not both. This and Cslib.Multigraph.mem_edgeCut_of_ends_eq are the Finset forms of Mathlib's Graph.edgeCut_symmDiff and Graph.IsLink.mem_edgeCut_iff, through Cslib.Multigraph.coe_edgeCut_eq_toGraph_edgeCut. The edge cut of a single vertex consists of the edges at it other than self-loops (Cslib.Multigraph.edgeCut_singleton), and on a connected multigraph the only sets with no edge leaving them are βˆ… and the set of all vertices (Cslib.Multigraph.eq_empty_or_eq_univ_of_edgeCut_eq_empty).

Identifying subsets of E with their 0/1 indicator vectors over 𝔽₂ = ZMod 2 (or Bool via Cslib.BitString.submoduleZModIso), the coboundary transpose of the 𝔽₂ vertex–edge incidence matrix Cslib.Multigraph.incidenceMatrix (which agrees with Matrix.endpointIncidence for any endpoint choice, dropping self-loops while retaining parallel edges) sends the indicator of S to the indicator of edgeCut ends S (Cslib.Multigraph.incidenceMatrix_transpose_mulVec_indicator). Its image Cslib.Multigraph.cutSpace consists of the indicator vectors of all edge cuts (Cslib.Multigraph.mem_cutSpace_iff_exists_edgeCut), is spanned over 𝔽₂ by the vertex incidence vectors (Cslib.Multigraph.cutSpace_eq_span_incidence), has dimension |V| - 1 on every connected multigraph (Cslib.Multigraph.finrank_cutSpace_add_one), and has the cycle / even-degree space ker (incidenceMatrix ends).mulVecLin of cyclomatic dimension |E| - |V| + 1 as its orthogonal complement (Cslib.Multigraph.orthogonal_cutSpace, Cslib.Multigraph.finrank_ker_incidenceMatrix_add_card).

A set S that fewer than e(G) edges leave (Cslib.Multigraph.minBalancedCut) is not balanced, so it has fewer than a third or more than two thirds of the vertices. If moreover S has at most two thirds of the vertices, it has fewer than a third of them (Cslib.Multigraph.three_mul_card_lt_of_card_edgeCut_lt). This dichotomy is how expansion enters degree lower bounds for Tseitin formulas in algebraic proof systems such as polynomial calculus.

Main definitions #

Main results #

References #

theorem Cslib.Multigraph.mem_edgeCut_of_ends_eq {V : Type u_1} {E : Type u_2} {ends : E β†’ Sym2 V} [Fintype V] [Fintype E] [DecidableEq V] {S : Finset V} {e : E} {a b : V} (h : ends e = s(a, b)) :
e ∈ edgeCut ends S ↔ (a ∈ S ↔ b βˆ‰ S)

An edge with ends a and b leaves S exactly when one of its ends is in S and the other is not.

theorem Cslib.Multigraph.edgeCut_symmDiff {V : Type u_1} {E : Type u_2} (ends : E β†’ Sym2 V) [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] (S T : Finset V) :
edgeCut ends (symmDiff S T) = symmDiff (edgeCut ends S) (edgeCut ends T)

Edge cuts turn symmetric differences into symmetric differences: an edge leaves S βˆ† T exactly when it leaves one of S and T but not both.

@[simp]
theorem Cslib.Multigraph.edgeCut_empty {V : Type u_1} {E : Type u_2} (ends : E β†’ Sym2 V) [Fintype V] [Fintype E] [DecidableEq V] :

No edge leaves the empty set.

theorem Cslib.Multigraph.edgeCut_singleton {V : Type u_1} {E : Type u_2} (ends : E β†’ Sym2 V) [Fintype V] [Fintype E] [DecidableEq V] (v : V) :
edgeCut ends {v} = incidence ends v

The edges leaving a single vertex are the edges at it other than self-loops.

theorem Cslib.Multigraph.eq_empty_or_eq_univ_of_edgeCut_eq_empty {V : Type u_1} {E : Type u_2} {ends : E β†’ Sym2 V} [Fintype V] [Fintype E] [DecidableEq V] (hG : (toSimpleGraph ends).Connected) {S : Finset V} (hS : edgeCut ends S = βˆ…) :

On a connected multigraph, only βˆ… and the set of all vertices have no edge leaving them.

theorem Cslib.Multigraph.three_mul_card_lt_of_card_edgeCut_lt {V : Type u_1} {E : Type u_2} {ends : E β†’ Sym2 V} [Fintype V] [Fintype E] [DecidableEq V] {S : Finset V} (hS : (edgeCut ends S).card < minBalancedCut ends) (hβ‚‚ : 3 * S.card ≀ 2 * Fintype.card V) :

The expansion dichotomy. A set of at most two thirds of the vertices that fewer than e(G) edges leave has fewer than a third of the vertices.

The 𝔽₂ incidence matrix, cut space, and orthogonal cycle space #

def Cslib.Multigraph.incidenceMatrix {V : Type u_1} {E : Type u_2} [DecidableEq V] (ends : E β†’ Sym2 V) :
Matrix V E (ZMod 2)

The 𝔽₂ vertex–edge incidence matrix of ends : E β†’ Sym2 V: entry (v, e) is 1 when e is a non-loop edge incident to v, and 0 otherwise.

@[simp]
theorem Cslib.Multigraph.incidenceMatrix_apply {V : Type u_1} {E : Type u_2} [DecidableEq V] (ends : E β†’ Sym2 V) (v : V) (e : E) :
incidenceMatrix ends v e = if v ∈ ends e ∧ ¬(ends e).IsDiag then 1 else 0
theorem Cslib.Multigraph.incidenceMatrix_eq_endpointIncidence {V : Type u_1} {E : Type u_2} [DecidableEq V] (ends : E β†’ Sym2 V) {u v : E β†’ V} (h : βˆ€ (e : E), ends e = s(u e, v e)) :

For any endpoint functions u v : E β†’ V realizing ends e = s(u e, v e), incidenceMatrix equals Matrix.endpointIncidence u v: self-loops contribute 1 + 1 = 0 in ZMod 2 while parallel edges retain distinct columns.

theorem Cslib.Multigraph.incidenceMatrix_row {V : Type u_1} {E : Type u_2} [Fintype E] [DecidableEq V] [DecidableEq E] (ends : E β†’ Sym2 V) (v : V) :
incidenceMatrix ends v = fun (e : E) => if e ∈ incidence ends v then 1 else 0

Row v of incidenceMatrix ends is the 𝔽₂ indicator vector of incidence ends v.

theorem Cslib.Multigraph.incidenceMatrix_transpose_mulVec_indicator {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] (ends : E β†’ Sym2 V) (S : Finset V) :
((incidenceMatrix ends).transpose.mulVec fun (v : V) => if v ∈ S then 1 else 0) = fun (e : E) => if e ∈ edgeCut ends S then 1 else 0

Applying (incidenceMatrix ends)α΅€ to the 𝔽₂ indicator of S : Finset V yields the 𝔽₂ indicator of edgeCut ends S.

def Cslib.Multigraph.cutSpace {V : Type u_1} {E : Type u_2} [Fintype V] [DecidableEq V] (ends : E β†’ Sym2 V) :
Submodule (ZMod 2) (E β†’ ZMod 2)

The 𝔽₂ cut space of ends : E β†’ Sym2 V: the subspace LinearMap.range (incidenceMatrix ends)α΅€.mulVecLin of E β†’ ZMod 2.

theorem Cslib.Multigraph.mem_cutSpace_iff_exists_edgeCut {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] {ends : E β†’ Sym2 V} {w : E β†’ ZMod 2} :
w ∈ cutSpace ends ↔ βˆƒ (S : Finset V), w = fun (e : E) => if e ∈ edgeCut ends S then 1 else 0

A vector in E β†’ ZMod 2 belongs to cutSpace ends if and only if it is the indicator vector of edgeCut ends S for some vertex set S : Finset V.

theorem Cslib.Multigraph.cutSpace_eq_span_incidence {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] (ends : E β†’ Sym2 V) :
cutSpace ends = Submodule.span (ZMod 2) (Set.range fun (v : V) (e : E) => if e ∈ incidence ends v then 1 else 0)

Vertex-incidence spanning theorem: cutSpace ends is spanned over 𝔽₂ by the indicator vectors of the non-loop vertex incidences incidence ends v.

theorem Cslib.Multigraph.submoduleZModIso_symm_cutSpace {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] (ends : E β†’ Sym2 V) :

Under BitString.submoduleZModIso, the Bool-submodule corresponding to cutSpace ends is spanned by the Boolean vertex-incidence indicators fun e => decide (e ∈ incidence ends v).

theorem Cslib.Multigraph.finrank_cutSpace_add_one {V : Type u_1} {E : Type u_2} [Fintype V] [Finite E] [DecidableEq V] {ends : E β†’ Sym2 V} (hG : (toSimpleGraph ends).Connected) :
Module.finrank (ZMod 2) β†₯(cutSpace ends) + 1 = Fintype.card V

On a connected multigraph, the 𝔽₂ cut space has dimension |V| - 1.

theorem Cslib.Multigraph.orthogonal_cutSpace {V : Type u_1} {E : Type u_2} [Fintype V] [Fintype E] [DecidableEq V] (ends : E β†’ Sym2 V) :

The orthogonal complement of cutSpace ends under dotProduct is the cycle (even-degree) space LinearMap.ker (incidenceMatrix ends).mulVecLin.

On a connected multigraph, the cycle space ker (incidenceMatrix ends).mulVecLin has cyclomatic dimension |E| - |V| + 1, written dim + |V| = |E| + 1.