Fourier-Motzkin elimination of one variable
ProvedSmaleNinth.lp_fourier_motzkin_stepLet and , and write for the coefficient of the last variable in row and for the remaining coefficients. Then the system in variables has a solution if and only if the following system in the unknowns has one:
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 times row plus times row . Sufficiency holds because a solution of the reduced system can be completed by any value of the last variable lying between the largest lower bound and the smallest upper bound ; 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 inequalities by roughly , so eliminating variables in turn gives a bound that is doubly exponential in , whereas Smale's ninth problem asks for a number of arithmetic operations polynomial in and .
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. -/
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