Farkas' lemma (conic form in Hilbert spaces)
ProvedFamousTheorems.farkas_lemmaFarkas' lemma (conic form). Let be real Hilbert spaces, a closed convex cone, a continuous linear map and . Then lies in the closure of if and only if
where is the adjoint of and is the dual cone.
For , and the nonnegative orthant, is already closed. The statement is then the classical Farkas lemma: exactly one of the systems and has a solution. It is the theorem of the alternative behind linear programming duality and the Karush–Kuhn–Tucker conditions.
Formalization note. Mathlib's ProperCone.relative_hyperplane_separation. A ProperCone ℝ E is a closed convex cone, and C.map f is the closure of the image . ProperCone.innerDual is the dual cone with respect to the inner product, and ContinuousLinearMap.adjoint f is the Hilbert-space adjoint.
import Mathlib
namespace FamousTheorems
theorem farkas_lemma {E F : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]
[NormedAddCommGroup F] [InnerProductSpace ℝ F] [CompleteSpace F] {C : ProperCone ℝ E}
{f : E →L[ℝ] F} {b : F} :
b ∈ C.map f ↔ ∀ y : F, ContinuousLinearMap.adjoint f y ∈ ProperCone.innerDual (C : Set E) →
0 ≤ inner ℝ b y := by sorry
end FamousTheorems