Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The lexicographic pivoting rule prevents cycling

Proved
LinearOptimization.simplex_lexicographic_anticycling

by Shuze Chen · Aug 5, 2026 · Mathlib c5ea003 (Lean v4.30.0)

anticyclinglexicographiclinear-programmingsimplextermination

(Theorem 3.4) Suppose that the simplex algorithm starts with all the rows in the simplex tableau, other than the zeroth row, lexicographically positive. Suppose that the lexicographic pivoting rule is followed. Then:

  • (a) every row of the simplex tableau, other than the zeroth row, remains lexicographically positive throughout the algorithm;
  • (b) the zeroth row strictly increases lexicographically at each iteration;
  • (c) the simplex method terminates after a finite number of iterations.

(No nondegeneracy assumption; the iiith tableau row is [ (B−1b)i∣(B−1A)i ][\,(B^{-1}b)_i \mid (B^{-1}A)_i\,][(B−1b)i​∣(B−1A)i​] and the zeroth row is [ −cB′B−1b∣c′−cB′B−1A ][\,-c_B'B^{-1}b \mid c' - c_B'B^{-1}A\,][−cB′​B−1b∣c′−cB′​B−1A].)

Preamble
import Mathlib.LinearAlgebra.LinearIndependent.Defs
import Definitions.Def_LinearOptimization_SimplexPivot


open Matrix

/-- **Bertsimas & Tsitsiklis, Theorem 3.4 (p. 110).** Lexicographic anticycling: under the
lexicographic pivoting rule, (a) lexicographic positivity of the tableau
rows `1, …, m` is preserved by every pivot, (b) the zeroth tableau row
strictly increases lexicographically at every pivot, and (c) there is no
infinite lexicographic pivot run starting from a tableau whose rows other
than the zeroth are lexicographically positive. -/
Formal statement
theorem LinearOptimization.simplex_lexicographic_anticycling {m n : ℕ}
    (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) (c : Fin n → ℝ)
    (hA : LinearIndependent ℝ (fun i => A i)) :
    (∀ (B B' : Fin m ↪ Fin n) (x x' : Fin n → ℝ),
      IsSimplexState A b B x →
      (∀ i, LexPos (tableauRow A b B i)) →
      IsLexicographicPivot A b c B x B' x' →
      (∀ i, LexPos (tableauRow A b B' i)) ∧
      LexLt (tableauZerothRow A b c B) (tableauZerothRow A b c B')) ∧
    ¬∃ f : ℕ → (Fin m ↪ Fin n) × (Fin n → ℝ),
      (∀ k, IsSimplexState A b (f k).1 (f k).2) ∧
      (∀ i, LexPos (tableauRow A b (f 0).1 i)) ∧
      ∀ k, IsLexicographicPivot A b c (f k).1 (f k).2 (f (k + 1)).1 (f (k + 1)).2 := by
  sorry
Source
Bertsimas & Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997, Theorem 3.4, p. 110
Read-back

What the Lean code literally says, in plain math · claude-fable-5

Let AAA be a real m×nm \times nm×n matrix with linearly independent rows, b∈Rmb \in \mathbb{R}^mb∈Rm, c∈Rnc \in \mathbb{R}^nc∈Rn — no non-degeneracy or feasibility assumptions. Write rowi(B)\mathrm{row}_i(B)rowi​(B) for the (n+1)(n{+}1)(n+1)-vector ((AB−1b)i,(AB−1A)i)\big((A_B^{-1}b)_i, (A_B^{-1}A)_i\big)((AB−1​b)i​,(AB−1​A)i​), row0(B)\mathrm{row}_0(B)row0​(B) for (−cB⋅AB−1b, cˉ(B))\big({-}c_B \cdot A_B^{-1}b,\ \bar{c}(B)\big)(−cB​⋅AB−1​b, cˉ(B)) with cˉ\bar ccˉ the reduced-cost vector, <lex<_{\mathrm{lex}}<lex​ for the first-difference lexicographic strict order on such vectors, and "lex-positive" for 0<lexv0 <_{\mathrm{lex}} v0<lex​v. The theorem asserts a conjunction. (a) For all bases B,B′B, B'B,B′ and points x,x′x, x'x,x′: if (B,x)(B,x)(B,x) is a simplex state (ABA_BAB​'s columns independent, Ax=bAx = bAx=b, x≥0x \ge 0x≥0, nonbasic coordinates zero), every rowi(B)\mathrm{row}_i(B)rowi​(B) is lex-positive, and (B,x)→(B′,x′)(B,x) \to (B',x')(B,x)→(B′,x′) is a lexicographic pivot (a pivot step at some entering jjj / leaving ℓ\ellℓ, such that for every other row iii with positive pivot-column entry the scaled row uℓ−1rowℓu_\ell^{-1}\mathrm{row}_\elluℓ−1​rowℓ​ is <lex<_{\mathrm{lex}}<lex​ the scaled row ui−1rowiu_i^{-1}\mathrm{row}_iui−1​rowi​), then every rowi(B′)\mathrm{row}_i(B')rowi​(B′) is lex-positive and row0(B)<lexrow0(B′)\mathrm{row}_0(B) <_{\mathrm{lex}} \mathrm{row}_0(B')row0​(B)<lex​row0​(B′) (the zeroth row strictly increases lexicographically). (b) There is no infinite sequence (Bk,xk)k∈N(B_k, x_k)_{k\in\mathbb{N}}(Bk​,xk​)k∈N​ of simplex states whose initial tableau rows rowi(B0)\mathrm{row}_i(B_0)rowi​(B0​) are all lex-positive and in which every consecutive pair is a lexicographic pivot.

Human review
  • Endorsed by Community (Bot) · Aug 5, 2026

  • Endorsed by Shuze Chen · Aug 5, 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