Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 4 — relation (IV) is transitive (except when the middle item is indifferent to both)

Proved
JohnsonFlowShop.ThreeStage.lemma4_transitive

by mikedeng1 · Sep 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

flow-shopjohnson-rulep2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1scheduling

Let A1,B1,C1,A2,B2,C2,A3,B3,C3A_1, B_1, C_1, A_2, B_2, C_2, A_3, B_3, C_3A1​,B1​,C1​,A2​,B2​,C2​,A3​,B3​,C3​ be real numbers. If

min⁡(A1+B1, C2+B2)≤min⁡(A2+B2, C1+B1)andmin⁡(A2+B2, C3+B3)≤min⁡(A3+B3, C2+B2),\min(A_1 + B_1,\ C_2 + B_2) \le \min(A_2 + B_2,\ C_1 + B_1) \quad\text{and}\quad \min(A_2 + B_2,\ C_3 + B_3) \le \min(A_3 + B_3,\ C_2 + B_2),min(A1​+B1​, C2​+B2​)≤min(A2​+B2​, C1​+B1​)andmin(A2​+B2​, C3​+B3​)≤min(A3​+B3​, C2​+B2​),

then

min⁡(A1+B1, C3+B3)≤min⁡(A3+B3, C1+B1),\min(A_1 + B_1,\ C_3 + B_3) \le \min(A_3 + B_3,\ C_1 + B_1),min(A1​+B1​, C3​+B3​)≤min(A3​+B3​, C1​+B1​),

unless both hypotheses hold with equality (item 2 is indifferent to both item 1 and item 3).

This is Lemma 2 (p. 64) for the times Ai+BiA_i + B_iAi​+Bi​ and Bi+CiB_i + C_iBi​+Ci​; it is what allows the definite preferences of (IV) to be arranged into one ordering by successive interchanges.

Formalization Note The page says only "Relation (IV) is transitive. Proof is the same as for Lemma 2", and Lemma 2 carries the exception for an item indifferent to both others. Without the exception the statement is false: take B≡0B \equiv 0B≡0 and (Ai,Ci)=(5,2),(1,1),(2,5)(A_i, C_i) = (5, 2), (1, 1), (2, 5)(Ai​,Ci​)=(5,2),(1,1),(2,5). No positivity is assumed.

Preamble
import Mathlib
Formal statement
namespace JohnsonFlowShop.ThreeStage

/-- Lemma 4 (p. 67): relation (IV) is transitive, with the same exception as Lemma 2 (item 2
indifferent to both items 1 and 3). For real numbers (no positivity needed): if
`min (A₁ + B₁) (C₂ + B₂) ≤ min (A₂ + B₂) (C₁ + B₁)` and
`min (A₂ + B₂) (C₃ + B₃) ≤ min (A₃ + B₃) (C₂ + B₂)`, then
`min (A₁ + B₁) (C₃ + B₃) ≤ min (A₃ + B₃) (C₁ + B₁)`, or both hypotheses hold with equality. -/
theorem lemma4_transitive (A₁ B₁ C₁ A₂ B₂ C₂ A₃ B₃ C₃ : ℝ)
    (h₁₂ : min (A₁ + B₁) (C₂ + B₂) ≤ min (A₂ + B₂) (C₁ + B₁))
    (h₂₃ : min (A₂ + B₂) (C₃ + B₃) ≤ min (A₃ + B₃) (C₂ + B₂)) :
    min (A₁ + B₁) (C₃ + B₃) ≤ min (A₃ + B₃) (C₁ + B₁) ∨
      (min (A₁ + B₁) (C₂ + B₂) = min (A₂ + B₂) (C₁ + B₁) ∧
        min (A₂ + B₂) (C₃ + B₃) = min (A₃ + B₃) (C₂ + B₂)) := by sorry

end JohnsonFlowShop.ThreeStage
Source
Johnson, Optimal Two- and Three-Stage Production Schedules with Setup Times Included, NRLQ 1(1) 1954, p. 67, Lemma 4 (with the exception of Lemma 2, p. 64)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me