Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5.1, p. 112 — next-node lists describe an Euler tour iff (i) kn=deg⁡(n)/2k_n = \deg(n)/2kn​=deg(n)/2, (ii) edge counts match, (iii) the last-exit edges form an arborescence

Proved
ChinesePostman.NextNode.theorem_5_1

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

arborescencechinese-postmaneuler-tournext-node-listp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let rrr be any node of an even, connected, finite loopless multigraph GGG, and let Ln(1),…,Ln(kn)L_n(1), \dots, L_n(k_n)Ln​(1),…,Ln​(kn​) be next-node lists for GGG. The lists describe an Euler tour (the tour specified by the lists from rrr uses every list entry and is an Euler tour of GGG) if and only if all of the following hold:

  1. (i) for every node nnn, the length knk_nkn​ of the list of nnn equals one half of the degree of nnn;
  2. (ii) for all nodes n,mn, mn,m, the number of edges meeting both nnn and mmm equals the number of iii with n=Lm(i)n = L_m(i)n=Lm​(i) plus the number of iii with m=Ln(i)m = L_n(i)m=Ln​(i);
  3. (iii) the edges (n,Ln(1))(n, L_n(1))(n,Ln​(1)), n≠rn \ne rn=r, directed from nnn to Ln(1)L_n(1)Ln​(1), form an arborescence with root rrr.
L describes an Euler tour from r  ⟺  (i)∧(ii)∧(iii).L \text{ describes an Euler tour from } r \iff \text{(i)} \wedge \text{(ii)} \wedge \text{(iii)} .L describes an Euler tour from r⟺(i)∧(ii)∧(iii).

An arborescence with root rrr is a tree with a direction on each edge such that every node n≠rn \ne rn=r has exactly one edge directed away from it and rrr 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 rrr 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 (n,Ln(kn))(n, L_n(k_n))(n,Ln​(kn​)), the first exits; the paper's proofs of Theorems 5.1 and 5.2 use (n,Ln(1))(n, L_n(1))(n,Ln​(1)), the last exits, and the printed version is false (the graph with edges rrr–aaa, aaa–ccc, aaa–ccc, aaa–bbb, bbb–rrr and the tour r,a,c,a,b,rr, a, c, a, b, rr,a,c,a,b,r has first exits a→c→aa \to c \to aa→c→a forming a cycle). The statement uses Ln(1)L_n(1)Ln​(1). The lists are read backwards: the first departure from nnn goes to Ln(kn)L_n(k_n)Ln​(kn​); reading them forwards would be a different theorem. (iii) requires every node n≠rn \ne rn=r 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.

Preamble
import Mathlib
import Definitions.Def_ChinesePostman_NextNode_Setting
Formal statement
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
Source
Edmonds and Johnson, Matching, Euler tours and the Chinese postman, Math. Programming 5 (1973), p. 112, Theorem 5.1 (with the definition of an arborescence on p. 112 and the next-node representation on p. 109)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me