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

Commit 4093834

Browse files
committed
feat(measure_theory/measure/finite_measure_weak_convergence): add definition and lemmas of pairing measures with nonnegative continuous test functions. (#9430)
Add definition and lemmas about pairing of `finite_measure`s and `probability_measure`s with nonnegative continuous test functions. These pairings will be used in the definition of the topology of weak convergence (convergence in distribution): the topology will be defined as an induced topology based on them. Co-authored-by: kkytola <39528102+kkytola@users.noreply.github.com>
1 parent 5c8243f commit 4093834

File tree

4 files changed

+210
-3
lines changed

4 files changed

+210
-3
lines changed

src/measure_theory/integral/lebesgue.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,16 @@ lemma set_lintegral_lt_top_of_is_compact [topological_space α] [opens_measurabl
20182018
∫⁻ x in s, f x ∂μ < ∞ :=
20192019
set_lintegral_lt_top_of_bdd_above hs hf.measurable (hsc.image hf).bdd_above
20202020

2021+
lemma _root_.is_finite_measure.lintegral_lt_top_of_bounded_to_ennreal {α : Type*}
2022+
[measurable_space α] (μ : measure α) [μ_fin : is_finite_measure μ]
2023+
{f : α → ℝ≥0∞} (f_bdd : ∃ c : ℝ≥0, ∀ x, f x ≤ c) : ∫⁻ x, f x ∂μ < ∞ :=
2024+
begin
2025+
cases f_bdd with c hc,
2026+
apply lt_of_le_of_lt (@lintegral_mono _ _ μ _ _ hc),
2027+
rw lintegral_const,
2028+
exact ennreal.mul_lt_top ennreal.coe_lt_top.ne μ_fin.measure_univ_lt_top.ne,
2029+
end
2030+
20212031
/-- Given a measure `μ : measure α` and a function `f : α → ℝ≥0∞`, `μ.with_density f` is the
20222032
measure such that for a measurable set `s` we have `μ.with_density f s = ∫⁻ a in s, f a ∂μ`. -/
20232033
def measure.with_density {m : measurable_space α} (μ : measure α) (f : α → ℝ≥0∞) : measure α :=

src/measure_theory/measure/finite_measure_weak_convergence.lean

Lines changed: 177 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Kalle Kytölä
55
-/
66
import measure_theory.measure.measure_space
7+
import measure_theory.integral.bochner
8+
import topology.continuous_function.bounded
9+
import topology.algebra.weak_dual_topology
710

811
/-!
912
# Weak convergence of (finite) measures
@@ -23,14 +26,21 @@ TODOs:
2326
2427
## Main definitions
2528
26-
The main definitions are the types `finite_measure α` and `probability_measure α`.
29+
The main definitions are the
30+
* types `finite_measure α` and `probability_measure α`;
31+
* `to_weak_dual_bounded_continuous_nnreal : finite_measure α → (weak_dual ℝ≥0 (α →ᵇ ℝ≥0))`
32+
allowing to interpret a finite measure as a continuous linear functional on the space of
33+
bounded continuous nonnegative functions on `α`. This will be used for the definition of the
34+
topology of weak convergence.
2735
2836
TODO:
2937
* Define the topologies on the above types.
3038
3139
## Main results
3240
33-
None yet.
41+
* Finite measures `μ` on `α` give rise to continuous linear functionals on the space of
42+
bounded continuous nonnegative functions on `α` via integration:
43+
`to_weak_dual_of_bounded_continuous_nnreal : finite_measure α → (weak_dual ℝ≥0 (α →ᵇ ℝ≥0))`.
3444
3545
TODO:
3646
* Portmanteau theorem.
@@ -73,7 +83,8 @@ noncomputable theory
7383
open measure_theory
7484
open set
7585
open filter
76-
open_locale topological_space ennreal nnreal
86+
open bounded_continuous_function
87+
open_locale topological_space ennreal nnreal bounded_continuous_function
7788

7889
namespace measure_theory
7990

@@ -154,6 +165,121 @@ def coe_add_monoid_hom : finite_measure α →+ measure α :=
154165
instance {α : Type*} [measurable_space α] : module ℝ≥0 (finite_measure α) :=
155166
function.injective.module _ coe_add_monoid_hom finite_measure.coe_injective coe_smul
156167

168+
variables [topological_space α]
169+
170+
/-- The pairing of a finite (Borel) measure `μ` with a nonnegative bounded continuous
171+
function is obtained by (Lebesgue) integrating the (test) function against the measure.
172+
This is `finite_measure.test_against_nn`. -/
173+
def test_against_nn (μ : finite_measure α) (f : α →ᵇ ℝ≥0) : ℝ≥0 :=
174+
(∫⁻ x, f x ∂(μ : measure α)).to_nnreal
175+
176+
lemma _root_.bounded_continuous_function.nnreal.to_ennreal_comp_measurable {α : Type*}
177+
[topological_space α] [measurable_space α] [opens_measurable_space α] (f : α →ᵇ ℝ≥0) :
178+
measurable (λ x, (f x : ℝ≥0∞)) :=
179+
measurable_coe_nnreal_ennreal.comp f.continuous.measurable
180+
181+
lemma lintegral_lt_top_of_bounded_continuous_to_nnreal (μ : finite_measure α) (f : α →ᵇ ℝ≥0) :
182+
∫⁻ x, f x ∂(μ : measure α) < ∞ :=
183+
begin
184+
apply is_finite_measure.lintegral_lt_top_of_bounded_to_ennreal,
185+
use nndist f 0,
186+
intros x,
187+
have key := bounded_continuous_function.nnreal.upper_bound f x,
188+
rw ennreal.coe_le_coe,
189+
have eq : nndist f 0 = ⟨dist f 0, dist_nonneg⟩,
190+
{ ext,
191+
simp only [real.coe_to_nnreal', max_eq_left_iff, subtype.coe_mk, coe_nndist], },
192+
rwa eq at key,
193+
end
194+
195+
@[simp] lemma test_against_nn_coe_eq {μ : finite_measure α} {f : α →ᵇ ℝ≥0} :
196+
(μ.test_against_nn f : ℝ≥0∞) = ∫⁻ x, f x ∂(μ : measure α) :=
197+
ennreal.coe_to_nnreal (lintegral_lt_top_of_bounded_continuous_to_nnreal μ f).ne
198+
199+
lemma test_against_nn_const (μ : finite_measure α) (c : ℝ≥0) :
200+
μ.test_against_nn (bounded_continuous_function.const α c) = c * μ.mass :=
201+
by simp [← ennreal.coe_eq_coe]
202+
203+
lemma test_against_nn_mono (μ : finite_measure α)
204+
{f g : α →ᵇ ℝ≥0} (f_le_g : (f : α → ℝ≥0) ≤ g) :
205+
μ.test_against_nn f ≤ μ.test_against_nn g :=
206+
begin
207+
simp only [←ennreal.coe_le_coe, test_against_nn_coe_eq],
208+
apply lintegral_mono,
209+
exact λ x, ennreal.coe_mono (f_le_g x),
210+
end
211+
212+
variables [opens_measurable_space α]
213+
214+
lemma test_against_nn_add (μ : finite_measure α) (f₁ f₂ : α →ᵇ ℝ≥0) :
215+
μ.test_against_nn (f₁ + f₂) = μ.test_against_nn f₁ + μ.test_against_nn f₂ :=
216+
begin
217+
simp only [←ennreal.coe_eq_coe, bounded_continuous_function.coe_add, ennreal.coe_add,
218+
pi.add_apply, test_against_nn_coe_eq],
219+
apply lintegral_add;
220+
exact bounded_continuous_function.nnreal.to_ennreal_comp_measurable _,
221+
end
222+
223+
lemma test_against_nn_smul (μ : finite_measure α) (c : ℝ≥0) (f : α →ᵇ ℝ≥0) :
224+
μ.test_against_nn (c • f) = c * μ.test_against_nn f :=
225+
begin
226+
simp only [←ennreal.coe_eq_coe, algebra.id.smul_eq_mul, bounded_continuous_function.coe_smul,
227+
test_against_nn_coe_eq, ennreal.coe_mul],
228+
exact @lintegral_const_mul _ _ (μ : measure α) c _
229+
(bounded_continuous_function.nnreal.to_ennreal_comp_measurable f),
230+
end
231+
232+
lemma test_against_nn_lipschitz_estimate (μ : finite_measure α) (f g : α →ᵇ ℝ≥0) :
233+
μ.test_against_nn f ≤ μ.test_against_nn g + (nndist f g) * μ.mass :=
234+
begin
235+
simp only [←μ.test_against_nn_const (nndist f g), ←test_against_nn_add, ←ennreal.coe_le_coe,
236+
bounded_continuous_function.coe_add, const_apply, ennreal.coe_add, pi.add_apply,
237+
coe_nnreal_ennreal_nndist, test_against_nn_coe_eq],
238+
apply lintegral_mono,
239+
have le_dist : ∀ x, dist (f x) (g x) ≤ nndist f g :=
240+
bounded_continuous_function.dist_coe_le_dist,
241+
intros x,
242+
have le' : f(x) ≤ g(x) + nndist f g,
243+
{ apply (nnreal.le_add_nndist (f x) (g x)).trans,
244+
rw add_le_add_iff_left,
245+
exact dist_le_coe.mp (le_dist x), },
246+
have le : (f(x) : ℝ≥0∞) ≤ (g(x) : ℝ≥0∞) + (nndist f g),
247+
by { rw ←ennreal.coe_add, exact ennreal.coe_mono le', },
248+
rwa [coe_nnreal_ennreal_nndist] at le,
249+
end
250+
251+
lemma test_against_nn_lipschitz (μ : finite_measure α) :
252+
lipschitz_with μ.mass (λ (f : α →ᵇ ℝ≥0), μ.test_against_nn f) :=
253+
begin
254+
rw lipschitz_with_iff_dist_le_mul,
255+
intros f₁ f₂,
256+
suffices : abs (μ.test_against_nn f₁ - μ.test_against_nn f₂ : ℝ) ≤ μ.mass * (dist f₁ f₂),
257+
{ rwa nnreal.dist_eq, },
258+
apply abs_le.mpr,
259+
split,
260+
{ have key' := μ.test_against_nn_lipschitz_estimate f₂ f₁,
261+
rw mul_comm at key',
262+
suffices : ↑(μ.test_against_nn f₂) ≤ ↑(μ.test_against_nn f₁) + ↑(μ.mass) * dist f₁ f₂,
263+
{ linarith, },
264+
have key := nnreal.coe_mono key',
265+
rwa [nnreal.coe_add, nnreal.coe_mul, nndist_comm] at key, },
266+
{ have key' := μ.test_against_nn_lipschitz_estimate f₁ f₂,
267+
rw mul_comm at key',
268+
suffices : ↑(μ.test_against_nn f₁) ≤ ↑(μ.test_against_nn f₂) + ↑(μ.mass) * dist f₁ f₂,
269+
{ linarith, },
270+
have key := nnreal.coe_mono key',
271+
rwa [nnreal.coe_add, nnreal.coe_mul] at key, },
272+
end
273+
274+
/-- Finite measures yield elements of the `weak_dual` of bounded continuous nonnegative
275+
functions via `finite_measure.test_against_nn`, i.e., integration. -/
276+
def to_weak_dual_bounded_continuous_nnreal (μ : finite_measure α) :
277+
weak_dual ℝ≥0 (α →ᵇ ℝ≥0) :=
278+
{ to_fun := λ f, μ.test_against_nn f,
279+
map_add' := test_against_nn_add μ,
280+
map_smul' := test_against_nn_smul μ,
281+
cont := μ.test_against_nn_lipschitz.continuous, }
282+
157283
end finite_measure
158284

159285
/-- Probability measures are defined as the subtype of measures that have the property of being
@@ -202,6 +328,54 @@ by { rw [← coe_fn_comp_to_finite_measure_eq_coe_fn,
202328
@[simp] lemma mass_to_finite_measure (μ : probability_measure α) :
203329
μ.to_finite_measure.mass = 1 := μ.coe_fn_univ
204330

331+
variables [topological_space α]
332+
333+
/-- The pairing of a (Borel) probability measure `μ` with a nonnegative bounded continuous
334+
function is obtained by (Lebesgue) integrating the (test) function against the measure. This
335+
is `probability_measure.test_against_nn`. -/
336+
def test_against_nn
337+
(μ : probability_measure α) (f : α →ᵇ ℝ≥0) : ℝ≥0 :=
338+
(lintegral (μ : measure α) ((coe : ℝ≥0 → ℝ≥0∞) ∘ f)).to_nnreal
339+
340+
lemma lintegral_lt_top_of_bounded_continuous_to_nnreal (μ : probability_measure α) (f : α →ᵇ ℝ≥0) :
341+
∫⁻ x, f x ∂(μ : measure α) < ∞ :=
342+
μ.to_finite_measure.lintegral_lt_top_of_bounded_continuous_to_nnreal f
343+
344+
@[simp] lemma test_against_nn_coe_eq {μ : probability_measure α} {f : α →ᵇ ℝ≥0} :
345+
(μ.test_against_nn f : ℝ≥0∞) = ∫⁻ x, f x ∂(μ : measure α) :=
346+
ennreal.coe_to_nnreal (lintegral_lt_top_of_bounded_continuous_to_nnreal μ f).ne
347+
348+
@[simp] lemma to_finite_measure_test_against_nn_eq_test_against_nn
349+
{μ : probability_measure α} {f : α →ᵇ nnreal} :
350+
μ.to_finite_measure.test_against_nn f = μ.test_against_nn f := rfl
351+
352+
lemma test_against_nn_const (μ : probability_measure α) (c : ℝ≥0) :
353+
μ.test_against_nn (bounded_continuous_function.const α c) = c :=
354+
by simp [← ennreal.coe_eq_coe, (measure_theory.is_probability_measure μ).measure_univ]
355+
356+
lemma test_against_nn_mono (μ : probability_measure α)
357+
{f g : α →ᵇ ℝ≥0} (f_le_g : (f : α → ℝ≥0) ≤ g) :
358+
μ.test_against_nn f ≤ μ.test_against_nn g :=
359+
by simpa using μ.to_finite_measure.test_against_nn_mono f_le_g
360+
361+
variables [opens_measurable_space α]
362+
363+
lemma test_against_nn_lipschitz (μ : probability_measure α) :
364+
lipschitz_with 1 (λ (f : α →ᵇ ℝ≥0), μ.test_against_nn f) :=
365+
begin
366+
have key := μ.to_finite_measure.test_against_nn_lipschitz,
367+
rwa μ.mass_to_finite_measure at key,
368+
end
369+
370+
/-- Probability measures yield elements of the `weak_dual` of bounded continuous nonnegative
371+
functions via `probability_measure.test_against_nn`, i.e., integration. -/
372+
def to_weak_dual_bounded_continuous_nnreal (μ : probability_measure α) :
373+
weak_dual ℝ≥0 (α →ᵇ ℝ≥0) :=
374+
{ to_fun := λ f, μ.test_against_nn f,
375+
map_add' := μ.to_finite_measure.test_against_nn_add,
376+
map_smul' := μ.to_finite_measure.test_against_nn_smul,
377+
cont := μ.test_against_nn_lipschitz.continuous, }
378+
205379
end probability_measure
206380

207381
end measure_theory

src/topology/continuous_function/bounded.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,15 @@ module over the algebra of bounded continuous functions from `α` to `𝕜`. -/
10251025

10261026
end normed_algebra
10271027

1028+
lemma nnreal.upper_bound {α : Type*} [topological_space α]
1029+
(f : α →ᵇ ℝ≥0) (x : α) : f x ≤ nndist f 0 :=
1030+
begin
1031+
have key : nndist (f x) ((0 : α →ᵇ ℝ≥0) x) ≤ nndist f 0,
1032+
{ exact @dist_coe_le_dist α ℝ≥0 _ _ f 0 x, },
1033+
simp only [coe_zero, pi.zero_apply] at key,
1034+
rwa nnreal.nndist_zero_eq_val' (f x) at key,
1035+
end
1036+
10281037
/-!
10291038
### Star structures
10301039

src/topology/metric_space/basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,20 @@ begin
12441244
linarith [nnreal.coe_le_coe.2 h] },
12451245
rwa [nndist_comm, max_comm]
12461246
end
1247+
1248+
@[simp] lemma nnreal.nndist_zero_eq_val (z : ℝ≥0) : nndist 0 z = z :=
1249+
by simp only [nnreal.nndist_eq, max_eq_right, tsub_zero, zero_tsub, zero_le']
1250+
1251+
@[simp] lemma nnreal.nndist_zero_eq_val' (z : ℝ≥0) : nndist z 0 = z :=
1252+
by { rw nndist_comm, exact nnreal.nndist_zero_eq_val z, }
1253+
1254+
lemma nnreal.le_add_nndist (a b : ℝ≥0) : a ≤ b + nndist a b :=
1255+
begin
1256+
suffices : (a : ℝ) ≤ (b : ℝ) + (dist a b),
1257+
{ exact nnreal.coe_le_coe.mp this, },
1258+
linarith [le_of_abs_le (by refl : abs (a-b : ℝ) ≤ (dist a b))],
1259+
end
1260+
12471261
end nnreal
12481262

12491263
section prod

0 commit comments

Comments
 (0)