Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit fe6ea3e

Browse files
committed
feat(analysis/convex/integral): strict Jensen's inequality (#11552)
1 parent c8150cc commit fe6ea3e

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

src/analysis/convex/integral.lean

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Yury G. Kudryashov
55
-/
66
import analysis.convex.function
7+
import analysis.convex.strict
8+
import measure_theory.function.ae_eq_of_integral
79
import measure_theory.integral.average
810

911
/-!
@@ -16,6 +18,17 @@ In this file we prove several forms of Jensen's inequality for integrals.
1618
- for convex functions: `convex.on.average_mem_epigraph`, `convex_on.map_average_le`,
1719
`convex_on.set_average_mem_epigraph`, `convex_on.map_set_average_le`, `convex_on.map_integral_le`;
1820
21+
- for strictly convex sets: `strict_convex.ae_eq_const_or_average_mem_interior`;
22+
23+
- for a closed ball in a strictly convex normed space:
24+
`strict_convex.ae_eq_const_or_norm_integral_lt_of_norm_le_const`
25+
26+
- for strictly convex functions: `strict_convex_on.ae_eq_const_or_map_average_lt`.
27+
28+
## TODO
29+
30+
- Use a typeclass for strict convexity of a closed ball.
31+
1932
## Tags
2033
2134
convex, integral, center mass, average value, Jensen's inequality
@@ -31,6 +44,10 @@ variables {α E F : Type*} {m0 : measurable_space α}
3144
[topological_space.second_countable_topology F] [measurable_space F] [borel_space F]
3245
{μ : measure α} {s : set E}
3346

47+
/-!
48+
### Non-strict Jensen's inequality
49+
-/
50+
3451
/-- If `μ` is a probability measure on `α`, `s` is a convex closed set in `E`, and `f` is an
3552
integrable function sending `μ`-a.e. points to `s`, then the expected value of `f` belongs to `s`:
3653
`∫ x, f x ∂μ ∈ s`. See also `convex.sum_mem` for a finite sum version of this lemma. -/
@@ -195,3 +212,125 @@ lemma concave_on.le_map_integral [is_probability_measure μ] {s : set E} {g : E
195212
∫ x, g (f x) ∂μ ≤ g (∫ x, f x ∂μ) :=
196213
by simpa only [average_eq_integral]
197214
using hg.le_map_average hgc hsc (is_probability_measure.ne_zero μ) hfs hfi hgi
215+
216+
/-!
217+
### Strict Jensen's inequality
218+
-/
219+
220+
/-- If `f : α → E` is an integrable function, then either it is a.e. equal to the constant
221+
`⨍ x, f x ∂μ` or there exists a measurable set such that `μ s ≠ 0`, `μ sᶜ ≠ 0`, and the average
222+
values of `f` over `s` and `sᶜ` are different. -/
223+
lemma measure_theory.integrable.ae_eq_const_or_exists_average_ne_compl [is_finite_measure μ]
224+
{f : α → E} (hfi : integrable f μ) :
225+
(f =ᵐ[μ] const α (⨍ x, f x ∂μ)) ∨ ∃ s, measurable_set s ∧ μ s ≠ 0 ∧ μ sᶜ ≠ 0
226+
⨍ x in s, f x ∂μ ≠ ⨍ x in sᶜ, f x ∂μ :=
227+
begin
228+
refine or_iff_not_imp_right.mpr (λ H, _), push_neg at H,
229+
refine hfi.ae_eq_of_forall_set_integral_eq _ _ (integrable_const _) (λ s hs hs', _), clear hs',
230+
simp only [const_apply, set_integral_const],
231+
by_cases h₀ : μ s = 0,
232+
{ rw [restrict_eq_zero.2 h₀, integral_zero_measure, h₀, ennreal.zero_to_real, zero_smul] },
233+
by_cases h₀' : μ sᶜ = 0,
234+
{ rw ← ae_eq_univ at h₀',
235+
rw [restrict_congr_set h₀', restrict_univ, measure_congr h₀', measure_smul_average] },
236+
have := average_mem_open_segment_compl_self hs.null_measurable_set h₀ h₀' hfi,
237+
rw [← H s hs h₀ h₀', open_segment_same, mem_singleton_iff] at this,
238+
rw [this, measure_smul_set_average _ (measure_ne_top μ _)]
239+
end
240+
241+
/-- If an integrable function `f : α → E` takes values in a convex closed set `s` and for some set
242+
`t` of positive measure, the average value of `f` over `t` belongs to the interior of `s`, then the
243+
average of `f` over the whole space belongs to the interior of `s`. -/
244+
lemma convex.average_mem_interior_of_set [is_finite_measure μ] {t : set α} {s : set E}
245+
(hs : convex ℝ s) (hsc : is_closed s) (h0 : μ t ≠ 0) {f : α → E} (hfs : ∀ᵐ x ∂μ, f x ∈ s)
246+
(hfi : integrable f μ) (ht : ⨍ x in t, f x ∂μ ∈ interior s) :
247+
⨍ x, f x ∂μ ∈ interior s :=
248+
begin
249+
rw ← measure_to_measurable at h0, rw ← restrict_to_measurable (measure_ne_top μ t) at ht,
250+
by_cases h0' : μ (to_measurable μ t)ᶜ = 0,
251+
{ rw ← ae_eq_univ at h0',
252+
rwa [restrict_congr_set h0', restrict_univ] at ht },
253+
exact hs.open_segment_subset_interior_left ht
254+
(hs.set_average_mem hsc h0' (measure_ne_top _ _) (ae_restrict_of_ae hfs) hfi.integrable_on)
255+
(average_mem_open_segment_compl_self (measurable_set_to_measurable μ t).null_measurable_set
256+
h0 h0' hfi)
257+
end
258+
259+
/-- If an integrable function `f : α → E` takes values in a strictly convex closed set `s`, then
260+
either it is a.e. equal to its average value, or its average value belongs to the interior of
261+
`s`. -/
262+
lemma strict_convex.ae_eq_const_or_average_mem_interior [is_finite_measure μ] {s : set E}
263+
(hs : strict_convex ℝ s) (hsc : is_closed s) {f : α → E} (hfs : ∀ᵐ x ∂μ, f x ∈ s)
264+
(hfi : integrable f μ) :
265+
f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ ⨍ x, f x ∂μ ∈ interior s :=
266+
begin
267+
have : ∀ {t}, μ t ≠ 0 → ⨍ x in t, f x ∂μ ∈ s,
268+
from λ t ht, hs.convex.set_average_mem hsc ht (measure_ne_top _ _) (ae_restrict_of_ae hfs)
269+
hfi.integrable_on,
270+
refine hfi.ae_eq_const_or_exists_average_ne_compl.imp_right _,
271+
rintro ⟨t, hm, h₀, h₀', hne⟩,
272+
exact hs.open_segment_subset (this h₀) (this h₀') hne
273+
(average_mem_open_segment_compl_self hm.null_measurable_set h₀ h₀' hfi)
274+
end
275+
276+
/-- **Jensen's inequality**, strict version: if an integrable function `f : α → E` takes values in a
277+
convex closed set `s`, and `g : E → ℝ` is continuous and strictly convex on `s`, then
278+
either `f` is a.e. equal to its average value, or `g (⨍ x, f x ∂μ) < ⨍ x, g (f x) ∂μ`. -/
279+
lemma strict_convex_on.ae_eq_const_or_map_average_lt [is_finite_measure μ] {s : set E} {g : E → ℝ}
280+
(hg : strict_convex_on ℝ s g) (hgc : continuous_on g s) (hsc : is_closed s) {f : α → E}
281+
(hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : integrable f μ) (hgi : integrable (g ∘ f) μ) :
282+
f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ g (⨍ x, f x ∂μ) < ⨍ x, g (f x) ∂μ :=
283+
begin
284+
have : ∀ {t}, μ t ≠ 0 → ⨍ x in t, f x ∂μ ∈ s ∧ g (⨍ x in t, f x ∂μ) ≤ ⨍ x in t, g (f x) ∂μ,
285+
from λ t ht, hg.convex_on.set_average_mem_epigraph hgc hsc ht (measure_ne_top _ _)
286+
(ae_restrict_of_ae hfs) hfi.integrable_on hgi.integrable_on,
287+
refine hfi.ae_eq_const_or_exists_average_ne_compl.imp_right _,
288+
rintro ⟨t, hm, h₀, h₀', hne⟩,
289+
rcases average_mem_open_segment_compl_self hm.null_measurable_set h₀ h₀' (hfi.prod_mk hgi)
290+
with ⟨a, b, ha, hb, hab, h_avg⟩,
291+
simp only [average_pair hfi hgi, average_pair hfi.integrable_on hgi.integrable_on, prod.smul_mk,
292+
prod.mk_add_mk, prod.mk.inj_iff, (∘)] at h_avg,
293+
rw [← h_avg.1, ← h_avg.2],
294+
calc g (a • ⨍ x in t, f x ∂μ + b • ⨍ x in tᶜ, f x ∂μ)
295+
< a * g (⨍ x in t, f x ∂μ) + b * g (⨍ x in tᶜ, f x ∂μ) :
296+
hg.2 (this h₀).1 (this h₀').1 hne ha hb hab
297+
... ≤ a * ⨍ x in t, g (f x) ∂μ + b * ⨍ x in tᶜ, g (f x) ∂μ :
298+
add_le_add (mul_le_mul_of_nonneg_left (this h₀).2 ha.le)
299+
(mul_le_mul_of_nonneg_left (this h₀').2 hb.le)
300+
end
301+
302+
/-- **Jensen's inequality**, strict version: if an integrable function `f : α → E` takes values in a
303+
convex closed set `s`, and `g : E → ℝ` is continuous and strictly concave on `s`, then
304+
either `f` is a.e. equal to its average value, or `⨍ x, g (f x) ∂μ < g (⨍ x, f x ∂μ)`. -/
305+
lemma strict_concave_on.ae_eq_const_or_lt_map_average [is_finite_measure μ] {s : set E} {g : E → ℝ}
306+
(hg : strict_concave_on ℝ s g) (hgc : continuous_on g s) (hsc : is_closed s) {f : α → E}
307+
(hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : integrable f μ) (hgi : integrable (g ∘ f) μ) :
308+
f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ ⨍ x, g (f x) ∂μ < g (⨍ x, f x ∂μ) :=
309+
by simpa only [pi.neg_apply, average_neg, neg_lt_neg_iff]
310+
using hg.neg.ae_eq_const_or_map_average_lt hgc.neg hsc hfs hfi hgi.neg
311+
312+
/-- If the closed ball of radius `C` in a normed space `E` is strictly convex and `f : α → E` is
313+
a function such that `∥f x∥ ≤ C` a.e., then either either this function is a.e. equal to its
314+
average value, or the norm of its integral is strictly less than `(μ univ).to_real * C`. -/
315+
lemma strict_convex.ae_eq_const_or_norm_integral_lt_of_norm_le_const [is_finite_measure μ]
316+
{f : α → E} {C : ℝ} (h_convex : strict_convex ℝ (closed_ball (0 : E) C))
317+
(h_le : ∀ᵐ x ∂μ, ∥f x∥ ≤ C) :
318+
(f =ᵐ[μ] const α ⨍ x, f x ∂μ) ∨ ∥∫ x, f x ∂μ∥ < (μ univ).to_real * C :=
319+
begin
320+
cases le_or_lt C 0 with hC0 hC0,
321+
{ have : f =ᵐ[μ] 0, from h_le.mono (λ x hx, norm_le_zero_iff.1 (hx.trans hC0)),
322+
simp only [average_congr this, pi.zero_apply, average_zero],
323+
exact or.inl this },
324+
cases eq_or_ne μ 0 with hμ hμ,
325+
{ rw hμ, exact or.inl rfl },
326+
by_cases hfi : integrable f μ, swap,
327+
{ right,
328+
simpa [integral_undef hfi, hC0, measure_lt_top, ennreal.to_real_pos_iff, pos_iff_ne_zero]
329+
using hμ },
330+
replace h_le : ∀ᵐ x ∂μ, f x ∈ closed_ball (0 : E) C, by simpa only [mem_closed_ball_zero_iff],
331+
have hμ' : 0 < (μ univ).to_real,
332+
from ennreal.to_real_pos (mt measure_univ_eq_zero.1 hμ) (measure_ne_top _ _),
333+
simpa only [interior_closed_ball _ hC0.ne', mem_ball_zero_iff, average_def', norm_smul,
334+
real.norm_eq_abs, abs_inv, abs_of_pos hμ', ← div_eq_inv_mul, div_lt_iff' hμ']
335+
using h_convex.ae_eq_const_or_average_mem_interior is_closed_ball h_le hfi,
336+
end

0 commit comments

Comments
 (0)