Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5 — executed in the right order, adjacent interchanges on φ have additive cost

Proved
GilmoreGomoryTSP.MinCost.lemma_5_ordered_execution

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

p2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1sequencingtraveling-salesman

Let BBB be sorted, f,gf,gf,g locally integrable with f+g≥0f+g\ge0f+g≥0, and φ\varphiφ the minimal cost permutation that ranks the AAA. Let αi1,i1+1,…,αim,im+1\alpha_{i_1,i_1+1},\dots,\alpha_{i_m,i_m+1}αi1​,i1​+1​,…,αim​,im​+1​ be distinct adjacent interchanges, i1<⋯<imi_1<\dots<i_mi1​<⋯<im​. Execute them on φ\varphiφ in the following order: first all type-1 interchanges (lower node qqq with Bq≤Aφ(q)B_q\le A_{\varphi(q)}Bq​≤Aφ(q)​) in decreasing order of index, then all type-2 interchanges in increasing order of index. The resulting permutation ψ′\psi'ψ′ satisfies

c(ψ′)=c(φ)+∑p=1mcφ(αip,ip+1).c(\psi') = c(\varphi)+\sum_{p=1}^{m} c_\varphi(\alpha_{i_p,i_p+1}).c(ψ′)=c(φ)+p=1∑m​cφ​(αip​,ip​+1​).

The order matters: in general later interchanges change the cost of earlier ones. This lemma supplies the cost half of Theorem 3.

Formalization Note The paper states "obtained by executing the α\alphaα's in a particular order" and specifies the order in the proof (p. 664); the Lean statement uses that explicit order (execOrder), which is stronger than an existential over orders. The set of interchanges is an arbitrary finite set TTT of lower indices.

Preamble
import Mathlib
import Definitions.Def_GilmoreGomoryTSP_MinCost_Model
Formal statement
namespace GilmoreGomoryTSP.MinCost

theorem lemma_5_ordered_execution {n : ℕ}
    (f g : ℝ → ℝ) (hf : MeasureTheory.LocallyIntegrable f) (hg : MeasureTheory.LocallyIntegrable g)
    (hfg : ∀ x, 0 ≤ f x + g x) (A B : Fin (n + 1) → ℝ) (hB : Monotone B)
    (φ : Equiv.Perm (Fin (n + 1))) (hφ : RanksA A φ)
    (T : Finset (Fin n)) :
    cost f g A B (applyAdj φ (execOrder A B φ T)) =
      cost f g A B φ + adjTreeCost f g A B φ T := by sorry

end GilmoreGomoryTSP.MinCost
Source
Gilmore and Gomory, Sequencing a one state-variable machine, Oper. Res. 12 (1964), p. 664, Lemma 5 and the execution order stated in its proof
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