Lemma 2.1 — an edge lies on a circuit iff its ends are joined in
ProvedCombOpt.SpanningTree.edge_mem_circuit_iffcombinatoricsgraph-theorylinear-optimizationminimum-spanning-treep2o-gran-per-chapterp2o-plan-bookp2o-v1
Let be a graph and an edge of with ends and (possibly a loop, ). Then is an edge of some circuit of if and only if there is a path from to in , the graph obtained from by deleting .
It follows that deleting an edge of a circuit from a connected graph leaves it connected; the lemma underlies the correctness of the greedy MST algorithms.
Formalization Note has the same nodes and the edges with the same ends, so a path in is a path of whose edge list does not contain .
Differences from the source:
- encoding: a path in G\e from u to v → a path of G from u to v whose edge list does not contain e; reason: G\e has the nodes of G and the edges E{e} with the same ends (p. 10), so these are the same paths
Preamble
import Mathlib import Definitions.Def_CombOpt_SpanningTree_Graph_IsCircuit
Formal statement
namespace CombOpt.SpanningTree
/-- **Lemma 2.1: an edge lies on a circuit iff its ends are joined by a path avoiding it.**
Cook, Cunningham, Pulleyblank & Schrijver, *Combinatorial Optimization* (Wiley, 1998), Lemma 2.1, p. 11 (PDF p. 20): "An edge e = uv of G is an edge of a circuit of G if and only
if there is a path in G\e from u to v."
For an edge `e` with ends `u, v`: there is a circuit of `G` having `e` among its edges if and only
if there is a path from `u` to `v` that does not use `e`.
**Formalization Note.** `G\e` has the same nodes and the edges `E \ {e}` with the same ends
(p. 10), so its paths are the paths of `G` not using `e`. Loops and parallel edges are allowed;
for a loop `e` at `u` both sides hold (the loop is a circuit of length 1; the one-node path `u`
avoids `e`). -/
theorem edge_mem_circuit_iff {V E : Type*} [Fintype V] [Fintype E] (G : Graph V E) (e : E)
(u v : V) (he : G.ends e = s(u, v)) :
(∃ (w : V) (p : G.Walk w w), G.IsCircuit p ∧ e ∈ p.edges) ↔
∃ p : G.Walk u v, e ∉ p.edges := by sorry
end CombOpt.SpanningTree
Source
Cook, Cunningham, Pulleyblank & Schrijver, Combinatorial Optimization (Wiley, 1998), Lemma 2.1, p. 11 (PDF p. 20)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.