Skip to content
40 changes: 33 additions & 7 deletions Mathlib/MeasureTheory/Function/ConvergenceInDistribution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,41 @@ theorem TendstoInDistribution.continuous_comp {F : Type*} [OpensMeasurableSpace
congr
rw [AEMeasurable.map_map_of_aemeasurable hg.aemeasurable h.aemeasurable_limit]

/-- Almost sure convergence implies convergence in distribution. -/
theorem tendstoInDistribution_of_ae_tendsto [l.IsCountablyGenerated]
[OpensMeasurableSpace E] {X : ι → Ω' → E}
(hX₁ : ∀ i, AEMeasurable (X i) μ') (hZ : AEMeasurable Z μ')
(hX₂ : ∀ᵐ ω ∂μ', Tendsto (fun i ↦ X i ω) l (𝓝 (Z ω))) :
TendstoInDistribution X l Z (fun _ ↦ μ') μ' where
forall_aemeasurable := hX₁
aemeasurable_limit := hZ
tendsto := by
simp_rw [ProbabilityMeasure.tendsto_iff_forall_lintegral_tendsto, ProbabilityMeasure.coe_mk]
intro f
rw [lintegral_map' (by fun_prop) hZ]
conv in ∫⁻ _, _ ∂_ => rw [lintegral_map' (by fun_prop) (hX₁ i)]
apply tendsto_lintegral_filter_of_dominated_convergence' (bound := fun _ ↦ edist 0 f)
· exact .of_forall (by fun_prop)
· simp [f.apply_le_edist_zero]
· simp
filter_upwards [hX₂] with ω hω
simpa using f.continuous.tendsto (Z ω) |>.comp hω

end TendstoInDistribution

/-- Convergence in probability (`TendstoInMeasure`) implies convergence in distribution
(`TendstoInDistribution`). -/
theorem TendstoInMeasure.tendstoInDistribution [PseudoEMetricSpace E] [BorelSpace E]
[l.IsCountablyGenerated] [l.NeBot] {X : ι → Ω' → E}
(h : TendstoInMeasure μ' X l Z) (hX : ∀ i, AEMeasurable (X i) μ') :
TendstoInDistribution X l Z (fun _ ↦ μ') μ' := by
have hZ := h.aemeasurable hX
refine ⟨hX, hZ, ?_⟩
refine Filter.tendsto_of_subseq_tendsto (fun ns hns ↦ ?_)
obtain ⟨ms, hms1, hms2⟩ := h.comp hns |>.exists_seq_tendsto_ae'
refine ⟨ms, TendstoInDistribution.tendsto ?_⟩
exact tendstoInDistribution_of_ae_tendsto (by fun_prop) hZ hms2

variable [SeminormedAddCommGroup E] [SecondCountableTopology E] [BorelSpace E]

/-- Let `X, Y` be two sequences of measurable functions such that `X n` converges in distribution
Expand Down Expand Up @@ -257,13 +290,6 @@ lemma TendstoInMeasure.tendstoInDistribution_of_aemeasurable [l.IsCountablyGener
tendstoInDistribution_of_tendstoInMeasure_sub X Z (tendstoInDistribution_const hZ)
(by simpa [tendstoInMeasure_iff_norm] using h) hX

/-- Convergence in probability (`TendstoInMeasure`) implies convergence in distribution
(`TendstoInDistribution`). -/
lemma TendstoInMeasure.tendstoInDistribution [l.NeBot] [l.IsCountablyGenerated]
{X : ι → Ω' → E} (h : TendstoInMeasure μ' X l Z) (hX : ∀ i, AEMeasurable (X i) μ') :
TendstoInDistribution X l Z (fun _ ↦ μ') μ' :=
h.tendstoInDistribution_of_aemeasurable hX (h.aemeasurable hX)

/-- **Slutsky's theorem**: if `X n` converges in distribution to `Z`, and `Y n` converges in
probability to a constant `c`, then the pair `(X n, Y n)` converges in distribution to `(Z, c)`. -/
theorem TendstoInDistribution.prodMk_of_tendstoInMeasure_const
Expand Down
10 changes: 8 additions & 2 deletions Mathlib/MeasureTheory/Integral/BoundedContinuousFunction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ namespace BoundedContinuousFunction

section NNRealValued

lemma apply_le_nndist_zero {X : Type*} [TopologicalSpace X] (f : X →ᵇ ℝ≥0) (x : X) :
variable {X : Type*} [TopologicalSpace X]

lemma apply_le_nndist_zero (f : X →ᵇ ℝ≥0) (x : X) :
f x ≤ nndist 0 f := by
convert! nndist_coe_le_nndist x
simp only [coe_zero, Pi.zero_apply, NNReal.nndist_zero_eq_val]

variable {X : Type*} [MeasurableSpace X] [TopologicalSpace X]
lemma apply_le_edist_zero (f : X →ᵇ ℝ≥0) (x : X) :
f x ≤ edist 0 f := by
simpa [← ENNReal.coe_le_coe] using f.apply_le_nndist_zero x

variable [MeasurableSpace X]

lemma lintegral_le_edist_mul (f : X →ᵇ ℝ≥0) (μ : Measure X) :
(∫⁻ x, f x ∂μ) ≤ edist 0 f * (μ Set.univ) :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ theorem edist_lt_top {α : Type*} [PseudoMetricSpace α] (x y : α) : edist x y
(edist_dist x y).symm ▸ ENNReal.ofReal_lt_top

/-- In a pseudometric space, the extended distance is always finite -/
@[aesop (rule_sets := [finiteness]) safe apply]
@[aesop (rule_sets := [finiteness]) safe apply, simp]
theorem edist_ne_top (x y : α) : edist x y ≠ ⊤ :=
(edist_lt_top x y).ne

Expand Down
Loading