Gale's theorem of the alternative for Bπ ≤ c
ProvedPolyhedral.gale_alternativeGale's theorem of the alternative. Let and . Exactly one of the following holds:
This is the inequality-form companion of Farkas' lemma: a system of linear inequalities is unsolvable precisely when some nonnegative combination of its rows yields the contradiction (a negative number). It is the transposition theorem behind linear programming duality in inequality form, behind the existence of dual multipliers for a linear program whose primal optimum is known, and behind the characterization of consistent linear inequality systems.
Formalization note. Xor is exclusive disjunction, so the statement contains both the incompatibility of the alternatives and the fact that one of them must hold. Vectors are functions out of a Fin type, B.mulVec pi is , B\u1d40.mulVec w is , and \u2b1d\u1d65 is the dot product.
import Mathlib open Matrix
theorem Polyhedral.gale_alternative {r k : ℕ} (B : Matrix (Fin r) (Fin k) ℝ)
(c : Fin r → ℝ) :
Xor (∃ pi : Fin k → ℝ, ∀ i, B.mulVec pi i ≤ c i)
(∃ w : Fin r → ℝ, (∀ i, 0 ≤ w i) ∧ Bᵀ.mulVec w = 0 ∧ w ⬝ᵥ c < 0) := by sorry