Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2, p. 6, proof of the Theorem — a postman's tour of G of weight ≤ k corresponds to a hamilton circuit of H

Proved
RuralPostman.NPC.claim_undirected_backward

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

arc-routinghamilton-circuitp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1rural-postman

Let HHH be an undirected graph on V={0,…,v−1}V=\{0,\dots,v-1\}V={0,…,v−1} with v≥3v\ge 3v≥3, and let GGG (arcs AAA, required arcs RRR, weight www, threshold k=vk=vk=v) be the rural postman instance of the undirected construction: a required pendant arc (⟨s,0⟩,⟨s,1⟩)(\langle s,0\rangle,\langle s,1\rangle)(⟨s,0⟩,⟨s,1⟩) of weight 000 for each vertex sss, and an arc (⟨s,0⟩,⟨t,0⟩)(\langle s,0\rangle,\langle t,0\rangle)(⟨s,0⟩,⟨t,0⟩) of weight 111 for each edge {s,t}\{s,t\}{s,t} of HHH.

If GGG has an undirected postman's tour of weight at most kkk, then HHH has a hamilton circuit, i.e. a cyclic ordering σ0,…,σv−1\sigma_0,\dots,\sigma_{v-1}σ0​,…,σv−1​ of all vertices of HHH in which {σi,σi+1 mod v}\{\sigma_i,\sigma_{i+1 \bmod v}\}{σi​,σi+1modv​} is an edge for every iii.

This is the "only if" direction of the equivalence on which the undirected reduction rests.

Formalization Note Nodes are 0-based: VVV is Fin v, and N=V×{0,1}N = V\times\{0,1\}N=V×{0,1} is Fin (v + v) with ⟨s,0⟩\langle s,0\rangle⟨s,0⟩ = Fin.castAdd v s and ⟨s,1⟩\langle s,1\rangle⟨s,1⟩ = Fin.natAdd v s. A tour is a list of traversals (arc index, direction); IsRequired e says that arc eee lies in RRR, and List.countP counts traversals. HHH is a symmetric Boolean adjacency matrix.

Differences from the source:

  • encoding: V a set of v nodes; N = V × {0,1} → V = Fin v (0-based); ⟨s,0⟩ = Fin.castAdd v s and ⟨s,1⟩ = Fin.natAdd v s in Fin (v + v); reason: Lean convention; the same instances up to relabelling
  • encoding: an undirected graph H = (V,E) → a Bool adjacency matrix adj on Fin v with IsSymm adj (diagonal ignored); reason: Lean convention for a finite undirected graph; loops play no role in a hamilton circuit on ≥ 3 nodes
  • encoding: {(<s,0>,<t,0>) | (s,t) ∈ E} → one arc (⟨s,0⟩,⟨t,0⟩) of weight 1 for each pair s < t with adj s t = true; reason: each undirected edge of H gives one arc of G (paper.md reading 6)
  • reading: a postman's tour is an "undirected (directed) cycle traversing each arc in R at least once" → a closed walk: a cyclic list of arc traversals in which nodes and arcs may repeat; the empty list is allowed; reason: the paper's own tour traverses each arc of R twice, so "cycle" means closed walk (paper.md reading 3); the empty tour matters only when R = ∅, where every reading gives weight 0
  • encoding: a hamilton circuit: a cycle visiting each node exactly once → SchedComplexity.NoWait.HasHamiltonCircuit adj: a bijection σ of Fin v with adj (σ i) (σ (i+1 mod v)) = true for all i; reason: for v ≥ 2 a cyclic ordering of all nodes with consecutive arcs is exactly such a cycle
Preamble
import Mathlib
import Definitions.Def_RuralPostman_NPC_Reductions
Formal statement
namespace RuralPostman.NPC

theorem claim_undirected_backward {v : ℕ} (adj : Fin v → Fin v → Bool) (hs : IsSymm adj)
    (hv : 3 ≤ v) (hG : (urpOfGraph adj).RPYes false) :
    SchedComplexity.NoWait.HasHamiltonCircuit adj := by sorry

end RuralPostman.NPC
Source
Lenstra, Rinnooy Kan, On general routing problems, Mathematisch Centrum report BW 42/74 (December 1974), p. 6, §2, proof of the Theorem, "… It follows that the tour corresponds to a hamilton circuit on H."
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 24, 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