Documentation

Tdaf.Analysis.Convex.Closure

Closures of convex functions #

Two operations on functions f : E → EReal over a real topological vector space: the lower semicontinuous hull lscHull f, whose epigraph is closure (epi f), and the closure clFn f of a convex function, which is that hull except that it is flattened to the constant ⊥ when the hull takes the value ⊥ anywhere.

Main definitions #

Main results #

Implementation notes #

clFn branches on lscHull f, not on f as Rockafellar does. The two agree for convex f on ℝⁿ but not in general, and branching on f would make Fenchel–Moreau false: a discontinuous linear functional g on an infinite-dimensional space is convex, finite and proper, yet its kernel is dense, so lscHull g ≡ ⊥ and g has no continuous affine minorant at all. Branching on the hull is the standard Γ-regularization and makes f** = clFn f unconditional; the price is that Proper f → Proper (clFn f) is finite-dimensional and appears as ConvexFn.proper_clFn in Tdaf/Analysis/Convex/RelativeInterior.lean, together with the relative-interior dichotomy itself.

References #

Lower semicontinuity #

A function is lower semicontinuous exactly when its epigraph is closed.

A function is lower semicontinuous exactly when every sublevel set {x | f x ≤ α} with α real is closed.

The lower semicontinuous hull and the closure of a convex function #

noncomputable def Tdaf.ConvexAnalysis.lscHull {E : Type u_1} [TopologicalSpace E] (f : E → EReal) :
E → EReal

The lower semicontinuous hull of f, the function whose epigraph is the closure of the epigraph of f: the greatest lower semicontinuous minorant of f.

Equations
Instances For
    noncomputable def Tdaf.ConvexAnalysis.clFn {E : Type u_1} [TopologicalSpace E] (f : E → EReal) :
    E → EReal

    The closure of a convex function: its lower semicontinuous hull, except that if the hull takes the value ⊥ anywhere then the closure is the constant function ⊥. Rockafellar branches on whether f itself takes ⊥, which is equivalent for convex f on ℝⁿ but not in general; see the module docstring.

    Equations
    Instances For

      A function is closed when it equals its own closure.

      Equations
      Instances For
        theorem Tdaf.ConvexAnalysis.clFn_of_forall_ne_bot {E : Type u_1} [TopologicalSpace E] {f : E → EReal} (h : ∀ (x : E), lscHull f x ≠ ⊥) :

        The defining equation of clFn in the regular branch.

        theorem Tdaf.ConvexAnalysis.clFn_of_exists_eq_bot {E : Type u_1} [TopologicalSpace E] {f : E → EReal} (h : ∃ (x : E), lscHull f x = ⊥) :
        clFn f = fun (x : E) => ⊥

        The defining equation of clFn in the exceptional branch.

        theorem Tdaf.ConvexAnalysis.lscHull_mono {E : Type u_1} [TopologicalSpace E] {f g : E → EReal} (h : f ≤ g) :
        theorem Tdaf.ConvexAnalysis.le_lscHull_of_le {E : Type u_1} [TopologicalSpace E] {f g : E → EReal} (hg : LowerSemicontinuous g) (hgf : g ≤ f) :

        The universal property, easy half. A lower semicontinuous minorant of f is a minorant of lscHull f, because its epigraph is a closed set containing epi f.

        For a lower semicontinuous g, being a minorant of lscHull f is the same as being a minorant of f.

        The closure of f is a minorant of its lower semicontinuous hull; the two differ only in the exceptional branch.

        theorem Tdaf.ConvexAnalysis.clFn_le {E : Type u_1} [TopologicalSpace E] (f : E → EReal) :
        clFn f ≤ f
        theorem Tdaf.ConvexAnalysis.clFn_mono {E : Type u_1} [TopologicalSpace E] {f g : E → EReal} (h : f ≤ g) :

        The hull is a hull #

        @[simp]

        The workhorse of this file. The epigraph of the lower semicontinuous hull is the closure of the epigraph, with no hypothesis on f: the closure of an epigraph is again an epigraph.

        The universal property. lscHull f is the greatest lower semicontinuous minorant of f.

        A function equals its lower semicontinuous hull exactly when it is lower semicontinuous.

        @[simp]
        theorem Tdaf.ConvexAnalysis.epi_const_bot {E : Type u_1} :
        (epi fun (x : E) => ⊥) = Set.univ
        @[simp]
        theorem Tdaf.ConvexAnalysis.lscHull_const_bot {E : Type u_1} [TopologicalSpace E] :
        (lscHull fun (x : E) => ⊥) = fun (x : E) => ⊥
        @[simp]
        theorem Tdaf.ConvexAnalysis.clFn_const_bot {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] :
        (clFn fun (x : E) => ⊥) = fun (x : E) => ⊥
        theorem Tdaf.ConvexAnalysis.closedFn_iff {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] [IsTopologicalAddGroup E] {f : E → EReal} :
        ClosedFn f ↔ (f = fun (x : E) => ⊥) ∨ LowerSemicontinuous f ∧ ∀ (x : E), f x ≠ ⊥

        What closedness means. A function is closed exactly when it is the constant ⊥, or is lower semicontinuous and never takes the value ⊥.

        For a function that never takes the value ⊥ — in particular for a proper convex function — closedness is exactly lower semicontinuity.

        theorem Tdaf.ConvexAnalysis.eq_const_of_closedFn_of_not_proper {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] [IsTopologicalAddGroup E] {f : E → EReal} (hc : ClosedFn f) (hp : ¬Proper f) :
        (f = fun (x : E) => ⊥) ∨ f = fun (x : E) => ⊤

        The only closed improper convex functions are the constant functions +∞ and −∞. Convexity is not needed for this direction.

        Infima, effective domains and level sets #

        theorem Tdaf.ConvexAnalysis.iInf_lscHull_eq_iInf {E : Type u_1} [TopologicalSpace E] (f : E → EReal) :
        ⨅ (x : E), lscHull f x = ⨅ (x : E), f x

        f and its lower semicontinuous hull have the same infimum. A constant function is lower semicontinuous, so ⨅ x, f x is already a minorant of lscHull f.

        theorem Tdaf.ConvexAnalysis.iInf_clFn_eq_iInf {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] (f : E → EReal) :
        ⨅ (x : E), clFn f x = ⨅ (x : E), f x

        f and cl f have the same infimum.

        dom f ⊆ dom (cl f) ⊆ cl (dom f); this is the second inclusion, which holds for the hull with no hypothesis on f. It is dom_eq_fst_image_epi pushed through the continuous projection Prod.fst.

        theorem Tdaf.ConvexAnalysis.not_proper_clFn {E : Type u_1} [TopologicalSpace E] {f : E → EReal} (himp : ¬Proper f) :

        The closure of an improper function is improper. Neither convexity nor finite dimension is used. The converse — properness is preserved — needs both, and is ConvexFn.proper_clFn in Tdaf/Analysis/Convex/RelativeInterior.lean.

        theorem Tdaf.ConvexAnalysis.mem_closure_le_of_mem_closure_epi {E : Type u_1} [TopologicalSpace E] {f : E → EReal} {x : E} {μ ν : ℝ} (h : (x, μ) ∈ closure (epi f)) (hμν : μ < ν) :
        x ∈ closure {z : E | f z ≤ ↑ν}

        A point of closure (epi f) at height μ is a limit of points where f is below any ν > μ. This is the pointwise content of Rockafellar's description of cl f as the infimum of the μ with x ∈ cl {z | f z ≤ μ}.

        theorem Tdaf.ConvexAnalysis.closure_le_subset_lscHull_le {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] [IsTopologicalAddGroup E] (f : E → EReal) (α : ℝ) :
        closure {x : E | f x ≤ ↑α} ⊆ {x : E | lscHull f x ≤ ↑α}

        The closure of a sublevel set of f is contained in the corresponding sublevel set of the hull.

        theorem Tdaf.ConvexAnalysis.lscHull_le_setOf {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] [IsTopologicalAddGroup E] (f : E → EReal) (α : ℝ) :
        {x : E | lscHull f x ≤ ↑α} = ⋂ μ ∈ Set.Ioi α, closure {x : E | f x ≤ ↑μ}

        The level sets of the closure: {x | (cl f) x ≤ α} = ⋂_{μ > α} cl {x | f x ≤ μ}. Stated for the hull, which is where the content is; the ri-flavoured half is finite-dimensional and is not proved here.

        lscHull and clFn as closure operators #

        Both operations are monotone, idempotent and decreasing, so each is a closure operator on the order dual of E → EReal. Recording that makes Mathlib's ClosureOperator API available and identifies LowerSemicontinuous and ClosedFn as the two closedness predicates; the constructor's hypotheses are literally the universal property.

        lscHull, as a closure operator on (E → EReal)ᵒᵈ. Its closed elements are the lower semicontinuous functions.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          clFn, as a closure operator on (E → EReal)ᵒᵈ. Its closed elements are exactly the closed functions, so ClosedFn is the closedness predicate of a genuine closure operator.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Tdaf.ConvexAnalysis.le_clFn_of_le {E : Type u_1} [TopologicalSpace E] {f g : E → EReal} (hg : ClosedFn g) (hgf : g ≤ f) :
            g ≤ clFn f

            The universal property of the closure. clFn f is the greatest closed minorant of f; this is the hmin field of clFnClosure, restated without the OrderDual wrapping.

            Indicator functions #

            @[simp]

            The lower semicontinuous hull of an indicator function is the indicator of the closure.

            @[simp]

            cl δ(· | s) = δ(· | cl s): closing an indicator function closes its set.

            Approaching the endpoint of a segment #

            The three lemmas below package the filter 𝓝[<] (1 : ℝ) bookkeeping shared by the dichotomy for improper functions and by the limit formulas for the closure.

            theorem Tdaf.ConvexAnalysis.tendsto_affine_nhdsLT_one (α β : ℝ) :
            Filter.Tendsto (fun (a : ℝ) => (1 - a) * α + a * β) (nhdsWithin 1 (Set.Iio 1)) (nhds β)

            Convexity of the hull and of the closure #

            The lower semicontinuous hull of a convex function is convex: the closure of a convex set is convex (Convex.closure), and convexFn_ofEpi turns that back into a convex function.

            The closure of a convex function is again convex, in either branch.

            The dichotomy for improper convex functions #

            "An improper convex function is −∞ on ri (dom f)" is finite-dimensional. Its lower-semicontinuous consequence below is not, and holds in any topological vector space. It is also the sharp form: the stronger-sounding "a lower semicontinuous convex function taking ⊥ anywhere is identically ⊥" is false; see eq_bot_of_lsc_of_eq_bot.

            theorem Tdaf.ConvexAnalysis.ConvexFn.eq_bot_of_lt_one {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFn f) {x₀ y : E} (h₀ : f x₀ = ⊥) (hy : y ∈ dom f) {a : ℝ} (ha : 0 ≤ a) (ha1 : a < 1) :
            f ((1 - a) • x₀ + a • y) = ⊥

            The algebraic engine of the dichotomy, valid in any real vector space: if f is convex, f x₀ = ⊥ and y is in the effective domain, then f is ⊥ on the half-open segment [x₀, y). The hypothesis y ∈ dom f is needed: for f = restrict {x₀} (fun _ => ⊥) the segment meets dom f only at x₀.

            theorem Tdaf.ConvexAnalysis.ConvexFn.eq_bot_of_mem_dom {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) (hl : LowerSemicontinuous f) {x₀ : E} (h₀ : f x₀ = ⊥) {y : E} (hy : y ∈ dom f) :
            f y = ⊥

            A lower semicontinuous convex function that takes the value ⊥ somewhere takes it at every point of its effective domain. Only lower semicontinuity at y is used, through the limit λ ↑ 1 along the segment from x₀ to y.

            theorem Tdaf.ConvexAnalysis.ConvexFn.eq_bot_or_eq_top {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) (hl : LowerSemicontinuous f) (h : ∃ (x₀ : E), f x₀ = ⊥) (x : E) :
            f x = ⊥ ∨ f x = ⊤

            A lower semicontinuous improper convex function has no finite values: it is ⊥ on its effective domain and ⊤ off it.

            theorem Tdaf.ConvexAnalysis.ConvexFn.dom_eq_setOf_eq_bot {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) (hl : LowerSemicontinuous f) (h : ∃ (x₀ : E), f x₀ = ⊥) :
            dom f = {x : E | f x = ⊥}

            A lower semicontinuous convex function taking the value ⊥ is ⊥ exactly on its effective domain, which is therefore closed.

            theorem Tdaf.ConvexAnalysis.eq_bot_of_lsc_of_eq_bot {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) (hl : LowerSemicontinuous f) (hdom : ∀ (x : E), f x < ⊤) (h : ∃ (x₀ : E), f x₀ = ⊥) :
            f = fun (x : E) => ⊥

            The dichotomy, in the form that is actually true. A lower semicontinuous convex function that takes the value ⊥ somewhere and is nowhere ⊤ is identically ⊥. The hypothesis hdom is not removable — see the example at the end of this file — and the sharp unconditional form is ConvexFn.eq_bot_or_eq_top.

            Positively homogeneous functions #

            The lower semicontinuous hull of a positively homogeneous function is positively homogeneous. Positive homogeneity is the epigraph being a cone, epi (lscHull f) is the closure of epi f, and the closure of a cone is a cone. Convexity is not used anywhere in that chain.

            The closure of a positively homogeneous function is positively homogeneous. The improper branch is a case rather than an exclusion: there cl f is the constant ⊥, and a * ⊥ = ⊥ for a > 0. The same conclusion for convex f follows from writing cl f as a support function; neither the pairing that needs, nor convexity, is required here.

            Non-negative scalar multiples #

            scaleSnd c is continuous. It scales only the real coordinate, so E contributes nothing beyond its own topology — no ContinuousSMul ℝ E is needed.

            theorem Tdaf.ConvexAnalysis.closedFn_coe_mul {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] {f : E → EReal} {c : ℝ} (hc : 0 ≤ c) (hf : ClosedFn f) (hb : ∀ (x : E), f x ≠ ⊥) :
            ClosedFn fun (x : E) => ↑c * f x

            A non-negative multiple of a closed function is closed, provided the function never takes ⊥. The ⊥-freedom is what makes closedness of cf equivalent to lower semicontinuity of cf; given it, epi (cf) is epi f pulled back along the continuous scaleSnd c⁻¹, and at c = 0 the product is the constant 0.

            Closed proper convex functions #

            A closed proper convex function: the standing hypothesis of the duality theory, and the class conjEquiv and supportEquiv are bijections between. The three conditions travel together throughout the duality theory, so they are bundled rather than repeated.

            • convex : ConvexFn f

              The epigraph is convex.

            • closed : ClosedFn f

              f equals its own closure.

            • proper : Proper f

              f is finite somewhere and never -∞.

            Instances For

              For a proper function, closedness of the epigraph is closedness of the function, so this is the form of the constructor the recession theory uses.

              A continuous affine function, read into EReal, is closed proper convex. This is what a section with affine constraints asks for: an equality constraint a x = 0 enters the theory as the pair of convex functions a and -a. Continuity is a hypothesis rather than a consequence: on an infinite-dimensional space a discontinuous linear functional is convex, finite everywhere and proper, and is not closed. In finite dimensions AffineMap.continuous_of_finiteDimensional discharges it.

              Why the dichotomy needs a hypothesis #

              The example below is the reason eq_bot_of_lsc_of_eq_bot carries ∀ x, f x < ⊤: the function that is ⊥ at the origin of ℝ and ⊤ elsewhere has the vertical line {0} × ℝ as its epigraph, so it is convex and lower semicontinuous, takes the value ⊥, and is not the constant ⊥.

              Affine minorants of closed proper convex functions #

              A closed proper convex function has a continuous affine minorant, the keystone of Fenchel–Moreau. Closedness is essential: for a merely proper convex f the statement is false in infinite dimensions — a discontinuous linear functional g has dense kernel, so lscHull g ≡ ⊥, while g is convex, finite everywhere and proper. The proof separates the closed convex set epi f from the point (x₀, f x₀ - 1); the separating functional cannot be vertical, since a functional (y, 0) agrees at (x₀, f x₀ - 1) and at (x₀, f x₀) ∈ epi f.

              Limits along a segment #

              theorem Tdaf.ConvexAnalysis.tendsto_lscHull_along_segment {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) {x : E} {α : ℝ} (hx : (x, α) ∈ interior (epi f)) (y : E) :
              Filter.Tendsto (fun (a : ℝ) => f ((1 - a) • x + a • y)) (nhdsWithin 1 (Set.Iio 1)) (nhds (lscHull f y))

              The lower semicontinuous hull of f at y is the limit of f along the segment running from x to y, provided the segment starts at an interior point of epi f. The classical hypothesis is x ∈ ri (dom f), which says that the vertical line over x meets ri (epi f); relative interiors are finite-dimensional, so the general statement uses interior (epi f) instead. In finite dimensions interior (epi f) may be empty when ri (epi f) is not, so this is a restriction as well as a generalisation.

              theorem Tdaf.ConvexAnalysis.clFn_eq_limit_along_segment {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFn f) (hne : ∀ (z : E), lscHull f z ≠ ⊥) {x : E} {α : ℝ} (hx : (x, α) ∈ interior (epi f)) (y : E) :
              Filter.Tendsto (fun (a : ℝ) => f ((1 - a) • x + a • y)) (nhdsWithin 1 (Set.Iio 1)) (nhds (clFn f y))

              The same limit formula for clFn. The exceptional branch has to be ruled out by hand, and it genuinely can occur: for the function that is ⊥ on a closed ball and ⊤ outside it, clFn f ≡ ⊥ while the limit along a segment ending outside the ball is ⊤. The classical statement carries the matching restriction y ∈ cl (dom f) in the improper case.

              theorem Tdaf.ConvexAnalysis.tendsto_along_segment_of_closed_proper {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ClosedProperConvexFn f) {x : E} (hx : x ∈ dom f) (y : E) :
              Filter.Tendsto (fun (a : ℝ) => f ((1 - a) • x + a • y)) (nhdsWithin 1 (Set.Iio 1)) (nhds (f y))

              For a closed proper convex f, every x ∈ dom f and every y, f y = lim_{a ↑ 1} f ((1 - a) • x + a • y). No relative interiors are involved: lower semicontinuity gives the liminf half for every y, including f y = ⊤, and convexity applied to the finite values f x and f y gives the limsup half.

              The lower semicontinuous hull as a liminf #

              Rockafellar writes (cl f)(x) = liminf_{y → x} f(y). In a complete lattice liminf f (𝓝 x) = ⨆ s ∈ 𝓝 x, ⨅ y ∈ s, f y, which is exactly the value of lscHull at x, so the identity needs no convexity and no hypothesis on f.

              theorem Tdaf.ConvexAnalysis.liminf_nhds_le {E : Type u_1} [TopologicalSpace E] (f : E → EReal) (x : E) :

              The pointwise liminf of f along the neighbourhood filter is a minorant of f: the neighbourhood filter contains the point itself.

              x ↦ liminf_{y → x} f(y) is lower semicontinuous: a neighbourhood witnessing the bound at x witnesses it, through its interior, at every nearby point.

              The lower semicontinuous hull is a liminf: (lsc f)(x) = liminf_{y → x} f(y), since the liminf function is a lower semicontinuous minorant of f and a lower semicontinuous function is at most its own liminf.

              theorem Tdaf.ConvexAnalysis.clFn_eq_liminf {E : Type u_1} [TopologicalSpace E] [AddCommGroup E] [IsTopologicalAddGroup E] {f : E → EReal} (h : ∀ (z : E), lscHull f z ≠ ⊥) (x : E) :

              Rockafellar's cl f = liminf f, in the regular branch: as soon as the lower semicontinuous hull is nowhere -∞, the closure of f at x is the liminf of f at x.

              Rockafellar's cl f = liminf f, in full. For a convex f the closure at x is the liminf of f at x, except in the single degenerate case where the left side is -∞ and the right side is +∞; that case can only arise in the exceptional branch of clFn, where the dichotomy leaves lscHull f with only the values -∞ and +∞.