Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A simplex pivot yields a new basic feasible solution with lower cost

Proved
LinearOptimization.simplex_pivot_basis_change

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

basislinear-programmingpivotingsimplex

(Theorem 3.2) In the setting of a simplex iteration — xxx a nondegenerate basic feasible solution with basis matrix B=[AB(1)⋯AB(m)]B = [A_{B(1)} \cdots A_{B(m)}]B=[AB(1)​⋯AB(m)​], jjj a nonbasic index with cˉj<0\bar{c}_j < 0cˉj​<0, ddd the jjjth basic direction,

θ∗=min⁡{i:dB(i)<0}(−xB(i)/dB(i))\theta^* = \min_{\{i : d_{B(i)} < 0\}} (-x_{B(i)}/d_{B(i)})θ∗={i:dB(i)​<0}min​(−xB(i)​/dB(i)​)

finite and attained at the index ℓ\ellℓ (so dB(ℓ)<0d_{B(\ell)} < 0dB(ℓ)​<0), and Bˉ\bar{B}Bˉ obtained from BBB by replacing AB(ℓ)A_{B(\ell)}AB(ℓ)​ with AjA_jAj​ (Eqs. (3.3)–(3.4)):

  • (a) the columns AB(i)A_{B(i)}AB(i)​, i≠ℓi \ne \elli=ℓ, and AjA_jAj​ are linearly independent and, therefore, Bˉ\bar{B}Bˉ is a basis matrix;
  • (b) the vector y=x+θ∗dy = x + \theta^* dy=x+θ∗d is a basic feasible solution associated with the basis matrix Bˉ\bar{B}Bˉ.
Preamble
import Mathlib.LinearAlgebra.LinearIndependent.Defs
import Definitions.Def_LinearOptimization_SimplexPivot


open Matrix

/-- **Bertsimas & Tsitsiklis, Theorem 3.2 (p. 89).** Basis change at a simplex pivot: with
entering index `j` (`c̄_j < 0`), exiting row `ℓ` attaining the ratio test,
and `B'` obtained from `B` by replacing `B(ℓ)` with `j`, the new basic
columns are linearly independent (so `B'` is a basis matrix), and
`y = x + θ* • d` is a basic feasible solution associated with `B'`. -/
Formal statement
theorem LinearOptimization.simplex_pivot_basis_change {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) (hB : IsStdBasis A B)
    (x : Fin n → ℝ) (hx : x ∈ stdPolyhedron A b)
    (hxB : ∀ j ∉ Set.range B, x j = 0)
    (hnd : ¬IsStdDegenerateBasicSolution A b x)
    (j : Fin n) (hj : j ∉ Set.range B) (hcj : reducedCost A c B j < 0)
    (ℓ : Fin m) (hℓ : 0 < pivotColumn A B j ℓ)
    (hmin : ∀ i, 0 < pivotColumn A B j i →
      x (B ℓ) / pivotColumn A B j ℓ ≤ x (B i) / pivotColumn A B j i)
    (hB'ne : ∀ i, i ≠ ℓ → B' i = B i) (hB'ℓ : B' ℓ = j) :
    IsStdBasis A B' ∧
    x + (x (B ℓ) / pivotColumn A B j ℓ) • basicDirection A B j ∈
      stdPolyhedron A b ∧
    ∀ k ∉ Set.range B',
      (x + (x (B ℓ) / pivotColumn A B j ℓ) • basicDirection A B j) k = 0 := by
  sorry
Source
Bertsimas & Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997, Theorem 3.2, p. 89
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: B,B′B, B'B,B′ are injections {1..m}↪{1..n}\{1..m\} \hookrightarrow \{1..n\}{1..m}↪{1..n}; the columns of AAA selected by BBB are linearly independent; xxx satisfies Ax=bAx = bAx=b, x≥0x \ge 0x≥0, and vanishes outside the range of BBB; xxx is not std-degenerate (not both: a basic solution of the standard-form system, and more than n−˙mn \dot- mn−˙​m zero coordinates); jjj is a nonbasic column with negative reduced cost cj−cB⋅u<0c_j - c_B \cdot u < 0cj​−cB​⋅u<0, where u=AB−1A⋅ju = A_B^{-1} A_{\cdot j}u=AB−1​A⋅j​; ℓ\ellℓ is a position with uℓ>0u_\ell > 0uℓ​>0 attaining the minimum ratio, xB(ℓ)/uℓ≤xB(i)/uix_{B(\ell)}/u_\ell \le x_{B(i)}/u_ixB(ℓ)​/uℓ​≤xB(i)​/ui​ for every iii with ui>0u_i > 0ui​>0; and B′B'B′ agrees with BBB off ℓ\ellℓ with B′(ℓ)=jB'(\ell) = jB′(ℓ)=j. Writing x+=x+(xB(ℓ)/uℓ) dx^{+} = x + (x_{B(\ell)}/u_\ell)\, dx+=x+(xB(ℓ)​/uℓ​)d with d=ej−∑iuieB(i)d = e_j - \sum_i u_i e_{B(i)}d=ej​−∑i​ui​eB(i)​, the conclusion is threefold: (i) the columns of AAA selected by B′B'B′ are linearly independent; (ii) x+x^{+}x+ satisfies Ax+=bA x^{+} = bAx+=b and x+≥0x^{+} \ge 0x+≥0; (iii) xk+=0x^{+}_k = 0xk+​=0 for every kkk outside the range of B′B'B′. I.e. the pivot produces a legitimate new simplex state.

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