Documentation

ConvexAnalysis.KKT

Lagrange multipliers, the KKT conditions and Lagrangian duality #

We consider the convex program

minimize f₀ x subject to g i x ≤ 0 for i : ι (finitely many) and A x = b,

with convex f₀, g i : H → ℝ on a Hilbert space H, a bounded linear map A : H → K into a finite-dimensional space K, and b : K; its Lagrangian is lagrangian f₀ g A b μ ν y = f₀ y + ∑ μ i g i y + ⟪A y - b, ν⟫. This file proves the existence of Lagrange multipliers under Slater's condition, the KKT conditions, and weak duality.

Main statements #

Strong Lagrangian duality for A y = b, g i y ≤ 0 with dual attainment without a primal minimizer (ConvexAnalysis.exists_le_lagrangian_of_le, ConvexAnalysis.exists_iInf_lagrangian_eq), the saddle point of the Lagrangian at a minimizer (ConvexAnalysis.exists_isMinOn_lagrangian_of_isMinOn, ConvexAnalysis.isSaddlePointOn_lagrangian) and the necessary KKT conditions with A† ν (ConvexAnalysis.exists_kkt_of_isMinOn, ConvexAnalysis.isMinOn_iff_exists_kkt, ConvexAnalysis.exists_kkt_of_isMinOn_of_hasGradientAt, ConvexAnalysis.exists_kkt_euclidean) need no continuity of f₀. They are in PolyhedralDuality.lean, as cases of duality under the refined Slater condition.

Implementation notes #

The multipliers come from separating 0 from the open convex set {(t, s) ∈ ℝ × ℝ^ι | ∃ y ∈ C, f₀ y - p < t, g y < s} in finite dimension; Slater's condition makes the multiplier of f₀ positive. The KKT conditions follow from the optimality condition for the Lagrangian on the constraint set and the sum rule for its continuous summands.

Completeness of H is needed for the KKT conditions: on the finitely supported sequences with the ℓ² norm and a = (1 / n) ∉ H, minimizing -⟪a, y⟫ subject to ⟪a, y⟫ ≤ 1 has the minimizer e₁ and the Slater point 0, but ∂f₀ = ∅. Continuity of every g i is needed for the stated form, which asks for subgradients also of inactive constraints. For equality constraints, some condition on A such as a finite-dimensional K is needed (A = diag (1 / n) on ℓ²).

References #

Tags #

KKT conditions, Karush–Kuhn–Tucker conditions, Lagrange multipliers, Slater's condition, Lagrangian duality, weak duality, sensitivity, convex program

theorem ConvexAnalysis.exists_lagrangeMultipliers_of_le {ι : Type u_1} [Fintype ι] {E : Type u_2} [AddCommGroup E] [Module ℝ E] {f₀ : E → ℝ} {g : ι → E → ℝ} {C : Set E} (hf₀ : ConvexOn ℝ C f₀) (hg : ∀ (i : ι), ConvexOn ℝ C (g i)) (hslater : ∃ z ∈ C, ∀ (i : ι), g i z < 0) {p : ℝ} (hp : ∀ y ∈ C, (∀ (i : ι), g i y ≤ 0) → p ≤ f₀ y) :
∃ (μ : ι → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ ∀ y ∈ C, p ≤ f₀ y + ∑ i : ι, μ i * g i y

Lagrange multipliers under Slater's condition R, Corollary 28.2.1, BV, Chapter 5: if p is a lower bound of the convex f₀ on {y ∈ C | ∀ i, g i y ≤ 0} for convex g i and a convex set C that contains a point z with g i z < 0 for all i, then there are μ ≥ 0 with p ≤ f₀ y + ∑ μ i g i y for all y ∈ C. No minimizer is needed, and E is any real vector space (Rockafellar: ℝⁿ and p the infimum).

theorem ConvexAnalysis.exists_lagrangeMultipliers {ι : Type u_1} [Fintype ι] {E : Type u_2} [AddCommGroup E] [Module ℝ E] {f₀ : E → ℝ} {g : ι → E → ℝ} {C : Set E} (hf₀ : ConvexOn ℝ C f₀) (hg : ∀ (i : ι), ConvexOn ℝ C (g i)) (hslater : ∃ z ∈ C, ∀ (i : ι), g i z < 0) {x : E} (hxC : x ∈ C) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : E | y ∈ C ∧ ∀ (i : ι), g i y ≤ 0} x) :
∃ (μ : ι → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ (∀ (i : ι), μ i * g i x = 0) ∧ ∀ y ∈ C, f₀ x ≤ f₀ y + ∑ i : ι, μ i * g i y

Lagrange multipliers at a minimizer: under Slater's condition, a minimizer x of f₀ on {y ∈ C | ∀ i, g i y ≤ 0} has multipliers μ ≥ 0 with f₀ x ≤ f₀ y + ∑ μ i g i y for all y ∈ C and complementary slackness μ i g i x = 0.

theorem ConvexAnalysis.exists_dual_eq_primal {ι : Type u_1} [Fintype ι] {E : Type u_2} [AddCommGroup E] [Module ℝ E] {f₀ : E → ℝ} {g : ι → E → ℝ} {C : Set E} (hf₀ : ConvexOn ℝ C f₀) (hg : ∀ (i : ι), ConvexOn ℝ C (g i)) (hslater : ∃ z ∈ C, ∀ (i : ι), g i z < 0) :
∃ (μ : ι → ℝ), (∀ (i : ι), 0 ≤ μ i) ∧ ⨅ y ∈ C, ↑(f₀ y + ∑ i : ι, μ i * g i y) = ⨅ y ∈ {y : E | y ∈ C ∧ ∀ (i : ι), g i y ≤ 0}, ↑(f₀ y)

Zero duality gap with dual attainment for inequality constraints under Slater's condition BV, Chapter 5: there are μ ≥ 0 with ⨅ y ∈ C, f₀ y + ∑ μ i g i y = ⨅ feasible f₀ in EReal, where the feasible set is {y ∈ C | ∀ i, g i y ≤ 0}. No primal minimizer and no lower bound are needed: if f₀ is unbounded below on the feasible set, both sides are ⊥ (with μ = 0). By weak duality, μ solves the dual problem.

theorem ConvexAnalysis.exists_neg_mem_subdifferential_valueFunction {ι : Type u_1} [Fintype ι] {E : Type u_2} [AddCommGroup E] [Module ℝ E] {f₀ : E → ℝ} {g : ι → E → ℝ} {C : Set E} (hf₀ : ConvexOn ℝ C f₀) (hg : ∀ (i : ι), ConvexOn ℝ C (g i)) (hslater : ∃ z ∈ C, ∀ (i : ι), g i z < 0) (hbdd : BddBelow (f₀ '' {y : E | y ∈ C ∧ ∀ (i : ι), g i y ≤ 0})) :
∃ (μ : EuclideanSpace ℝ ι), (∀ (i : ι), 0 ≤ μ.ofLp i) ∧ -μ ∈ subdifferential (fun (u : EuclideanSpace ℝ ι) => ⨅ y ∈ {y : E | y ∈ C ∧ ∀ (i : ι), g i y ≤ u.ofLp i}, ↑(f₀ y)) 0

Sensitivity: multipliers as subgradients of the value function BV, Chapter 5, R, Theorem 29.1 (see also the remarks in R, Section 28): under Slater's condition, if f₀ is bounded below on the feasible set {y ∈ C | ∀ i, g i y ≤ 0}, there is μ ≥ 0 such that -μ is a subgradient at 0 of the value function v u = inf {f₀ y | y ∈ C, ∀ i, g i y ≤ u i} of the perturbed problems, that is, v 0 - ∑ μ i u i ≤ v u for every u. At u = (g i y)_i this is v 0 ≤ f₀ y + ∑ μ i g i y for y ∈ C, so μ is a Lagrange multiplier vector.

theorem ConvexAnalysis.ConvexOn.add_sum_mul {ι : Type u_1} [Fintype ι] {E : Type u_2} [AddCommGroup E] [Module ℝ E] {f₀ : E → ℝ} {g : ι → E → ℝ} {s : Set E} (hf₀ : ConvexOn ℝ s f₀) (hg : ∀ (i : ι), ConvexOn ℝ s (g i)) {μ : ι → ℝ} (hμ : ∀ (i : ι), 0 ≤ μ i) :
ConvexOn ℝ s fun (y : E) => f₀ y + ∑ i : ι, μ i * g i y

For μ ≥ 0, the Lagrangian f₀ + ∑ μ i g i of convex inequality constraints is convex.

noncomputable def ConvexAnalysis.lagrangian {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {K : Type u_2} [NormedAddCommGroup K] [InnerProductSpace ℝ K] {ι : Type u_3} [Fintype ι] (f₀ : H → ℝ) (g : ι → H → ℝ) (A : H →L[ℝ] K) (b : K) (μ : ι → ℝ) (ν : K) (y : H) :

The Lagrangian L(y, μ, ν) = f₀ y + ∑ μ i g i y + ⟪A y - b, ν⟫ of the convex program.

Equations
Instances For
    theorem ConvexAnalysis.lagrangian_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {K : Type u_2} [NormedAddCommGroup K] [InnerProductSpace ℝ K] {ι : Type u_3} [Fintype ι] (f₀ : H → ℝ) (g : ι → H → ℝ) (A : H →L[ℝ] K) (b : K) (μ : ι → ℝ) (ν : K) (hμ : ∀ (i : ι), 0 ≤ μ i) {y : H} (hAy : A y = b) (hgy : ∀ (i : ι), g i y ≤ 0) :
    lagrangian f₀ g A b μ ν y ≤ f₀ y

    Weak Lagrangian duality: for μ ≥ 0, the Lagrangian is at most f₀ on the feasible set.

    theorem ConvexAnalysis.lagrangian_eq_of_complementary {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {K : Type u_2} [NormedAddCommGroup K] [InnerProductSpace ℝ K] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (A : H →L[ℝ] K) (b : K) (μ : ι → ℝ) (ν : K) {x : H} (hAx : A x = b) (hcs : ∀ (i : ι), μ i * g i x = 0) :
    lagrangian f₀ g A b μ ν x = f₀ x

    With complementary slackness at a feasible point, the Lagrangian equals f₀ there.

    theorem ConvexAnalysis.isMinOn_lagrangian_of_stationary {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {K : Type u_2} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [CompleteSpace K] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (A : H →L[ℝ] K) (b : K) {x : H} (μ : ι → ℝ) (ν : K) (u₀ : H) (u : ι → H) (hμ : ∀ (i : ι), 0 ≤ μ i) (hu₀ : u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x) (hu : ∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) (hstat : u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν = 0) :
    IsMinOn (lagrangian f₀ g A b μ ν) Set.univ x

    Stationarity u₀ + ∑ μ i • u i + A† ν = 0 with μ ≥ 0 and subgradients u₀ ∈ ∂f₀ x, u i ∈ ∂(g i) x makes x a minimizer of the Lagrangian over all of H, for any functions.

    theorem ConvexAnalysis.isMinOn_of_kkt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {K : Type u_2} [NormedAddCommGroup K] [InnerProductSpace ℝ K] [CompleteSpace K] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (A : H →L[ℝ] K) (b : K) {x : H} (hAx : A x = b) (μ : ι → ℝ) (ν : K) (u₀ : H) (u : ι → H) (hμ : ∀ (i : ι), 0 ≤ μ i) (hcs : ∀ (i : ι), μ i * g i x = 0) (hu₀ : u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x) (hu : ∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) (hstat : u₀ + ∑ i : ι, μ i • u i + (ContinuousLinearMap.adjoint A) ν = 0) :
    IsMinOn f₀ {y : H | A y = b ∧ ∀ (i : ι), g i y ≤ 0} x

    KKT conditions are sufficient BV, Chapter 5, R, Theorem 28.3, for any functions: if A x = b and 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, then f₀ x ≤ f₀ y for every feasible y. (IsMinOn does not say that x is feasible; with g i x ≤ 0 it is a minimizer.)

    theorem ConvexAnalysis.mem_subdifferential_add_sum_mul_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} (hf₀ : ConvexOn ℝ Set.univ f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) {μ : ι → ℝ} (hμ : ∀ (i : ι), 0 ≤ μ i) {x v : H} :
    v ∈ subdifferential (fun (y : H) => ↑(f₀ y + ∑ i : ι, μ i * g i y)) x ↔ ∃ (u₀ : H) (u : ι → H), u₀ ∈ subdifferential (fun (y : H) => ↑(f₀ y)) x ∧ (∀ (i : ι), u i ∈ subdifferential (fun (y : H) => ↑(g i y)) x) ∧ u₀ + ∑ i : ι, μ i • u i = v

    Subgradients of the Lagrangian of the inequality constraints: for convex f₀, convex continuous g i and μ ≥ 0, the subgradients of f₀ + ∑ μ i g i at x are the vectors u₀ + ∑ μ i • u i with u₀ ∈ ∂f₀ x and u i ∈ ∂(g i) x. No continuity of f₀ is needed (sum rule with the continuous summands μ i g i); continuity of g i gives subgradients also where μ i = 0.

    theorem ConvexAnalysis.exists_kkt_of_isMinOn_of_convex {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {ι : Type u_3} [Fintype ι] {f₀ : H → ℝ} {g : ι → H → ℝ} {C : Set H} (hC : Convex ℝ C) (hf₀ : ConvexOn ℝ Set.univ f₀) (hf₀c : Continuous f₀) (hg : ∀ (i : ι), ConvexOn ℝ Set.univ (g i)) (hgc : ∀ (i : ι), Continuous (g i)) (hslater : ∃ z ∈ C, ∀ (i : ι), g i z < 0) {x : H} (hxC : x ∈ C) (hgx : ∀ (i : ι), g i x ≤ 0) (hx : IsMinOn f₀ {y : H | y ∈ C ∧ ∀ (i : ι), g i y ≤ 0} x) :
    ∃ (μ : ι → ℝ) (u₀ : H) (u : ι → H) (w : 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) ∧ w ∈ normalCone C x ∧ u₀ + ∑ i : ι, μ i • u i + w = 0

    KKT conditions with an abstract convex constraint set C, necessary under Slater's condition (a point of C with g i < 0; no interior point of C is needed): there are μ ≥ 0, subgradients u₀ ∈ ∂f₀ x, u i ∈ ∂(g i) x and a normal vector w ∈ N_C x with u₀ + ∑ μ i • u i + w = 0 and μ i g i x = 0. Compare BC, Proposition 27.21, for lower semicontinuous f₀, g i with values in ]-∞, +∞] and no set C.