Documentation

Tdaf.Analysis.Convex.Subgradient.Defs

Subgradients, normal cones and directional derivatives #

Over a dual pair B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ, a subgradient of f at x is a y : F for which the affine function z ↦ f x + ⟨z - x, y⟩ minorizes f; equivalently, one whose graph is a non-vertical supporting hyperplane to epi f at (x, f x). The set of them is the subdifferential ∂f x. The definition is deliberately algebraic — a system of weak linear inequalities, one for each z — and no topology enters until the closure of f does. This file also introduces the normal cone N_C(x) and the one-sided directional derivative f'(x; y), and develops the elementary theory of all three.

Main definitions #

Main results #

Implementation notes #

∂f is available both pointwise and as a relation. The monotonicity and Legendre theory is about the graph, and with subgradientRel the inversion reads literally as ∂(f*) = (∂f)⁻¹. ∂f x is not bundled as a convex set: convexity is unconditional but closedness needs a continuous pairing, and a bundled object would carry that hypothesis as data. N_C(x) is bundled, being a cone for every C and x.

The finiteness hypothesis on dirDeriv is not removable: EReal has ⊤ - ⊤ = ⊥, so off dom f the difference quotient is ⊥ in every direction and f'(x; 0) = 0 fails. Statements that mention a value of f'(x; ·) therefore carry f x ≠ ⊤ and f x ≠ ⊥; positive homogeneity is the exception, being a reindexing of the infimum.

References #

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

Definitions #

def Tdaf.ConvexAnalysis.subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) (x : E) :
Set F

The subdifferential of f at x with respect to the pairing B: the set of y : F satisfying the subgradient inequality f z ≥ f x + ⟨z - x, y⟩ for every z.

Geometrically, when f x is finite, y is a subgradient exactly when the graph of the affine function z ↦ f x + ⟨z - x, y⟩ is a non-vertical supporting hyperplane to epi f at (x, f x).

Equations
Instances For
    def Tdaf.ConvexAnalysis.subgradientRel {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) :
    SetRel E F

    The graph of the subdifferential: the multivalued mapping ∂f : x ↦ ∂f x, as a SetRel E F. This is the object the monotonicity and duality theory is about, and what conjugation inverts.

    Equations
    Instances For
      def Tdaf.ConvexAnalysis.normalCone {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (C : Set E) (x : E) :
      Set F

      The normal cone to C at x: the y : F making a non-acute angle with every direction z - x pointing from x into C. Introducing N_C(x) as ∂δ(x | C) would leave it empty for x ∉ C; here it is defined for every x, which is what makes it a pointed cone with no hypothesis. The price is the x ∈ C in subgradient_indicatorFn.

      Equations
      Instances For
        @[simp]
        theorem Tdaf.ConvexAnalysis.mem_subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
        y ∈ subgradient B f x ↔ ∀ (z : E), f x + ↑((B (z - x)) y) ≤ f z
        @[simp]
        theorem Tdaf.ConvexAnalysis.mem_subgradientRel {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
        @[simp]
        theorem Tdaf.ConvexAnalysis.mem_normalCone {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {C : Set E} {x : E} {y : F} :
        y ∈ normalCone B C x ↔ ∀ z ∈ C, (B (z - x)) y ≤ 0

        The normal cone as a pointed convex cone, with no hypothesis on C or on x.

        Equations
        Instances For
          @[simp]
          theorem Tdaf.ConvexAnalysis.coe_normalPointedCone {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (C : Set E) (x : E) :
          ↑(normalPointedCone B C x) = normalCone B C x
          theorem Tdaf.ConvexAnalysis.convex_subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) (x : E) :

          The subdifferential is a convex set, with no hypothesis on f: it is an intersection of half-spaces of F, one for each z.

          theorem Tdaf.ConvexAnalysis.mem_dom_of_mem_subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (hp : Proper f) (hy : y ∈ subgradient B f x) :
          x ∈ dom f

          A point with a subgradient lies in the effective domain: were f x = ⊤, the subgradient inequality would read ⊤ ≤ f z for every z and force f ≡ ⊤, which properness forbids.

          def Tdaf.ConvexAnalysis.domSubgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) :
          Set E

          dom ∂f: the set of points at which f has at least one subgradient.

          Equations
          Instances For
            @[simp]
            theorem Tdaf.ConvexAnalysis.mem_domSubgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} :
            theorem Tdaf.ConvexAnalysis.domSubgradient_subset_dom {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} (hp : Proper f) :

            dom ∂f ⊆ dom f: a subgradient at x forces f x < ⊤.

            Subgradients, conjugates and Fenchel's inequality #

            theorem Tdaf.ConvexAnalysis.mem_subgradient_iff_forall_sub_le {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
            y ∈ subgradient B f x ↔ ∀ (z : E), ↑((B z) y) - f z ≤ ↑((B x) y) - f x

            y ∈ ∂f x says exactly that ⟨·, y⟩ - f attains its supremum at x.

            theorem Tdaf.ConvexAnalysis.mem_subgradient_iff_conj_le {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
            y ∈ subgradient B f x ↔ conj B f y ≤ ↑((B x) y) - f x

            That supremum is f* y, so y ∈ ∂f x is the inequality f* y ≤ ⟨x, y⟩ - f x.

            theorem Tdaf.ConvexAnalysis.mem_subgradient_iff_conj_eq {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
            y ∈ subgradient B f x ↔ conj B f y = ↑((B x) y) - f x

            Attainment written as an equation: y ∈ ∂f x exactly when f* y = ⟨x, y⟩ - f x. This is the ∞ - ∞-free reading of equality in Fenchel's inequality.

            theorem Tdaf.ConvexAnalysis.mem_subgradient_iff_add_conj_le {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} :
            y ∈ subgradient B f x ↔ f x + conj B f y ≤ ↑((B x) y)

            The same in the additive form f x + f* y ≤ ⟨x, y⟩. Unconditional: adding a real number is an order isomorphism of EReal, so no ∞ - ∞ arises.

            theorem Tdaf.ConvexAnalysis.Proper.mem_subgradient_iff_add_conj_eq {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (hp : Proper f) :
            y ∈ subgradient B f x ↔ f x + conj B f y = ↑((B x) y)

            y ∈ ∂f x exactly when Fenchel's inequality holds with equality at (x, y). Properness is not decorative: for f ≡ ⊤ every y is a subgradient at every x, while f* ≡ ⊥ and so f x + f* y = ⊤ + ⊥ = ⊥ ≠ ⟨x, y⟩.

            theorem Tdaf.ConvexAnalysis.Proper.mem_subgradient_tfae {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} (hp : Proper f) (x : E) (y : F) :
            [y ∈ subgradient B f x, ∀ (z : E), ↑((B z) y) - f z ≤ ↑((B x) y) - f x, f x + conj B f y ≤ ↑((B x) y), f x + conj B f y = ↑((B x) y)].TFAE

            The four equivalent forms of subgradient membership: for a proper f the conditions

            • (a) y ∈ ∂f x;
            • (b) ⟨·, y⟩ - f attains its supremum at x;
            • (c) f x + f* y ≤ ⟨x, y⟩;
            • (d) f x + f* y = ⟨x, y⟩

            are equivalent. Convexity of f is nowhere used; properness is needed only to close the loop back from (d).

            theorem Tdaf.ConvexAnalysis.mem_subgradient_conj_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (h : biconj B f x = f x) :
            x ∈ subgradient B.flip (conj B f) y ↔ y ∈ subgradient B f x

            x ∈ ∂f* y and y ∈ ∂f x agree at every x where f coincides with its biconjugate — for a closed proper convex f, everywhere.

            theorem Tdaf.ConvexAnalysis.biconj_eq_of_mem_subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (hy : y ∈ subgradient B f x) :
            biconj B f x = f x

            At a point where f is subdifferentiable it agrees with its biconjugate. No topology and no convexity are needed.

            theorem Tdaf.ConvexAnalysis.proper_of_mem_subgradient {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) (hy : y ∈ subgradient B f x) :

            A function subdifferentiable at a point where it is finite is proper. The subgradient inequality exhibits a finite affine minorant, ruling out the value ⊥.

            theorem Tdaf.ConvexAnalysis.proper_of_subgradient_nonempty {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) (h : (subgradient B f x).Nonempty) :

            The same in the "subdifferentiable" phrasing.

            theorem Tdaf.ConvexAnalysis.subgradient_eq_empty_of_notMem_dom {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} (hp : Proper f) (hx : x ∉ dom f) :

            A proper function has no subgradients off its effective domain. Unlike the finer statements about where ∂f is non-empty, this involves no relative interiors.

            Indicator functions, normal cones and polar cones #

            theorem Tdaf.ConvexAnalysis.subgradient_indicatorFn {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {C : Set E} {x : E} (hx : x ∈ C) :

            The subdifferential of an indicator function is the normal cone, at any point of C.

            theorem Tdaf.ConvexAnalysis.subgradient_indicatorFn_of_notMem {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {C : Set E} {x : E} (hC : C.Nonempty) (hx : x ∉ C) :

            Off C there are no subgradients of δ(· | C), provided C is nonempty.

            theorem Tdaf.ConvexAnalysis.mem_subgradient_indicatorFn_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {C : Set E} {x : E} {y : F} (hC : C.Nonempty) :

            Membership in ∂δ(· | C) in full, for nonempty C.

            theorem Tdaf.ConvexAnalysis.mem_subgradient_indicatorFn_pointedCone {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {x : E} {y : F} (K : PointedCone ℝ E) :
            y ∈ subgradient B (indicatorFn ↑K) x ↔ x ∈ K ∧ y ∈ normalCone B (↑K) 0 ∧ (B x) y = 0

            For a pointed convex cone K, y is a subgradient of δ(· | K) at x exactly when x ∈ K, y lies in the polar cone K° = N_K(0), and ⟨x, y⟩ = 0. The classical route assumes K closed and goes through δ(· | K)* = δ(· | K°); the direct argument — put z = 0 and z = x + x into the subgradient inequality — needs no topology, so K is arbitrary here.

            Closedness of the subdifferential #

            theorem Tdaf.ConvexAnalysis.continuous_add_coe (u : EReal) :
            Continuous fun (t : ℝ) => u + ↑t

            Adding a fixed EReal to a real is continuous. Note that u + · on all of EReal is not continuous when u = ⊤, because ⊤ + ⊥ = ⊥; restricting the argument to the reals saves it.

            The subdifferential is closed once every ⟨z, ·⟩ : F → ℝ is continuous — automatic in ℝⁿ, and here the instance closedFn_conj also asks for.

            The directional derivative #

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

            The one-sided directional derivative f'(x; y), as the infimum over a > 0 of the difference quotient. The quotient is nondecreasing in a for convex f finite at x, so the infimum is the limit as a ↓ 0, the classical definition. Off dom f the expression degenerates to ⊥ in every direction.

            Equations
            Instances For
              theorem Tdaf.ConvexAnalysis.dirDeriv_apply {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f : E → EReal) (x y : E) :
              dirDeriv f x y = ⨅ a ∈ Set.Ioi 0, (f (x + a • y) - f x) / ↑a
              theorem Tdaf.ConvexAnalysis.dirDeriv_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f : E → EReal) (x y : E) {a : ℝ} (ha : 0 < a) :
              dirDeriv f x y ≤ (f (x + a • y) - f x) / ↑a

              The directional derivative is a lower bound for every difference quotient.

              theorem Tdaf.ConvexAnalysis.le_dirDeriv {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x y : E} {c : EReal} (h : ∀ (a : ℝ), 0 < a → c ≤ (f (x + a • y) - f x) / ↑a) :
              c ≤ dirDeriv f x y

              A lower bound for all difference quotients bounds the directional derivative.

              theorem Tdaf.ConvexAnalysis.dirDeriv_lt_iff {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x y : E} {c : EReal} :
              dirDeriv f x y < c ↔ ∃ (a : ℝ), 0 < a ∧ (f (x + a • y) - f x) / ↑a < c

              Witness extraction from the defining infimum.

              theorem Tdaf.ConvexAnalysis.dirDeriv_zero {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x : E} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) :
              dirDeriv f x 0 = 0

              f'(x; 0) = 0 whenever f x is finite.

              f'(x; ·) is positively homogeneous. Unlike its other basic properties this needs no hypothesis: it is the reindexing a ↦ a * c of the defining infimum.

              theorem Tdaf.ConvexAnalysis.monotoneOn_sub_div {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) {r : ℝ} (hr : f x = ↑r) (y : E) :
              MonotoneOn (fun (a : ℝ) => (f (x + a • y) - f x) / ↑a) (Set.Ioi 0)

              For convex f finite at x, the difference quotient is nondecreasing in the step a. This is what makes the infimum defining dirDeriv the limit as a ↓ 0.

              theorem Tdaf.ConvexAnalysis.exists_le_of_dirDeriv_lt {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) {r : ℝ} (hr : f x = ↑r) {y : E} {m : ℝ} (h : dirDeriv f x y < ↑m) :
              ∃ (a₀ : ℝ), 0 < a₀ ∧ ∀ (a : ℝ), 0 < a → a ≤ a₀ → f (x + a • y) ≤ ↑(r + m * a)

              The form in which that monotonicity is consumed: if f'(x; y) < m then f (x + a • y) ≤ f x + m * a for every sufficiently small a > 0.

              theorem Tdaf.ConvexAnalysis.convexFn_dirDeriv {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) :

              f'(x; ·) is a convex function, for convex f finite at x.

              theorem Tdaf.ConvexAnalysis.neg_dirDeriv_neg_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) (y : E) :
              -dirDeriv f x (-y) ≤ dirDeriv f x y

              -f'(x; -y) ≤ f'(x; y). No ≠ ⊥ hypothesis on f'(x; ·) appears, although PosHomogeneous.neg_le carries one: f'(x; ·) really can take the value ⊥.

              The subdifferential and the directional derivative #

              theorem Tdaf.ConvexAnalysis.mem_subgradient_iff_le_dirDeriv {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) :
              y ∈ subgradient B f x ↔ ∀ (v : E), ↑((B v) y) ≤ dirDeriv f x v

              y is a subgradient of f at x exactly when the linear function ⟨·, y⟩ is majorized by the directional derivative f'(x; ·). Neither convexity of f nor monotonicity of the difference quotient is used.

              theorem Tdaf.ConvexAnalysis.supportSet_dirDeriv {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) :

              The support set of f'(x; ·) is the subdifferential.

              theorem Tdaf.ConvexAnalysis.conj_dirDeriv {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) :

              Dually, the conjugate of f'(x; ·) is the indicator of ∂f x. Neither convexity of f nor any topology is needed.

              Conjugate subdifferentials, and the closure of the directional derivative #

              Everything here consumes Fenchel–Moreau, so it carries the pairing hypotheses of biconj_eq_clFn.

              theorem Tdaf.ConvexAnalysis.mem_subgradient_clFn_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace E] [IsTopologicalAddGroup E] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} {y : F} [IsContinuousPairing B] (hx : clFn f x = f x) :

              ∂(cl f) x = ∂f x wherever (cl f) x = f x. Only continuity of the pairing is needed, through conj_clFn.

              Pointwise inversion: for a closed proper convex f, x ∈ ∂f* y and y ∈ ∂f x say the same thing.

              For a closed proper convex f, ∂f* is the inverse of ∂f as a multivalued mapping — the graph of ∂f* is the flip of the graph of ∂f.

              At a point where a convex f is subdifferentiable, (cl f) x = f x.

              And then ∂(cl f) x = ∂f x.

              theorem Tdaf.ConvexAnalysis.subgradient_conj_indicatorFn {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace E] [IsTopologicalAddGroup E] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [ContinuousSMul ℝ E] [LocallyConvexSpace ℝ E] [IsCompatiblePairing B] {C : Set E} (hC : IsClosed C) (hCc : Convex ℝ C) (hCne : C.Nonempty) (y : F) :
              subgradient B.flip (conj B (indicatorFn C)) y = {x : E | x ∈ C ∧ ∀ z ∈ C, (B z) y ≤ (B x) y}

              For a nonempty closed convex set C, the subgradients at y of the support function δ*(· | C) = δ(· | C)* are exactly the points of C at which ⟨·, y⟩ attains its maximum over C.

              theorem Tdaf.ConvexAnalysis.subgradient_supportFn {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace E] [IsTopologicalAddGroup E] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [ContinuousSMul ℝ E] [LocallyConvexSpace ℝ E] [IsCompatiblePairing B] {C : Set E} (hC : IsClosed C) (hCc : Convex ℝ C) (hCne : C.Nonempty) (y : F) :
              subgradient B.flip (supportFn B C) y = {x : E | x ∈ C ∧ ∀ z ∈ C, (B z) y ≤ (B x) y}

              The same in terms of supportFn: ∂δ*(· | C) y is the face of C on which ⟨·, y⟩ is maximized.

              The closure of f'(x; ·) is the support function of ∂f x, the conjugate of f'(x; ·) being the indicator of that set.