Documentation

Tdaf.Analysis.Convex.Saddle.Differential

Directional derivatives and subgradients of a saddle-function #

The one-variable differential theory of convex functions, read for a concave-convex function of a pair on an open rectangle C ×ˢ D where the function is finite and real-valued.

The joint one-sided directional derivative exists and splits, K'(u, v; u', v') = K'(u, v; u', 0) + K'(u, v; 0, v'), and is a finite concave-convex function of the direction. The subdifferential ∂K = ∂₁K ×ˢ ∂₂K is a product — the two variables never interact — so differentiability is a separate condition in each variable: K is differentiable at a point exactly when ∂K is a singleton there. The directional derivatives are semicontinuous and ∂K upper semicontinuous along a convergent sequence.

Main definitions #

Main results #

Four one-variable statements are proved here in real form, each with its concave mirror, because the EReal versions are not usable through a slice without a detour: the gradient inequality and its uniqueness half, the description of ∂f(x) by the directional derivative at an interior point, and nonemptiness of ∂f(x) there.

Implementation notes #

subgradientFst and subgradientSnd test against C and D rather than the whole space; Rockafellar tests against Rᵐ, the case C = univ, and the two agree once K is extended off the rectangle by the simple extension of Saddle/Kernel.lean.

Mathlib gives U × X the supremum norm, so it is not an inner-product space and ∇K (u, v) has to be a pair rather than a vector; the same choice makes the εB of the semicontinuity statements the supremum ball rather than the book's Euclidean one, harmlessly, since every statement quantifies over all ε > 0. Everything is stated on an open rectangle, as in the book.

References #

[^1]: R. T. Rockafellar, Convex Analysis, Princeton University Press, 1970, §35.

The one-sided directional derivative of a real-valued function #

noncomputable def Tdaf.ConvexAnalysis.dirDerivReal {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f : E → ℝ) (x y : E) :

The one-sided directional derivative f'(x; y) of a real-valued function: the limit of the difference quotient as the step decreases to 0, with the junk value 0 where it does not exist.

dirDeriv (Subgradient/Defs.lean) is an infimum instead, which agrees with the limit only when the quotient is monotone in the step — true along a line for a convex function, false for a saddle-function in a joint direction, which is the case treated here.

Equations
Instances For
    theorem Tdaf.ConvexAnalysis.dirDerivReal_eq_of_tendsto {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → ℝ} {x y : E} {L : ℝ} (h : Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds L)) :
    dirDerivReal f x y = L

    Reading off dirDerivReal from a limit that is known to exist.

    theorem Tdaf.ConvexAnalysis.exists_tendsto_slope_of_convexOn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {S : Set E} {f : E → ℝ} {x : E} [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) (y : E) :
    ∃ (L : ℝ), Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds L)

    At a point where a convex function is finite on a neighbourhood, the one-sided difference quotient converges. It is the secant slope along the line t ↦ x + t • y, nondecreasing and bounded below by its value at a negative step, so it converges to its infimum.

    theorem Tdaf.ConvexAnalysis.exists_tendsto_slope_of_concaveOn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {S : Set E} {f : E → ℝ} {x : E} [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) (y : E) :
    ∃ (L : ℝ), Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds L)

    The same for a concave function: the one-sided difference quotient converges.

    theorem Tdaf.ConvexAnalysis.tendsto_slope_dirDerivReal_of_convexOn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {S : Set E} {f : E → ℝ} {x : E} [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) (y : E) :
    Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds (dirDerivReal f x y))

    The difference quotient of a convex function converges to dirDerivReal.

    theorem Tdaf.ConvexAnalysis.tendsto_slope_dirDerivReal_of_concaveOn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {S : Set E} {f : E → ℝ} {x : E} [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) (y : E) :
    Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds (dirDerivReal f x y))

    The difference quotient of a concave function converges to dirDerivReal.

    theorem Tdaf.ConvexAnalysis.tendsto_slope_smul {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → ℝ} {x y : E} {c : ℝ} (hc : 0 < c) {L : ℝ} (h : Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds L)) :
    Filter.Tendsto (fun (t : ℝ) => (f (x + t • c • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds (c * L))

    Positive homogeneity, in the form that transports a limit. No convexity is involved: it is the reparametrisation t ↦ t * c of the difference quotient.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_smul_of_tendsto {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → ℝ} {x y : E} {c : ℝ} (hc : 0 < c) {L : ℝ} (h : Filter.Tendsto (fun (t : ℝ) => (f (x + t • y) - f x) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds L)) :
    dirDerivReal f x (c • y) = c * dirDerivReal f x y

    Positive homogeneity of f'(x; ·), wherever the limit defining it exists.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_zero {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f : E → ℝ) (x : E) :
    dirDerivReal f x 0 = 0

    f'(x; 0) = 0, with no hypothesis: the difference quotient is identically 0.

    Convexity of the directional derivative in the direction #

    theorem Tdaf.ConvexAnalysis.add_smul_convexComb {E : Type u_1} [AddCommGroup E] [Module ℝ E] (x d₁ d₂ : E) {a b : ℝ} (hab : a + b = 1) (t : ℝ) :
    x + t • (a • d₁ + b • d₂) = a • (x + t • d₁) + b • (x + t • d₂)

    The affine identity behind every restriction to a line: for a + b = 1 the point x + t • (a • d₁ + b • d₂) is the corresponding convex combination of x + t • d₁ and x + t • d₂.

    theorem Tdaf.ConvexAnalysis.eventually_nhdsGT_add_smul_mem {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {S : Set E} {x : E} (hS : IsOpen S) (hx : x ∈ S) (y : E) :
    ∀ᶠ (t : ℝ) in nhdsWithin 0 (Set.Ioi 0), x + t • y ∈ S

    Every direction eventually stays inside an open set.

    theorem Tdaf.ConvexAnalysis.convexOn_dirDerivReal {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {S : Set E} {f : E → ℝ} {x : E} (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) :

    f'(x; ·) is a convex function of the direction on the whole space, when f is convex on an open set containing x.

    The difference quotient is convex in the direction for every fixed step, by the affine identity add_smul_convexComb together with the convexity of f; the inequality survives the limit.

    theorem Tdaf.ConvexAnalysis.concaveOn_dirDerivReal {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {S : Set E} {f : E → ℝ} {x : E} (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) :

    The mirror: f'(x; ·) is a concave function of the direction.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_le_slope {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {S : Set E} {f : E → ℝ} {x y : E} (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) {α : ℝ} (hα : 0 < α) (hxα : x + α • y ∈ S) :
    dirDerivReal f x y ≤ (f (x + α • y) - f x) / α

    The directional derivative of a convex function is bounded above by every difference quotient whose step keeps the point inside the set on which f is convex.

    The quotient is nondecreasing in the step, so the limit at 0 is below the value at step α.

    theorem Tdaf.ConvexAnalysis.slope_le_dirDerivReal {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {S : Set E} {f : E → ℝ} {x y : E} (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) {α : ℝ} (hα : 0 < α) (hxα : x + α • y ∈ S) :
    (f (x + α • y) - f x) / α ≤ dirDerivReal f x y

    The concave counterpart of dirDerivReal_le_slope.

    The joint directional derivative of a saddle-function #

    theorem Tdaf.ConvexAnalysis.ConcaveConvexOn.negSwap {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [AddCommGroup X] [Module ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} (hK : ConcaveConvexOn C D K) :
    ConcaveConvexOn D C fun (p : X × U) => -K (p.2, p.1)

    Negating a concave-convex function and swapping its arguments gives a concave-convex function of the swapped pair: (x, w) ↦ -K (w, x) is concave-convex on D × C.

    This involution is what makes the two halves of the joint limit below a single statement: the liminf half for K is the limsup half for the swap.

    theorem Tdaf.ConvexAnalysis.eventually_slope_snd_lt {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {u' : U} {v' : X} {b μ : ℝ} (hb : Filter.Tendsto (fun (t : ℝ) => (K (u, v + t • v') - K (u, v)) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds b)) (hμ : b < μ) :
    ∀ᶠ (t : ℝ) in nhdsWithin 0 (Set.Ioi 0), (K (u + t • u', v + t • v') - K (u + t • u', v)) / t < μ

    The limsup half: moving the concave variable does not raise the difference quotient of the convex variable above its limit at the base point.

    Given μ above K'(u, v; 0, v'), some step α > 0 already realises a secant slope of the convex slice below μ; the concave slice is continuous along t ↦ u + t • u', so the same secant slope at the moving point is still below μ for small t.

    theorem Tdaf.ConvexAnalysis.tendsto_slope_prod {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {u' : U} {v' : X} {a b : ℝ} (ha : Filter.Tendsto (fun (t : ℝ) => (K (u + t • u', v) - K (u, v)) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds a)) (hb : Filter.Tendsto (fun (t : ℝ) => (K (u, v + t • v') - K (u, v)) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds b)) :
    Filter.Tendsto (fun (t : ℝ) => (K (u + t • u', v + t • v') - K (u, v)) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds (a + b))

    The joint one-sided directional derivative of a finite concave-convex function at an interior point of the rectangle exists, and it is the sum of the two partial directional derivatives.

    The difference quotient splits as [K(u + t u', v) - K(u, v)]/t + [K(u + t u', v + t v') - K(u + t u', v)]/t, whose first summand converges by the one-variable existence clause. eventually_slope_snd_lt bounds the second above by anything above K'(u, v; 0, v'), and the matching lower bound is that lemma at the negated swap.

    The joint directional derivative in terms of dirDerivReal #

    theorem Tdaf.ConvexAnalysis.tendsto_slope_dirDerivReal_prod {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (q : U × X) :
    Filter.Tendsto (fun (t : ℝ) => (K ((u, v) + t • q) - K (u, v)) / t) (nhdsWithin 0 (Set.Ioi 0)) (nhds (dirDerivReal (fun (w : U) => K (w, v)) u q.1 + dirDerivReal (fun (x : X) => K (u, x)) v q.2))

    The joint difference quotient of a finite concave-convex function converges, and its limit is dirDerivReal K (u, v) q.

    This is tendsto_slope_prod with the two partial limits supplied by tendsto_slope_dirDerivReal_of_concaveOn and ..._of_convexOn.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_prod {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (q : U × X) :
    dirDerivReal K (u, v) q = dirDerivReal (fun (w : U) => K (w, v)) u q.1 + dirDerivReal (fun (x : X) => K (u, x)) v q.2

    The splitting of the joint directional derivative: K'(u, v; u', v') = K'(u, v; u', 0) + K'(u, v; 0, v').

    theorem Tdaf.ConvexAnalysis.concaveConvexOn_dirDerivReal {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) :

    K'(u, v; ·, ·) is a finite concave-convex function on the whole of U × X.

    By the splitting it is the sum of a concave function of the first direction and a convex function of the second, and each summand is finite because the corresponding slice of K is finite on a neighbourhood of the base point.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_prod_smul {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {c : ℝ} (hc : 0 < c) (q : U × X) :
    dirDerivReal K (u, v) (c • q) = c * dirDerivReal K (u, v) q

    The homogeneity clause: K'(u, v; ·, ·) is positively homogeneous.

    theorem Tdaf.ConvexAnalysis.dirDerivReal_prod_fst {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (u' : U) :
    dirDerivReal K (u, v) (u', 0) = dirDerivReal (fun (w : U) => K (w, v)) u u'

    Read on the first axis: the joint directional derivative in a direction of the form (u', 0) is the partial one, K'(u, v; u', 0).

    theorem Tdaf.ConvexAnalysis.dirDerivReal_prod_snd {U : Type u_1} {X : Type u_2} [AddCommGroup U] [Module ℝ U] [TopologicalSpace U] [ContinuousAdd U] [ContinuousSMul ℝ U] [AddCommGroup X] [Module ℝ X] [TopologicalSpace X] [ContinuousAdd X] [ContinuousSMul ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (v' : X) :
    dirDerivReal K (u, v) (0, v') = dirDerivReal (fun (x : X) => K (u, x)) v v'

    Read on the second axis: the joint derivative at (0, v') is K'(u, v; 0, v').

    The subdifferential of a saddle-function #

    theorem Tdaf.ConvexAnalysis.proper_restrict_coe {E : Type u_1} {s : Set E} (hs : s.Nonempty) (g : E → ℝ) :
    Proper (restrict s fun (x : E) => ↑(g x))

    The restriction of a real-valued function to a nonempty set is a proper EReal-valued function: its effective domain is that set, and it never takes the value -∞.

    def Tdaf.ConvexAnalysis.subgradientFst {U : Type u_2} {X : Type u_3} [NormedAddCommGroup U] [InnerProductSpace ℝ U] (C : Set U) (K : U × X → ℝ) (p : U × X) :
    Set U

    ∂₁K(u, v), the subdifferential of a saddle-function in its concave variable: the supergradients at u of the concave slice K (·, v), tested against the points of C. Rockafellar tests against all of Rᵐ, which is the case C = univ.

    Equations
    Instances For
      def Tdaf.ConvexAnalysis.subgradientSnd {U : Type u_2} {X : Type u_3} [NormedAddCommGroup X] [InnerProductSpace ℝ X] (D : Set X) (K : U × X → ℝ) (p : U × X) :
      Set X

      ∂₂K(u, v): the subgradients at v of the convex slice K (u, ·), tested against D.

      Equations
      Instances For
        def Tdaf.ConvexAnalysis.subgradientSaddle {U : Type u_2} {X : Type u_3} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] (C : Set U) (D : Set X) (K : U × X → ℝ) (p : U × X) :
        Set (U × X)

        ∂K(u, v) = ∂₁K(u, v) × ∂₂K(u, v), Rockafellar's subdifferential of a saddle-function.

        It is a product, not a set of joint subgradients: the two variables never interact, which is what makes differentiability a condition on each variable separately.

        Equations
        Instances For
          @[simp]
          theorem Tdaf.ConvexAnalysis.mem_subgradientFst {U : Type u_2} {X : Type u_3} [NormedAddCommGroup U] [InnerProductSpace ℝ U] {C : Set U} {K : U × X → ℝ} {p : U × X} {y : U} :
          y ∈ subgradientFst C K p ↔ ∀ w ∈ C, K (w, p.2) ≤ K p + inner ℝ (w - p.1) y
          @[simp]
          theorem Tdaf.ConvexAnalysis.mem_subgradientSnd {U : Type u_2} {X : Type u_3} [NormedAddCommGroup X] [InnerProductSpace ℝ X] {D : Set X} {K : U × X → ℝ} {p : U × X} {y : X} :
          y ∈ subgradientSnd D K p ↔ ∀ x ∈ D, K p + inner ℝ (x - p.2) y ≤ K (p.1, x)
          @[simp]
          theorem Tdaf.ConvexAnalysis.mem_subgradientSaddle {U : Type u_2} {X : Type u_3} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {p q : U × X} :
          theorem Tdaf.ConvexAnalysis.subgradientSnd_eq_subgradient {U : Type u_2} {X : Type u_3} [NormedAddCommGroup X] [InnerProductSpace ℝ X] {D : Set X} {K : U × X → ℝ} {p : U × X} (hp : p.2 ∈ D) :
          subgradientSnd D K p = subgradient (innerₗ X) (restrict D fun (x : X) => ↑(K (p.1, x))) p.2

          ∂₂K(u, v) is the subdifferential, in the sense of Subgradient/Defs.lean, of the convex slice extended by +∞ off D. This is the bridge that lets the one-variable subgradient theory be applied to a saddle-function one variable at a time.

          theorem Tdaf.ConvexAnalysis.subgradientFst_eq_neg_subgradient {U : Type u_2} {X : Type u_3} [NormedAddCommGroup U] [InnerProductSpace ℝ U] {C : Set U} {K : U × X → ℝ} {p : U × X} (hp : p.1 ∈ C) :
          subgradientFst C K p = -subgradient (innerₗ U) (restrict C fun (w : U) => ↑(-K (w, p.2))) p.1

          ∂₁K(u, v) is the negated subdifferential of the negated concave slice extended by +∞ off C: the concave variable reaches the convex theory through -K.

          Continuous convergence, and semicontinuity of the directional derivatives #

          theorem Tdaf.ConvexAnalysis.tendsto_eval_prod_of_tendsto {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) :
          Filter.Tendsto (fun (i : ℕ) => Ks i (us i, vs i)) Filter.atTop (nhds (K (u, v)))

          Finite concave-convex functions converge continuously. Pointwise convergence on an open convex rectangle C × D forces K i (u i, v i) → K (u, v) along every sequence (u i, v i) → (u, v) in C × D. This combines uniform convergence on compact rectangles with continuity of the limit, on a closed-ball rectangle.

          theorem Tdaf.ConvexAnalysis.eventually_dirDerivReal_snd_lt {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) {v' : X} {μ : ℝ} (hμ : dirDerivReal (fun (x : X) => K (u, x)) v v' < μ) :
          ∀ᶠ (i : ℕ) in Filter.atTop, dirDerivReal (fun (x : X) => Ks i (us i, x)) (vs i) v' < μ

          The directional derivatives in the convex variable are upper semicontinuous along the convergence, limsup_i K_i'(u_i, v_i; 0, v') ≤ K'(u, v; 0, v').

          Spelled without junk values: every real μ above K'(u, v; 0, v') eventually bounds K_i'(u_i, v_i; 0, v'). A single step α > 0 realises a secant slope of K (u, ·) below μ; continuous convergence carries that slope to K i at the moving points; and the directional derivative is below every secant slope.

          theorem Tdaf.ConvexAnalysis.eventually_lt_dirDerivReal_fst {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) {u' : U} {μ : ℝ} (hμ : μ < dirDerivReal (fun (w : U) => K (w, v)) u u') :
          ∀ᶠ (i : ℕ) in Filter.atTop, μ < dirDerivReal (fun (w : U) => Ks i (w, vs i)) (us i) u'

          The directional derivatives in the concave variable are lower semicontinuous along the convergence, liminf_i K_i'(u_i, v_i; u', 0) ≥ K'(u, v; u', 0).

          This is eventually_dirDerivReal_snd_lt read for the negated swap; it is proved here directly because the roles of the two sequences do not swap.

          Upper semicontinuity of the subdifferentials #

          Negating a set thickened by a ball thickens the negated set by the same ball: the closed ball about the origin is symmetric.

          theorem Tdaf.ConvexAnalysis.prod_add_prod_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedAddCommGroup X] {A A' : Set U} {B B' : Set X} :
          (A + A') ×ˢ (B + B') ⊆ A ×ˢ B + A' ×ˢ B'

          A product of thickened sets is contained in the thickening of the product.

          theorem Tdaf.ConvexAnalysis.eventually_subgradientSnd_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) {ε : ℝ} (hε : 0 < ε) :

          In the convex variable: ∂₂K_i(u_i, v_i) ⊆ ∂₂K(u, v) + εB eventually.

          Upper semicontinuity of the one-variable subdifferential, applied to the convex slices K_i (u_i, ·) extended by +∞ off D; the family converges pointwise on D to K (u, ·) by continuous convergence.

          theorem Tdaf.ConvexAnalysis.eventually_subgradientFst_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) {ε : ℝ} (hε : 0 < ε) :

          In the concave variable: ∂₁K_i(u_i, v_i) ⊆ ∂₁K(u, v) + εB eventually.

          The same argument through -K: ∂₁ is the negated subdifferential of the negated concave slice, and negation carries the ε-thickening across because the ball is symmetric.

          theorem Tdaf.ConvexAnalysis.eventually_subgradientSaddle_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {Ks : ℕ → U × X → ℝ} {K : U × X → ℝ} {u : U} {v : X} {us : ℕ → U} {vs : ℕ → X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hKs : ∀ (i : ℕ), ConcaveConvexOn C D (Ks i)) (hK : ConcaveConvexOn C D K) (hconv : ∀ q ∈ C ×ˢ D, Filter.Tendsto (fun (i : ℕ) => Ks i q) Filter.atTop (nhds (K q))) (hu : u ∈ C) (hv : v ∈ D) (hus : Filter.Tendsto us Filter.atTop (nhds u)) (hvs : Filter.Tendsto vs Filter.atTop (nhds v)) {ε : ℝ} (hε : 0 < ε) :

          ∂K_i(u_i, v_i) ⊆ ∂K(u, v) + εB eventually, with B the unit ball of U × X.

          The subdifferential of a saddle-function is the product of the two one-variable ones, and the unit ball of a product is the product of the unit balls (Metric.closedBall_prod_same), so the statement is the conjunction of the previous two.

          The constant sequence: semicontinuity on the rectangle #

          theorem Tdaf.ConvexAnalysis.lowerSemicontinuousAt_dirDerivReal_fst {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (u' : U) :
          LowerSemicontinuousAt (fun (p : U × X) => dirDerivReal (fun (w : U) => K (w, p.2)) p.1 u') (u, v)

          K'(u, v; u', 0) is lower semicontinuous in (u, v) on C × D.

          The sequential statement for the constant sequence K, K, K, …, transported from sequences to the neighbourhood filter (𝓝 (u, v) is countably generated).

          theorem Tdaf.ConvexAnalysis.upperSemicontinuousAt_dirDerivReal_snd {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (v' : X) :
          UpperSemicontinuousAt (fun (p : U × X) => dirDerivReal (fun (x : X) => K (p.1, x)) p.2 v') (u, v)

          K'(u, v; 0, v') is upper semicontinuous in (u, v) on C × D.

          theorem Tdaf.ConvexAnalysis.eventually_nhds_subgradientSaddle_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {ε : ℝ} (hε : 0 < ε) :

          ∂K is upper semicontinuous on C × D: ∂K(x, y) ⊆ ∂K(u, v) + εB for every (x, y) near (u, v).

          Tangent inequalities at a point of differentiability #

          theorem Tdaf.ConvexAnalysis.dirDerivReal_eq_of_hasFDerivAt {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → ℝ} {x : E} {L : E →L[ℝ] ℝ} (hd : HasFDerivAt f L x) (y : E) :
          dirDerivReal f x y = L y

          Where a real-valued function is Fréchet differentiable, dirDerivReal is the value of the derivative in the given direction.

          theorem Tdaf.ConvexAnalysis.le_add_of_hasFDerivAt_of_convexOn {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {S : Set E} {f : E → ℝ} {x : E} {L : E →L[ℝ] ℝ} (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) (hd : HasFDerivAt f L x) {z : E} (hz : z ∈ S) :
          f x + L (z - x) ≤ f z

          The gradient inequality: a convex function on an open set lies above its tangent at a point of differentiability.

          The difference quotient is nondecreasing in the step, so its limit at 0 — the derivative — is below its value at step 1, which is f z - f x.

          theorem Tdaf.ConvexAnalysis.le_add_of_hasFDerivAt_of_concaveOn {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {S : Set E} {f : E → ℝ} {x : E} {L : E →L[ℝ] ℝ} (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) (hd : HasFDerivAt f L x) {z : E} (hz : z ∈ S) :
          f z ≤ f x + L (z - x)

          The gradient inequality for a concave function: it lies below its tangent.

          theorem Tdaf.ConvexAnalysis.eq_of_forall_add_le_of_hasFDerivAt {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {S : Set E} {f : E → ℝ} {x : E} {L M : E →L[ℝ] ℝ} (hS : IsOpen S) (hx : x ∈ S) (hd : HasFDerivAt f L x) (hM : ∀ z ∈ S, f x + M (z - x) ≤ f z) :
          M = L

          A linear function that minorises the increment of f is the derivative. No convexity is used — only the limit of the difference quotient along the two opposite rays.

          theorem Tdaf.ConvexAnalysis.eq_of_forall_le_add_of_hasFDerivAt {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {S : Set E} {f : E → ℝ} {x : E} {L M : E →L[ℝ] ℝ} (hS : IsOpen S) (hx : x ∈ S) (hd : HasFDerivAt f L x) (hM : ∀ z ∈ S, f z ≤ f x + M (z - x)) :
          M = L

          The same for a concave function: a linear majorant of the increment is the derivative.

          The gradient of a saddle-function, as a pair #

          The continuous linear functional on U × X represented by a pair q = (u*, v*), namely (w, x) ↦ ⟪w, u*⟫ + ⟪x, v*⟫.

          A product of inner-product spaces carries the supremum norm in Mathlib, so U × X is not itself an inner-product space and Mathlib's gradient does not apply to a function of a pair. Rockafellar's ∇K (u, v) is the pair q for which prodInnerL q is the Fréchet derivative.

          Equations
          Instances For

            ∇K p = q: K is Fréchet differentiable at p with derivative prodInnerL q. This is Rockafellar's gradient of a finite saddle-function, split into its two blocks.

            Equations
            Instances For

              A saddle-function with a gradient is differentiable.

              theorem Tdaf.ConvexAnalysis.HasSaddleGradientAt.hasFDerivAt_fst {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {K : U × X → ℝ} {q : U × X} {u : U} {v : X} (h : HasSaddleGradientAt K q (u, v)) :
              HasFDerivAt (fun (w : U) => K (w, v)) ((innerSL ℝ) q.1) u

              The concave slice of a differentiable saddle-function is differentiable, with the first block of the gradient as its derivative.

              theorem Tdaf.ConvexAnalysis.HasSaddleGradientAt.hasFDerivAt_snd {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {K : U × X → ℝ} {q : U × X} {u : U} {v : X} (h : HasSaddleGradientAt K q (u, v)) :
              HasFDerivAt (fun (x : X) => K (u, x)) ((innerSL ℝ) q.2) v

              The convex slice of a differentiable saddle-function is differentiable, with the second block of the gradient as its derivative.

              In finite dimensions every continuous linear functional on U × X is a prodInnerL, by the Riesz representation in each factor.

              In finite dimensions, being differentiable and having a saddle-gradient are the same.

              Thickening a singleton #

              Membership in a singleton thickened by a closed ball about the origin is a bound on the distance to that point.

              Differentiability and a unique subgradient #

              theorem Tdaf.ConvexAnalysis.subgradientSaddle_eq_singleton_iff {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {p q : U × X} (hne₁ : (subgradientFst C K p).Nonempty) (hne₂ : (subgradientSnd D K p).Nonempty) :

              The subdifferential of a saddle-function is a singleton exactly when each of its two blocks is, provided both are nonempty. It is a product, so this is not automatic: an empty factor makes the product empty whatever the other factor is.

              theorem Tdaf.ConvexAnalysis.subgradientFst_eq_singleton_of_hasSaddleGradientAt {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {C : Set U} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hK : ConcaveOn ℝ C fun (w : U) => K (w, v)) (hu : u ∈ C) (hd : HasSaddleGradientAt K q (u, v)) :

              At a point where K is differentiable the first block of ∇K is the only element of ∂₁K(u, v).

              theorem Tdaf.ConvexAnalysis.subgradientSnd_eq_singleton_of_hasSaddleGradientAt {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hDo : IsOpen D) (hK : ConvexOn ℝ D fun (x : X) => K (u, x)) (hv : v ∈ D) (hd : HasSaddleGradientAt K q (u, v)) :

              The same in the convex variable: the second block of ∇K is the only element of ∂₂K(u, v).

              theorem Tdaf.ConvexAnalysis.subgradientSaddle_eq_singleton_of_hasSaddleGradientAt {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hDo : IsOpen D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (hd : HasSaddleGradientAt K q (u, v)) :

              Where a finite concave-convex function is differentiable, its gradient is its unique subgradient.

              theorem Tdaf.ConvexAnalysis.subgradientSnd_nonempty {U : Type u_1} {X : Type u_2} [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConvexOn ℝ D fun (x : X) => K (u, x)) (hv : v ∈ D) :

              ∂₂K(u, v) is nonempty at every point of the open rectangle: a convex function has a subgradient wherever it is finite on a neighbourhood.

              theorem Tdaf.ConvexAnalysis.subgradientFst_nonempty {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] {C : Set U} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hK : ConcaveOn ℝ C fun (w : U) => K (w, v)) (hu : u ∈ C) :

              ∂₁K(u, v) is nonempty at every point of the open rectangle, by the same fact for the concave slice.

              theorem Tdaf.ConvexAnalysis.eventually_nhds_subgradientFst_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {ε : ℝ} (hε : 0 < ε) :

              Upper semicontinuity of ∂₁K on the rectangle, in the concave variable alone.

              theorem Tdaf.ConvexAnalysis.eventually_nhds_subgradientSnd_subset {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) {ε : ℝ} (hε : 0 < ε) :

              Upper semicontinuity of ∂₂K on the rectangle, in the convex variable alone.

              theorem Tdaf.ConvexAnalysis.hasSaddleGradientAt_of_subgradient_eq_singleton {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) (h₁ : subgradientFst C K (u, v) = {q.1}) (h₂ : subgradientSnd D K (u, v) = {q.2}) :

              Converse half: a finite concave-convex function with a unique subgradient at a point of an open rectangle is differentiable there, jointly in the two variables.

              The proof is not the book's, which upgrades separate to joint differentiability through uniform convergence of the rescalings h_λ (x, y) = [K (u + λx, v + λy) - K (u, v) - λ⟪x, u*⟫ - λ⟪y, v*⟫] / λ. Upper semicontinuity of ∂K gives the estimate outright: the increment K (u + a, v + b) - K (u, v) is sandwiched by subgradient inequalities at (u, v), (u, v + b) and (u + a, v + b), each of whose subgradients lies within ε of q, so the error is at most ε (‖a‖ + ‖b‖).

              theorem Tdaf.ConvexAnalysis.hasSaddleGradientAt_iff_subgradientSaddle_eq_singleton {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) :

              A finite concave-convex function is differentiable at a point of an open rectangle exactly when it has a unique subgradient there, and the gradient is then that subgradient.

              theorem Tdaf.ConvexAnalysis.differentiableAt_iff_exists_subgradientSaddle_eq_singleton {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) :
              DifferentiableAt ℝ K (u, v) ↔ ∃ (q : U × X), subgradientSaddle C D K (u, v) = {q}

              The same without naming the gradient: differentiability and unique subdifferentiability are the same property.

              Subgradients through the directional derivative, in real form #

              theorem Tdaf.ConvexAnalysis.eq_of_forall_real_inner_le {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {y z : E} (h : ∀ (w : E), inner ℝ w y ≤ inner ℝ w z) :
              y = z

              An inner product separates points on the right, and a one-sided comparison is enough because directions come in pairs.

              theorem Tdaf.ConvexAnalysis.forall_inner_le_dirDerivReal_iff {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {S : Set E} {f : E → ℝ} {x y : E} (hS : IsOpen S) (hf : ConvexOn ℝ S f) (hx : x ∈ S) :
              (∀ (w : E), inner ℝ w y ≤ dirDerivReal f x w) ↔ ∀ z ∈ S, f x + inner ℝ (z - x) y ≤ f z

              y satisfies the subgradient inequality of f at x on S exactly when ⟪w, y⟫ ≤ f'(x; w) in every direction w.

              Rockafellar states it as "cl f'(x; ·) is the support function of ∂f(x)"; at an interior point of an open set no closure is needed, and this is the pointwise reading.

              theorem Tdaf.ConvexAnalysis.forall_dirDerivReal_le_inner_iff {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {S : Set E} {f : E → ℝ} {x y : E} (hS : IsOpen S) (hf : ConcaveOn ℝ S f) (hx : x ∈ S) :
              (∀ (w : E), dirDerivReal f x w ≤ inner ℝ w y) ↔ ∀ z ∈ S, f z ≤ f x + inner ℝ (z - x) y

              The concave case: y is a supergradient exactly when f'(x; w) ≤ ⟪w, y⟫ in every direction.

              Differentiability is linearity of K'(u, v; ·, ·) #

              theorem Tdaf.ConvexAnalysis.subgradientFst_eq_singleton_of_dirDerivReal {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] {C : Set U} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hK : ConcaveOn ℝ C fun (w : U) => K (w, v)) (hu : u ∈ C) (h : ∀ (w : U), dirDerivReal (fun (w : U) => K (w, v)) u w = inner ℝ w q.1) :

              A partial directional derivative equal to the linear function ⟪·, q.1⟫ pins ∂₁K(u, v) down to {q.1}, for the concave variable. Unlike the usual Gâteaux criterion this needs no upgrade to Fréchet differentiability, because its conclusion is about subgradients.

              theorem Tdaf.ConvexAnalysis.subgradientSnd_eq_singleton_of_dirDerivReal {U : Type u_1} {X : Type u_2} [NormedAddCommGroup X] [InnerProductSpace ℝ X] {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hDo : IsOpen D) (hK : ConvexOn ℝ D fun (x : X) => K (u, x)) (hv : v ∈ D) (h : ∀ (w : X), dirDerivReal (fun (x : X) => K (u, x)) v w = inner ℝ w q.2) :

              The same for the convex variable: ∂₂K(u, v) is pinned down to {q.2}.

              theorem Tdaf.ConvexAnalysis.hasSaddleGradientAt_iff_forall_dirDerivReal_eq {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} {q : U × X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) :
              HasSaddleGradientAt K q (u, v) ↔ ∀ (z : U × X), dirDerivReal K (u, v) z = (prodInnerL q) z

              ∇K(u, v) = q exactly when K'(u, v; ·, ·) is the linear function prodInnerL q. The forward direction needs no hypothesis; the converse restricts the identity to the two axes, turns each into a one-point subdifferential, and invokes the differentiability criterion.

              theorem Tdaf.ConvexAnalysis.differentiableAt_iff_isLinearMap_dirDerivReal {U : Type u_1} {X : Type u_2} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup X] [InnerProductSpace ℝ X] [FiniteDimensional ℝ X] {C : Set U} {D : Set X} {K : U × X → ℝ} {u : U} {v : X} (hCo : IsOpen C) (hCc : Convex ℝ C) (hDo : IsOpen D) (hDc : Convex ℝ D) (hK : ConcaveConvexOn C D K) (hu : u ∈ C) (hv : v ∈ D) :

              For a concave-convex function already finite on an open rectangle — Rockafellar's "K is finite on a neighbourhood of (u, v)" — differentiability at (u, v) is exactly linearity of K'(u, v; ·, ·).

              The book's last clause, that finiteness of the m + n two-sided partial derivatives already suffices, is not formalised: it is a statement about a coordinate basis rather than about the space.