Documentation

Tdaf.Analysis.Convex.Duality.Conjugate

Conjugates of convex functions #

The conjugate of f : E → EReal with respect to a pairing B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ is f*(y) = sup_x (⟨x, y⟩ - f x). Read through epigraphs, f* is a description of the affine minorants of f: f*(y) ≤ c says exactly that x ↦ ⟨x, y⟩ - c lies below f. It is defined for an arbitrary f, and is always a closed convex function. The theorem the rest of the library rests on is Fenchel–Moreau, f** = cl f for convex f: conjugacy is an involution on the closed convex functions, and a closed convex function is the pointwise supremum of the affine functions below it.

Main definitions #

Main results #

Implementation notes #

Fenchel–Moreau does not care which topology E carries, so long as its continuous dual is the F side of the pairing: that is IsCompatiblePairing B. Its weaker companion IsContinuousPairing, asking only that every ⟨·, y⟩ be continuous, is all the closedness half of this file needs — closedFn_conj, conj_clFn, biconj_le_clFn — which matters because a Banach space paired with its norm-topology dual is continuous on both sides but compatible only if it is reflexive.

References #

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

The conjugate #

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

The convex conjugate of f with respect to the pairing B: f*(y) = sup_x (⟨x, y⟩ - f x). epi f* is the set of pairs (y, c) for which the affine function x ↦ ⟨x, y⟩ - c is majorized by f. No hypothesis is placed on f.

Equations
Instances For
    @[reducible, inline]
    noncomputable abbrev Tdaf.ConvexAnalysis.biconj {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) :
    E → EReal

    The biconjugate, back on E. Using B.flip rather than a second copy of B makes the correspondence symmetric with no reflexivity assumption; B.flip.flip = B holds by rfl.

    Equations
    Instances For
      theorem Tdaf.ConvexAnalysis.conj_apply {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) (y : F) :
      conj B f y = ⨆ (x : E), ↑((B x) y) - f x
      theorem Tdaf.ConvexAnalysis.biconj_apply {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) (x : E) :
      biconj B f x = ⨆ (y : F), ↑((B x) y) - conj B f y
      theorem Tdaf.ConvexAnalysis.sub_le_conj {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) :
      ↑((B x) y) - f x ≤ conj B f y

      Fenchel's inequality, ∞ - ∞-free: it holds for every f, x and y, and it is the form the proofs below use rather than the additive le_add_conj.

      theorem Tdaf.ConvexAnalysis.conj_le_coe_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {y : F} {c : ℝ} :
      conj B f y ≤ ↑c ↔ affineFn B y c ≤ f

      f*(y) ≤ c says exactly that the affine function x ↦ ⟨x, y⟩ - c lies below f.

      theorem Tdaf.ConvexAnalysis.conj_le_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {g : F → EReal} :
      conj B f ≤ g ↔ conj B.flip g ≤ f

      The adjunction. f* ≤ g and g* ≤ f say the same thing — that ⟨x, y⟩ ≤ f x + g y for all x and y, in the ∞ - ∞-free reading.

      theorem Tdaf.ConvexAnalysis.biconj_le {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) :
      biconj B f ≤ f

      The improper cases #

      theorem Tdaf.ConvexAnalysis.conj_eq_bot_iff {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {y : F} :
      conj B f y = ⊥ ↔ ∀ (x : E), f x = ⊤

      f* takes the value ⊥ at a point exactly when f ≡ ⊤ — a condition independent of the point. So f* is either the constant ⊥ or never ⊥, which is why it is always closed.

      theorem Tdaf.ConvexAnalysis.conj_of_eq_bot {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x₀ : E} (h : f x₀ = ⊥) :
      conj B f = fun (x : F) => ⊤

      If f takes the value ⊥ anywhere, its conjugate is identically ⊤.

      theorem Tdaf.ConvexAnalysis.conj_top {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) :
      (conj B fun (x : E) => ⊤) = fun (x : F) => ⊥
      theorem Tdaf.ConvexAnalysis.conj_bot {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) :
      (conj B fun (x : E) => ⊥) = fun (x : F) => ⊤
      theorem Tdaf.ConvexAnalysis.conj_ne_bot {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} (h : (dom f).Nonempty) (y : F) :
      conj B f y ≠ ⊥
      theorem Tdaf.ConvexAnalysis.le_add_conj {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x : E} (hb : f x ≠ ⊥) (hd : (dom f).Nonempty) (y : F) :
      ↑((B x) y) ≤ f x + conj B f y

      Fenchel's inequality: ⟨x, y⟩ ≤ f x + f*(y) for a proper f.

      Properness is not decorative: if f ≡ +∞ then f* ≡ -∞ and the right-hand side is ⊤ + ⊥ = ⊥, and if f takes -∞ then it is ⊥ + ⊤ = ⊥. Use sub_le_conj when properness is unavailable.

      theorem Tdaf.ConvexAnalysis.Proper.le_add_conj {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) :
      ↑((B x) y) ≤ f x + conj B f y
      theorem Tdaf.ConvexAnalysis.proper_of_proper_conj {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} (h : Proper (conj B f)) :

      If the conjugate is proper then so is the original function; no hypothesis is needed for this direction. The converse is proper_conj, and needs closedness.

      Convexity of the conjugate #

      theorem Tdaf.ConvexAnalysis.conj_term_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) :
      ((fun (y : F) => ↑((B x) y) - f x) = fun (x : F) => ⊥) ∨ ((fun (y : F) => ↑((B x) y) - f x) = fun (x : F) => ⊤) ∨ ∃ (t : ℝ), (fun (y : F) => ↑((B x) y) - f x) = affineFn B.flip x t

      The x-th term of the supremum defining f* is, as a function of y, either constant or one of the affine functions of the flipped pairing, according to the value of f x.

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

      The conjugate of an arbitrary function is convex: a pointwise supremum of affine functions and constants.

      Why Fenchel's inequality needs properness #

      In EReal the value ⊥ is absorbing for addition, so ⊤ + ⊥ = ⊥ + ⊤ = ⊥ and the additive form of Fenchel's inequality collapses at each of the two improper functions.

      Closedness of the conjugate #

      The conjugate is closed in any topology on F for which the pairing is continuous — in particular in σ(F, E), hence also in the norm topology of a normed space paired with its dual.

      The conjugate is a closed convex function, with no hypothesis on f: if f ≡ +∞ it is the constant ⊥, and otherwise it is lower semicontinuous and never takes ⊥.

      The conjugate sees only the closure #

      Closure does not change the conjugate: (cl f)* = f*. The affine functions below f and below cl f are the same, because an affine function of a continuous pairing is itself closed.

      The biconjugate is a closed convex minorant of f, hence a minorant of cl f: the easy half of Fenchel–Moreau, needing no convexity.

      Affine minorants of a closed convex function #

      theorem Tdaf.ConvexAnalysis.exists_affineFn_le_of_lt {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] [LocallyConvexSpace ℝ E] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [IsCompatiblePairing B] {f : E → EReal} (hf : ConvexFn f) (hc : ClosedFn f) {x₀ : E} {α : ℝ} (h : ↑α < f x₀) :
      ∃ (y : F) (c : ℝ), affineFn B y c ≤ f ∧ ↑α < affineFn B y c x₀

      The affine-minorant lemma, in its working form: below any value strictly under a closed convex function there is an affine minorant of the pairing.

      theorem Tdaf.ConvexAnalysis.eq_biSup_affineFn {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] [LocallyConvexSpace ℝ E] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [IsCompatiblePairing B] {f : E → EReal} (hf : ConvexFn f) (hc : ClosedFn f) :
      f = fun (x : E) => ⨆ p ∈ {p : F × ℝ | affineFn B p.1 p.2 ≤ f}, affineFn B p.1 p.2 x

      A closed convex function is the pointwise supremum of all the affine functions of the pairing that lie below it.

      The Fenchel–Moreau theorem #

      The Fenchel–Moreau theorem. For a convex function, f** = cl f.

      The improper cases are why clFn branches on lscHull f rather than on f: if f takes -∞ anywhere then f* ≡ +∞ and f** ≡ -∞, which is cl f only under that branching.

      The properness half: the conjugate of a closed proper convex function is proper. With proper_of_proper_conj, "f* is proper if and only if f is".

      Conjugacy as a Galois connection #

      conj_le_iff says that conj B and conj B.flip are antitonely adjoint; Fenchel–Moreau then identifies the closed elements of the induced closure operator with the closed convex functions. The OrderDual on the domain is what makes an antitone adjunction fit Mathlib's monotone GaloisConnection.

      theorem Tdaf.ConvexAnalysis.gc_conj_conj {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) :
      GaloisConnection (fun (f : (E → EReal)ᵒᵈ) => conj B (OrderDual.ofDual f)) fun (g : F → EReal) => OrderDual.toDual (conj B.flip g)

      The closure operator f ↦ f** induced by the adjunction. Its closed elements are the functions equal to their own biconjugate, which by Fenchel–Moreau are exactly the closed convex functions.

      Equations
      Instances For
        theorem Tdaf.ConvexAnalysis.conj_biconj {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (f : E → EReal) :
        conj B (biconj B f) = conj B f

        Conjugating three times is the same as conjugating once: the triangle identity, which here says that f* is unchanged by closure.

        Conjugacy is an order anti-isomorphism between the biconjugation-fixed functions.

        Neither this nor conjEquiv below subsumes the other: this one needs no topology and carries the order, while conjEquiv is about the proper closed convex functions, a strictly smaller class that f** = f does not pin down — the improper f ≡ +∞ and f ≡ -∞ are fixed by biconjugation too.

        Equations
        Instances For

          The involution on closed proper convex functions #

          Both spaces carry topologies compatible with the pairing, and everything is symmetric under B ↦ B.flip.

          Conjugacy is a symmetric one-to-one correspondence between the closed proper convex functions on E and those on F.

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

            Translation, tilting, constants and an invertible substitution #

            The elementary conjugacy operations, those under which h* changes by a change of variable rather than by a change of function. There are four independent rows —

            primaldual
            h (x - a)h* y + ⟨a, y⟩
            h x + ⟨x, b⟩h* (y - b)
            h x + αh* y - α
            h (A x), A invertibleh* (A'⁻¹ y)

            — and conj_comp_affine composes all four into a single formula. The two scaling rows of the same table are conj_smul and conj_smulRight in Duality/Ops.lean. Each identity holds for an arbitrary h : E → EReal, improper ones included, with no topology, properness or convexity: ⟨a, y⟩, ⟨x, b⟩ and α are real, so sliding them across the difference ⟨x, y⟩ - h x never produces ∞ - ∞.

            Rockafellar writes the substitution row with A*⁻¹, presuming that A has an adjoint and that the adjoint is invertible. Over a general pairing neither is automatic, so conj_comp_linearEquiv takes the inverse pair A, A' and the adjointness datum IsAdjointPair B B' A A' as hypotheses; with B and B' separating, A' is determined by A, so nothing is lost.

            theorem Tdaf.ConvexAnalysis.conj_comp_sub {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (a : E) (y : F) :
            conj B (fun (x : E) => h (x - a)) y = conj B h y + ↑((B a) y)

            The translation row: translating the argument of h by a adds the linear function ⟨a, ·⟩ to the conjugate.

            theorem Tdaf.ConvexAnalysis.conj_comp_add {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (a : E) (y : F) :
            conj B (fun (x : E) => h (a + x)) y = conj B h y - ↑((B a) y)

            The translation row with the translation on the left: h (a + ·) is h (· - (-a)), so its conjugate is h* - ⟨a, ·⟩.

            theorem Tdaf.ConvexAnalysis.conj_add_pairing {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (b y : F) :
            conj B (fun (x : E) => h x + ↑((B x) b)) y = conj B h (y - b)

            The tilting row: adding the linear function ⟨·, b⟩ to h translates the conjugate by b.

            theorem Tdaf.ConvexAnalysis.conj_sub_pairing {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (b y : F) :
            conj B (fun (x : E) => h x - ↑((B x) b)) y = conj B h (y + b)

            The tilting row with the linear term subtracted: h - ⟨·, b⟩ has conjugate h* (· + b).

            theorem Tdaf.ConvexAnalysis.conj_add_const {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (α : ℝ) (y : F) :
            conj B (fun (x : E) => h x + ↑α) y = conj B h y - ↑α

            The constant row: adding a constant to h subtracts it from the conjugate.

            theorem Tdaf.ConvexAnalysis.conj_comp_linearEquiv {E : Type u_1} {F : Type u_2} {G : Type u_3} {H : Type u_4} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [AddCommGroup G] [Module ℝ G] [AddCommGroup H] [Module ℝ H] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {B' : G →ₗ[ℝ] H →ₗ[ℝ] ℝ} (A : E ≃ₗ[ℝ] G) (A' : H ≃ₗ[ℝ] F) (hA : IsAdjointPair B B' ↑A ↑A') (h : G → EReal) (y : F) :
            conj B (fun (x : E) => h (A x)) y = conj B' h (A'.symm y)

            The substitution row: precomposing h with a linear isomorphism A precomposes the conjugate with the inverse of the transpose. Contrast conj_mapLin, which drops invertibility at the cost of stating the dual side as an image.

            theorem Tdaf.ConvexAnalysis.conj_comp_affine {E : Type u_1} {F : Type u_2} {G : Type u_3} {H : Type u_4} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] [AddCommGroup G] [Module ℝ G] [AddCommGroup H] [Module ℝ H] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {B' : G →ₗ[ℝ] H →ₗ[ℝ] ℝ} (A : E ≃ₗ[ℝ] G) (A' : H ≃ₗ[ℝ] F) (hA : IsAdjointPair B B' ↑A ↑A') (h : G → EReal) (a : E) (b : F) (α : ℝ) (y : F) :
            conj B (fun (x : E) => h (A (x - a)) + ↑((B x) b) + ↑α) y = conj B' h (A'.symm (y - b)) + ↑((B a) y) + ↑(-α - (B a) b)

            The four rows composed. For f x = h (A (x - a)) + ⟨x, a*⟩ + α with A an invertible linear transformation, f* y = h* (A*⁻¹ (y - a*)) + ⟨a, y⟩ + α* where α* = -α - ⟨a, a*⟩.

            theorem Tdaf.ConvexAnalysis.conj_comp_add_sub_pairing {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (h : E → EReal) (z : E) (z' y : F) :
            conj B (fun (x : E) => h (z + x) - ↑((B x) z')) y = conj B h (z' + y) - ↑((B z) y) - ↑((B z) z')

            Translation and tilting composed: for f = h (z + ·) - ⟨·, z*⟩, f* = h* (z* + ·) - ⟨z, ·⟩ - ⟨z, z*⟩. The constant ⟨z, z*⟩ is what makes the two infima it is used for add to ⟨z, z*⟩ rather than to zero.

            Fenchel–Moreau for a locally convex space paired with its own topological dual, in the original topology of E and with no hypothesis beyond convexity.

            Fenchel–Moreau for a real Hilbert space paired with itself by the inner product, in the norm topology. Compatibility is the Fréchet–Riesz representation theorem.

            theorem Tdaf.ConvexAnalysis.eq_biSup_affineFn_inner {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] {f : E → EReal} (hf : ConvexFn f) (hc : ClosedFn f) :
            f = fun (x : E) => ⨆ p ∈ {p : E × ℝ | affineFn (innerₗ E) p.1 p.2 ≤ f}, affineFn (innerₗ E) p.1 p.2 x