Fourier–Motzkin elimination #
Fourier–Motzkin elimination removes one variable from a finite system of linear inequalities over
a linearly ordered field. A variable occurring with coefficients a i is eliminated by keeping
the rows with a i = 0 and adding, for every pair of rows p, q with a p > 0 > a q, the
nonnegative combination -a q • row p + a p • row q, in which the variable cancels. The new
system is solvable exactly when the old one is solvable for some value of the eliminated variable.
Iterating this step eliminates any finite block of variables.
The combinations are recorded as an explicit matrix with nonnegative entries, so that every
consequence of the projected system is a nonnegative combination of the original rows. This is
what the algebraic proofs of Farkas' lemma and linear-programming duality in
CslibFrontier.Foundations.LinearAlgebra.Matrix.Farkas and
CslibFrontier.Foundations.LinearAlgebra.Matrix.LinearProgramming use. Unlike Mathlib's
topological Farkas lemma ProperCone.hyperplane_separation, everything here works over any
linearly ordered field, in particular over ℚ.
Main definitions #
Matrix.FourierMotzkin.Row: the index type of the rows produced by one elimination step.Matrix.FourierMotzkin.combination: the nonnegative combination matrix of one elimination step.
Main results #
Matrix.FourierMotzkin.exists_smul_add_le_iff: one elimination step,(∃ t, t • a + v ≤ b) ↔ combination a *ᵥ v ≤ combination a *ᵥ b.Matrix.FourierMotzkin.exists_projection: eliminating a finite block of variablesyfromA *ᵥ y + B *ᵥ z ≤ bgives a system(T * B) *ᵥ z ≤ T *ᵥ b, whereTis entrywise nonnegative andT * A = 0.
References #
The rows produced by eliminating a variable whose coefficient column is a: the rows i
with a i = 0, and the pairs (p, q) with a p > 0 > a q.
Instances For
The combination matrix of one Fourier–Motzkin step for the column a. A row i with
a i = 0 is kept, and a pair (p, q) with a p > 0 > a q gives -a q • row p + a p • row q.
Instances For
A row with zero coefficient is kept unchanged.
The entries of a Fourier–Motzkin combination matrix are nonnegative.
The kept row i of combination a *ᵥ v is v i.
The combined row (p, q) of combination a *ᵥ v is -a q * v p + a p * v q.
The eliminated variable cancels in every combined row.
One step of Fourier–Motzkin elimination: the system t • a + v ≤ b is solvable in t
exactly when the combined system without t holds.
Fourier–Motzkin projection. Eliminating a finite block of variables y from the system
A *ᵥ y + B *ᵥ z ≤ b yields a finite system (T * B) *ᵥ z ≤ T *ᵥ b in the remaining variables
z, whose rows are nonnegative combinations T of the original rows cancelling every column of
A [Schrijver1986, Section 12.2].