Skip to content

Commit 25075fe

Browse files
committed
feat: independence of processes with almost everywhere equal marginals (leanprover-community#36066)
If `X` is a process independent from `Y` and for all `i`, `X' i` is almost everywhere equal to `X i`, then `X'` is also independent from `Y`. This implies that independence results about measurable processes should generally also hold for processes whose marginals are only aemeasurable.
1 parent bad25bb commit 25075fe

File tree

3 files changed

+304
-38
lines changed

3 files changed

+304
-38
lines changed

Mathlib/MeasureTheory/Constructions/Cylinders.lean

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ a product set.
4444

4545
@[expose] public section
4646

47-
open Function Set
47+
open Function Set MeasurableSpace
4848

4949
namespace MeasureTheory
5050

@@ -454,4 +454,27 @@ lemma measurable_restrict_cylinderEvents (Δ : Set ι) :
454454
rw [@measurable_pi_iff]; exact fun i ↦ measurable_cylinderEvent_apply i.2
455455

456456
end cylinderEvents
457+
458+
/-- A measurable set from the product sigma-algebra only depends on countably many coordinates. -/
459+
lemma MeasurableSet.eq_preimage_restrict_countable
460+
[∀ i, MeasurableSpace (α i)] {s : Set (Π i, α i)} (hs : MeasurableSet s) :
461+
∃ I : Set ι, ∃ t, I.Countable ∧ s = I.restrict ⁻¹' t := by
462+
refine induction_on_inter generateFrom_squareCylinders.symm
463+
(isPiSystem_squareCylinders (fun _ ↦ isPiSystem_measurableSet) (by simp))
464+
⟨∅, ∅, by simp⟩ ?_ ?_ ?_ s hs
465+
· rintro - ⟨I, t, -, rfl⟩
466+
exact ⟨I, univ.pi (fun i ↦ t i), I.countable_toSet, by ext; simp⟩
467+
· rintro - - ⟨I, t, hI, rfl⟩
468+
exact ⟨I, tᶜ, hI, by simp⟩
469+
intro f df mf hf
470+
choose! I t hI hf using hf
471+
refine ⟨⋃ n, I n, ⋃ n, (⋃ k, I k).restrict '' (f n), countable_iUnion hI, ?_⟩
472+
ext x
473+
simp only [hf, mem_iUnion, mem_preimage, preimage_iUnion, mem_image]
474+
refine ⟨fun ⟨i, hi⟩ ↦ ⟨i, x, hi, rfl⟩, fun ⟨n, x', hn, hx⟩ ↦ ⟨n, ?_⟩⟩
475+
have (x : Π i, α i) : (I n).restrict x =
476+
(fun (x : Π (i : ⋃ k, I k), α i) (i : I n) ↦ x ⟨i.1, subset_iUnion I n i.2⟩)
477+
((⋃ k, I k).restrict x) := rfl
478+
rwa [this, ← hx, ← this]
479+
457480
end MeasureTheory

Mathlib/Probability/Independence/BoundedContinuousFunction.lean

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ section IndepFun
320320
variable [IsZeroOrProbabilityMeasure P]
321321

322322
lemma process_indepFun_process_of_prod_bcf
323-
(mX : ∀ s, Measurable (X s)) (mY : ∀ t, Measurable (Y t))
323+
(mX : ∀ s, AEMeasurable (X s) P) (mY : ∀ t, AEMeasurable (Y t) P)
324324
(h : ∀ (I : Finset S) (J : Finset T) (f : (s : I) → E s →ᵇ ℝ) (g : (t : J) → F t →ᵇ ℝ),
325325
P[(∏ s, f s ∘ (X s)) * (∏ t, g t ∘ (Y t))] = P[∏ s, f s ∘ (X s)] * P[∏ t, g t ∘ (Y t)]) :
326326
IndepFun (fun ω s ↦ X s ω) (fun ω t ↦ Y t ω) P :=
327-
IndepFun.process_indepFun_process mX mY
327+
IndepFun.process_indepFun_process mX mY
328328
fun I J ↦ pi_indepFun_pi_of_prod_bcf (by fun_prop) (by fun_prop) (h I J)
329329

330330
/-- Two stochastic processes $(X_s)_{s \in S}$ and $(Y_t)_{t \in T}$ are independent if
@@ -333,41 +333,41 @@ for all real bounded continuous functions $f$ and $g$,
333333
$$P[f(X_{s_1}, ..., X_{s_p}) g(Y_{t_1}, ..., Y_{t_q})] =
334334
P[f(X_{s_1}, ..., X_{s_p})] * P[g(Y_{t_1}, ..., Y_{t_q})].$$ -/
335335
lemma process_indepFun_process_of_bcf
336-
(mX : ∀ s, Measurable (X s)) (mY : ∀ t, Measurable (Y t))
336+
(mX : ∀ s, AEMeasurable (X s) P) (mY : ∀ t, AEMeasurable (Y t) P)
337337
(h : ∀ (I : Finset S) (J : Finset T) (f : (Π s : I, E s) →ᵇ ℝ) (g : (Π t : J, F t) →ᵇ ℝ),
338338
P[fun ω ↦ f (X · ω) * g (Y · ω)] = P[fun ω ↦ f (X · ω)] * P[fun ω ↦ g (Y · ω)]) :
339339
IndepFun (fun ω s ↦ X s ω) (fun ω t ↦ Y t ω) P :=
340-
IndepFun.process_indepFun_process mX mY
340+
IndepFun.process_indepFun_process mX mY
341341
fun I J ↦ pi_indepFun_pi_of_bcf (by fun_prop) (by fun_prop) (h I J)
342342

343343
lemma indepFun_process_of_prod_bcf
344-
(mZ : AEMeasurable Z P) (mY : ∀ t, Measurable (Y t))
344+
(mZ : AEMeasurable Z P) (mY : ∀ t, AEMeasurable (Y t) P)
345345
(h : ∀ (f : G →ᵇ ℝ) (J : Finset T) (g : (t : J) → F t →ᵇ ℝ),
346346
P[f ∘ Z * (∏ t, g t ∘ (Y t))] = P[f ∘ Z] * P[∏ t, g t ∘ (Y t)]) :
347347
IndepFun Z (fun ω t ↦ Y t ω) P :=
348-
IndepFun.indepFun_process mZ mY fun J ↦
348+
IndepFun.indepFun_process mZ mY fun J ↦
349349
indepFun_pi_of_prod_bcf (by fun_prop) (by fun_prop) (h · J)
350350

351351
lemma indepFun_process_of_bcf
352-
(mZ : AEMeasurable Z P) (mY : ∀ t, Measurable (Y t))
352+
(mZ : AEMeasurable Z P) (mY : ∀ t, AEMeasurable (Y t) P)
353353
(h : ∀ (f : G →ᵇ ℝ) (J : Finset T) (g : (Π t : J, F t) →ᵇ ℝ),
354354
P[fun ω ↦ f (Z ω) * g (Y · ω)] = P[f ∘ Z] * P[fun ω ↦ g (Y · ω)]) :
355355
IndepFun Z (fun ω t ↦ Y t ω) P :=
356-
IndepFun.indepFun_process mZ mY fun J ↦ indepFun_pi_of_bcf (by fun_prop) (by fun_prop) (h · J)
356+
IndepFun.indepFun_process mZ mY fun J ↦ indepFun_pi_of_bcf (by fun_prop) (by fun_prop) (h · J)
357357

358358
lemma process_indepFun_of_prod_bcf
359-
(mX : ∀ s, Measurable (X s)) (mU : AEMeasurable U P)
359+
(mX : ∀ s, AEMeasurable (X s) P) (mU : AEMeasurable U P)
360360
(h : ∀ (I : Finset S) (f : (s : I) → E s →ᵇ ℝ) (g : H →ᵇ ℝ),
361361
P[(∏ s, f s ∘ (X s)) * g ∘ U] = P[∏ s, f s ∘ (X s)] * P[g ∘ U]) :
362362
IndepFun (fun ω s ↦ X s ω) U P :=
363-
IndepFun.process_indepFun mX mU fun I ↦ pi_indepFun_of_prod_bcf (by fun_prop) (by fun_prop) (h I)
363+
IndepFun.process_indepFun mX mU fun I ↦ pi_indepFun_of_prod_bcf (by fun_prop) (by fun_prop) (h I)
364364

365365
lemma process_indepFun_of_bcf
366-
(mX : ∀ s, Measurable (X s)) (mU : AEMeasurable U P)
366+
(mX : ∀ s, AEMeasurable (X s) P) (mU : AEMeasurable U P)
367367
(h : ∀ (I : Finset S) (f : (Π s : I, E s) →ᵇ ℝ) (g : H →ᵇ ℝ),
368368
P[fun ω ↦ f (X · ω) * g (U ω)] = P[fun ω ↦ f (X · ω)] * P[g ∘ U]) :
369369
IndepFun (fun ω s ↦ X s ω) U P :=
370-
IndepFun.process_indepFun mX mU fun I ↦ pi_indepFun_of_bcf (by fun_prop) (by fun_prop) (h I)
370+
IndepFun.process_indepFun mX mU fun I ↦ pi_indepFun_of_bcf (by fun_prop) (by fun_prop) (h I)
371371

372372
end IndepFun
373373

@@ -376,39 +376,39 @@ variable [IsProbabilityMeasure P]
376376
section Indicator
377377

378378
lemma indicator_indepFun_process_of_prod_bcf
379-
{A : Set Ω} (mA : NullMeasurableSet A P) (mX : ∀ s, Measurable (X s))
379+
{A : Set Ω} (mA : NullMeasurableSet A P) (mX : ∀ s, AEMeasurable (X s) P)
380380
(h : ∀ (I : Finset S) (f : (s : I) → E s →ᵇ ℝ),
381381
∫ ω in A, ∏ s, f s (X s ω) ∂P = P.real A * ∫ ω, ∏ s, f s (X s ω) ∂P) :
382382
IndepFun (A.indicator (1 : Ω → ℝ)) (fun ω s ↦ X s ω) P :=
383-
IndepFun.indepFun_process ((aemeasurable_indicator_const_iff 1).2 mA) mX
383+
IndepFun.indepFun_process ((aemeasurable_indicator_const_iff 1).2 mA) mX
384384
fun I ↦ indicator_indepFun_pi_of_prod_bcf mA (by fun_prop) (h I)
385385

386386
/-- The indicator of a set $A$ and a stochastic process $(X_s)_{s \in S}$ are independent if
387387
for all $s_1, ..., s_p \in S$ and for all real bounded continuous function $f$,
388388
$$P[\mathbb{I}_A f(X_{s_1}, ..., X_{s_p})] =
389389
P(A) P[f(X_{s_1}, ..., X_{s_p})].$$ -/
390390
lemma indicator_indepFun_process_of_bcf
391-
{A : Set Ω} (mA : NullMeasurableSet A P) (mX : ∀ s, Measurable (X s))
391+
{A : Set Ω} (mA : NullMeasurableSet A P) (mX : ∀ s, AEMeasurable (X s) P)
392392
(h : ∀ (I : Finset S) (f : (Π s : I, E s) →ᵇ ℝ),
393393
∫ ω in A, f (X · ω) ∂P = P.real A * ∫ ω, f (X · ω) ∂P) :
394394
IndepFun (A.indicator (1 : Ω → ℝ)) (fun ω s ↦ X s ω) P :=
395-
IndepFun.indepFun_process ((aemeasurable_indicator_const_iff 1).2 mA) mX
395+
IndepFun.indepFun_process ((aemeasurable_indicator_const_iff 1).2 mA) mX
396396
fun I ↦ indicator_indepFun_pi_of_bcf mA (by fun_prop) (h I)
397397

398398
end Indicator
399399

400400
section IndepSets
401401

402402
lemma indepSets_comap_process_of_prod_bcf
403-
{𝒜 : Set (Set Ω)} (m𝒜 : ∀ A ∈ 𝒜, NullMeasurableSet A P) (mX : ∀ s, Measurable (X s))
403+
{𝒜 : Set (Set Ω)} (m𝒜 : ∀ A ∈ 𝒜, NullMeasurableSet A P) (mX : ∀ s, AEMeasurable (X s) P)
404404
(h : ∀ A ∈ 𝒜, ∀ (I : Finset S) (f : (s : I) → E s →ᵇ ℝ),
405405
∫ ω in A, ∏ s, f s (X s ω) ∂P = P.real A * ∫ ω, ∏ s, f s (X s ω) ∂P) :
406406
IndepSets 𝒜 {A | MeasurableSet[MeasurableSpace.pi.comap (fun ω s ↦ X s ω)] A} P :=
407407
indepSets_iff_singleton_indepSets.2 fun A hA ↦ IndepFun.singleton_indepSets_of_indicator
408408
(indicator_indepFun_process_of_prod_bcf (m𝒜 A hA) mX (h A hA))
409409

410410
lemma indepSets_comap_process_of_bcf
411-
{𝒜 : Set (Set Ω)} (m𝒜 : ∀ A ∈ 𝒜, NullMeasurableSet A P) (mX : ∀ s, Measurable (X s))
411+
{𝒜 : Set (Set Ω)} (m𝒜 : ∀ A ∈ 𝒜, NullMeasurableSet A P) (mX : ∀ s, AEMeasurable (X s) P)
412412
(h : ∀ A ∈ 𝒜, ∀ (I : Finset S) (f : (Π s : I, E s) →ᵇ ℝ),
413413
∫ ω in A, f (X · ω) ∂P = P.real A * ∫ ω, f (X · ω) ∂P) :
414414
IndepSets 𝒜 {A | MeasurableSet[MeasurableSpace.pi.comap (fun ω s ↦ X s ω)] A} P :=
@@ -420,7 +420,7 @@ end IndepSets
420420
section Indep
421421

422422
lemma indep_comap_process_of_prod_bcf
423-
(hm : m ≤ mΩ) (mX : ∀ s, Measurable (X s))
423+
(hm : m ≤ mΩ) (mX : ∀ s, AEMeasurable (X s) P)
424424
(h : ∀ A, MeasurableSet[m] A → ∀ (I : Finset S) (f : (s : I) → E s →ᵇ ℝ),
425425
∫ ω in A, ∏ s, f s (X s ω) ∂P = P.real A * ∫ ω, ∏ s, f s (X s ω) ∂P) :
426426
Indep m (MeasurableSpace.pi.comap (fun ω s ↦ X s ω)) P :=
@@ -433,7 +433,7 @@ for all real bounded continuous function $f$,
433433
$$P[\mathbb{I}_A f(X_{s_1}, ..., X_{s_p})] =
434434
P(A) P[f(X_{s_1}, ..., X_{s_p})].$$ -/
435435
lemma indep_comap_process_of_bcf
436-
(hm : m ≤ mΩ) (mX : ∀ s, Measurable (X s))
436+
(hm : m ≤ mΩ) (mX : ∀ s, AEMeasurable (X s) P)
437437
(h : ∀ A, MeasurableSet[m] A → ∀ (I : Finset S) (f : (Π s : I, E s) →ᵇ ℝ),
438438
∫ ω in A, f (X · ω) ∂P = P.real A * ∫ ω, f (X · ω) ∂P) :
439439
Indep m (MeasurableSpace.pi.comap (fun ω s ↦ X s ω)) P :=

0 commit comments

Comments
 (0)