Documentation

Tdaf.Analysis.Convex.Operations.Hull

The convex hull of a family of functions #

The pointwise infimum of convex functions is generally not convex; the convex hull is what replaces it. The convex hull of a family f : ι → E → EReal is the function determined by the convex hull of the union of the epigraphs, and it is the greatest convex function below every f i.

Main definitions #

Main results #

References #

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

The convex hull of a family #

noncomputable def Tdaf.ConvexAnalysis.convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) :
E → EReal

The convex hull of a family of functions: the function determined by the convex hull of the union of the epigraphs. Equivalently (isGreatest_convFn), the greatest convex h, proper or not, with h ≤ f i for every i.

Equations
Instances For
    theorem Tdaf.ConvexAnalysis.convexFn_convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) :

    The convex hull of a family is a convex function, a convex hull of sets being convex.

    theorem Tdaf.ConvexAnalysis.convFn_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) (i : ι) :
    convFn f ≤ f i
    theorem Tdaf.ConvexAnalysis.le_convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} {f : ι → E → EReal} {g : E → EReal} (hg : ConvexFn g) (h : ∀ (i : ι), g ≤ f i) :

    The universal property. Any convex function below every f i is below the convex hull; with convFn_le and convexFn_convFn, the convex hull is the greatest convex minorant.

    theorem Tdaf.ConvexAnalysis.isGreatest_convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) :
    IsGreatest {g : E → EReal | ConvexFn g ∧ ∀ (i : ι), g ≤ f i} (convFn f)
    theorem Tdaf.ConvexAnalysis.convFn_mono {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} {f₁ f₂ : ι → E → EReal} (h : ∀ (i : ι), f₁ i ≤ f₂ i) :
    convFn f₁ ≤ convFn f₂
    theorem Tdaf.ConvexAnalysis.epi_convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} {f : ι → E → EReal} (h : IsEpiLike ((convexHull ℝ) (⋃ (i : ι), epi (f i)))) :
    epi (convFn f) = (convexHull ℝ) (⋃ (i : ι), epi (f i))

    The epigraph of the convex hull is the convex hull of the union of epigraphs, under the hypothesis that the latter is an epigraph at all. It need not be: even for two functions the infimum in the formula for convFn need not be attained.

    theorem Tdaf.ConvexAnalysis.convFn_le_iInf {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) (x : E) :
    convFn f x ≤ ⨅ (i : ι), f i x

    The convex hull is below the pointwise infimum, strictly in general (convFn₂_indicatorFn_lt_inf), which is the entire reason the convex hull exists.

    theorem Tdaf.ConvexAnalysis.convFn_eq_iInf {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} {f : ι → E → EReal} (hc : ConvexFn fun (x : E) => ⨅ (i : ι), f i x) :
    convFn f = fun (x : E) => ⨅ (i : ι), f i x

    When the pointwise infimum happens to be convex, it is the convex hull.

    The convex hull of a single function #

    noncomputable def Tdaf.ConvexAnalysis.convHullFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] (g : E → EReal) :
    E → EReal

    The convex hull of a function, conv g: the greatest convex function majorised by g.

    Equations
    Instances For
      theorem Tdaf.ConvexAnalysis.le_convHullFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] {g h : E → EReal} (hh : ConvexFn h) (hg : h ≤ g) :

      The universal property of conv g.

      theorem Tdaf.ConvexAnalysis.convHullFn_mono {E : Type u_1} [AddCommGroup E] [Module ℝ E] {g h : E → EReal} (hgh : g ≤ h) :

      Convexity is exactly closedness under conv.

      The coreflection onto the convex functions #

      conv is right adjoint to the inclusion of the convex functions. For convex h and arbitrary g, h ≤ g and h ≤ conv g say the same thing.

      A coinsertion, because conv fixes the convex functions. The convex functions therefore inherit a complete lattice structure in which the infimum is convFn.

      Equations
      Instances For

        The two hulls determine each other #

        theorem Tdaf.ConvexAnalysis.convFn_eq_convHullFn_iInf {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} (f : ι → E → EReal) :
        convFn f = convHullFn fun (x : E) => ⨅ (i : ι), f i x

        Rockafellar: the convex hull of a collection "is the convex hull of the pointwise infimum of the collection". Both sides are the greatest convex function below every f i.

        theorem Tdaf.ConvexAnalysis.convFn_unit {E : Type u_1} [AddCommGroup E] [Module ℝ E] (g : E → EReal) :
        (convFn fun (x : Unit) => g) = convHullFn g

        convHullFn is the one-element instance of convFn.

        The binary case #

        noncomputable def Tdaf.ConvexAnalysis.convFn₂ {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f g : E → EReal) :
        E → EReal

        The convex hull of two functions: the greatest convex function below both, i.e. the meet in the lattice of convex functions.

        Equations
        Instances For
          theorem Tdaf.ConvexAnalysis.le_convFn₂ {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g h : E → EReal} (hh : ConvexFn h) (h₁ : h ≤ f) (h₂ : h ≤ g) :

          The universal property, binary case.

          theorem Tdaf.ConvexAnalysis.convFn₂_le_inf {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f g : E → EReal) :
          convFn₂ f g ≤ f ⊓ g

          The binary convex hull is below the pointwise minimum, generally strictly.

          theorem Tdaf.ConvexAnalysis.convFn₂_eq_convFn {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f g : E → EReal) :
          convFn₂ f g = convFn fun (b : Bool) => bif b then f else g

          The binary case is the two-element instance of convFn.

          The inequality convFn₂_le_inf is strict in general. The indicator functions of {0} and {1} in ℝ are both convex; their pointwise minimum is ⊤ at 1 / 2, while their convex hull — the indicator function of the segment [0, 1] — is 0 there.

          The explicit formula for two functions #

          theorem Tdaf.ConvexAnalysis.convFn₂_le_combo {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g : E → EReal} (hf : ∀ (x : E), f x ≠ ⊥) (hg : ∀ (x : E), g x ≠ ⊥) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) {u v x : E} (hx : a • u + b • v = x) :
          convFn₂ f g x ≤ ↑a * f u + ↑b * g v

          Every convex combination a • u + b • v = x bounds the convex hull at x: the easy half of the formula. Only f, g ≠ ⊥ is needed, not full properness — with ⊥ allowed the right-hand side can be ⊥ (since ⊥ + ⊤ = ⊥ in EReal) while the left-hand side is ⊤.

          theorem Tdaf.ConvexAnalysis.convFn₂_apply {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g : E → EReal} (hf : ConvexFn f) (hg : ConvexFn g) (hf' : Proper f) (hg' : Proper g) (x : E) :
          convFn₂ f g x = sInf {z : EReal | ∃ (a : ℝ) (b : ℝ) (u : E) (v : E), 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ a • u + b • v = x ∧ z = ↑a * f u + ↑b * g v}

          The convex hull of two proper convex functions is given by the explicit formula

          (conv {f, g}) x = inf {a f u + b g v | a u + b v = x, a, b ≥ 0, a + b = 1},

          the infimum over all representations, and genuinely an infimum — it need not be attained.

          convFn_apply proves the same theorem for an arbitrary family and needs only the ≠ ⊥ half of properness. Here dom f, dom g ≠ ∅ is used as well, to make the epigraphs non-empty and so turn the convex hull of their union into a convex join.

          theorem Tdaf.ConvexAnalysis.convHullFn_inf {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f g : E → EReal) :
          convHullFn (f ⊓ g) = convFn₂ f g

          conv (f ⊓ g) = conv {f, g}: both sides are the greatest convex function below f and g.

          When a convex hull of epigraphs is again an epigraph #

          epi (convFn₂ f g) is conv (epi f ∪ epi g) only when that hull is epi-like, which is exactly the statement that the infimum in the formula is attained. Of the two halves of isEpiLike_iff_forall the upward-closure half holds unconditionally; only attainment is at issue.

          theorem Tdaf.ConvexAnalysis.IsEpiLike.mem_convexHull_of_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] {F : Set (E × ℝ)} (hF : IsEpiLike F) {x : E} {μ ν : ℝ} (hmem : (x, μ) ∈ (convexHull ℝ) F) (hμν : μ ≤ ν) :

          The convex hull of an epi-like set is upward closed in the vertical coordinate: conv F inherits every translation p ↦ p + (0, t), t ≥ 0, that F itself admits.

          theorem Tdaf.ConvexAnalysis.epi_convFn₂ {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g : E → EReal} (hF : IsEpiLike ((convexHull ℝ) (epi f ∪ epi g))) :

          The binary case of epi_convFn.

          The explicit formula in general #

          theorem Tdaf.ConvexAnalysis.convFn_apply {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Type u_2} {f : ι → E → EReal} (hf : ∀ (i : ι), ConvexFn (f i)) (hf' : ∀ (i : ι) (x : E), f i x ≠ ⊥) (x : E) :
          convFn f x = sInf {z : EReal | ∃ (t : Finset ι) (w : ι → ℝ) (p : ι → E), (∀ i ∈ t, 0 ≤ w i) ∧ ∑ i ∈ t, w i = 1 ∧ ∑ i ∈ t, w i • p i = x ∧ z = ∑ i ∈ t, ↑(w i) * f i (p i)}

          The convex hull of a family of convex functions, none of which takes the value ⊥, is given by the explicit formula

          (conv {f i}) x = inf {∑ λ i * f i (x i) | ∑ λ i • x i = x},

          the infimum being over all representations of x as a convex combination of points x i, with only finitely many non-zero coefficients.

          The classical statement assumes the f i proper; only the ≠ ⊥ half is used, twice — it keeps λ i * f i (x i) from being −∞ where λ i = 0, and it turns a finite bound on the sum into a finite bound on each term. dom (f i) ≠ ∅ does no work, exactly as for sums.

          The description of a convex hull by convex combinations presents a point of the hull as drawn from the epi (f i) with repetitions, whereas the infimum here ranges over one point per index. The proof of ≥ bridges the two by merging the points drawn from a single epi (f i) into their center of mass, which is the only use made of convexity of the f i.

          Closedness supplies the missing half #

          A closed convex hull of two epigraphs is an epigraph: IsEpiLike.mem_convexHull_of_le gives upward closure unconditionally and closedness gives attainment of the vertical infima. So the only way conv (epi f ∪ epi g) can fail to be an epigraph is by failing to be closed, which turns the closedness criteria for convex hulls into attainment statements for that infimum.