Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Finite termination of the simplex method under nondegeneracy

Proved
LinearOptimization.simplex_termination_nondegenerate

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

linear-programmingoptimalitysimplextermination

(Theorem 3.3, GOAL) Assume that the feasible set is nonempty and that every basic feasible solution is nondegenerate. Then, the simplex method terminates after a finite number of iterations. At termination, there are the following two possibilities:

  • (a) we have an optimal basis BBB and an associated basic feasible solution which is optimal;
  • (b) we have found a vector ddd satisfying Ad=0Ad = 0Ad=0, d≥0d \ge 0d≥0, and c′d<0c'd < 0c′d<0, and the optimal cost is −∞-\infty−∞.

Encoding: (Termination is encoded as: there is no infinite admissible pivot run, and every maximal run ends in one of the two terminal states.)

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


open Matrix

/-- **Bertsimas & Tsitsiklis, Theorem 3.3 (p. 91).** Termination of the simplex method under
nondegeneracy: if the standard-form feasible set is nonempty and every
basic feasible solution is nondegenerate, then no infinite pivot run
exists, and every admissible state admitting no further pivot exhibits
either an optimal basis with an optimal associated basic feasible
solution, or a direction `d` with `Ad = 0`, `d ≥ 0`, `c'd < 0`
certifying optimal cost `−∞`. -/
Formal statement
theorem LinearOptimization.simplex_termination_nondegenerate {m n : ℕ}
    (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) (c : Fin n → ℝ)
    (hA : LinearIndependent ℝ (fun i => A i))
    (hne : (stdPolyhedron A b).Nonempty)
    (hnd : ∀ x, IsBasicFeasibleSolution (stdFormSystem A b) x →
      ¬IsStdDegenerateBasicSolution A b x) :
    (¬∃ f : ℕ → (Fin m ↪ Fin n) × (Fin n → ℝ),
      (∀ k, IsSimplexState A b (f k).1 (f k).2) ∧
      ∀ k, IsSimplexPivot A c (f k).1 (f k).2 (f (k + 1)).1 (f (k + 1)).2) ∧
    ∀ (B : Fin m ↪ Fin n) (x : Fin n → ℝ), IsSimplexState A b B x →
      (¬∃ (B' : Fin m ↪ Fin n) (x' : Fin n → ℝ), IsSimplexPivot A c B x B' x') →
      (IsOptimalBasis A b c B ∧ IsLpOptimal c (stdPolyhedron A b) x) ∨
      ∃ d : Fin n → ℝ, A.mulVec d = 0 ∧ 0 ≤ d ∧ c ⬝ᵥ d < 0 ∧
        lpValue c (stdPolyhedron A b) = ⊥ := by
  sorry
Source
Bertsimas & Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997, Theorem 3.3, p. 91
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. Assume the standard polyhedron S={x∣Ax=b,x≥0}S = \{x \mid Ax = b, x \ge 0\}S={x∣Ax=b,x≥0} is nonempty and that every basic feasible solution of the standard-form constraint system is not std-degenerate (never both a basic solution and with more than n−˙mn \dot- mn−˙​m zero coordinates). The conclusion is a conjunction. (a) There is no infinite sequence (Bk,xk)k∈N(B_k, x_k)_{k \in \mathbb{N}}(Bk​,xk​)k∈N​ in which every (Bk,xk)(B_k, x_k)(Bk​,xk​) is a simplex state (basis columns independent, xk∈Sx_k \in Sxk​∈S, nonbasic coordinates zero) and every consecutive pair is related by a simplex pivot (an entering nonbasic column with negative reduced cost, a leaving row with positive pivot-column entry attaining the minimum ratio, and the update xk+1=xk+θ∗dx_{k+1} = x_k + \theta^* dxk+1​=xk​+θ∗d). (b) For every simplex state (B,x)(B, x)(B,x) from which no simplex pivot to any (B′,x′)(B', x')(B′,x′) exists, either (BBB is an optimal basis: independent columns, AB−1b≥0A_B^{-1}b \ge 0AB−1​b≥0, all reduced costs ≥0\ge 0≥0 — and xxx minimizes c⋅yc \cdot yc⋅y over SSS), or there exists d∈Rnd \in \mathbb{R}^nd∈Rn with Ad=0Ad = 0Ad=0, d≥0d \ge 0d≥0, c⋅d<0c \cdot d < 0c⋅d<0, and inf⁡y∈Sc⋅y=−∞\inf_{y \in S} c \cdot y = -\inftyinfy∈S​c⋅y=−∞ in the extended reals. Note (a) rules out infinite pivot sequences of any kind under the global non-degeneracy hypothesis, and in (b) the no-pivot condition is over the specific pivot relation defined in the bundle.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me