Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 10.5 — Farkas' Lemma

Proved
VanderbeiLP.StrictComp.farkas_lemma

by mikedeng1 · Oct 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

farkaslinear-programmingp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1theorems-of-the-alternative

Let AAA be a real m×nm \times nm×n matrix and b∈Rmb \in \mathbb{R}^mb∈Rm. The system of linear inequalities Ax≤bAx \le bAx≤b, in the unknown x∈Rnx \in \mathbb{R}^nx∈Rn (no sign constraint on xxx), has no solution if and only if there is a y∈Rmy \in \mathbb{R}^my∈Rm such that

ATy=0,y≥0,bTy<0.(10.8)A^T y = 0, \qquad y \ge 0, \qquad b^T y < 0. \qquad (10.8)ATy=0,y≥0,bTy<0.(10.8)

Such a yyy is a certificate of infeasibility: a nonnegative combination of the inequalities whose left-hand side vanishes and whose right-hand side is negative. Farkas' Lemma is the tool behind the Separation Theorem for polyhedra and the strict complementarity results of the same chapter.

Formalization Note Vector inequalities are componentwise. For m=0m = 0m=0 the system is always solvable and no yyy with bTy<0b^T y < 0bTy<0 exists, consistently with the statement.

Preamble
import Mathlib

open Matrix
Formal statement
namespace VanderbeiLP.StrictComp

/-- **Vanderbei, Lemma 10.5 (p. 146), Farkas' Lemma.** The system `Ax ≤ b` (with `x ∈ ℝⁿ`
unrestricted in sign) has no solution iff there is `y ∈ ℝᵐ` with `Aᵀy = 0`, `y ≥ 0`,
`bᵀy < 0` (10.8). -/
theorem farkas_lemma {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
    (¬ ∃ x : Fin n → ℝ, A *ᵥ x ≤ b) ↔
      ∃ y : Fin m → ℝ, Aᵀ *ᵥ y = 0 ∧ 0 ≤ y ∧ b ⬝ᵥ y < 0 := by sorry

end VanderbeiLP.StrictComp
Source
Vanderbei, Linear Programming: Foundations and Extensions, 4th ed., Springer 2014, p. 146, Lemma 10.5, Eq. (10.8) (PDF p. 159)
Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 2, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me