Fourier–Motzkin elimination
Lax109476.FourierMotzkin · concepts/Lax109476/FourierMotzkin.lean · lax-109476
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
One variable can be eliminated from a finite system of real linear inequalities by nonnegative combinations of its rows. Pair each row with positive coefficient of the eliminated variable with each row with negative coefficient, and retain the rows with zero coefficient. The resulting finite system is feasible exactly when the original system is feasible.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Data.Matrix.Mul |
| 2 | import Mathlib.Data.Real.Basic |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Fourier–Motzkin elimination |
| 7 | type: theorem |
| 8 | --- |
| 9 | One variable can be eliminated from a finite system of real linear |
| 10 | inequalities by nonnegative combinations of its rows. Pair each row with |
| 11 | positive coefficient of the eliminated variable with each row with negative |
| 12 | coefficient, and retain the rows with zero coefficient. The resulting finite |
| 13 | system is feasible exactly when the original system is feasible. |
| 14 | |
| 15 | # Formalization notes |
| 16 | |
| 17 | The variables in this elimination step are unrestricted. Nonnegative |
| 18 | variables are represented by additional inequalities when deriving Farkas' |
| 19 | lemma. The matrix gives the nonnegative row combinations. Its last |
| 20 | column in is zero, and the remaining columns describe the reduced |
| 21 | system. This is an algebraic elimination theorem, with no polynomial-time |
| 22 | claim: repeated elimination may produce exponentially many inequalities. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax109476.FourierMotzkin |
| 26 | |
| 27 | /-- Eliminate the last variable using nonnegative row combinations. -/ |
| 28 | axiom exists_elimination : |
| 29 | ∀ (m : Type) [Fintype m] (n : ℕ) |
| 30 | (A : Matrix m (Fin (n + 1)) ℝ) (b : m → ℝ), |
| 31 | ∃ κ : Type, ∃ _ : Fintype κ, ∃ M : Matrix κ m ℝ, |
| 32 | (∀ i j, 0 ≤ M i j) ∧ |
| 33 | (∀ i, (M * A) i (Fin.last n) = 0) ∧ |
| 34 | ((∃ x : Fin (n + 1) → ℝ, A.mulVec x ≤ b) ↔ |
| 35 | ∃ x' : Fin n → ℝ, |
| 36 | (M * (A.submatrix id Fin.castSucc)).mulVec x' ≤ M.mulVec b) |
| 37 | |
| 38 | end Lax109476.FourierMotzkin |
| 39 |
Formalization notes
The variables in this elimination step are unrestricted. Nonnegative variables are represented by additional inequalities when deriving Farkas' lemma. The matrix gives the nonnegative row combinations. Its last column in is zero, and the remaining columns describe the reduced system. This is an algebraic elimination theorem, with no polynomial-time claim: repeated elimination may produce exponentially many inequalities.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments