From 76ed1a898b91415fce8a8dacff3750f289809cc5 Mon Sep 17 00:00:00 2001 From: Jeremy Tan Jie Rui Date: Tue, 20 Jun 2023 13:55:40 +0000 Subject: [PATCH] chore: forward port leanprover-community/mathlib#19090 (#5291) --- .../Constructions/Prod/Basic.lean | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean b/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean index b1c4f27022684..09d38fcf769e9 100644 --- a/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean +++ b/Mathlib/MeasureTheory/Constructions/Prod/Basic.lean @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn ! This file was ported from Lean 3 source module measure_theory.constructions.prod.basic -! leanprover-community/mathlib commit 3b88f4005dc2e28d42f974cc1ce838f0dafb39b8 +! leanprover-community/mathlib commit 00abe0695d8767201e6d008afa22393978bb324d ! Please do not edit these lines, except to modify the commit id ! if you have ported upstream changes. -/ @@ -834,6 +834,19 @@ instance fst.instIsProbabilityMeasure [IsProbabilityMeasure ρ] : IsProbabilityM exact measure_univ #align measure_theory.measure.fst.measure_theory.is_probability_measure MeasureTheory.Measure.fst.instIsProbabilityMeasure +theorem fst_map_prod_mk₀ {X : α → β} {Y : α → γ} {μ : Measure α} (hX : AEMeasurable X μ) + (hY : AEMeasurable Y μ) : (μ.map fun a => (X a, Y a)).fst = μ.map X := by + ext1 s hs + rw [Measure.fst_apply hs, Measure.map_apply_of_aemeasurable (hX.prod_mk hY) (measurable_fst hs), + Measure.map_apply_of_aemeasurable hX hs, ← prod_univ, mk_preimage_prod, preimage_univ, + inter_univ] +#align measure_theory.measure.fst_map_prod_mk₀ MeasureTheory.Measure.fst_map_prod_mk₀ + +theorem fst_map_prod_mk {X : α → β} {Y : α → γ} {μ : Measure α} (hX : Measurable X) + (hY : Measurable Y) : (μ.map fun a => (X a, Y a)).fst = μ.map X := + fst_map_prod_mk₀ hX.aemeasurable hY.aemeasurable +#align measure_theory.measure.fst_map_prod_mk MeasureTheory.Measure.fst_map_prod_mk + /-- Marginal measure on `β` obtained from a measure on `ρ` `α × β`, defined by `ρ.map Prod.snd`. -/ noncomputable def snd (ρ : Measure (α × β)) : Measure β := ρ.map Prod.snd @@ -857,6 +870,19 @@ instance snd.instIsProbabilityMeasure [IsProbabilityMeasure ρ] : IsProbabilityM exact measure_univ #align measure_theory.measure.snd.measure_theory.is_probability_measure MeasureTheory.Measure.snd.instIsProbabilityMeasure +theorem snd_map_prod_mk₀ {X : α → β} {Y : α → γ} {μ : Measure α} (hX : AEMeasurable X μ) + (hY : AEMeasurable Y μ) : (μ.map fun a => (X a, Y a)).snd = μ.map Y := by + ext1 s hs + rw [Measure.snd_apply hs, Measure.map_apply_of_aemeasurable (hX.prod_mk hY) (measurable_snd hs), + Measure.map_apply_of_aemeasurable hY hs, ← univ_prod, mk_preimage_prod, preimage_univ, + univ_inter] +#align measure_theory.measure.snd_map_prod_mk₀ MeasureTheory.Measure.snd_map_prod_mk₀ + +theorem snd_map_prod_mk {X : α → β} {Y : α → γ} {μ : Measure α} (hX : Measurable X) + (hY : Measurable Y) : (μ.map fun a => (X a, Y a)).snd = μ.map Y := + snd_map_prod_mk₀ hX.aemeasurable hY.aemeasurable +#align measure_theory.measure.snd_map_prod_mk MeasureTheory.Measure.snd_map_prod_mk + end Measure end MeasureTheory