Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Fourier-Motzkin elimination of one variable

Proved
SmaleNinth.lp_fourier_motzkin_step

by Zexuan Liu · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

eliminationfourier-motzkinlinear-programmingpolyhedra

Let A∈Rm×(n+1)A \in \mathbb{R}^{m \times (n+1)}A∈Rm×(n+1) and c∈Rmc \in \mathbb{R}^mc∈Rm, and write βi=Ai,n\beta_i = A_{i,n}βi​=Ai,n​ for the coefficient of the last variable in row iii and αi∈Rn\alpha_i \in \mathbb{R}^nαi​∈Rn for the remaining coefficients. Then the system Ax≥cAx \ge cAx≥c in n+1n+1n+1 variables has a solution if and only if the following system in the nnn unknowns yyy has one:

αiTy≥ci(βi=0),(βiαj−βjαi)Ty ≥ βicj−βjci(βi>0>βj).\alpha_i^{\mathsf T} y \ge c_i \quad (\beta_i = 0), \qquad (\beta_i \alpha_j - \beta_j \alpha_i)^{\mathsf T} y \ \ge\ \beta_i c_j - \beta_j c_i \quad (\beta_i > 0 > \beta_j).αiT​y≥ci​(βi​=0),(βi​αj​−βj​αi​)Ty ≥ βi​cj​−βj​ci​(βi​>0>βj​).

This is one step of Fourier–Motzkin elimination. Necessity holds because each inequality of the reduced system is a nonnegative combination of two inequalities of the original one, chosen so that the last variable cancels: the pair inequality is (−βj)(-\beta_j)(−βj​) times row iii plus βi\beta_iβi​ times row jjj. Sufficiency holds because a solution yyy of the reduced system can be completed by any value vvv of the last variable lying between the largest lower bound max⁡βi>0(ci−αiTy)/βi\max_{\beta_i>0} (c_i - \alpha_i^{\mathsf T} y)/\beta_imaxβi​>0​(ci​−αiT​y)/βi​ and the smallest upper bound min⁡βj<0(cj−αjTy)/βj\min_{\beta_j<0}(c_j - \alpha_j^{\mathsf T} y)/\beta_jminβj​<0​(cj​−αjT​y)/βj​; the pair inequalities say precisely that every lower bound is at most every upper bound, and when one of the two families is empty any sufficiently extreme value works.

Iterating the step eliminates all variables and decides feasibility, which gives an elementary proof that linear feasibility over the reals is decidable, and, by tracking the nonnegative multipliers, the standard constructive route to Farkas' lemma and to linear programming duality. It also shows why the classical method is useless for the mission's goal: a single step can replace mmm inequalities by roughly m2/4m^2/4m2/4, so eliminating nnn variables in turn gives a bound that is doubly exponential in nnn, whereas Smale's ninth problem asks for a number of arithmetic operations polynomial in mmm and nnn.

Preamble
import Definitions.Def_Polyhedron

/-!
Fourier-Motzkin elimination of one variable from a system of linear
inequalities in any number of variables: the induction step of the classical
elimination procedure.

Source: J. B. J. Fourier (1826) and T. Motzkin (1936); see A. Schrijver,
*Theory of Linear and Integer Programming*, Wiley 1986, Section 12.2
(Theorem 12.3 and the surrounding discussion), and Bertsimas-Tsitsiklis,
*Introduction to Linear Optimization*, Athena Scientific 1997, Section 2.8.
-/

open Matrix LinearOptimization

/-- **Fourier-Motzkin elimination of one variable.** The system `Ax >= c` in
`n+1` variables is feasible if and only if the system in `n` variables
obtained by eliminating the last one is feasible: the rows whose last
coefficient vanishes are kept, and each pair of rows with last coefficients of
opposite signs contributes the combination in which the last variable
cancels. -/
Formal statement
theorem SmaleNinth.lp_fourier_motzkin_step {m n : ℕ} (A : Matrix (Fin m) (Fin (n + 1)) ℝ)
    (c : Fin m → ℝ) :
    (polyhedron A c).Nonempty ↔
      ∃ y : Fin n → ℝ,
        (∀ i : Fin m, A i (Fin.last n) = 0 →
            c i ≤ ∑ k : Fin n, A i k.castSucc * y k) ∧
        (∀ i j : Fin m, 0 < A i (Fin.last n) → A j (Fin.last n) < 0 →
            A i (Fin.last n) * c j - A j (Fin.last n) * c i ≤
              ∑ k : Fin n, (A i (Fin.last n) * A j k.castSucc
                - A j (Fin.last n) * A i k.castSucc) * y k) := by sorry
Source
J. B. J. Fourier (1826); T. Motzkin, Beitraege zur Theorie der linearen Ungleichungen, Dissertation, Basel 1936. See A. Schrijver, Theory of Linear and Integer Programming, Wiley 1986, Section 12.2, and Bertsimas-Tsitsiklis, Introduction to Linear Optimization, Athena Scientific 1997, Section 2.8.

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