Skip to content

Commit 3954aeb

Browse files
jvanwindenBergschaf
authored andcommitted
feat(MeasureTheory/Measure/Tight): portmanteau condition for compact sets (leanprover-community#39543)
One part of the portmanteau theorem states that a limsup condition for closed sets implies weak convergence of probability measures. In the situation where the measures are tight however, one only needs to check the limsup condition for compact sets. This PR thus introduces `tendsto_of_forall_isCompact_of_isTightMeasureSet`, which is a version of [tendsto_of_forall_isClosed_limsup_le](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Portmanteau.html#MeasureTheory.tendsto_of_forall_isClosed_limsup_le) but replaces `IsClosed` with `IsCompact`, under the additional hypothesis that the measures are tight. I would have liked to put this lemma in MeasureTheory/Portmeanteau, but this created an import cycle. I am open to suggestions for where it could otherwise be moved.
1 parent f210104 commit 3954aeb

5 files changed

Lines changed: 201 additions & 151 deletions

File tree

Mathlib/MeasureTheory/Measure/LevyConvergence.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Rémy Degenne
66
module
77

88
public import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic
9+
public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
910
public import Mathlib.MeasureTheory.Measure.Tight
1011

1112
import Mathlib.MeasureTheory.Measure.CharacteristicFunction.TaylorExpansion

Mathlib/MeasureTheory/Measure/Portmanteau.lean

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Authors: Kalle Kytölä
66
module
77

88
public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
9-
public import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
10-
public import Mathlib.MeasureTheory.Integral.Layercake
11-
public import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction
9+
public import Mathlib.MeasureTheory.Measure.Tight
10+
11+
import Mathlib.MeasureTheory.Integral.Layercake
1212

1313
/-!
1414
# Characterizations of weak convergence of finite measures and probability measures
@@ -52,6 +52,9 @@ converges to a limiting probability measure. Assume also that the π-system cont
5252
small neighborhoods of any point. Then the sequence of probability measures converges for the
5353
weak topology.
5454
55+
In case the set of measures is tight, (C) implies (T) even when 'closed' is replaced by 'compact'.
56+
This is shown in `MeasureTheory.tendsto_of_forall_isCompact_of_isTightMeasureSet`.
57+
5558
## Implementation notes
5659
5760
Many of the characterizations of weak convergence hold for finite measures and are proven in that
@@ -647,6 +650,34 @@ lemma tendsto_of_forall_isClosed_limsup_real_le' {L : Filter ι} [L.IsCountablyG
647650
limsup (fun i ↦ (μs i : Measure Ω).real F) L ≤ (μ : Measure Ω).real F) :
648651
Tendsto μs L (𝓝 μ) := tendsto_of_forall_isClosed_limsup_le (by simpa using h)
649652

653+
/-- A different version of the (C) → (T) implication of the portmanteau theorem:
654+
If the set of measures is tight, a `limsup` inequality for compact sets implies weak convergence. -/
655+
theorem tendsto_of_forall_isCompact_of_isTightMeasureSet
656+
(h₁ : IsTightMeasureSet (range (ProbabilityMeasure.toMeasure ∘ μs)))
657+
(h₂ : ∀ F, IsCompact F → limsup (μs · F) L ≤ μ F) :
658+
Tendsto μs L (𝓝 μ) := by
659+
obtain rfl | _ := L.eq_or_neBot
660+
· simp
661+
refine tendsto_of_forall_isClosed_limsup_le <| fun F hF_closed ↦ ?_
662+
rw [← ENNReal.coe_le_coe, ENNReal.ofNNReal_limsup <|
663+
isBoundedUnder_of_eventually_le (a := 1) (by simp)]
664+
refine ENNReal.le_of_forall_pos_le_add <| fun ε hε _ ↦ ?_
665+
obtain ⟨K, hKc, hK_le⟩ := isTightMeasureSet_iff_exists_isCompact_measure_compl_le.mp
666+
h₁ ε (by positivity)
667+
grw [limsup_le_limsup (v := fun i ↦ μs i (F ∩ K) + (ε : ENNReal))]
668+
· rw [limsup_add_const _ _ _ (by isBoundedDefault) (by isBoundedDefault)]
669+
apply add_le_add _ (by simp)
670+
specialize h₂ (F ∩ K) <| hKc.inter_left hF_closed
671+
rw [← ENNReal.coe_le_coe, ENNReal.ofNNReal_limsup <|
672+
isBoundedUnder_of_eventually_le (a := 1) (by simp)] at h₂
673+
grw [h₂]
674+
simp [measure_mono]
675+
· refine .of_forall (fun i ↦ ?_)
676+
simp_rw [ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure]
677+
grw [measure_mono (t := (F ∩ K) ∪ F \ K) (by simp), measure_union_le]
678+
gcongr
679+
exact le_trans (measure_mono (by simp)) <| hK_le (μs i) <| by simp
680+
650681
end Closed
651682

652683
section Lipschitz

Mathlib/MeasureTheory/Measure/Prokhorov.lean

Lines changed: 159 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ module
77

88
public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
99
public import Mathlib.MeasureTheory.Measure.Tight
10+
1011
import Mathlib.MeasureTheory.Integral.Regular
1112
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real
12-
import Mathlib.Topology.Separation.CompletelyRegular
13+
import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric
1314

1415
/-!
1516
# Prokhorov theorem
@@ -26,6 +27,8 @@ notably several versions of Prokhorov theorem on tight sets of probability measu
2627
to the complement of `Kₙ` form a compact set.
2728
* `isCompact_closure_of_isTightMeasureSet`: Given a tight set of probability measures, its closure
2829
is compact.
30+
* `isTightMeasureSet_of_isCompact_closure`: In a second countable complete metric space, a set of
31+
probability measures with compact closure is tight.
2932
3033
Versions are also given for finite measures.
3134
@@ -51,9 +54,13 @@ check the condition.
5154

5255
public section
5356

54-
open scoped ENNReal NNReal CompactlySupported
55-
open Filter Function Set Topology TopologicalSpace MeasureTheory BoundedContinuousFunction
56-
MeasureTheory.FiniteMeasure
57+
open scoped CompactlySupported
58+
open Metric ENNReal NNReal Filter Set Topology TopologicalSpace MeasureTheory
59+
BoundedContinuousFunction
60+
61+
section Forward
62+
63+
open FiniteMeasure
5764

5865
variable {E : Type*} [MeasurableSpace E] [TopologicalSpace E] [T2Space E] [BorelSpace E]
5966

@@ -525,3 +532,151 @@ lemma isCompact_closure_of_isTightMeasureSet {S : Set (ProbabilityMeasure E)}
525532
apply subset_biUnion_of_mem
526533
exact le_rfl (a := n)
527534
_ ≤ u n := by grind
535+
536+
end Forward
537+
538+
section Backward
539+
540+
open ProbabilityMeasure
541+
542+
namespace MeasureTheory
543+
544+
variable {𝓧 : Type*} {m𝓧 : MeasurableSpace 𝓧} {μ : Measure 𝓧} [PseudoMetricSpace 𝓧]
545+
[OpensMeasurableSpace 𝓧] [SecondCountableTopology 𝓧] {S : Set (ProbabilityMeasure 𝓧)}
546+
547+
lemma exists_measure_iUnion_gt_of_isCompact_closure
548+
(U : ℕ → Set 𝓧) (O : ∀ i, IsOpen (U i)) (Cov : ⋃ i, U i = univ) (hcomp : IsCompact (closure S))
549+
(ε : ℝ≥0∞) (hε : 0 < ε) (hεbound : ε ≤ 1) :
550+
∃ (k : ℕ), ∀ μ ∈ S, 1 - ε < μ (⋃ i ≤ k, U i) := by
551+
have εfin : ε ≠ ∞ := ne_top_of_le_ne_top (by simp) hεbound
552+
lift ε to ℝ≥0 using εfin
553+
obtain ⟨ε, hε', rfl⟩ : ∃ (ε' : ℝ) (hε' : 0 ≤ ε'), ε = .mk ε' hε' := ⟨↑ε, ε.2, rfl⟩
554+
simp only [ENNReal.coe_pos, ← NNReal.coe_lt_coe, NNReal.coe_zero, coe_mk, coe_le_one_iff,
555+
← NNReal.coe_le_coe, NNReal.coe_one] at hε hεbound
556+
by_contra! nh
557+
choose μ hμInS hcontradiction using nh
558+
obtain ⟨μlim, _, sub, hsubmono, hμconverges⟩ :=
559+
hcomp.isSeqCompact (fun n ↦ subset_closure <| hμInS n)
560+
have Measurebound n : (μlim (⋃ (i ≤ n), U i) : ℝ) ≤ 1 - ε := calc
561+
(μlim (⋃ (i ≤ n), U i) : ℝ)
562+
_ ≤ liminf (fun k ↦ (μ (sub k) (⋃ (i ≤ n), U i) : ℝ)) atTop := by
563+
have hopen : IsOpen (⋃ i ≤ n, U i) := isOpen_biUnion fun i a ↦ O i
564+
have := ProbabilityMeasure.le_liminf_measure_open_of_tendsto hμconverges hopen
565+
simp_rw [Function.comp_apply, ← ennreal_coeFn_eq_coeFn_toMeasure] at this
566+
rw [← ofNNReal_liminf] at this
567+
· exact mod_cast this
568+
use 1
569+
simpa [ge_iff_le, eventually_map, eventually_atTop, forall_exists_index] using fun _ x h ↦
570+
(h x (by simp)).trans <| ProbabilityMeasure.apply_le_one (μ (sub x)) (⋃ i ≤ n, U i)
571+
_ ≤ liminf (fun k ↦ (μ (sub k) (⋃ (i ≤ sub k), U i) : ℝ)) atTop := by
572+
apply Filter.liminf_le_liminf
573+
· simp only [NNReal.coe_le_coe, eventually_atTop, ge_iff_le]
574+
use n + 1
575+
intro b hypo
576+
refine (μ (sub b)).apply_mono
577+
<| Set.biUnion_mono (fun i (hi : i ≤ n) ↦ hi.trans ?_) fun _ _ ↦ le_rfl
578+
exact le_trans (Nat.le_add_right n 1) (le_trans hypo (StrictMono.le_apply hsubmono))
579+
· use 0; simp
580+
· use 1
581+
simpa [ge_iff_le, eventually_map, eventually_atTop, ge_iff_le, forall_exists_index] using
582+
fun _ d hyp ↦ (hyp d (by simp)).trans (by simp)
583+
_ ≤ 1 - ε := by
584+
apply Filter.liminf_le_of_le
585+
· use 0; simp
586+
simp only [eventually_atTop, ge_iff_le, forall_exists_index]
587+
intro b c h
588+
apply le_trans (h c le_rfl)
589+
refine (ofReal_le_ofReal_iff (by rw [sub_nonneg]; exact hεbound)).mp ?_
590+
rw [ofReal_coe_nnreal]
591+
apply le_trans (hcontradiction (sub c))
592+
norm_cast
593+
have accumulation : Tendsto (fun n ↦ μlim (⋃ i ≤ n, U i)) atTop (𝓝 (μlim (⋃ i, U i))) := by
594+
simp_rw [← Set.accumulate_def, ProbabilityMeasure.tendsto_measure_iUnion_accumulate]
595+
rw [Cov, coeFn_univ, ← NNReal.tendsto_coe] at accumulation
596+
have exceeds_bound : ∀ᶠ n in atTop, (1 - ε / 2 : ℝ) ≤ μlim (⋃ i ≤ n, U i) :=
597+
Tendsto.eventually_const_le (v := 1)
598+
(by simp only [sub_lt_self_iff, Nat.ofNat_pos, div_pos_iff_of_pos_right]; positivity)
599+
accumulation
600+
suffices ∀ᶠ n : ℕ in atTop, False from this.exists.choose_spec
601+
filter_upwards [exceeds_bound] with n hn
602+
linarith [hn.trans <| Measurebound n]
603+
604+
variable [CompleteSpace 𝓧]
605+
606+
/-- In a second countable complete metric space, a set of probability measures with compact closure
607+
is tight. -/
608+
theorem isTightMeasureSet_of_isCompact_closure (hcomp : IsCompact (closure S)) :
609+
IsTightMeasureSet {((μ : ProbabilityMeasure 𝓧) : Measure 𝓧) | μ ∈ S} := by
610+
rw [isTightMeasureSet_iff_exists_isCompact_measure_compl_le]
611+
rcases isEmpty_or_nonempty 𝓧 with hempty | hnonempty
612+
· rw [← univ_eq_empty_iff] at hempty
613+
exact fun ε εpos ↦ ⟨∅, isCompact_empty, by simp [hempty]⟩
614+
obtain ⟨D, hD⟩ := exists_dense_seq 𝓧
615+
obtain ⟨u, hu_anti, hu_pos, hu⟩ : ∃ u, StrictAnti u ∧ (∀ n, 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=
616+
exists_seq_strictAnti_tendsto (0 : ℝ)
617+
have hcov (m : ℕ) : ⋃ i, ball (D i) (u m) = univ := by
618+
rw [denseRange_iff] at hD
619+
ext p
620+
exact ⟨fun a ↦ trivial, fun _ ↦ mem_iUnion.mpr <| hD p (u m) (hu_pos m)⟩
621+
intro ε εpos
622+
rcases lt_or_ge 1 ε with hεbound | hεbound
623+
· refine ⟨∅, isCompact_empty, fun μ hμ ↦ ?_⟩
624+
simp only [mem_setOf_eq] at hμ
625+
obtain ⟨μ', hμ', rfl⟩ := hμ
626+
rw [compl_empty, measure_univ]
627+
exact le_of_lt hεbound
628+
have byclaim (m : ℕ) : ∃ k, ∀ μ ∈ S, 1 - (ε * 2 ^ (-m : ℤ) : ℝ≥0∞) <
629+
μ (⋃ i ≤ k, ball (D i) (u m)) := by
630+
refine exists_measure_iUnion_gt_of_isCompact_closure
631+
(fun i ↦ ball (D i) (u m)) (fun _ ↦ isOpen_ball) (hcov m) hcomp (ε * 2 ^ (-m : ℤ)) ?_ ?_
632+
· simpa using ⟨εpos, (ENNReal.zpow_pos (by simp) (by simp) (-↑m))⟩
633+
· exact Left.mul_le_one hεbound <| zpow_le_one_of_nonpos (by linarith) (by simp)
634+
choose! km hbound using byclaim
635+
-- This is a set we can construct to show tightness
636+
let bigK := ⋂ m, ⋃ (i ≤ km (m + 1)), closure (ball (D i) (u m))
637+
have bigcalc (μ : ProbabilityMeasure 𝓧) (hs : μ ∈ S) : μ.toMeasure bigKᶜ ≤ ε := calc
638+
μ.toMeasure bigKᶜ
639+
_ = μ.toMeasure (⋃ m, (⋃ (i ≤ km (m + 1)), closure (ball (D i) (u m)))ᶜ) := by simp [bigK]
640+
_ ≤ ∑' m, μ.toMeasure (⋃ (i ≤ km (m + 1)), closure (ball (D i) (u m)))ᶜ :=
641+
measure_iUnion_le _
642+
_ = ∑' m, (1 - μ.toMeasure (⋃ (i ≤ km (m + 1)), closure (ball (D i) (u m)))) := by
643+
congr! with m; rw [measure_compl (by measurability) (by simp)]; simp
644+
_ ≤ (∑' (m : ℕ), (ε : ℝ≥0∞) * 2 ^ (-(m + 1) : ℤ)) := by
645+
refine ENNReal.tsum_le_tsum fun m ↦ tsub_le_iff_tsub_le.mp ?_
646+
replace hbound := (hbound (m + 1) μ hs).le
647+
simp_all only [neg_add_rev, Int.reduceNeg, tsub_le_iff_right, Nat.cast_add, Nat.cast_one,
648+
← coe_ofNat, ← ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure]
649+
grw [hbound]
650+
gcongr with i hi
651+
grw [← subset_closure (s := ball (D i) (u m)), ball_subset_ball]
652+
exact hu_anti.antitone (by grind)
653+
_ = ε := by
654+
rw [ENNReal.tsum_mul_left]
655+
nth_rw 2 [← mul_one (a := ε)]
656+
congr
657+
ring_nf
658+
exact tsum_two_zpow_neg_add_one
659+
-- Final proof
660+
refine ⟨bigK, ?_, by simpa⟩
661+
-- Compactness first
662+
refine TotallyBounded.isCompact_of_isClosed ?_ ?_
663+
--Totally bounded
664+
· refine Metric.totallyBounded_iff.mpr fun δ δpos ↦ ?_
665+
have ⟨δ_inv, hδ_inv⟩ : ∃ x, u x < δ := (Tendsto.eventually_lt_const δpos hu).exists
666+
refine ⟨D '' .Iic (km (δ_inv + 1)), (Set.finite_Iic _).image _, ?_⟩
667+
-- t should be image under D of the set of numbers less than km of δ_inv
668+
simp only [mem_image, iUnion_exists, biUnion_and', iUnion_iUnion_eq_right, bigK]
669+
calc
670+
⋂ m, ⋃ i ≤ km (m + 1), closure (ball (D i) (u m))
671+
_ ⊆ ⋃ i ≤ km (δ_inv + 1), closure (ball (D i) (u δ_inv)) := iInter_subset ..
672+
_ ⊆ ⋃ i ≤ km (δ_inv + 1), ball (D i) δ := by
673+
gcongr
674+
exact closure_ball_subset_closedBall.trans <| closedBall_subset_ball <| hδ_inv
675+
-- Closedness
676+
· simp_rw [bigK, ← Set.mem_Iic]
677+
exact isClosed_iInter fun n =>
678+
Finite.isClosed_biUnion (finite_Iic _) (fun _ _ ↦ isClosed_closure)
679+
680+
end MeasureTheory -- namespace
681+
682+
end Backward

0 commit comments

Comments
 (0)