|
| 1 | +/- |
| 2 | +Copyright (c) 2022 Kexing Ying. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Kexing Ying |
| 5 | +
|
| 6 | +! This file was ported from Lean 3 source module probability.conditional_expectation |
| 7 | +! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740 |
| 8 | +! Please do not edit these lines, except to modify the commit id |
| 9 | +! if you have ported upstream changes. |
| 10 | +-/ |
| 11 | +import Mathlib.Probability.Notation |
| 12 | +import Mathlib.Probability.Independence.Basic |
| 13 | +import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic |
| 14 | + |
| 15 | +/-! |
| 16 | +
|
| 17 | +# Probabilistic properties of the conditional expectation |
| 18 | +
|
| 19 | +This file contains some properties about the conditional expectation which does not belong in |
| 20 | +the main conditional expectation file. |
| 21 | +
|
| 22 | +## Main result |
| 23 | +
|
| 24 | +* `MeasureTheory.condexp_indep_eq`: If `m₁, m₂` are independent σ-algebras and `f` is a |
| 25 | + `m₁`-measurable function, then `𝔼[f | m₂] = 𝔼[f]` almost everywhere. |
| 26 | +
|
| 27 | +-/ |
| 28 | + |
| 29 | + |
| 30 | +open TopologicalSpace Filter |
| 31 | + |
| 32 | +open scoped NNReal ENNReal MeasureTheory ProbabilityTheory BigOperators |
| 33 | + |
| 34 | +namespace MeasureTheory |
| 35 | + |
| 36 | +open ProbabilityTheory |
| 37 | + |
| 38 | +variable {Ω E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 39 | + {m₁ m₂ m : MeasurableSpace Ω} {μ : Measure Ω} {f : Ω → E} |
| 40 | + |
| 41 | +/-- If `m₁, m₂` are independent σ-algebras and `f` is `m₁`-measurable, then `𝔼[f | m₂] = 𝔼[f]` |
| 42 | +almost everywhere. -/ |
| 43 | +theorem condexp_indep_eq (hle₁ : m₁ ≤ m) (hle₂ : m₂ ≤ m) [SigmaFinite (μ.trim hle₂)] |
| 44 | + (hf : StronglyMeasurable[m₁] f) (hindp : Indep m₁ m₂ μ) : μ[f|m₂] =ᵐ[μ] fun _ => μ[f] := by |
| 45 | + by_cases hfint : Integrable f μ |
| 46 | + swap; · rw [condexp_undef hfint, integral_undef hfint]; rfl |
| 47 | + refine' (ae_eq_condexp_of_forall_set_integral_eq hle₂ hfint |
| 48 | + (fun s _ hs => integrableOn_const.2 (Or.inr hs)) (fun s hms hs => _) |
| 49 | + stronglyMeasurable_const.aeStronglyMeasurable').symm |
| 50 | + rw [set_integral_const] |
| 51 | + rw [← memℒp_one_iff_integrable] at hfint |
| 52 | + refine' Memℒp.induction_stronglyMeasurable hle₁ ENNReal.one_ne_top _ _ _ _ hfint _ |
| 53 | + · exact ⟨f, hf, EventuallyEq.rfl⟩ |
| 54 | + · intro c t hmt _ |
| 55 | + rw [integral_indicator (hle₁ _ hmt), set_integral_const, smul_smul, ← ENNReal.toReal_mul, |
| 56 | + mul_comm, ← hindp _ _ hmt hms, set_integral_indicator (hle₁ _ hmt), set_integral_const, |
| 57 | + Set.inter_comm] |
| 58 | + · intro u v _ huint hvint hu hv hu_eq hv_eq |
| 59 | + rw [memℒp_one_iff_integrable] at huint hvint |
| 60 | + rw [integral_add' huint hvint, smul_add, hu_eq, hv_eq, |
| 61 | + integral_add' huint.integrableOn hvint.integrableOn] |
| 62 | + · have heq₁ : (fun f : lpMeas E ℝ m₁ 1 μ => ∫ x, (f : Ω → E) x ∂μ) = |
| 63 | + (fun f : Lp E 1 μ => ∫ x, f x ∂μ) ∘ Submodule.subtypeL _ := by |
| 64 | + refine' funext fun f => integral_congr_ae _ |
| 65 | + simp_rw [Submodule.coe_subtypeL', Submodule.coeSubtype]; norm_cast |
| 66 | + have heq₂ : (fun f : lpMeas E ℝ m₁ 1 μ => ∫ x in s, (f : Ω → E) x ∂μ) = |
| 67 | + (fun f : Lp E 1 μ => ∫ x in s, f x ∂μ) ∘ Submodule.subtypeL _ := by |
| 68 | + refine' funext fun f => integral_congr_ae (ae_restrict_of_ae _) |
| 69 | + simp_rw [Submodule.coe_subtypeL', Submodule.coeSubtype] |
| 70 | + exact eventually_of_forall fun _ => (by trivial) |
| 71 | + refine' isClosed_eq (Continuous.const_smul _ _) _ |
| 72 | + · rw [heq₁] |
| 73 | + exact continuous_integral.comp (ContinuousLinearMap.continuous _) |
| 74 | + · rw [heq₂] |
| 75 | + exact (continuous_set_integral _).comp (ContinuousLinearMap.continuous _) |
| 76 | + · intro u v huv _ hueq |
| 77 | + rwa [← integral_congr_ae huv, ← |
| 78 | + (set_integral_congr_ae (hle₂ _ hms) _ : ∫ x in s, u x ∂μ = ∫ x in s, v x ∂μ)] |
| 79 | + filter_upwards [huv] with x hx _ using hx |
| 80 | +#align measure_theory.condexp_indep_eq MeasureTheory.condexp_indep_eq |
| 81 | + |
| 82 | +end MeasureTheory |
0 commit comments