Documentation

ConvexAnalysis.Basic

Extended real valued functions #

Functions of convex analysis take values in EReal = [-∞, +∞] (see DESIGN.md). This file defines the basic notions for f : E → EReal on a real vector space E: the effective domain, proper functions, the epigraph, convexity through the epigraph, and the indicator function, with the bridges to Mathlib's ConvexOn.

Main definitions #

Main statements #

References #

Tags #

extended real valued function, effective domain, proper function, epigraph, convex function, indicator function, lower semicontinuity

def ConvexAnalysis.effectiveDomain {α : Type u_1} (f : α → EReal) :
Set α

The effective domain of f: the points where f takes a value less than ⊤.

Equations
Instances For
    @[simp]
    theorem ConvexAnalysis.mem_effectiveDomain {α : Type u_1} {f : α → EReal} {x : α} :

    Membership in the effective domain: f x < ⊤.

    structure ConvexAnalysis.IsProper {α : Type u_1} (f : α → EReal) :

    A function is proper if it never takes the value ⊥ and its effective domain is nonempty.

    • bot_lt (x : α) : ⊥ < f x

      The function is everywhere greater than ⊥.

    • nonempty_effectiveDomain : (effectiveDomain f).Nonempty

      The function takes a value less than ⊤ somewhere.

    Instances For
      theorem ConvexAnalysis.isProper_iff {α : Type u_1} (f : α → EReal) :
      IsProper f ↔ (∀ (x : α), ⊥ < f x) ∧ (effectiveDomain f).Nonempty

      f is proper iff it never takes the value ⊥ and is less than ⊤ somewhere.

      theorem ConvexAnalysis.IsProper.ne_bot {α : Type u_1} {f : α → EReal} (hf : IsProper f) (x : α) :
      f x ≠ ⊥

      A proper function never takes the value ⊥.

      def ConvexAnalysis.epigraph {α : Type u_1} (f : α → EReal) :
      Set (α × ℝ)

      The epigraph of f: the points (x, t) of α × ℝ with f x ≤ t. Only real heights t are used, as in R, Section 4.

      Equations
      Instances For
        @[simp]
        theorem ConvexAnalysis.mem_epigraph {α : Type u_1} {f : α → EReal} {p : α × ℝ} :
        p ∈ epigraph f ↔ f p.1 ≤ ↑p.2

        Membership in the epigraph: (x, t) ∈ epigraph f iff f x ≤ t.

        theorem ConvexAnalysis.mem_effectiveDomain_iff_exists_le {α : Type u_1} {f : α → EReal} {x : α} :
        x ∈ effectiveDomain f ↔ ∃ (t : ℝ), f x ≤ ↑t

        A point is in the effective domain iff f is below some real number there.

        The effective domain is the projection of the epigraph.

        theorem ConvexAnalysis.epigraph_coe {α : Type u_1} (f : α → ℝ) :
        (epigraph fun (x : α) => ↑(f x)) = {p : α × ℝ | f p.1 ≤ p.2}

        The epigraph of a real valued function, seen as an EReal valued function.

        theorem ConvexAnalysis.IsProper.isMinOn_coe_add_iff {α : Type u_1} {f : α → ℝ} {g : α → EReal} (hg : IsProper g) {z : α} :
        IsMinOn (fun (x : α) => ↑(f x) + g x) Set.univ z ↔ ∃ (s : ℝ), g z = ↑s ∧ ∀ (w : α) (r : ℝ), g w = ↑r → f z + s ≤ f w + r

        Minimizers of f + g for a real valued f and a proper g: z minimizes f + g iff g z = s is finite and f z + s ≤ f w + r whenever g w = r is finite. This links the statements about minimizers of f + g in the forward–backward method and FISTA, written with IsMinOn, with the rates, which compare finite values.

        Multiples x ↦ (c : EReal) * f x of f : α → EReal, written with multiplication since EReal has no scalar multiplication by reals. Mathlib's EReal has 0 * ⊤ = 0 * ⊥ = 0, so the multiple with c = 0 is the zero function, the convention 0 · ∞ = 0 of R, Section 4; it is not the indicator of dom f.

        noncomputable def ConvexAnalysis.mulOrderIso {c : ℝ} (hc : 0 < c) :

        Multiplication by a positive real number, as an order isomorphism of EReal. Mathlib has no such lemma; a candidate for Mathlib/Data/EReal/Inv.lean.

        Equations
        Instances For
          @[simp]
          theorem ConvexAnalysis.mulOrderIso_apply {c : ℝ} (hc : 0 < c) (a : EReal) :
          (mulOrderIso hc) a = ↑c * a

          The order isomorphism mulOrderIso hc is the multiplication by c.

          theorem ConvexAnalysis.coe_mul_le_coe_mul_iff {c : ℝ} (hc : 0 < c) {a b : EReal} :
          ↑c * a ≤ ↑c * b ↔ a ≤ b

          Multiplication by a positive real number preserves and reflects ≤.

          theorem ConvexAnalysis.coe_mul_lt_coe_mul_iff {c : ℝ} (hc : 0 < c) {a b : EReal} :
          ↑c * a < ↑c * b ↔ a < b

          Multiplication by a positive real number preserves and reflects <.

          noncomputable def ConvexAnalysis.addOrderIso (c : ℝ) :

          Addition of a real number on the right, as an order isomorphism of EReal. Mathlib has no such lemma; a candidate for Mathlib/Data/EReal/Operations.lean.

          Equations
          Instances For
            @[simp]
            theorem ConvexAnalysis.addOrderIso_apply (c : ℝ) (a : EReal) :
            (addOrderIso c) a = a + ↑c

            The order isomorphism addOrderIso c is the addition of c.

            theorem ConvexAnalysis.ereal_iSup_add_coe {ι : Sort u_1} (a : ι → EReal) (c : ℝ) :
            (⨆ (i : ι), a i) + ↑c = ⨆ (i : ι), a i + ↑c

            Adding a real number commutes with suprema in EReal.

            theorem ConvexAnalysis.ereal_exists_coe_of_add_eq_coe {a b : EReal} {r : ℝ} (h : a + b = ↑r) :
            ∃ (a' : ℝ) (b' : ℝ), a = ↑a' ∧ b = ↑b'

            A sum of two EReals that is real has real summands.

            theorem ConvexAnalysis.coe_mul_lt_top_iff {c : ℝ} (hc : 0 < c) {a : EReal} :
            ↑c * a < ⊤ ↔ a < ⊤

            For c > 0, c * a < ⊤ iff a < ⊤.

            theorem ConvexAnalysis.bot_lt_coe_mul_iff {c : ℝ} (hc : 0 < c) {a : EReal} :
            ⊥ < ↑c * a ↔ ⊥ < a

            For c > 0, ⊥ < c * a iff ⊥ < a.

            theorem ConvexAnalysis.isMinOn_const_mul_iff {γ : ℝ} {α : Type u_1} {φ : α → EReal} (hγ : 0 < γ) {s : Set α} {z : α} :
            IsMinOn (fun (w : α) => ↑γ * φ w) s z ↔ IsMinOn φ s z

            Multiplying an EReal valued function by a constant γ > 0 does not change its minimizers.

            theorem ConvexAnalysis.effectiveDomain_const_mul {α : Type u_1} {f : α → EReal} {c : ℝ} (hc : 0 < c) :
            (effectiveDomain fun (x : α) => ↑c * f x) = effectiveDomain f

            A positive multiple c f has the same effective domain as f.

            theorem ConvexAnalysis.IsProper.const_mul {α : Type u_1} {f : α → EReal} {c : ℝ} (hf : IsProper f) (hc : 0 < c) :
            IsProper fun (x : α) => ↑c * f x

            A positive multiple of a proper function is proper.

            theorem ConvexAnalysis.epigraph_const_mul {α : Type u_1} {f : α → EReal} {c : ℝ} (hc : 0 < c) :
            (epigraph fun (x : α) => ↑c * f x) = (fun (p : α × ℝ) => (p.1, c⁻¹ * p.2)) ⁻¹' epigraph f

            The epigraph of c * f is the preimage of the epigraph of f under (x, t) ↦ (x, t / c).

            def ConvexAnalysis.ConvexFun {E : Type u_1} [AddCommGroup E] [Module ℝ E] (f : E → EReal) :

            A function f : E → EReal is convex if its epigraph is a convex subset of E × ℝ R, Section 4, BC, Definition 8.1.

            Equations
            Instances For
              theorem ConvexAnalysis.convexFun_coe_iff {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → ℝ} :
              (ConvexFun fun (x : E) => ↑(f x)) ↔ ConvexOn ℝ Set.univ f

              For a real valued function, ConvexFun is Mathlib's ConvexOn ℝ univ.

              The zero function is convex.

              theorem ConvexAnalysis.convexFun_top {E : Type u_1} [AddCommGroup E] [Module ℝ E] :
              ConvexFun fun (x : E) => ⊤

              The constant function ⊤ is convex: its epigraph is empty.

              theorem ConvexAnalysis.convexFun_bot {E : Type u_1} [AddCommGroup E] [Module ℝ E] :
              ConvexFun fun (x : E) => ⊥

              The constant function ⊥ is convex: its epigraph is everything.

              theorem ConvexAnalysis.ConvexFun.comp_linearMap {E : Type u_1} [AddCommGroup E] [Module ℝ E] {F : Type u_2} [AddCommGroup F] [Module ℝ F] {f : F → EReal} (hf : ConvexFun f) (A : E →ₗ[ℝ] F) :
              ConvexFun (f ∘ ⇑A)

              Composition with a linear map preserves convexity: the epigraph of f ∘ A is the preimage of the epigraph of f under A × id.

              theorem ConvexAnalysis.ConvexFun.apply_smul_add_smul_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) {x y : E} {t s : ℝ} (hx : f x ≤ ↑t) (hy : f y ≤ ↑s) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
              f (a • x + b • y) ≤ ↑(a * t + b * s)

              The convexity inequality, for real upper bounds t ≥ f x and s ≥ f y.

              theorem ConvexAnalysis.ConvexFun.const_mul {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) {c : ℝ} (hc : 0 ≤ c) :
              ConvexFun fun (x : E) => ↑c * f x

              A nonnegative multiple of a convex function is convex. For c = 0 the multiple is the zero function (see the section on scaling).

              theorem ConvexAnalysis.convexFun_const_mul_iff {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} {c : ℝ} (hc : 0 < c) :
              (ConvexFun fun (x : E) => ↑c * f x) ↔ ConvexFun f

              For c > 0, the multiple c f is convex iff f is convex.

              theorem ConvexAnalysis.ConvexFun.apply_smul_add_smul_eq_bot {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) {x y : E} (hx : f x = ⊥) (hy : f y < ⊤) {a b : ℝ} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
              f (a • x + b • y) = ⊥

              If f x = ⊥ and f y < ⊤, a convex f is ⊥ at every convex combination a • x + b • y with a > 0 (and b ≥ 0, a + b = 1).

              theorem ConvexAnalysis.ConvexFun.apply_add_smul_lt_of_lt {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) {x d : E} {r α s t : ℝ} (hx : f x ≤ ↑r) (hs : 0 < s) (hst : s ≤ t) (ht : f (x + t • d) < ↑(r + t * α)) :
              f (x + s • d) < ↑(r + s * α)

              Along a ray, a convex function lies below the chord: if f x ≤ r and f (x + t • d) < r + t α, then f (x + s • d) < r + s α for 0 < s ≤ t. In other words, the difference quotients (f (x + t • d) - f x) / t are monotone in t.

              theorem ConvexAnalysis.ConvexFun.forall_le_of_eventually_le {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) {x d : E} {α : ℝ} (hx : x ∈ effectiveDomain f) (hd : ∀ᶠ (t : ℝ) in nhdsWithin 0 (Set.Ioi 0), f x + ↑(t * α) ≤ f (x + t • d)) (t : ℝ) :
              0 < t → f x + ↑(t * α) ≤ f (x + t • d)

              For a convex f and x ∈ dom f, the inequality f x + t α ≤ f (x + t • d) for small t > 0 implies it for all t > 0.

              theorem ConvexAnalysis.ConvexFun.iSup {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Sort u_2} {f : ι → E → EReal} (hf : ∀ (i : ι), ConvexFun (f i)) :
              ConvexFun fun (y : E) => ⨆ (i : ι), f i y

              A pointwise supremum of convex functions is convex: its epigraph is the intersection of the epigraphs.

              theorem ConvexAnalysis.ConvexFun.add {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g : E → EReal} (hf : ConvexFun f) (hg : ConvexFun g) (hbot : ∀ (x : E), ⊥ < f x) :
              ConvexFun (f + g)

              The sum of two convex functions is convex if the first one never takes the value ⊥; see ConvexFun.add_of_bot_lt_right for the second. Some such hypothesis is needed, since ⊥ + ⊤ = ⊥ in EReal (DESIGN.md, section 3).

              theorem ConvexAnalysis.ConvexFun.add_of_bot_lt_right {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f g : E → EReal} (hf : ConvexFun f) (hg : ConvexFun g) (hbot : ∀ (x : E), ⊥ < g x) :
              ConvexFun (f + g)

              The sum of two convex functions is convex if the second one never takes the value ⊥.

              theorem ConvexAnalysis.ConvexFun.sum {E : Type u_1} [AddCommGroup E] [Module ℝ E] {ι : Type u_2} {s : Finset ι} {f : ι → E → EReal} (hf : ∀ i ∈ s, ConvexFun (f i)) (hbot : ∀ i ∈ s, ∀ (x : E), ⊥ < f i x) :
              ConvexFun (∑ i ∈ s, f i)

              A finite sum of convex functions that never take the value ⊥ is convex.

              The effective domain of a convex function is convex.

              theorem ConvexAnalysis.ConvexFun.convex_setOf_le_coe {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → EReal} (hf : ConvexFun f) (t : ℝ) :
              Convex ℝ {x : E | f x ≤ ↑t}

              The sublevel sets {x | f x ≤ t}, t : ℝ, of a convex function are convex.

              f is lower semicontinuous iff its epigraph in α × ℝ is closed BC, Lemma 1.24.

              theorem ConvexAnalysis.exists_eventually_le_of_upperSemicontinuousAt {α : Type u_1} [TopologicalSpace α] {f : α → EReal} {x : α} (hf : UpperSemicontinuousAt f x) (hx : x ∈ effectiveDomain f) :
              ∃ (M : ℝ), ∀ᶠ (y : α) in nhds x, f y ≤ ↑M

              A function that is upper semicontinuous at a point of its domain is bounded above by a real number near that point.

              theorem ConvexAnalysis.mem_interior_epigraph_of_eventually_le {α : Type u_1} [TopologicalSpace α] {f : α → EReal} {x : α} {M t : ℝ} (hM : ∀ᶠ (y : α) in nhds x, f y ≤ ↑M) (ht : M < t) :

              If f ≤ M near x and M < t, then (x, t) is an interior point of the epigraph.

              theorem ConvexAnalysis.lt_of_mem_interior_epigraph {α : Type u_1} [TopologicalSpace α] {f : α → EReal} {p : α × ℝ} (hp : p ∈ interior (epigraph f)) :
              f p.1 < ↑p.2

              At an interior point p of the epigraph, f p.1 < p.2.

              theorem ConvexAnalysis.lowerSemicontinuous_const_mul {α : Type u_1} [TopologicalSpace α] {f : α → EReal} (hf : LowerSemicontinuous f) {c : ℝ} (hc : 0 ≤ c) :
              LowerSemicontinuous fun (x : α) => ↑c * f x

              A nonnegative multiple of a lower semicontinuous function is lower semicontinuous.

              theorem ConvexAnalysis.ConvexFun.eq_bot_of_lowerSemicontinuous {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFun f) {y z : E} (hlsc : LowerSemicontinuousAt f z) (hy : f y = ⊥) (hz : z ∈ effectiveDomain f) :
              f z = ⊥

              A lower semicontinuous convex function that takes the value ⊥ somewhere is ⊥ on its whole domain: convexity spreads ⊥ along the segment [y, z) from a point y with f y = ⊥ to a point z of the domain (ConvexFun.apply_smul_add_smul_eq_bot), and lower semicontinuity at z gives f z = ⊥ BC, Proposition 9.6. Only lower semicontinuity at z is used.

              theorem ConvexAnalysis.ConvexFun.ne_bot_of_lowerSemicontinuous {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFun f) {x : E} (hlsc : LowerSemicontinuousAt f x) {r : ℝ} (hx : f x = ↑r) (y : E) :
              f y ≠ ⊥

              A convex function with a finite value at a point x where it is lower semicontinuous never takes the value ⊥ (ConvexFun.eq_bot_of_lowerSemicontinuous).

              theorem ConvexAnalysis.ConvexFun.isProper_of_lowerSemicontinuous {E : Type u_1} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E] {f : E → EReal} (hf : ConvexFun f) {x : E} (hlsc : LowerSemicontinuousAt f x) {r : ℝ} (hx : f x = ↑r) :

              A convex function with a finite value at a point where it is lower semicontinuous is proper.

              noncomputable def ConvexAnalysis.convexIndicator {E : Type u_1} (C : Set E) :
              E → EReal

              The indicator function of convex analysis: 0 on C and ⊤ outside C. It is Mathlib's Set.indicator of the complement with the constant ⊤.

              Equations
              Instances For
                @[simp]
                theorem ConvexAnalysis.convexIndicator_of_mem {E : Type u_1} {C : Set E} {x : E} (hx : x ∈ C) :

                The indicator function of C is 0 on C.

                @[simp]
                theorem ConvexAnalysis.convexIndicator_of_notMem {E : Type u_1} {C : Set E} {x : E} (hx : x ∉ C) :

                The indicator function of C is ⊤ outside C.

                theorem ConvexAnalysis.convexIndicator_apply {E : Type u_1} (C : Set E) (x : E) [Decidable (x ∈ C)] :

                The indicator function of C at x: 0 if x ∈ C, and ⊤ otherwise.

                theorem ConvexAnalysis.convexIndicator_ne_bot {E : Type u_1} (C : Set E) (x : E) :

                The indicator function never takes the value ⊥.

                theorem ConvexAnalysis.convexIndicator_nonneg {E : Type u_1} (C : Set E) (x : E) :

                The indicator function is nonnegative.

                @[simp]

                The indicator function of the whole space is 0.

                @[simp]

                The indicator function of the empty set is the constant ⊤.

                The indicator of an intersection is the sum of the indicators: ι_{C ∩ D} = ι_C + ι_D.

                @[simp]

                The epigraph of ι_C is C × [0, ∞).

                @[simp]

                The effective domain of ι_C is C.

                ι_C is proper iff C is nonempty.

                ι_C is convex iff C is convex.

                The indicator of C is continuous at interior points of C, where it is locally 0.

                ι_C is lower semicontinuous iff C is closed.

                theorem ConvexAnalysis.epigraph_coe_add_convexIndicator {E : Type u_1} (f : E → ℝ) (s : Set E) :
                epigraph ((fun (x : E) => ↑(f x)) + convexIndicator s) = {p : E × ℝ | p.1 ∈ s ∧ f p.1 ≤ p.2}

                The epigraph of f + ι_s for a real valued f: the points over s above the graph.

                theorem ConvexAnalysis.convexFun_coe_add_convexIndicator_iff {E : Type u_1} [AddCommGroup E] [Module ℝ E] {f : E → ℝ} {s : Set E} :
                ConvexFun ((fun (x : E) => ↑(f x)) + convexIndicator s) ↔ ConvexOn ℝ s f

                A real valued f is convex on s in the sense of Mathlib's ConvexOn ℝ s f iff f + ι_s is convex.

                The lower semicontinuity bridge for f + ι_s with s closed: it is lower semicontinuous iff f is lower semicontinuous on s in Mathlib's sense.