probability.kernel.cond_distribMathlib.Probability.Kernel.CondDistrib

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 -/
-import Probability.Kernel.Disintegration
+import Probability.Kernel.Disintegration.Basic
 import Probability.Notation
 
 #align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 -/
-import Mathbin.Probability.Kernel.Disintegration
-import Mathbin.Probability.Notation
+import Probability.Kernel.Disintegration
+import Probability.Notation
 
 #align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.kernel.cond_distrib
-! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Probability.Kernel.Disintegration
 import Mathbin.Probability.Notation
 
+#align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
+
 /-!
 # Regular conditional probability distribution
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 
 ! This file was ported from Lean 3 source module probability.kernel.cond_distrib
-! leanprover-community/mathlib commit 00abe0695d8767201e6d008afa22393978bb324d
+! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Probability.Notation
 /-!
 # Regular conditional probability distribution
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define the regular conditional probability distribution of `Y : α → Ω` given `X : α → β`, where
 `Ω` is a standard Borel space. This is a `kernel β Ω` such that for almost all `a`, `cond_distrib`
 evaluated at `X a` and a measurable set `s` is equal to the conditional expectation
Diff
@@ -56,6 +56,7 @@ variable {α β Ω F : Type _} [TopologicalSpace Ω] [MeasurableSpace Ω] [Polis
   [Nonempty Ω] [NormedAddCommGroup F] {mα : MeasurableSpace α} {μ : Measure α} [IsFiniteMeasure μ]
   {X : α → β} {Y : α → Ω}
 
+#print ProbabilityTheory.condDistrib /-
 /-- **Regular conditional probability distribution**: kernel associated with the conditional
 expectation of `Y` given `X`.
 For almost all `a`, `cond_distrib Y X μ` evaluated at `X a` and a measurable set `s` is equal to
@@ -66,6 +67,7 @@ noncomputable irreducible_def condDistrib {mα : MeasurableSpace α} [Measurable
     (X : α → β) (μ : Measure α) [IsFiniteMeasure μ] : kernel β Ω :=
   (μ.map fun a => (X a, Y a)).condKernel
 #align probability_theory.cond_distrib ProbabilityTheory.condDistrib
+-/
 
 instance [MeasurableSpace β] : IsMarkovKernel (condDistrib Y X μ) := by rw [cond_distrib];
   infer_instance
@@ -74,11 +76,14 @@ variable {mβ : MeasurableSpace β} {s : Set Ω} {t : Set β} {f : β × Ω →
 
 section Measurability
 
+#print ProbabilityTheory.measurable_condDistrib /-
 theorem measurable_condDistrib (hs : MeasurableSet s) :
     measurable[mβ.comap X] fun a => condDistrib Y X μ (X a) s :=
   (kernel.measurable_coe _ hs).comp (Measurable.of_comap_le le_rfl)
 #align probability_theory.measurable_cond_distrib ProbabilityTheory.measurable_condDistrib
+-/
 
+#print MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff /-
 theorem MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     (∀ᵐ a ∂μ.map X, Integrable (fun ω => f (a, ω)) (condDistrib Y X μ a)) ∧
@@ -86,31 +91,39 @@ theorem MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff (hX
       Integrable f (μ.map fun a => (X a, Y a)) :=
   by rw [cond_distrib, ← hf.ae_integrable_cond_kernel_iff, measure.fst_map_prod_mk₀ hX hY]
 #align measure_theory.ae_strongly_measurable.ae_integrable_cond_distrib_map_iff MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff
+-/
 
 variable [NormedSpace ℝ F] [CompleteSpace F]
 
+#print MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map /-
 theorem MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂condDistrib Y X μ x) (μ.map X) := by
   rw [← measure.fst_map_prod_mk₀ hX hY, cond_distrib]; exact hf.integral_cond_kernel
 #align measure_theory.ae_strongly_measurable.integral_cond_distrib_map MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map
+-/
 
+#print MeasureTheory.AEStronglyMeasurable.integral_condDistrib /-
 theorem MeasureTheory.AEStronglyMeasurable.integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
   (hf.integral_condDistrib_map hX hY).comp_aemeasurable hX
 #align measure_theory.ae_strongly_measurable.integral_cond_distrib MeasureTheory.AEStronglyMeasurable.integral_condDistrib
+-/
 
-theorem aEStronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
+#print ProbabilityTheory.aestronglyMeasurable'_integral_condDistrib /-
+theorem aestronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
     (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable' (mβ.comap X) (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
   (hf.integral_condDistrib_map hX hY).comp_ae_measurable' hX
-#align probability_theory.ae_strongly_measurable'_integral_cond_distrib ProbabilityTheory.aEStronglyMeasurable'_integral_condDistrib
+#align probability_theory.ae_strongly_measurable'_integral_cond_distrib ProbabilityTheory.aestronglyMeasurable'_integral_condDistrib
+-/
 
 end Measurability
 
 section Integrability
 
+#print ProbabilityTheory.integrable_toReal_condDistrib /-
 theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableSet s) :
     Integrable (fun a => (condDistrib Y X μ (X a) s).toReal) μ :=
   by
@@ -122,60 +135,78 @@ theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableS
       _ = μ univ := lintegral_one
       _ < ∞ := measure_lt_top _ _
 #align probability_theory.integrable_to_real_cond_distrib ProbabilityTheory.integrable_toReal_condDistrib
+-/
 
+#print MeasureTheory.Integrable.condDistrib_ae_map /-
 theorem MeasureTheory.Integrable.condDistrib_ae_map (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
     (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     ∀ᵐ b ∂μ.map X, Integrable (fun ω => f (b, ω)) (condDistrib Y X μ b) := by
   rw [cond_distrib, ← measure.fst_map_prod_mk₀ hX hY]; exact hf_int.cond_kernel_ae
 #align measure_theory.integrable.cond_distrib_ae_map MeasureTheory.Integrable.condDistrib_ae_map
+-/
 
+#print MeasureTheory.Integrable.condDistrib_ae /-
 theorem MeasureTheory.Integrable.condDistrib_ae (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
     (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     ∀ᵐ a ∂μ, Integrable (fun ω => f (X a, ω)) (condDistrib Y X μ (X a)) :=
   ae_of_ae_map hX (hf_int.condDistrib_ae_map hX hY)
 #align measure_theory.integrable.cond_distrib_ae MeasureTheory.Integrable.condDistrib_ae
+-/
 
+#print MeasureTheory.Integrable.integral_norm_condDistrib_map /-
 theorem MeasureTheory.Integrable.integral_norm_condDistrib_map (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂condDistrib Y X μ x) (μ.map X) := by
   rw [cond_distrib, ← measure.fst_map_prod_mk₀ hX hY]; exact hf_int.integral_norm_cond_kernel
 #align measure_theory.integrable.integral_norm_cond_distrib_map MeasureTheory.Integrable.integral_norm_condDistrib_map
+-/
 
+#print MeasureTheory.Integrable.integral_norm_condDistrib /-
 theorem MeasureTheory.Integrable.integral_norm_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ∫ y, ‖f (X a, y)‖ ∂condDistrib Y X μ (X a)) μ :=
   (hf_int.integral_norm_condDistrib_map hX hY).comp_aemeasurable hX
 #align measure_theory.integrable.integral_norm_cond_distrib MeasureTheory.Integrable.integral_norm_condDistrib
+-/
 
 variable [NormedSpace ℝ F] [CompleteSpace F]
 
+#print MeasureTheory.Integrable.norm_integral_condDistrib_map /-
 theorem MeasureTheory.Integrable.norm_integral_condDistrib_map (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ‖∫ y, f (x, y) ∂condDistrib Y X μ x‖) (μ.map X) := by
   rw [cond_distrib, ← measure.fst_map_prod_mk₀ hX hY]; exact hf_int.norm_integral_cond_kernel
 #align measure_theory.integrable.norm_integral_cond_distrib_map MeasureTheory.Integrable.norm_integral_condDistrib_map
+-/
 
+#print MeasureTheory.Integrable.norm_integral_condDistrib /-
 theorem MeasureTheory.Integrable.norm_integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ‖∫ y, f (X a, y) ∂condDistrib Y X μ (X a)‖) μ :=
   (hf_int.norm_integral_condDistrib_map hX hY).comp_aemeasurable hX
 #align measure_theory.integrable.norm_integral_cond_distrib MeasureTheory.Integrable.norm_integral_condDistrib
+-/
 
+#print MeasureTheory.Integrable.integral_condDistrib_map /-
 theorem MeasureTheory.Integrable.integral_condDistrib_map (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ∫ y, f (x, y) ∂condDistrib Y X μ x) (μ.map X) :=
   (integrable_norm_iff (hf_int.1.integral_condDistrib_map hX hY)).mp
     (hf_int.norm_integral_condDistrib_map hX hY)
 #align measure_theory.integrable.integral_cond_distrib_map MeasureTheory.Integrable.integral_condDistrib_map
+-/
 
+#print MeasureTheory.Integrable.integral_condDistrib /-
 theorem MeasureTheory.Integrable.integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
   (hf_int.integral_condDistrib_map hX hY).comp_aemeasurable hX
 #align measure_theory.integrable.integral_cond_distrib MeasureTheory.Integrable.integral_condDistrib
+-/
 
 end Integrability
 
+#print ProbabilityTheory.set_lintegral_preimage_condDistrib /-
 theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hs : MeasurableSet s) (ht : MeasurableSet t) :
     ∫⁻ a in X ⁻¹' t, condDistrib Y X μ (X a) s ∂μ = μ (X ⁻¹' t ∩ Y ⁻¹' s) := by
@@ -183,13 +214,17 @@ theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurabl
     measure.fst_map_prod_mk₀ hX.ae_measurable hY, set_lintegral_cond_kernel_eq_measure_prod _ ht hs,
     measure.map_apply_of_ae_measurable (hX.ae_measurable.prod_mk hY) (ht.prod hs), mk_preimage_prod]
 #align probability_theory.set_lintegral_preimage_cond_distrib ProbabilityTheory.set_lintegral_preimage_condDistrib
+-/
 
+#print ProbabilityTheory.set_lintegral_condDistrib_of_measurableSet /-
 theorem set_lintegral_condDistrib_of_measurableSet (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hs : MeasurableSet s) {t : Set α} (ht : measurable_set[mβ.comap X] t) :
     ∫⁻ a in t, condDistrib Y X μ (X a) s ∂μ = μ (t ∩ Y ⁻¹' s) := by obtain ⟨t', ht', rfl⟩ := ht;
   rw [set_lintegral_preimage_cond_distrib hX hY hs ht']
 #align probability_theory.set_lintegral_cond_distrib_of_measurable_set ProbabilityTheory.set_lintegral_condDistrib_of_measurableSet
+-/
 
+#print ProbabilityTheory.condDistrib_ae_eq_condexp /-
 /-- For almost every `a : α`, the `cond_distrib Y X μ` kernel applied to `X a` and a measurable set
 `s` is equal to the conditional expectation of the indicator of `Y ⁻¹' s`. -/
 theorem condDistrib_ae_eq_condexp (hX : Measurable X) (hY : Measurable Y) (hs : MeasurableSet s) :
@@ -206,10 +241,12 @@ theorem condDistrib_ae_eq_condexp (hX : Measurable X) (hY : Measurable Y) (hs :
   · refine' (Measurable.stronglyMeasurable _).aestronglyMeasurable'
     exact @Measurable.ennreal_toReal _ (mβ.comap X) _ (measurable_cond_distrib hs)
 #align probability_theory.cond_distrib_ae_eq_condexp ProbabilityTheory.condDistrib_ae_eq_condexp
+-/
 
+#print ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib' /-
 /-- The conditional expectation of a function `f` of the product `(X, Y)` is almost everywhere equal
 to the integral of `y ↦ f(X, y)` against the `cond_distrib` kernel. -/
-theorem condexp_prod_ae_eq_integral_cond_distrib' [NormedSpace ℝ F] [CompleteSpace F]
+theorem condexp_prod_ae_eq_integral_condDistrib' [NormedSpace ℝ F] [CompleteSpace F]
     (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     μ[fun a => f (X a, Y a)|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a) :=
@@ -231,11 +268,13 @@ theorem condexp_prod_ae_eq_integral_cond_distrib' [NormedSpace ℝ F] [CompleteS
       set_integral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.ae_measurable.prod_mk hY),
       mk_preimage_prod, preimage_univ, inter_univ]
   · exact ae_strongly_measurable'_integral_cond_distrib hX.ae_measurable hY hf_int.1
-#align probability_theory.condexp_prod_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_prod_ae_eq_integral_cond_distrib'
+#align probability_theory.condexp_prod_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib'
+-/
 
+#print ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib₀ /-
 /-- The conditional expectation of a function `f` of the product `(X, Y)` is almost everywhere equal
 to the integral of `y ↦ f(X, y)` against the `cond_distrib` kernel. -/
-theorem condexp_prod_ae_eq_integral_cond_distrib₀ [NormedSpace ℝ F] [CompleteSpace F]
+theorem condexp_prod_ae_eq_integral_condDistrib₀ [NormedSpace ℝ F] [CompleteSpace F]
     (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a)))
     (hf_int : Integrable (fun a => f (X a, Y a)) μ) :
@@ -243,8 +282,10 @@ theorem condexp_prod_ae_eq_integral_cond_distrib₀ [NormedSpace ℝ F] [Complet
   haveI hf_int' : integrable f (μ.map fun a => (X a, Y a)) := by
     rwa [integrable_map_measure hf (hX.ae_measurable.prod_mk hY)]
   condexp_prod_ae_eq_integral_cond_distrib' hX hY hf_int'
-#align probability_theory.condexp_prod_ae_eq_integral_cond_distrib₀ ProbabilityTheory.condexp_prod_ae_eq_integral_cond_distrib₀
+#align probability_theory.condexp_prod_ae_eq_integral_cond_distrib₀ ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib₀
+-/
 
+#print ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib /-
 /-- The conditional expectation of a function `f` of the product `(X, Y)` is almost everywhere equal
 to the integral of `y ↦ f(X, y)` against the `cond_distrib` kernel. -/
 theorem condexp_prod_ae_eq_integral_condDistrib [NormedSpace ℝ F] [CompleteSpace F]
@@ -255,23 +296,29 @@ theorem condexp_prod_ae_eq_integral_condDistrib [NormedSpace ℝ F] [CompleteSpa
     rwa [integrable_map_measure hf.ae_strongly_measurable (hX.ae_measurable.prod_mk hY)]
   condexp_prod_ae_eq_integral_cond_distrib' hX hY hf_int'
 #align probability_theory.condexp_prod_ae_eq_integral_cond_distrib ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib
+-/
 
+#print ProbabilityTheory.condexp_ae_eq_integral_condDistrib /-
 theorem condexp_ae_eq_integral_condDistrib [NormedSpace ℝ F] [CompleteSpace F] (hX : Measurable X)
     (hY : AEMeasurable Y μ) {f : Ω → F} (hf : StronglyMeasurable f)
     (hf_int : Integrable (fun a => f (Y a)) μ) :
     μ[fun a => f (Y a)|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f y ∂condDistrib Y X μ (X a) :=
   condexp_prod_ae_eq_integral_condDistrib hX hY (hf.comp_measurable measurable_snd) hf_int
 #align probability_theory.condexp_ae_eq_integral_cond_distrib ProbabilityTheory.condexp_ae_eq_integral_condDistrib
+-/
 
+#print ProbabilityTheory.condexp_ae_eq_integral_condDistrib' /-
 /-- The conditional expectation of `Y` given `X` is almost everywhere equal to the integral
 `∫ y, y ∂(cond_distrib Y X μ (X a))`. -/
-theorem condexp_ae_eq_integral_cond_distrib' {Ω} [NormedAddCommGroup Ω] [NormedSpace ℝ Ω]
+theorem condexp_ae_eq_integral_condDistrib' {Ω} [NormedAddCommGroup Ω] [NormedSpace ℝ Ω]
     [CompleteSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] [SecondCountableTopology Ω] {Y : α → Ω}
     (hX : Measurable X) (hY_int : Integrable Y μ) :
     μ[Y|mβ.comap X] =ᵐ[μ] fun a => ∫ y, y ∂condDistrib Y X μ (X a) :=
   condexp_ae_eq_integral_condDistrib hX hY_int.1.AEMeasurable stronglyMeasurable_id hY_int
-#align probability_theory.condexp_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_ae_eq_integral_cond_distrib'
+#align probability_theory.condexp_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_ae_eq_integral_condDistrib'
+-/
 
+#print MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk /-
 theorem MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk {Ω F} {mΩ : MeasurableSpace Ω}
     {X : Ω → β} {μ : Measure Ω} [TopologicalSpace F] (hX : Measurable X) {f : Ω → F}
     (hf : AEStronglyMeasurable f μ) :
@@ -289,7 +336,9 @@ theorem MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk {Ω F} {mΩ : Me
   · exact hX.prod_mk measurable_id
   · exact measurable_snd hs
 #align measure_theory.ae_strongly_measurable.comp_snd_map_prod_mk MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk
+-/
 
+#print MeasureTheory.Integrable.comp_snd_map_prod_mk /-
 theorem MeasureTheory.Integrable.comp_snd_map_prod_mk {Ω} {mΩ : MeasurableSpace Ω} {X : Ω → β}
     {μ : Measure Ω} (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
     Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) :=
@@ -299,25 +348,32 @@ theorem MeasureTheory.Integrable.comp_snd_map_prod_mk {Ω} {mΩ : MeasurableSpac
   rw [has_finite_integral, lintegral_map' hf.ennnorm (hX.prod_mk measurable_id).AEMeasurable]
   exact hf_int.2
 #align measure_theory.integrable.comp_snd_map_prod_mk MeasureTheory.Integrable.comp_snd_map_prod_mk
+-/
 
-theorem aEStronglyMeasurable_comp_snd_map_prod_mk_iff {Ω F} {mΩ : MeasurableSpace Ω}
+#print ProbabilityTheory.aestronglyMeasurable_comp_snd_map_prod_mk_iff /-
+theorem aestronglyMeasurable_comp_snd_map_prod_mk_iff {Ω F} {mΩ : MeasurableSpace Ω}
     [TopologicalSpace F] {X : Ω → β} {μ : Measure Ω} (hX : Measurable X) {f : Ω → F} :
     AEStronglyMeasurable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) ↔
       AEStronglyMeasurable f μ :=
   ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk hX⟩
-#align probability_theory.ae_strongly_measurable_comp_snd_map_prod_mk_iff ProbabilityTheory.aEStronglyMeasurable_comp_snd_map_prod_mk_iff
+#align probability_theory.ae_strongly_measurable_comp_snd_map_prod_mk_iff ProbabilityTheory.aestronglyMeasurable_comp_snd_map_prod_mk_iff
+-/
 
+#print ProbabilityTheory.integrable_comp_snd_map_prod_mk_iff /-
 theorem integrable_comp_snd_map_prod_mk_iff {Ω} {mΩ : MeasurableSpace Ω} {X : Ω → β} {μ : Measure Ω}
     (hX : Measurable X) {f : Ω → F} :
     Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) ↔ Integrable f μ :=
   ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk hX⟩
 #align probability_theory.integrable_comp_snd_map_prod_mk_iff ProbabilityTheory.integrable_comp_snd_map_prod_mk_iff
+-/
 
+#print ProbabilityTheory.condexp_ae_eq_integral_condDistrib_id /-
 theorem condexp_ae_eq_integral_condDistrib_id [NormedSpace ℝ F] [CompleteSpace F] {X : Ω → β}
     {μ : Measure Ω} [IsFiniteMeasure μ] (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
     μ[f|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f y ∂condDistrib id X μ (X a) :=
-  condexp_prod_ae_eq_integral_cond_distrib' hX aemeasurable_id (hf_int.comp_snd_map_prod_mk hX)
+  condexp_prod_ae_eq_integral_condDistrib' hX aemeasurable_id (hf_int.comp_snd_map_prod_mk hX)
 #align probability_theory.condexp_ae_eq_integral_cond_distrib_id ProbabilityTheory.condexp_ae_eq_integral_condDistrib_id
+-/
 
 end ProbabilityTheory
 
Diff
@@ -72,8 +72,6 @@ instance [MeasurableSpace β] : IsMarkovKernel (condDistrib Y X μ) := by rw [co
 
 variable {mβ : MeasurableSpace β} {s : Set Ω} {t : Set β} {f : β × Ω → F}
 
-include mβ
-
 section Measurability
 
 theorem measurable_condDistrib (hs : MeasurableSet s) :
Diff
@@ -103,11 +103,11 @@ theorem MeasureTheory.AEStronglyMeasurable.integral_condDistrib (hX : AEMeasurab
   (hf.integral_condDistrib_map hX hY).comp_aemeasurable hX
 #align measure_theory.ae_strongly_measurable.integral_cond_distrib MeasureTheory.AEStronglyMeasurable.integral_condDistrib
 
-theorem aeStronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
+theorem aEStronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
     (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
-    AeStronglyMeasurable' (mβ.comap X) (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
+    AEStronglyMeasurable' (mβ.comap X) (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
   (hf.integral_condDistrib_map hX hY).comp_ae_measurable' hX
-#align probability_theory.ae_strongly_measurable'_integral_cond_distrib ProbabilityTheory.aeStronglyMeasurable'_integral_condDistrib
+#align probability_theory.ae_strongly_measurable'_integral_cond_distrib ProbabilityTheory.aEStronglyMeasurable'_integral_condDistrib
 
 end Measurability
 
Diff
@@ -120,7 +120,7 @@ theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableS
   · exact Measurable.comp_aemeasurable (kernel.measurable_coe _ hs) hX
   · refine' ne_of_lt _
     calc
-      (∫⁻ a, cond_distrib Y X μ (X a) s ∂μ) ≤ ∫⁻ a, 1 ∂μ := lintegral_mono fun a => prob_le_one
+      ∫⁻ a, cond_distrib Y X μ (X a) s ∂μ ≤ ∫⁻ a, 1 ∂μ := lintegral_mono fun a => prob_le_one
       _ = μ univ := lintegral_one
       _ < ∞ := measure_lt_top _ _
 #align probability_theory.integrable_to_real_cond_distrib ProbabilityTheory.integrable_toReal_condDistrib
@@ -180,7 +180,7 @@ end Integrability
 
 theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hs : MeasurableSet s) (ht : MeasurableSet t) :
-    (∫⁻ a in X ⁻¹' t, condDistrib Y X μ (X a) s ∂μ) = μ (X ⁻¹' t ∩ Y ⁻¹' s) := by
+    ∫⁻ a in X ⁻¹' t, condDistrib Y X μ (X a) s ∂μ = μ (X ⁻¹' t ∩ Y ⁻¹' s) := by
   rw [lintegral_comp (kernel.measurable_coe _ hs) hX, cond_distrib, ← measure.restrict_map hX ht, ←
     measure.fst_map_prod_mk₀ hX.ae_measurable hY, set_lintegral_cond_kernel_eq_measure_prod _ ht hs,
     measure.map_apply_of_ae_measurable (hX.ae_measurable.prod_mk hY) (ht.prod hs), mk_preimage_prod]
@@ -188,7 +188,7 @@ theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurabl
 
 theorem set_lintegral_condDistrib_of_measurableSet (hX : Measurable X) (hY : AEMeasurable Y μ)
     (hs : MeasurableSet s) {t : Set α} (ht : measurable_set[mβ.comap X] t) :
-    (∫⁻ a in t, condDistrib Y X μ (X a) s ∂μ) = μ (t ∩ Y ⁻¹' s) := by obtain ⟨t', ht', rfl⟩ := ht;
+    ∫⁻ a in t, condDistrib Y X μ (X a) s ∂μ = μ (t ∩ Y ⁻¹' s) := by obtain ⟨t', ht', rfl⟩ := ht;
   rw [set_lintegral_preimage_cond_distrib hX hY hs ht']
 #align probability_theory.set_lintegral_cond_distrib_of_measurable_set ProbabilityTheory.set_lintegral_condDistrib_of_measurableSet
 
@@ -222,7 +222,7 @@ theorem condexp_prod_ae_eq_integral_cond_distrib' [NormedSpace ℝ F] [CompleteS
   · exact (hf_int.integral_cond_distrib hX.ae_measurable hY).IntegrableOn
   · rintro s ⟨t, ht, rfl⟩ _
     change
-      (∫ a in X ⁻¹' t, ((fun x' => ∫ y, f (x', y) ∂(cond_distrib Y X μ) x') ∘ X) a ∂μ) =
+      ∫ a in X ⁻¹' t, ((fun x' => ∫ y, f (x', y) ∂(cond_distrib Y X μ) x') ∘ X) a ∂μ =
         ∫ a in X ⁻¹' t, f (X a, Y a) ∂μ
     rw [← integral_map hX.ae_measurable]
     swap
Diff
@@ -123,7 +123,6 @@ theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableS
       (∫⁻ a, cond_distrib Y X μ (X a) s ∂μ) ≤ ∫⁻ a, 1 ∂μ := lintegral_mono fun a => prob_le_one
       _ = μ univ := lintegral_one
       _ < ∞ := measure_lt_top _ _
-      
 #align probability_theory.integrable_to_real_cond_distrib ProbabilityTheory.integrable_toReal_condDistrib
 
 theorem MeasureTheory.Integrable.condDistrib_ae_map (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
Diff
@@ -53,7 +53,7 @@ open scoped ENNReal MeasureTheory ProbabilityTheory
 namespace ProbabilityTheory
 
 variable {α β Ω F : Type _} [TopologicalSpace Ω] [MeasurableSpace Ω] [PolishSpace Ω] [BorelSpace Ω]
-  [Nonempty Ω] [NormedAddCommGroup F] {mα : MeasurableSpace α} {μ : Measure α} [FiniteMeasure μ]
+  [Nonempty Ω] [NormedAddCommGroup F] {mα : MeasurableSpace α} {μ : Measure α} [IsFiniteMeasure μ]
   {X : α → β} {Y : α → Ω}
 
 /-- **Regular conditional probability distribution**: kernel associated with the conditional
@@ -63,7 +63,7 @@ the conditional expectation `μ⟦Y ⁻¹' s | mβ.comap X⟧ a`. It also satisf
 `μ[(λ a, f (X a, Y a)) | mβ.comap X] =ᵐ[μ] λ a, ∫ y, f (X a, y) ∂(cond_distrib Y X μ (X a))` for
 all integrable functions `f`. -/
 noncomputable irreducible_def condDistrib {mα : MeasurableSpace α} [MeasurableSpace β] (Y : α → Ω)
-  (X : α → β) (μ : Measure α) [FiniteMeasure μ] : kernel β Ω :=
+    (X : α → β) (μ : Measure α) [IsFiniteMeasure μ] : kernel β Ω :=
   (μ.map fun a => (X a, Y a)).condKernel
 #align probability_theory.cond_distrib ProbabilityTheory.condDistrib
 
@@ -317,7 +317,7 @@ theorem integrable_comp_snd_map_prod_mk_iff {Ω} {mΩ : MeasurableSpace Ω} {X :
 #align probability_theory.integrable_comp_snd_map_prod_mk_iff ProbabilityTheory.integrable_comp_snd_map_prod_mk_iff
 
 theorem condexp_ae_eq_integral_condDistrib_id [NormedSpace ℝ F] [CompleteSpace F] {X : Ω → β}
-    {μ : Measure Ω} [FiniteMeasure μ] (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
+    {μ : Measure Ω} [IsFiniteMeasure μ] (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
     μ[f|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f y ∂condDistrib id X μ (X a) :=
   condexp_prod_ae_eq_integral_cond_distrib' hX aemeasurable_id (hf_int.comp_snd_map_prod_mk hX)
 #align probability_theory.condexp_ae_eq_integral_cond_distrib_id ProbabilityTheory.condexp_ae_eq_integral_condDistrib_id

Changes in mathlib4

mathlib3
mathlib4
chore: replace set_integral with setIntegral (#12215)

Done with a global search and replace, and then (to fix the #align lines), replace (#align \S*)setIntegral with $1set_integral.

Diff
@@ -217,7 +217,7 @@ theorem set_lintegral_condDistrib_of_measurableSet (hX : Measurable X) (hY : AEM
 `s` is equal to the conditional expectation of the indicator of `Y ⁻¹' s`. -/
 theorem condDistrib_ae_eq_condexp (hX : Measurable X) (hY : Measurable Y) (hs : MeasurableSet s) :
     (fun a => (condDistrib Y X μ (X a) s).toReal) =ᵐ[μ] μ⟦Y ⁻¹' s|mβ.comap X⟧ := by
-  refine' ae_eq_condexp_of_forall_set_integral_eq hX.comap_le _ _ _ _
+  refine' ae_eq_condexp_of_forall_setIntegral_eq hX.comap_le _ _ _ _
   · exact (integrable_const _).indicator (hY hs)
   · exact fun t _ _ => (integrable_toReal_condDistrib hX.aemeasurable hs).integrableOn
   · intro t ht _
@@ -237,7 +237,7 @@ theorem condexp_prod_ae_eq_integral_condDistrib' [NormedSpace ℝ F] [CompleteSp
     μ[fun a => f (X a, Y a)|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f (X a,y) ∂condDistrib Y X μ (X a) := by
   have hf_int' : Integrable (fun a => f (X a, Y a)) μ :=
     (integrable_map_measure hf_int.1 (hX.aemeasurable.prod_mk hY)).mp hf_int
-  refine' (ae_eq_condexp_of_forall_set_integral_eq hX.comap_le hf_int' (fun s _ _ => _) _ _).symm
+  refine' (ae_eq_condexp_of_forall_setIntegral_eq hX.comap_le hf_int' (fun s _ _ => _) _ _).symm
   · exact (hf_int.integral_condDistrib hX.aemeasurable hY).integrableOn
   · rintro s ⟨t, ht, rfl⟩ _
     change ∫ a in X ⁻¹' t, ((fun x' => ∫ y, f (x', y) ∂(condDistrib Y X μ) x') ∘ X) a ∂μ =
@@ -248,8 +248,8 @@ theorem condexp_prod_ae_eq_integral_condDistrib' [NormedSpace ℝ F] [CompleteSp
     · rw [← Measure.restrict_map hX ht]
       exact (hf_int.1.integral_condDistrib_map hY).restrict
     rw [← Measure.restrict_map hX ht, ← Measure.fst_map_prod_mk₀ hY, condDistrib,
-      Measure.set_integral_condKernel_univ_right ht hf_int.integrableOn,
-      set_integral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.aemeasurable.prod_mk hY),
+      Measure.setIntegral_condKernel_univ_right ht hf_int.integrableOn,
+      setIntegral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.aemeasurable.prod_mk hY),
       mk_preimage_prod, preimage_univ, inter_univ]
   · exact aestronglyMeasurable'_integral_condDistrib hX.aemeasurable hY hf_int.1
 #align probability_theory.condexp_prod_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_prod_ae_eq_integral_condDistrib'
feat(Probability/Kernel): disintegration of finite kernels (#10603)

Let κ : kernel α (β × Ω) be a finite kernel, where Ω is a standard Borel space. Then if α is countable or β has a countably generated σ-algebra (for example if it is standard Borel), then there exists a kernel (α × β) Ω called conditional kernel and denoted by condKernel κ such that κ = fst κ ⊗ₖ condKernel κ.

Properties of integrals involving condKernel are collated in the file Integral.lean. The conditional kernel is unique (almost everywhere w.r.t. fst κ): this is proved in the file Unique.lean.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Rémy Degenne <remydegenne@gmail.com>

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 -/
-import Mathlib.Probability.Kernel.Disintegration
+import Mathlib.Probability.Kernel.Disintegration.Unique
 import Mathlib.Probability.Notation
 
 #align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
@@ -74,7 +74,7 @@ variable {mβ : MeasurableSpace β} {s : Set Ω} {t : Set β} {f : β × Ω →
 lemma condDistrib_apply_of_ne_zero [MeasurableSingletonClass β]
     (hY : Measurable Y) (x : β) (hX : μ.map X {x} ≠ 0) (s : Set Ω) :
     condDistrib Y X μ x s = (μ.map X {x})⁻¹ * μ.map (fun a => (X a, Y a)) ({x} ×ˢ s) := by
-  rw [condDistrib, condKernel_apply_of_ne_zero _ s]
+  rw [condDistrib, Measure.condKernel_apply_of_ne_zero _ s]
   · rw [Measure.fst_map_prod_mk hY]
   · rwa [Measure.fst_map_prod_mk hY]
 
@@ -125,7 +125,7 @@ theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Measurable X) (hY : Measu
     rw [Measure.map_apply hX hs, Measure.fst_apply hs, Measure.map_apply]
     exacts [rfl, Measurable.prod hX hY, measurable_fst hs]
   rw [heq, condDistrib]
-  refine' eq_condKernel_of_measure_eq_compProd _ _ _
+  refine eq_condKernel_of_measure_eq_compProd _ ?_
   convert hκ
   exact heq.symm
 
@@ -202,7 +202,7 @@ theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurabl
   -- (`rw` does not see that the two forms are defeq)
   conv_lhs => arg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X
   rw [lintegral_comp (kernel.measurable_coe _ hs) hX, condDistrib, ← Measure.restrict_map hX ht, ←
-    Measure.fst_map_prod_mk₀ hY, set_lintegral_condKernel_eq_measure_prod _ ht hs,
+    Measure.fst_map_prod_mk₀ hY, Measure.set_lintegral_condKernel_eq_measure_prod ht hs,
     Measure.map_apply_of_aemeasurable (hX.aemeasurable.prod_mk hY) (ht.prod hs), mk_preimage_prod]
 #align probability_theory.set_lintegral_preimage_cond_distrib ProbabilityTheory.set_lintegral_preimage_condDistrib
 
@@ -248,7 +248,7 @@ theorem condexp_prod_ae_eq_integral_condDistrib' [NormedSpace ℝ F] [CompleteSp
     · rw [← Measure.restrict_map hX ht]
       exact (hf_int.1.integral_condDistrib_map hY).restrict
     rw [← Measure.restrict_map hX ht, ← Measure.fst_map_prod_mk₀ hY, condDistrib,
-      set_integral_condKernel_univ_right ht hf_int.integrableOn,
+      Measure.set_integral_condKernel_univ_right ht hf_int.integrableOn,
       set_integral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.aemeasurable.prod_mk hY),
       mk_preimage_prod, preimage_univ, inter_univ]
   · exact aestronglyMeasurable'_integral_condDistrib hX.aemeasurable hY hf_int.1
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -120,8 +120,8 @@ end Measurability
 theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Measurable X) (hY : Measurable Y)
     (κ : kernel β Ω) [IsFiniteKernel κ] (hκ : μ.map (fun x => (X x, Y x)) = μ.map X ⊗ₘ κ) :
     ∀ᵐ x ∂μ.map X, κ x = condDistrib Y X μ x := by
-  have heq : μ.map X = (μ.map (fun x => (X x, Y x))).fst
-  · ext s hs
+  have heq : μ.map X = (μ.map (fun x ↦ (X x, Y x))).fst := by
+    ext s hs
     rw [Measure.map_apply hX hs, Measure.fst_apply hs, Measure.map_apply]
     exacts [rfl, Measurable.prod hX hY, measurable_fst hs]
   rw [heq, condDistrib]
@@ -300,8 +300,8 @@ theorem _root_.MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk
     (hf : AEStronglyMeasurable f μ) :
     AEStronglyMeasurable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) := by
   refine' ⟨fun x => hf.mk f x.2, hf.stronglyMeasurable_mk.comp_measurable measurable_snd, _⟩
-  suffices h : Measure.QuasiMeasurePreserving Prod.snd (μ.map fun ω => (X ω, ω)) μ
-  · exact Measure.QuasiMeasurePreserving.ae_eq h hf.ae_eq_mk
+  suffices h : Measure.QuasiMeasurePreserving Prod.snd (μ.map fun ω ↦ (X ω, ω)) μ from
+    Measure.QuasiMeasurePreserving.ae_eq h hf.ae_eq_mk
   refine' ⟨measurable_snd, Measure.AbsolutelyContinuous.mk fun s hs hμs => _⟩
   rw [Measure.map_apply _ hs]
   swap; · exact measurable_snd
feat(Probability): condKernel and condDistrib applied to singletons of non-zero measure (#9351)

From the PFR project.

Diff
@@ -69,6 +69,15 @@ instance [MeasurableSpace β] : IsMarkovKernel (condDistrib Y X μ) := by
 
 variable {mβ : MeasurableSpace β} {s : Set Ω} {t : Set β} {f : β × Ω → F}
 
+/-- If the singleton `{x}` has non-zero mass for `μ.map X`, then for all `s : Set Ω`,
+`condDistrib Y X μ x s = (μ.map X {x})⁻¹ * μ.map (fun a => (X a, Y a)) ({x} ×ˢ s)` . -/
+lemma condDistrib_apply_of_ne_zero [MeasurableSingletonClass β]
+    (hY : Measurable Y) (x : β) (hX : μ.map X {x} ≠ 0) (s : Set Ω) :
+    condDistrib Y X μ x s = (μ.map X {x})⁻¹ * μ.map (fun a => (X a, Y a)) ({x} ×ˢ s) := by
+  rw [condDistrib, condKernel_apply_of_ne_zero _ s]
+  · rw [Measure.fst_map_prod_mk hY]
+  · rwa [Measure.fst_map_prod_mk hY]
+
 section Measurability
 
 theorem measurable_condDistrib (hs : MeasurableSet s) :
feat: define the composition-product of a measure and a kernel (#8852)

The composition-product of a measure and a kernel, denoted by ⊗ₘ, takes μ : Measure α and κ : kernel α β and creates μ ⊗ₘ κ : Measure (α × β). The integral of a function against μ ⊗ₘ κ is ∫⁻ x, f x ∂(μ ⊗ₘ κ) = ∫⁻ a, ∫⁻ b, f (a, b) ∂(κ a) ∂μ.

This PR also modifies the Disintegration file to use the new definition.

From the PFR project.

Co-authored-by: Rémy Degenne <remydegenne@gmail.com>

Diff
@@ -109,9 +109,7 @@ end Measurability
 /-- `condDistrib` is a.e. uniquely defined as the kernel satisfying the defining property of
 `condKernel`. -/
 theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Measurable X) (hY : Measurable Y)
-    (κ : kernel β Ω) [IsFiniteKernel κ]
-    (hκ : μ.map (fun x => (X x, Y x)) =
-      (kernel.const Unit (μ.map X) ⊗ₖ kernel.prodMkLeft Unit κ) ()) :
+    (κ : kernel β Ω) [IsFiniteKernel κ] (hκ : μ.map (fun x => (X x, Y x)) = μ.map X ⊗ₘ κ) :
     ∀ᵐ x ∂μ.map X, κ x = condDistrib Y X μ x := by
   have heq : μ.map X = (μ.map (fun x => (X x, Y x))).fst
   · ext s hs
chore: use StandardBorelSpace everywhere in the probability folder instead of PolishSpace (#8746)
Diff
@@ -49,7 +49,7 @@ open scoped ENNReal MeasureTheory ProbabilityTheory
 
 namespace ProbabilityTheory
 
-variable {α β Ω F : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [PolishSpace Ω] [BorelSpace Ω]
+variable {α β Ω F : Type*} [MeasurableSpace Ω] [StandardBorelSpace Ω]
   [Nonempty Ω] [NormedAddCommGroup F] {mα : MeasurableSpace α} {μ : Measure α} [IsFiniteMeasure μ]
   {X : α → β} {Y : α → Ω}
 
feat(Probability/Kernel/Disintegration): Uniqueness of the disintegration kernel (#6110)

Co-authored-by: JasonKYi <kexing.ying19@imperial.ac.uk> Co-authored-by: RemyDegenne <Remydegenne@gmail.com>

Diff
@@ -106,6 +106,22 @@ theorem aestronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY
 
 end Measurability
 
+/-- `condDistrib` is a.e. uniquely defined as the kernel satisfying the defining property of
+`condKernel`. -/
+theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Measurable X) (hY : Measurable Y)
+    (κ : kernel β Ω) [IsFiniteKernel κ]
+    (hκ : μ.map (fun x => (X x, Y x)) =
+      (kernel.const Unit (μ.map X) ⊗ₖ kernel.prodMkLeft Unit κ) ()) :
+    ∀ᵐ x ∂μ.map X, κ x = condDistrib Y X μ x := by
+  have heq : μ.map X = (μ.map (fun x => (X x, Y x))).fst
+  · ext s hs
+    rw [Measure.map_apply hX hs, Measure.fst_apply hs, Measure.map_apply]
+    exacts [rfl, Measurable.prod hX hY, measurable_fst hs]
+  rw [heq, condDistrib]
+  refine' eq_condKernel_of_measure_eq_compProd _ _ _
+  convert hκ
+  exact heq.symm
+
 section Integrability
 
 theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableSet s) :
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -49,7 +49,7 @@ open scoped ENNReal MeasureTheory ProbabilityTheory
 
 namespace ProbabilityTheory
 
-variable {α β Ω F : Type _} [TopologicalSpace Ω] [MeasurableSpace Ω] [PolishSpace Ω] [BorelSpace Ω]
+variable {α β Ω F : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [PolishSpace Ω] [BorelSpace Ω]
   [Nonempty Ω] [NormedAddCommGroup F] {mα : MeasurableSpace α} {μ : Measure α} [IsFiniteMeasure μ]
   {X : α → β} {Y : α → Ω}
 
chore(Probability.Kernel): drop AEMeasurable assumptions (#6129)
Diff
@@ -23,7 +23,7 @@ on `s` can prevent us from finding versions of the conditional expectation that
 measure. The standard Borel space assumption on `Ω` allows us to do so.
 
 The case `Y = X = id` is developed in more detail in `Probability/Kernel/Condexp.lean`: here `X` is
-understood as a map from `Ω` with a sub-σ-algebra to `Ω` with its default σ-algebra and the
+understood as a map from `Ω` with a sub-σ-algebra `m` to `Ω` with its default σ-algebra and the
 conditional distribution defines a kernel associated with the conditional expectation with respect
 to `m`.
 
@@ -77,32 +77,31 @@ theorem measurable_condDistrib (hs : MeasurableSet s) :
 #align probability_theory.measurable_cond_distrib ProbabilityTheory.measurable_condDistrib
 
 theorem _root_.MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff
-    (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
-    (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
+    (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     (∀ᵐ a ∂μ.map X, Integrable (fun ω => f (a, ω)) (condDistrib Y X μ a)) ∧
       Integrable (fun a => ∫ ω, ‖f (a, ω)‖ ∂condDistrib Y X μ a) (μ.map X) ↔
     Integrable f (μ.map fun a => (X a, Y a)) := by
-  rw [condDistrib, ← hf.ae_integrable_condKernel_iff, Measure.fst_map_prod_mk₀ hX hY]
+  rw [condDistrib, ← hf.ae_integrable_condKernel_iff, Measure.fst_map_prod_mk₀ hY]
 #align measure_theory.ae_strongly_measurable.ae_integrable_cond_distrib_map_iff MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff
 
 variable [NormedSpace ℝ F] [CompleteSpace F]
 
-theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map (hX : AEMeasurable X μ)
+theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map
     (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂condDistrib Y X μ x) (μ.map X) := by
-  rw [← Measure.fst_map_prod_mk₀ hX hY, condDistrib]; exact hf.integral_condKernel
+  rw [← Measure.fst_map_prod_mk₀ hY, condDistrib]; exact hf.integral_condKernel
 #align measure_theory.ae_strongly_measurable.integral_cond_distrib_map MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map
 
 theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
-  (hf.integral_condDistrib_map hX hY).comp_aemeasurable hX
+  (hf.integral_condDistrib_map hY).comp_aemeasurable hX
 #align measure_theory.ae_strongly_measurable.integral_cond_distrib MeasureTheory.AEStronglyMeasurable.integral_condDistrib
 
 theorem aestronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
     (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
     AEStronglyMeasurable' (mβ.comap X) (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
-  (hf.integral_condDistrib_map hX hY).comp_ae_measurable' hX
+  (hf.integral_condDistrib_map hY).comp_ae_measurable' hX
 #align probability_theory.ae_strongly_measurable'_integral_cond_distrib ProbabilityTheory.aestronglyMeasurable'_integral_condDistrib
 
 end Measurability
@@ -120,55 +119,55 @@ theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableS
       _ < ∞ := measure_lt_top _ _
 #align probability_theory.integrable_to_real_cond_distrib ProbabilityTheory.integrable_toReal_condDistrib
 
-theorem _root_.MeasureTheory.Integrable.condDistrib_ae_map (hX : AEMeasurable X μ)
+theorem _root_.MeasureTheory.Integrable.condDistrib_ae_map
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     ∀ᵐ b ∂μ.map X, Integrable (fun ω => f (b, ω)) (condDistrib Y X μ b) := by
-  rw [condDistrib, ← Measure.fst_map_prod_mk₀ hX hY]; exact hf_int.condKernel_ae
+  rw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]; exact hf_int.condKernel_ae
 #align measure_theory.integrable.cond_distrib_ae_map MeasureTheory.Integrable.condDistrib_ae_map
 
 theorem _root_.MeasureTheory.Integrable.condDistrib_ae (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     ∀ᵐ a ∂μ, Integrable (fun ω => f (X a, ω)) (condDistrib Y X μ (X a)) :=
-  ae_of_ae_map hX (hf_int.condDistrib_ae_map hX hY)
+  ae_of_ae_map hX (hf_int.condDistrib_ae_map hY)
 #align measure_theory.integrable.cond_distrib_ae MeasureTheory.Integrable.condDistrib_ae
 
-theorem _root_.MeasureTheory.Integrable.integral_norm_condDistrib_map (hX : AEMeasurable X μ)
+theorem _root_.MeasureTheory.Integrable.integral_norm_condDistrib_map
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂condDistrib Y X μ x) (μ.map X) := by
-  rw [condDistrib, ← Measure.fst_map_prod_mk₀ hX hY]; exact hf_int.integral_norm_condKernel
+  rw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]; exact hf_int.integral_norm_condKernel
 #align measure_theory.integrable.integral_norm_cond_distrib_map MeasureTheory.Integrable.integral_norm_condDistrib_map
 
 theorem _root_.MeasureTheory.Integrable.integral_norm_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ∫ y, ‖f (X a, y)‖ ∂condDistrib Y X μ (X a)) μ :=
-  (hf_int.integral_norm_condDistrib_map hX hY).comp_aemeasurable hX
+  (hf_int.integral_norm_condDistrib_map hY).comp_aemeasurable hX
 #align measure_theory.integrable.integral_norm_cond_distrib MeasureTheory.Integrable.integral_norm_condDistrib
 
 variable [NormedSpace ℝ F] [CompleteSpace F]
 
-theorem _root_.MeasureTheory.Integrable.norm_integral_condDistrib_map (hX : AEMeasurable X μ)
+theorem _root_.MeasureTheory.Integrable.norm_integral_condDistrib_map
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ‖∫ y, f (x, y) ∂condDistrib Y X μ x‖) (μ.map X) := by
-  rw [condDistrib, ← Measure.fst_map_prod_mk₀ hX hY]; exact hf_int.norm_integral_condKernel
+  rw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]; exact hf_int.norm_integral_condKernel
 #align measure_theory.integrable.norm_integral_cond_distrib_map MeasureTheory.Integrable.norm_integral_condDistrib_map
 
 theorem _root_.MeasureTheory.Integrable.norm_integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ‖∫ y, f (X a, y) ∂condDistrib Y X μ (X a)‖) μ :=
-  (hf_int.norm_integral_condDistrib_map hX hY).comp_aemeasurable hX
+  (hf_int.norm_integral_condDistrib_map hY).comp_aemeasurable hX
 #align measure_theory.integrable.norm_integral_cond_distrib MeasureTheory.Integrable.norm_integral_condDistrib
 
-theorem _root_.MeasureTheory.Integrable.integral_condDistrib_map (hX : AEMeasurable X μ)
+theorem _root_.MeasureTheory.Integrable.integral_condDistrib_map
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun x => ∫ y, f (x, y) ∂condDistrib Y X μ x) (μ.map X) :=
-  (integrable_norm_iff (hf_int.1.integral_condDistrib_map hX hY)).mp
-    (hf_int.norm_integral_condDistrib_map hX hY)
+  (integrable_norm_iff (hf_int.1.integral_condDistrib_map hY)).mp
+    (hf_int.norm_integral_condDistrib_map hY)
 #align measure_theory.integrable.integral_cond_distrib_map MeasureTheory.Integrable.integral_condDistrib_map
 
 theorem _root_.MeasureTheory.Integrable.integral_condDistrib (hX : AEMeasurable X μ)
     (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
     Integrable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ :=
-  (hf_int.integral_condDistrib_map hX hY).comp_aemeasurable hX
+  (hf_int.integral_condDistrib_map hY).comp_aemeasurable hX
 #align measure_theory.integrable.integral_cond_distrib MeasureTheory.Integrable.integral_condDistrib
 
 end Integrability
@@ -180,7 +179,7 @@ theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurabl
   -- (`rw` does not see that the two forms are defeq)
   conv_lhs => arg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X
   rw [lintegral_comp (kernel.measurable_coe _ hs) hX, condDistrib, ← Measure.restrict_map hX ht, ←
-    Measure.fst_map_prod_mk₀ hX.aemeasurable hY, set_lintegral_condKernel_eq_measure_prod _ ht hs,
+    Measure.fst_map_prod_mk₀ hY, set_lintegral_condKernel_eq_measure_prod _ ht hs,
     Measure.map_apply_of_aemeasurable (hX.aemeasurable.prod_mk hY) (ht.prod hs), mk_preimage_prod]
 #align probability_theory.set_lintegral_preimage_cond_distrib ProbabilityTheory.set_lintegral_preimage_condDistrib
 
@@ -224,8 +223,8 @@ theorem condexp_prod_ae_eq_integral_condDistrib' [NormedSpace ℝ F] [CompleteSp
     rw [← integral_map hX.aemeasurable (f := fun x' => ∫ y, f (x', y) ∂(condDistrib Y X μ) x')]
     swap
     · rw [← Measure.restrict_map hX ht]
-      exact (hf_int.1.integral_condDistrib_map hX.aemeasurable hY).restrict
-    rw [← Measure.restrict_map hX ht, ← Measure.fst_map_prod_mk₀ hX.aemeasurable hY, condDistrib,
+      exact (hf_int.1.integral_condDistrib_map hY).restrict
+    rw [← Measure.restrict_map hX ht, ← Measure.fst_map_prod_mk₀ hY, condDistrib,
       set_integral_condKernel_univ_right ht hf_int.integrableOn,
       set_integral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.aemeasurable.prod_mk hY),
       mk_preimage_prod, preimage_univ, inter_univ]
@@ -271,8 +270,10 @@ theorem condexp_ae_eq_integral_condDistrib' {Ω} [NormedAddCommGroup Ω] [Normed
   condexp_ae_eq_integral_condDistrib hX hY_int.1.aemeasurable stronglyMeasurable_id hY_int
 #align probability_theory.condexp_ae_eq_integral_cond_distrib' ProbabilityTheory.condexp_ae_eq_integral_condDistrib'
 
-theorem _root_.MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk {Ω F} {mΩ: MeasurableSpace Ω}
-    {X : Ω → β} {μ : Measure Ω} [TopologicalSpace F] (hX : Measurable X) {f : Ω → F}
+open MeasureTheory
+
+theorem _root_.MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk
+    {Ω F} {mΩ : MeasurableSpace Ω} (X : Ω → β) {μ : Measure Ω} [TopologicalSpace F] {f : Ω → F}
     (hf : AEStronglyMeasurable f μ) :
     AEStronglyMeasurable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) := by
   refine' ⟨fun x => hf.mk f x.2, hf.stronglyMeasurable_mk.comp_measurable measurable_snd, _⟩
@@ -281,39 +282,47 @@ theorem _root_.MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk {Ω F} {m
   refine' ⟨measurable_snd, Measure.AbsolutelyContinuous.mk fun s hs hμs => _⟩
   rw [Measure.map_apply _ hs]
   swap; · exact measurable_snd
-  rw [Measure.map_apply]
-  · rw [← univ_prod, mk_preimage_prod, preimage_univ, univ_inter, preimage_id']
-    exact hμs
-  · exact hX.prod_mk measurable_id
-  · exact measurable_snd hs
+  by_cases hX : AEMeasurable X μ
+  · rw [Measure.map_apply_of_aemeasurable]
+    · rw [← univ_prod, mk_preimage_prod, preimage_univ, univ_inter, preimage_id']
+      exact hμs
+    · exact hX.prod_mk aemeasurable_id
+    · exact measurable_snd hs
+  · rw [Measure.map_of_not_aemeasurable]
+    · simp
+    · contrapose! hX; exact measurable_fst.comp_aemeasurable hX
 #align measure_theory.ae_strongly_measurable.comp_snd_map_prod_mk MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_mk
 
-theorem _root_.MeasureTheory.Integrable.comp_snd_map_prod_mk {Ω} {mΩ : MeasurableSpace Ω} {X: Ω → β}
-    {μ : Measure Ω} (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
+theorem _root_.MeasureTheory.Integrable.comp_snd_map_prod_mk
+    {Ω} {mΩ : MeasurableSpace Ω} (X : Ω → β) {μ : Measure Ω} {f : Ω → F} (hf_int : Integrable f μ) :
     Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) := by
-  have hf := hf_int.1.comp_snd_map_prod_mk hX
-  refine' ⟨hf, _⟩
-  rw [HasFiniteIntegral, lintegral_map' hf.ennnorm (hX.prod_mk measurable_id).aemeasurable]
-  exact hf_int.2
+  by_cases hX : AEMeasurable X μ
+  · have hf := hf_int.1.comp_snd_map_prod_mk X (mΩ := mΩ) (mβ := mβ)
+    refine' ⟨hf, _⟩
+    rw [HasFiniteIntegral, lintegral_map' hf.ennnorm (hX.prod_mk aemeasurable_id)]
+    exact hf_int.2
+  · rw [Measure.map_of_not_aemeasurable]
+    · simp
+    · contrapose! hX; exact measurable_fst.comp_aemeasurable hX
 #align measure_theory.integrable.comp_snd_map_prod_mk MeasureTheory.Integrable.comp_snd_map_prod_mk
 
 theorem aestronglyMeasurable_comp_snd_map_prod_mk_iff {Ω F} {_ : MeasurableSpace Ω}
     [TopologicalSpace F] {X : Ω → β} {μ : Measure Ω} (hX : Measurable X) {f : Ω → F} :
     AEStronglyMeasurable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) ↔
     AEStronglyMeasurable f μ :=
-  ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk hX⟩
+  ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk X⟩
 #align probability_theory.ae_strongly_measurable_comp_snd_map_prod_mk_iff ProbabilityTheory.aestronglyMeasurable_comp_snd_map_prod_mk_iff
 
 theorem integrable_comp_snd_map_prod_mk_iff {Ω} {_ : MeasurableSpace Ω} {X : Ω → β} {μ : Measure Ω}
     (hX : Measurable X) {f : Ω → F} :
     Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) ↔ Integrable f μ :=
-  ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk hX⟩
+  ⟨fun h => h.comp_measurable (hX.prod_mk measurable_id), fun h => h.comp_snd_map_prod_mk X⟩
 #align probability_theory.integrable_comp_snd_map_prod_mk_iff ProbabilityTheory.integrable_comp_snd_map_prod_mk_iff
 
 theorem condexp_ae_eq_integral_condDistrib_id [NormedSpace ℝ F] [CompleteSpace F] {X : Ω → β}
     {μ : Measure Ω} [IsFiniteMeasure μ] (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
     μ[f|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f y ∂condDistrib id X μ (X a) :=
-  condexp_prod_ae_eq_integral_condDistrib' hX aemeasurable_id (hf_int.comp_snd_map_prod_mk hX)
+  condexp_prod_ae_eq_integral_condDistrib' hX aemeasurable_id (hf_int.comp_snd_map_prod_mk X)
 #align probability_theory.condexp_ae_eq_integral_cond_distrib_id ProbabilityTheory.condexp_ae_eq_integral_condDistrib_id
 
 end ProbabilityTheory
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.kernel.cond_distrib
-! leanprover-community/mathlib commit 00abe0695d8767201e6d008afa22393978bb324d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Probability.Kernel.Disintegration
 import Mathlib.Probability.Notation
 
+#align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
+
 /-!
 # Regular conditional probability distribution
 
feat: port Probability.Kernel.CondDistrib (#5293)

Dependencies 12 + 1014

1015 files ported (98.8%)
464409 lines ported (98.8%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file