Proposition 6.4.3 — the Farkas lemma in three variants
ProvedMatousekLP.Duality.farkas_three_variantsfarkas-lemmalinear-programmingp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1
Let be a real matrix with rows and columns and let . All vector inequalities are componentwise.
- The system has a solution if and only if every with also satisfies .
- The system has a solution if and only if every with and also satisfies .
- The system has a solution if and only if every with and also satisfies .
In each part the condition on the right is a certificate-of-infeasibility test: a vector violating it combines the constraints into an obviously unsatisfiable inequality. Part (ii) is the form used in the proof of the duality theorem from the Farkas lemma.
Formalization Note The row vector is represented as the column vector , so is 0 ≤ Aᵀ *ᵥ y and is Aᵀ *ᵥ y = 0; is the dot product y ⬝ᵥ b. The three parts are stated as one conjunction.
Preamble
import Mathlib
Formal statement
namespace MatousekLP.Duality
open Matrix
/-- Matoušek & Gärtner, Proposition 6.4.3 (pp. 90–91), the Farkas lemma in three variants.
`yᵀA ≥ 0ᵀ` is written `0 ≤ Aᵀ *ᵥ y` and `yᵀA = 0ᵀ` is `Aᵀ *ᵥ y = 0`.
(i) `Ax = b` has a nonnegative solution iff every `y` with `yᵀA ≥ 0ᵀ` has `yᵀb ≥ 0`;
(ii) `Ax ≤ b` has a nonnegative solution iff every `y ≥ 0` with `yᵀA ≥ 0ᵀ` has `yᵀb ≥ 0`;
(iii) `Ax ≤ b` has a solution iff every `y ≥ 0` with `yᵀA = 0ᵀ` has `yᵀb ≥ 0`. -/
theorem farkas_three_variants {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
((∃ x : Fin n → ℝ, 0 ≤ x ∧ A *ᵥ x = b) ↔
∀ y : Fin m → ℝ, 0 ≤ Aᵀ *ᵥ y → 0 ≤ y ⬝ᵥ b) ∧
((∃ x : Fin n → ℝ, 0 ≤ x ∧ A *ᵥ x ≤ b) ↔
∀ y : Fin m → ℝ, 0 ≤ y → 0 ≤ Aᵀ *ᵥ y → 0 ≤ y ⬝ᵥ b) ∧
((∃ x : Fin n → ℝ, A *ᵥ x ≤ b) ↔
∀ y : Fin m → ℝ, 0 ≤ y → Aᵀ *ᵥ y = 0 → 0 ≤ y ⬝ᵥ b) := by sorry
end MatousekLP.Duality
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, pp. 90–91, Proposition 6.4.3
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.