Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (11) — the cost of an interchange under the order-preserving assumption (8)

Proved
GilmoreGomoryTSP.MinCost.eq_11_interchange_cost

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

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

Let f,gf,gf,g be locally integrable with f+g≥0f+g\ge0f+g≥0, let Ai,BiA_i,B_iAi​,Bi​ be the states of the jobs and ψ\psiψ any permutation. For jobs i,ji,ji,j assume (8): Bj≥BiB_j\ge B_iBj​≥Bi​ and Aψ(j)≥Aψ(i)A_{\psi(j)}\ge A_{\psi(i)}Aψ(j)​≥Aψ(i)​. Then the cost of the interchange αij\alpha_{ij}αij​ is

cψ(αij)=ciψ(j)+cjψ(i)−ciψ(i)−cjψ(j)=∥[Bi,Bj]∩[Aψ(i),Aψ(j)]∥,c_\psi(\alpha_{ij}) = c_{i\psi(j)}+c_{j\psi(i)}-c_{i\psi(i)}-c_{j\psi(j)} = \big\|[B_i,B_j]\cap[A_{\psi(i)},A_{\psi(j)}]\big\|,cψ​(αij​)=ciψ(j)​+cjψ(i)​−ciψ(i)​−cjψ(j)​=​[Bi​,Bj​]∩[Aψ(i)​,Aψ(j)​]​,

where ∥[a,b]∥=∫ab{f(x)+g(x)} dx\|[a,b]\| = \int_a^b \{f(x)+g(x)\}\,dx∥[a,b]∥=∫ab​{f(x)+g(x)}dx (and ∥∅∥=0\|\emptyset\|=0∥∅∥=0).

In particular cψ(αij)≥0c_\psi(\alpha_{ij})\ge0cψ​(αij​)≥0 for interchanges that create a crossing; this formula is the computational core of the algorithm (step P4).

Formalization Note The right-hand side is the set integral of f+gf+gf+g over [Bi,Bj]∩[Aψ(i),Aψ(j)][B_i,B_j]\cap[A_{\psi(i)},A_{\psi(j)}][Bi​,Bj​]∩[Aψ(i)​,Aψ(j)​], which is 000 when the intersection is empty or a point. The case "with the reverse order, preceded by a minus sign" is not part of this item.

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

theorem eq_11_interchange_cost {n : ℕ}
    (f g : ℝ → ℝ) (hf : MeasureTheory.LocallyIntegrable f) (hg : MeasureTheory.LocallyIntegrable g)
    (hfg : ∀ x, 0 ≤ f x + g x) (A B : Fin (n + 1) → ℝ)
    (ψ : Equiv.Perm (Fin (n + 1))) (i j : Fin (n + 1))
    (hBij : B i ≤ B j) (hAij : A (ψ i) ≤ A (ψ j)) :
    interchangeCost f g A B ψ i j =
      ∫ x in Set.Icc (B i) (B j) ∩ Set.Icc (A (ψ i)) (A (ψ j)), (f x + g x) := by sorry

end GilmoreGomoryTSP.MinCost
Source
Gilmore and Gomory, Sequencing a one state-variable machine, Oper. Res. 12 (1964), p. 659, Eqs. (8) and (11)
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