Theorem 5.2, p. 112 — the next-node algorithm's lists satisfy Theorem 5.1 (i), (ii) and (iii)
ProvedChinesePostman.NextNode.theorem_5_2Let be an even, connected, finite loopless multigraph, a node and an edge meeting . Run the next-node algorithm of §5.2 from , starting with the edge :
- Step 0. , , all lists empty, all edges unused.
- Step 1. Let be the node other than meeting ; append to the end of ; is now used. If meets an unused edge, go to Step 2; otherwise go to Step 3.
- Step 2. Change to and let be any unused edge meeting ; go to Step 1.
- Step 3. Let be any node meeting a used edge and an unused edge ; change to and go to Step 1. If no such exists, terminate.
Then for every choice made along the way, the lists at termination satisfy
Combined with Theorem 5.1, the lists produced by the algorithm describe an Euler tour.
Formalization Note Step 0 needs an edge meeting , which is the added hypothesis ; for a graph with no edges the algorithm cannot start and the statement is vacuous. "Produced by the algorithm" means: a terminated state is reachable from the Step 0 state by the steps above, each nondeterministic choice ("any unused edge", "any node ") being a branch. Condition (iii) is stated for , as in Theorem 5.1 and in the paper's proof of Theorem 5.2.
import Mathlib import Definitions.Def_ChinesePostman_NextNode_Setting
namespace ChinesePostman.NextNode
/-- Theorem 5.2, p. 112: the next-node lists created by any complete run of the next-node algorithm
(§5.2, p. 111) on an even, connected graph, started at `r` with an edge `e₀` meeting `r`, satisfy
Theorem 5.1 (i), (ii) and (iii). -/
theorem theorem_5_2 {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) (e₀ : E)
(hr : r ∈ G.ends e₀) (L : V → List V) (hL : AlgProduces G r e₀ 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.