Theorem 5.1, p. 112 — next-node lists describe an Euler tour iff (i) , (ii) edge counts match, (iii) the last-exit edges form an arborescence
ProvedChinesePostman.NextNode.theorem_5_1Let be any node of an even, connected, finite loopless multigraph , and let be next-node lists for . The lists describe an Euler tour (the tour specified by the lists from uses every list entry and is an Euler tour of ) if and only if all of the following hold:
- (i) for every node , the length of the list of equals one half of the degree of ;
- (ii) for all nodes , the number of edges meeting both and equals the number of with plus the number of with ;
- (iii) the edges , , directed from to , form an arborescence with root .
An arborescence with root is a tree with a direction on each edge such that every node has exactly one edge directed away from it and has none.
The theorem certifies the next-node representation of Euler tours: three local, easily checked conditions on the lists guarantee that following them from traverses every edge exactly once. Theorem 5.2 shows that the next-node algorithm produces lists with these properties.
Formalization Note The printed condition (iii) names the edges , the first exits; the paper's proofs of Theorems 5.1 and 5.2 use , the last exits, and the printed version is false (the graph with edges –, –, –, –, – and the tour has first exits forming a cycle). The statement uses . The lists are read backwards: the first departure from goes to ; reading them forwards would be a different theorem. (iii) requires every node to have a nonempty list. A graph with one node and no edges is allowed: all lists are empty, the one-node tour is an Euler tour, and both sides hold.
import Mathlib import Definitions.Def_ChinesePostman_NextNode_Setting
namespace ChinesePostman.NextNode
/-- Theorem 5.1, p. 112: for any node `r` of an even, connected graph `G`, next-node lists describe
an Euler tour (from `r`) if and only if (i), (ii) and (iii) hold, with (iii) for the edges
`(n, L_n(1))`, `n ≠ r`. -/
theorem theorem_5_1 {V E : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
(G : Graph V E) (hconn : Connected G) (heven : ∀ n, Even (degree G n)) (r : V)
(L : V → List V) :
DescribesEulerTour G r L ↔ CondI G L ∧ CondII G L ∧ CondIII G r L := by sorry
end ChinesePostman.NextNode
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.