Spanning tree of a connected finite multigraph
Provedexists_spanningTree_of_connectedLet and be finite types with decidable equality, and let be two maps, to be read as the head and tail of each edge of a directed multigraph with vertex set and edge set . For a function , regarded as an integral -chain, write its boundary at a vertex as . The hypothesis is that for every ordered pair of vertices there exists whose boundary at each equals , the difference of the two indicator values. The conclusion asserts the existence of a finite set of edges, a subset of , such that for every ordered pair of vertices there is exactly one which vanishes at every edge outside and whose boundary at each equals . Thus existence of chains with prescribed boundary for all pairs is upgraded to existence and uniqueness of such chains supported on a fixed edge set .
This is the existence of a spanning tree of a finite connected multigraph, phrased homologically: connectivity is expressed by solvability of the boundary equation , and the spanning-tree property of by unique solvability among chains supported on (existence for all pairs says spans, uniqueness says carries no nonzero cycle). It feeds the construction of fundamental cycles and the computation of the first homology of the graphs arising in the Čerednik–Drinfeld setting, being cited by CerednikDrinfeld.Omega.exists_isUnit_det_pathCycle_and_span_pathCycle.
import Mathlib set_option maxHeartbeats 4000000 set_option synthInstance.maxHeartbeats 400000 set_option backward.isDefEq.respectTransparency.types false
theorem exists_spanningTree_of_connected {V E : Type*} [Fintype V] [Fintype E]
[DecidableEq V] [DecidableEq E] (hd tl : E → V)
(hconn : ∀ u v : V, ∃ c : E → ℤ,
∀ w, (∑ e with hd e = w, c e) - (∑ e with tl e = w, c e) =
(if w = v then 1 else 0) - (if w = u then 1 else 0)) :
∃ T : Finset E, ∀ u v : V, ∃! c : E → ℤ, (∀ e ∉ T, c e = 0) ∧
∀ w, (∑ e with hd e = w, c e) - (∑ e with tl e = w, c e) =
(if w = v then 1 else 0) - (if w = u then 1 else 0) := by sorry