Documentation

ConvexAnalysis.PolyhedralDuality

Lagrangian duality under the refined Slater condition #

We consider the convex program

minimize f₀ y subject to g i y ≤ 0 for i : ι and ⟪a k, y⟫ ≤ β k for k : κ,

with finitely many constraints, convex f₀, g i : H → ℝ on a real inner product space H, and possibly equality constraints A y = b. The refined Slater condition asks for a feasible point at which the nonaffine constraints g i hold strictly; the affine constraints need only hold R, Theorem 28.2. The duality theorems need neither continuity of f₀, g i nor completeness of H; they hold on every real vector space, for affine constraints ℓ k y ≤ β k with linear functionals ℓ k. The KKT conditions use the adjoint A† and need complete spaces. With subgradients (ConvexAnalysis.exists_kkt_of_isMinOn) they need continuous g i for the sum rule, but no continuity of f₀; in finite dimension (ConvexAnalysis.exists_kkt_of_isMinOn_of_finiteDimensional) and with gradients (ConvexAnalysis.exists_kkt_of_isMinOn_of_hasGradientAt) they need no continuity.

Main statements #

Implementation notes #

Rockafellar proves the refined Slater theorem R, Theorem 28.2 from R, Theorem 21.2, which rests on a separation theorem in which one of the sets is polyhedral R, Theorem 20.2; both are stated with relative interiors. For real valued f₀ and g i ordinary steps suffice. First, Slater's condition for the g i on the polyhedron P (ConvexAnalysis.exists_lagrangeMultipliers_of_le, which needs no topology) gives μ ≥ 0 with p ≤ φ := f₀ + ∑ μ i g i on P. Second, the constraints only see L y = (ℓ k y)_k, a point of the finite-dimensional range W of L in EuclideanSpace ℝ κ. The partial minimum ψ t = inf {φ y | L y = t} is bounded below on W (by convexity, with a point of P), so it is a real valued convex function on W, hence continuous, and p ≤ ψ on the polyhedron {t ∈ W | ∀ k, t k ≤ β k}. Third, in the Hilbert space W, the open strict epigraph of ψ is separated from this polyhedron times (-∞, p]. The separating hyperplane is not vertical, because ψ is finite on all of W and a vertical hyperplane cannot separate W from the polyhedron. So it is the graph of an affine minorant of ψ that is at least p on the polyhedron, and the nonhomogeneous Farkas lemma in W writes this affine function with multipliers. Polyhedrality enters only through Farkas' lemma, that is, through the closedness of finitely generated cones (ConvexAnalysis.isClosed_finiteCone). Farkas' lemma without completeness then follows from the multiplier theorem for linear φ.

Equality constraints A y = b with finite-dimensional K are the affine inequalities ⟪e j, A y⟫ ≤ ⟪e j, b⟫ and -⟪e j, A y⟫ ≤ -⟪e j, b⟫ for an orthonormal basis e of K, with the linear functionals ⟪e j, A ·⟫, so no Riesz vectors and no completeness of H are needed. The KKT conditions come from the sum rule for f₀ and the continuous μ i g i (ConvexAnalysis.mem_subdifferential_add_sum_mul_iff) at a minimizer of the Lagrangian; they need completeness (see KKT.lean). With gradients, Fermat's rule at the minimizer of the Lagrangian suffices, so no continuity of f₀, g i is needed.

On ℝ, two examples show what the hypotheses exclude: -√y for y ≥ 0 and +∞ for y < 0 is not finite everywhere, and it is bounded below by 0 on {y ≤ 0} with no multiplier; the nonaffine constraint y ^ 2 ≤ 0 has no Slater point, and f₀ y = y is bounded below by 0 on {y ^ 2 ≤ 0} with no multiplier.

References #

Tags #

Lagrangian duality, refined Slater condition, strong duality, Lagrange multipliers, saddle point, KKT conditions, Karush–Kuhn–Tucker conditions, nonhomogeneous Farkas lemma, normal cone, polyhedron

The case of a continuous function on a Hilbert space #

Affine constraints with linear functionals on a real vector space #

theorem ConvexAnalysis.exists_lagrangeMultipliers_of_le_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {φ : E → ℝ} (hφ : ConvexOn ℝ Set.univ φ) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hP : ∃ (z : E), ∀ (k : κ), (ℓ k) z ≤ β k) {p : ℝ} (hp : ∀ (y : E), (∀ (k : κ), (ℓ k) y ≤ β k) → p ≤ φ y) :
∃ (lam : κ → ℝ), (∀ (k : κ), 0 ≤ lam k) ∧ ∀ (y : E), p ≤ φ y + ∑ k : κ, lam k * ((ℓ k) y - β k)

Multipliers for affine inequality constraints on a real vector space: if a convex φ : E → ℝ is bounded below by p on a nonempty polyhedron P = {y | ∀ k, ℓ k y ≤ β k} with linear functionals ℓ k, then there are λ ≥ 0 with p ≤ φ y + ∑ λ k (ℓ k y - β k) for all y. No point of P needs to satisfy the constraints strictly, and no topology is needed: the problem reduces to the partial minimum t ↦ inf {φ y | (ℓ k y)_k = t} on the finite-dimensional range of y ↦ (ℓ k y)_k, which is real valued and convex, hence continuous. Compare R, Corollary 28.2.2, for linear constraints on ℝⁿ with a feasible point in the relative interior of the domain.

theorem ConvexAnalysis.exists_nonneg_sum_smul_eq_of_forall_le {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hP : ∃ (z : E), ∀ (k : κ), (ℓ k) z ≤ β k) {ℓ₀ : E →ₗ[ℝ] ℝ} {δ : ℝ} (h : ∀ (y : E), (∀ (k : κ), (ℓ k) y ≤ β k) → ℓ₀ y ≤ δ) :
∃ (lam : κ → ℝ), (∀ (k : κ), 0 ≤ lam k) ∧ ∑ k : κ, lam k • ℓ k = ℓ₀ ∧ ∑ k : κ, lam k * β k ≤ δ

Farkas' lemma, nonhomogeneous form, for linear functionals on a real vector space: if the polyhedron P = {y | ∀ k, ℓ k y ≤ β k} is nonempty and ℓ₀ ≤ δ on P, then ℓ₀ = ∑ λ k • ℓ k with λ ≥ 0 and ∑ λ k β k ≤ δ R, Theorem 22.3.

theorem ConvexAnalysis.lagrangian_le_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {ι : Type u_4} [Fintype ι] (f₀ : E → ℝ) (g : ι → E → ℝ) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) {μ : ι → ℝ} {lam : κ → ℝ} (hμ : ∀ (i : ι), 0 ≤ μ i) (hlam : ∀ (k : κ), 0 ≤ lam k) {y : E} (hℓy : ∀ (k : κ), (ℓ k) y ≤ β k) (hgy : ∀ (i : ι), g i y ≤ 0) :
f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * ((ℓ k) y - β k) ≤ f₀ y

Weak duality for affine constraints ℓ k y ≤ β k with linear functionals: for μ ≥ 0 and λ ≥ 0, the Lagrangian is at most f₀ at every feasible point.

theorem ConvexAnalysis.exists_le_lagrangian_of_le_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {ι : Type u_4} [Fintype ι] {f₀ : E → ℝ} {g : ι → E → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hslater : ∃ (z : E), (∀ (k : κ), (ℓ k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {p : ℝ} (hp : ∀ (y : E), (∀ (k : κ), (ℓ k) y ≤ β k) → (∀ (i : ι), g i y ≤ 0) → p ≤ f₀ y) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ∀ (y : E), p ≤ f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * ((ℓ k) y - β k)

Strong Lagrangian duality with dual attainment under the refined Slater condition on a real vector space, for affine constraints ℓ k y ≤ β k with linear functionals ℓ k; the form with inner products is exists_le_lagrangian_of_le_of_affine. No topology is needed. Compare R, Theorem 28.2.

theorem ConvexAnalysis.exists_iInf_lagrangian_eq_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {ι : Type u_4} [Fintype ι] {f₀ : E → ℝ} {g : ι → E → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hslater : ∃ (z : E), (∀ (k : κ), (ℓ k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ⨅ (y : E), ↑(f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * ((ℓ k) y - β k)) = ⨅ y ∈ {y : E | (∀ (k : κ), (ℓ k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0}, ↑(f₀ y)

Zero duality gap with dual attainment under the refined Slater condition in EReal, on a real vector space with linear functionals ℓ k; see exists_iInf_lagrangian_eq_of_affine and R, Theorem 28.4.

theorem ConvexAnalysis.exists_isMinOn_lagrangian_of_isMinOn_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {ι : Type u_4} [Fintype ι] {f₀ : E → ℝ} {g : ι → E → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hslater : ∃ (z : E), (∀ (k : κ), (ℓ k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : E} (hℓx : ∀ (k : κ), (ℓ k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : E | (∀ (k : κ), (ℓ k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ (∀ (k : κ), lam k * ((ℓ k) x - β k) = 0) ∧ IsMinOn (fun (y : E) => f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * ((ℓ k) y - β k)) Set.univ x

Strong Lagrangian duality at a minimizer under the refined Slater condition, on a real vector space with linear functionals ℓ k: there are μ ≥ 0 and λ ≥ 0 with complementary slackness such that x minimizes the Lagrangian over all of E.

theorem ConvexAnalysis.isSaddlePointOn_lagrangian_of_linear {κ : Type u_2} [Fintype κ] {E : Type u_3} [AddCommGroup E] [Module ℝ E] {ι : Type u_4} [Fintype ι] {f₀ : E → ℝ} {g : ι → E → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (ℓ : κ → E →ₗ[ℝ] ℝ) (β : κ → ℝ) (hslater : ∃ (z : E), (∀ (k : κ), (ℓ k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : E} (hℓx : ∀ (k : κ), (ℓ k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : E | (∀ (k : κ), (ℓ k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ IsSaddlePointOn Set.univ {q : (ι → ℝ) × (κ → ℝ) | (∀ (i : ι), 0 ≤ q.1 i) ∧ ∀ (k : κ), 0 ≤ q.2 k} (fun (y : E) (q : (ι → ℝ) × (κ → ℝ)) => f₀ y + ∑ i : ι, q.1 i * g i y + ∑ k : κ, q.2 k * ((ℓ k) y - β k)) x (μ, lam)

Saddle point of the Lagrangian under the refined Slater condition, on a real vector space with linear functionals ℓ k: at a minimizer x there are (μ, λ) ≥ 0 such that (x, (μ, λ)) is a saddle point of L(y, μ, λ) = f₀ y + ∑ μ i g i y + ∑ λ k (ℓ k y - β k) on E × {μ ≥ 0, λ ≥ 0}. Compare R, Theorem 28.3 and R, Corollary 28.3.1.

Affine constraints with inner products #

theorem ConvexAnalysis.exists_lagrangeMultipliers_of_le_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {φ : H → ℝ} (hφ : ConvexOn ℝ Set.univ φ) (a : κ → H) (β : κ → ℝ) (hP : ∃ (z : H), ∀ (k : κ), inner ℝ (a k) z ≤ β k) {p : ℝ} (hp : ∀ (y : H), (∀ (k : κ), inner ℝ (a k) y ≤ β k) → p ≤ φ y) :
∃ (lam : κ → ℝ), (∀ (k : κ), 0 ≤ lam k) ∧ ∀ (y : H), p ≤ φ y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)

Multipliers for affine inequality constraints: if a convex φ : H → ℝ is bounded below by p on a nonempty polyhedron P = {y | ∀ k, ⟪a k, y⟫ ≤ β k}, then there are λ ≥ 0 with p ≤ φ y + ∑ λ k (⟪a k, y⟫ - β k) for all y. No point of P needs to satisfy the constraints strictly, and neither continuity of φ nor completeness of H is needed (exists_lagrangeMultipliers_of_le_of_linear). Compare R, Corollary 28.2.2.

theorem ConvexAnalysis.exists_nonneg_sum_smul_eq_of_forall_inner_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] (a : κ → H) (β : κ → ℝ) (hP : ∃ (z : H), ∀ (k : κ), inner ℝ (a k) z ≤ β k) {c : H} {δ : ℝ} (h : ∀ (y : H), (∀ (k : κ), inner ℝ (a k) y ≤ β k) → inner ℝ c y ≤ δ) :
∃ (lam : κ → ℝ), (∀ (k : κ), 0 ≤ lam k) ∧ ∑ k : κ, lam k • a k = c ∧ ∑ k : κ, lam k * β k ≤ δ

Farkas' lemma, nonhomogeneous form R, Theorem 22.3: if the polyhedron P = {y | ∀ k, ⟪a k, y⟫ ≤ β k} is nonempty and ⟪c, y⟫ ≤ δ for all y ∈ P, then c = ∑ λ k • a k with λ ≥ 0 and ∑ λ k β k ≤ δ. Rockafellar states it on ℝⁿ; here H is any real inner product space, and no completeness is needed.

theorem ConvexAnalysis.forall_inner_le_iff_exists_nonneg_sum_smul_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] (a : κ → H) (β : κ → ℝ) (hP : ∃ (z : H), ∀ (k : κ), inner ℝ (a k) z ≤ β k) {c : H} {δ : ℝ} :
(∀ (y : H), (∀ (k : κ), inner ℝ (a k) y ≤ β k) → inner ℝ c y ≤ δ) ↔ ∃ (lam : κ → ℝ), (∀ (k : κ), 0 ≤ lam k) ∧ ∑ k : κ, lam k • a k = c ∧ ∑ k : κ, lam k * β k ≤ δ

Farkas' lemma, nonhomogeneous form, as an equivalence: on a nonempty polyhedron P = {y | ∀ k, ⟪a k, y⟫ ≤ β k}, ⟪c, ·⟫ ≤ δ iff c = ∑ λ k • a k with λ ≥ 0 and ∑ λ k β k ≤ δ R, Theorem 22.3.

theorem ConvexAnalysis.normalCone_polyhedron {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] (a : κ → H) (β : κ → ℝ) {x : H} (hx : ∀ (k : κ), inner ℝ (a k) x ≤ β k) :
normalCone {y : H | ∀ (k : κ), inner ℝ (a k) y ≤ β k} x = {u : H | ∃ (μ : κ → ℝ), (∀ (k : κ), 0 ≤ μ k) ∧ (∀ (k : κ), μ k * (inner ℝ (a k) x - β k) = 0) ∧ ∑ k : κ, μ k • a k = u}

Normal cone of a polyhedron: at a point x of P = {y | ∀ k, ⟪a k, y⟫ ≤ β k}, the normal cone is the cone generated by the active a k, N_P x = {∑ λ k • a k | λ ≥ 0, λ k (⟪a k, x⟫ - β k) = 0}. This is the nonhomogeneous Farkas lemma R, Theorem 22.3 for ⟪u, ·⟫ ≤ ⟪u, x⟫ on P, and the polyhedral case of R, Corollary 23.8.1 (there on ℝⁿ). No completeness of H is needed.

theorem ConvexAnalysis.lagrangian_le_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] (f₀ : H → ℝ) (g : ι → H → ℝ) (a : κ → H) (β : κ → ℝ) {μ : ι → ℝ} {lam : κ → ℝ} (hμ : ∀ (i : ι), 0 ≤ μ i) (hlam : ∀ (k : κ), 0 ≤ lam k) {y : H} (hay : ∀ (k : κ), inner ℝ (a k) y ≤ β k) (hgy : ∀ (i : ι), g i y ≤ 0) :
f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k) ≤ f₀ y

Weak duality for affine inequality constraints: for μ ≥ 0 and λ ≥ 0, the Lagrangian is at most f₀ at every feasible point.

theorem ConvexAnalysis.exists_le_lagrangian_of_le_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {p : ℝ} (hp : ∀ (y : H), (∀ (k : κ), inner ℝ (a k) y ≤ β k) → (∀ (i : ι), g i y ≤ 0) → p ≤ f₀ y) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ∀ (y : H), p ≤ f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)

Strong Lagrangian duality with dual attainment under the refined Slater condition R, Theorem 28.2, without a primal minimizer: consider min f₀ y subject to g i y ≤ 0 and ⟪a k, y⟫ ≤ β k with convex f₀ and g i. If some z satisfies the affine constraints and g i z < 0 for all i (the affine constraints need not hold strictly), and p is a lower bound of f₀ on the feasible set, then there are μ ≥ 0 and λ ≥ 0 with p ≤ f₀ y + ∑ μ i g i y + ∑ λ k (⟪a k, y⟫ - β k) for every y. With p the primal value and weak duality (lagrangian_le_of_affine), (μ, λ) solves the dual problem and the duality gap is zero. No continuity and no completeness of H are needed. Rockafellar works on ℝⁿ with f₀, g i defined on a convex set C and a Slater point in its relative interior; here they are real valued on all of H.

theorem ConvexAnalysis.exists_iInf_lagrangian_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ⨅ (y : H), ↑(f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)) = ⨅ y ∈ {y : H | (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0}, ↑(f₀ y)

Zero duality gap with dual attainment under the refined Slater condition, in EReal: some μ ≥ 0, λ ≥ 0 have inf_y (f₀ y + ∑ μ i g i y + ∑ λ k (⟪a k, y⟫ - β k)) equal to the primal value inf {f₀ y | ⟪a k, y⟫ ≤ β k, g y ≤ 0}. No primal minimizer and no lower bound are needed; if the primal value is ⊥, weak duality gives ⊥. Compare R, Theorem 28.4 and R, Corollary 28.4.1.

theorem ConvexAnalysis.exists_isMinOn_lagrangian_of_isMinOn_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ (∀ (k : κ), lam k * (inner ℝ (a k) x - β k) = 0) ∧ IsMinOn (fun (y : H) => f₀ y + ∑ i : ι, μ i * g i y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)) Set.univ x

Strong Lagrangian duality at a minimizer under the refined Slater condition: there are μ ≥ 0 and λ ≥ 0 with complementary slackness such that x minimizes the Lagrangian over all of H. The KKT conditions with subgradients are exists_kkt_of_isMinOn_of_affine.

theorem ConvexAnalysis.isSaddlePointOn_lagrangian_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ IsSaddlePointOn Set.univ {q : (ι → ℝ) × (κ → ℝ) | (∀ (i : ι), 0 ≤ q.1 i) ∧ ∀ (k : κ), 0 ≤ q.2 k} (fun (y : H) (q : (ι → ℝ) × (κ → ℝ)) => f₀ y + ∑ i : ι, q.1 i * g i y + ∑ k : κ, q.2 k * (inner ℝ (a k) y - β k)) x (μ, lam)

Saddle point of the Lagrangian under the refined Slater condition: at a minimizer x there are multipliers (μ, λ) ≥ 0 such that (x, (μ, λ)) is a saddle point of L(y, μ, λ) = f₀ y + ∑ μ i g i y + ∑ λ k (⟪a k, y⟫ - β k) on H × {μ ≥ 0, λ ≥ 0} (R, Theorem 28.3, R, Corollary 28.3.1).

theorem ConvexAnalysis.exists_kkt_of_isMinOn_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} [CompleteSpace H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (lam : κ → ℝ) (u₀ : H) (u : ι → H), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ (∀ (k : κ), lam k * (inner ℝ (a k) x - β k) = 0) ∧ u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i + ∑ k : κ, lam k • a k = 0

KKT under the refined Slater condition (R, Theorem 28.3 and the Kuhn–Tucker theorem R, Corollary 28.3.1, under the hypotheses of R, Theorem 28.2): if x minimizes the convex f₀ subject to g i ≤ 0 (convex continuous) and ⟪a k, ·⟫ ≤ β k, and some z satisfies the affine constraints with g i z < 0 for all i (the affine constraints need only be feasible), then there are μ ≥ 0, λ ≥ 0 and subgradients u₀ ∈ ∂f₀ x, u i ∈ ∂(g i) x with complementary slackness and u₀ + ∑ μ i • u i + ∑ λ k • a k = 0. No continuity of f₀ is needed: for example f₀ = |ℓ| with a discontinuous linear functional ℓ on an infinite-dimensional H.

Equality constraints #

theorem ConvexAnalysis.exists_le_lagrangian_of_le_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), A z = b ∧ (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {p : ℝ} (hp : ∀ (y : H), A y = b → (∀ (k : κ), inner ℝ (a k) y ≤ β k) → (∀ (i : ι), g i y ≤ 0) → p ≤ f₀ y) :
∃ (μ : ι → ℝ) (ν : K) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ∀ (y : H), p ≤ lagrangian f₀ g A b μ ν y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)

Strong Lagrangian duality under the refined Slater condition with equality constraints, without a primal minimizer: for min f₀ y subject to g i y ≤ 0, A y = b and ⟪a k, y⟫ ≤ β k with convex f₀ and g i, if some z with A z = b and ⟪a k, z⟫ ≤ β k has g i z < 0 for all i, and p is a lower bound of f₀ on the feasible set, then there are μ ≥ 0, ν and λ ≥ 0 with p ≤ L(y, μ, ν) + ∑ λ k (⟪a k, y⟫ - β k) for every y, where L is lagrangian. The equality constraints are the affine inequalities ⟪e j, A y⟫ ≤ ⟪e j, b⟫ and -⟪e j, A y⟫ ≤ -⟪e j, b⟫ for an orthonormal basis e of K; neither continuity of f₀, g i nor completeness of H is needed.

theorem ConvexAnalysis.lagrangian_le_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] (f₀ : H → ℝ) (g : ι → H → ℝ) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) {μ : ι → ℝ} (ν : K) {lam : κ → ℝ} (hμ : ∀ (i : ι), 0 ≤ μ i) (hlam : ∀ (k : κ), 0 ≤ lam k) {y : H} (hAy : A y = b) (hay : ∀ (k : κ), inner ℝ (a k) y ≤ β k) (hgy : ∀ (i : ι), g i y ≤ 0) :
lagrangian f₀ g A b μ ν y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k) ≤ f₀ y

Weak duality with equality constraints: for μ ≥ 0 and λ ≥ 0, the Lagrangian L(y, μ, ν) + ∑ λ k (⟪a k, y⟫ - β k) is at most f₀ at every feasible point.

theorem ConvexAnalysis.exists_iInf_lagrangian_eq_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), A z = b ∧ (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) :
∃ (μ : ι → ℝ) (ν : K) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ ⨅ (y : H), ↑(lagrangian f₀ g A b μ ν y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)) = ⨅ y ∈ {y : H | A y = b ∧ (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0}, ↑(f₀ y)

Zero duality gap with dual attainment under the refined Slater condition with equality constraints, in EReal: some μ ≥ 0, ν and λ ≥ 0 have inf_y (L(y, μ, ν) + ∑ λ k (⟪a k, y⟫ - β k)) equal to the primal value inf {f₀ y | A y = b, ⟪a k, y⟫ ≤ β k, g y ≤ 0}. No primal minimizer and no lower bound are needed.

theorem ConvexAnalysis.exists_isMinOn_lagrangian_of_isMinOn_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), A z = b ∧ (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ (∀ (k : κ), lam k * (inner ℝ (a k) x - β k) = 0) ∧ IsMinOn (fun (y : H) => lagrangian f₀ g A b μ ν y + ∑ k : κ, lam k * (inner ℝ (a k) y - β k)) Set.univ x

Strong Lagrangian duality at a minimizer with equality constraints under the refined Slater condition: there are μ ≥ 0, ν and λ ≥ 0 with complementary slackness such that x minimizes L(·, μ, ν) + ∑ λ k (⟪a k, ·⟫ - β k) over all of H.

theorem ConvexAnalysis.isSaddlePointOn_lagrangian_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), A z = b ∧ (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K) (lam : κ → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ IsSaddlePointOn Set.univ {q : (ι → ℝ) × K × (κ → ℝ) | (∀ (i : ι), 0 ≤ q.1 i) ∧ ∀ (k : κ), 0 ≤ q.2.2 k} (fun (y : H) (q : (ι → ℝ) × K × (κ → ℝ)) => lagrangian f₀ g A b q.1 q.2.1 y + ∑ k : κ, q.2.2 k * (inner ℝ (a k) y - β k)) x (μ, ν, lam)

Saddle point of the Lagrangian with equality constraints under the refined Slater condition: at a minimizer x there are μ ≥ 0, ν and λ ≥ 0 such that (x, (μ, ν, λ)) is a saddle point of L(y, μ, ν) + ∑ λ k (⟪a k, y⟫ - β k) on H × {μ ≥ 0, λ ≥ 0}.

theorem ConvexAnalysis.exists_kkt_of_isMinOn_of_eq_of_affine {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {κ : Type u_2} [Fintype κ] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] [CompleteSpace H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) (A : H →L[ℝ] K) (b : K) (a : κ → H) (β : κ → ℝ) (hslater : ∃ (z : H), A z = b ∧ (∀ (k : κ), inner ℝ (a k) z ≤ β k) ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hax : ∀ (k : κ), inner ℝ (a k) x ≤ β k) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ (∀ (k : κ), inner ℝ (a k) y ≤ β k) ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K) (lam : κ → ℝ) (u₀ : H) (u : ι → H), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (k : κ), 0 ≤ lam k) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ (∀ (k : κ), lam k * (inner ℝ (a k) x - β k) = 0) ∧ u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν + ∑ k : κ, lam k • a k = 0

KKT conditions with equality and affine inequality constraints under the refined Slater condition: if x minimizes the convex f₀ subject to g i ≤ 0 (convex continuous), A y = b and ⟪a k, y⟫ ≤ β k, and some z with A z = b and ⟪a k, z⟫ ≤ β k has g i z < 0 for all i, then there are μ ≥ 0, ν, λ ≥ 0 and subgradients u₀ ∈ ∂f₀ x, u i ∈ ∂(g i) x with complementary slackness and u₀ + ∑ μ i • u i + A† ν + ∑ λ k • a k = 0. No continuity of f₀ is needed.

Slater's theorems for A y = b and g i y ≤ 0 without continuity #

theorem ConvexAnalysis.exists_le_lagrangian_of_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {p : ℝ} (hp : ∀ (y : H), A y = b → (∀ (i : ι), g i y ≤ 0) → p ≤ f₀ y) :
∃ (μ : ι → ℝ) (ν : K), (∀ (i : ι), 0 ≤ μ i) ∧ ∀ (y : H), p ≤ lagrangian f₀ g A b μ ν y

Strong Lagrangian duality with dual attainment under Slater's condition BV, Chapter 5, without a primal minimizer: if p is a lower bound of f₀ on {y | A y = b, g y ≤ 0}, there are μ ≥ 0 and ν with p ≤ L(y, μ, ν) for every y, so the dual function at (μ, ν) is at least p; with p the primal value and weak duality (lagrangian_le), (μ, ν) solves the dual problem and the duality gap is zero. Neither continuity of f₀, g i nor completeness of H is needed: this is exists_le_lagrangian_of_le_of_eq_of_affine without affine inequalities.

theorem ConvexAnalysis.exists_iInf_lagrangian_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) :
∃ (μ : ι → ℝ) (ν : K), (∀ (i : ι), 0 ≤ μ i) ∧ ⨅ (y : H), ↑(lagrangian f₀ g A b μ ν y) = ⨅ y ∈ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0}, ↑(f₀ y)

Zero duality gap with dual attainment under Slater's condition BV, Chapter 5, in EReal: some μ ≥ 0, ν have inf_y L(y, μ, ν) = inf {f₀ y | A y = b, g y ≤ 0}. No primal minimizer, no lower bound, no continuity of f₀, g i and no completeness of H are needed; if the primal value is ⊥, weak duality gives ⊥.

theorem ConvexAnalysis.exists_isMinOn_lagrangian_of_isMinOn {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ IsMinOn (lagrangian f₀ g A b μ ν) Set.univ x

Strong Lagrangian duality at a minimizer under Slater's condition: there are μ ≥ 0 and ν with complementary slackness such that x minimizes the Lagrangian over all of H; so the dual function inf_y L(y, μ, ν) equals f₀ x (zero gap, dual attainment). No continuity of f₀, g i and no completeness of H are needed.

theorem ConvexAnalysis.isSaddlePointOn_lagrangian {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K), (∀ (i : ι), 0 ≤ μ i) ∧ IsSaddlePointOn Set.univ {q : (ι → ℝ) × K | ∀ (i : ι), 0 ≤ q.1 i} (fun (y : H) (q : (ι → ℝ) × K) => lagrangian f₀ g A b q.1 q.2 y) x (μ, ν)

Saddle point of the Lagrangian under Slater's condition: at a minimizer x there are multipliers (μ, ν) with μ ≥ 0 such that (x, (μ, ν)) is a saddle point of the Lagrangian on H × {μ ≥ 0} (Mathlib's IsSaddlePointOn). No continuity of f₀, g i and no completeness of H are needed. Compare BC, Corollary 19.19 and BC, Proposition 19.25, for lower semicontinuous functions on a Hilbert space under an interiority condition.

KKT conditions for A y = b and g i y ≤ 0 #

theorem ConvexAnalysis.exists_kkt_of_isMinOn {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] [CompleteSpace H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K) (u₀ : H) (u : ι → H), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν = 0

KKT conditions are necessary under Slater's condition BV, Chapter 5, R, Theorem 28.3 with the Kuhn–Tucker theorem R, Corollary 28.3.1 (there on ℝⁿ): if x minimizes the convex f₀ subject to g i ≤ 0 (convex continuous) and A y = b, and some z has A z = b and g i z < 0 for all i, then there are μ ≥ 0, ν and subgradients u₀ ∈ ∂f₀ x, u i ∈ ∂(g i) x with u₀ + ∑ μ i • u i + A† ν = 0 and μ i g i x = 0. Compare BC, Corollary 19.30, for lower semicontinuous f₀ with values in ]-∞, +∞] and finitely many equality constraints ⟪u j, x⟫ = ρ j. No continuity of f₀ is needed; this is exists_kkt_of_isMinOn_of_eq_of_affine without affine inequality constraints.

theorem ConvexAnalysis.exists_kkt_of_isMinOn_of_finiteDimensional {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] [FiniteDimensional ℝ H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ) (ν : K) (u₀ : H) (u : ι → H), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν = 0

KKT conditions in finite dimension, where convex functions are continuous.

theorem ConvexAnalysis.isMinOn_iff_exists_kkt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] [CompleteSpace H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) :
IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x ↔ ∃ (μ : ι → ℝ) (ν : K) (u₀ : H) (u : ι → H), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν = 0

Under Slater's condition, a feasible x is a minimizer iff the KKT conditions hold; no continuity of f₀ is needed.

theorem ConvexAnalysis.exists_kkt_of_isMinOn_of_hasGradientAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {K : Type u_4} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [FiniteDimensional ℝ K] [CompleteSpace H] (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (A : H →L[ℝ] K) (b : K) (hslater : ∃ (z : H), A z = b ∧ ∀ (i : ι), g i z < 0) {x : H} (hAx : A x = b) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x) {d₀ : H} {d : ι → H} (hd₀ : HasGradientAt f₀ d₀ x) (hd : ∀ (i : ι), HasGradientAt (g i) (d i) x) :
∃ (μ : ι → ℝ) (ν : K), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ d₀ + ∑ i : ι, μ i • d i + (ContinuousLinearMap.adjoint A) ν = 0

KKT conditions with gradients: if x minimizes the convex f₀ subject to g i ≤ 0 (convex) and A y = b under Slater's condition, and f₀ and the g i are differentiable at x, then there are μ ≥ 0 and ν with ∇f₀ x + ∑ μ i • ∇(g i) x + A† ν = 0 and μ i g i x = 0. No continuity is needed: x minimizes the Lagrangian (exists_isMinOn_lagrangian_of_isMinOn), whose gradient at x therefore vanishes.

theorem ConvexAnalysis.exists_kkt_euclidean {n m p : ℕ} {f₀ : EuclideanSpace ℝ (Fin n) → ℝ} {f : Fin m → EuclideanSpace ℝ (Fin n) → ℝ} (A : Matrix (Fin p) (Fin n) ℝ) (b : EuclideanSpace ℝ (Fin p)) (hf₀ : ConvexOn ℝ Set.univ f₀) (hf : ∀ (i : Fin m), ConvexOn ℝ Set.univ (f i)) (hslater : ∃ (z : EuclideanSpace ℝ (Fin n)), (Matrix.toEuclideanLin A) z = b ∧ ∀ (i : Fin m), f i z < 0) {x : EuclideanSpace ℝ (Fin n)} (hAx : (Matrix.toEuclideanLin A) x = b) (hfx : ∀ (i : Fin m), f i x ≤ 0) (hx : IsMinOn f₀ {y : EuclideanSpace ℝ (Fin n) | (Matrix.toEuclideanLin A) y = b ∧ ∀ (i : Fin m), f i y ≤ 0} x) (hd₀ : DifferentiableAt ℝ f₀ x) (hd : ∀ (i : Fin m), DifferentiableAt ℝ (f i) x) :
∃ (l : Fin m → ℝ) (ν : EuclideanSpace ℝ (Fin p)), (∀ (i : Fin m), 0 ≤ l i) ∧ (∀ (i : Fin m), l i * f i x = 0) ∧ gradient f₀ x + ∑ i : Fin m, l i • gradient (f i) x + (Matrix.toEuclideanLin A.transpose) ν = 0

KKT conditions on ℝⁿ in the form of BV, Chapter 5: for convex f₀, f i differentiable at x and a matrix A with a Slater point, a minimizer x of f₀ subject to f i ≤ 0 and A x = b has l ≥ 0 and ν with ∇f₀ x + ∑ l i ∇f i x + Aᵀ ν = 0 and l i f i x = 0.