fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
compProd_eq_tsum_compProd (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ) [IsSFiniteKernel η] (a : α) (hs : MeasurableSet s) : (κ ⊗ₖ η) a s = ∑' (n : ℕ) (m : ℕ), (seq κ n ⊗ₖ seq η m) a s := by rw [compProd_eq_sum_compProd] simp_rw [sum_apply' _ _ hs]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_eq_tsum_compProd
null
IsMarkovKernel.compProd (κ : Kernel α β) [IsMarkovKernel κ] (η : Kernel (α × β) γ) [IsMarkovKernel η] : IsMarkovKernel (κ ⊗ₖ η) where isProbabilityMeasure a := ⟨by simp [compProd_apply]⟩
instance
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
IsMarkovKernel.compProd
null
IsZeroOrMarkovKernel.compProd (κ : Kernel α β) [IsZeroOrMarkovKernel κ] (η : Kernel (α × β) γ) [IsZeroOrMarkovKernel η] : IsZeroOrMarkovKernel (κ ⊗ₖ η) := by rw [compProd_def] infer_instance
instance
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
IsZeroOrMarkovKernel.compProd
null
compProd_apply_univ_le (κ : Kernel α β) (η : Kernel (α × β) γ) [IsFiniteKernel η] (a : α) : (κ ⊗ₖ η) a Set.univ ≤ κ a Set.univ * η.bound := by by_cases hκ : IsSFiniteKernel κ swap · rw [compProd_of_not_isSFiniteKernel_left _ _ hκ] simp rw [compProd_apply .univ] let Cη := η.bound calc ∫⁻ b, η (a, b) Set.univ ∂κ a ≤ ∫⁻ _, Cη ∂κ a := lintegral_mono fun b => measure_le_bound η (a, b) Set.univ _ = Cη * κ a Set.univ := MeasureTheory.lintegral_const Cη _ = κ a Set.univ * Cη := mul_comm _ _
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_apply_univ_le
null
IsFiniteKernel.compProd (κ : Kernel α β) [IsFiniteKernel κ] (η : Kernel (α × β) γ) [IsFiniteKernel η] : IsFiniteKernel (κ ⊗ₖ η) := by rw [compProd_def] infer_instance
instance
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
IsFiniteKernel.compProd
null
IsSFiniteKernel.compProd (κ : Kernel α β) (η : Kernel (α × β) γ) : IsSFiniteKernel (κ ⊗ₖ η) := by rw [compProd_def] infer_instance
instance
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
IsSFiniteKernel.compProd
null
compProd_assoc {δ : Type*} {mδ : MeasurableSpace δ} {κ : Kernel α β} {η : Kernel (α × β) γ} {ξ : Kernel (α × β × γ) δ} : (κ ⊗ₖ (η ⊗ₖ (ξ.comap MeasurableEquiv.prodAssoc (MeasurableEquiv.measurable _)))).map MeasurableEquiv.prodAssoc.symm = κ ⊗ₖ η ⊗ₖ ξ := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] by_cases hη : IsSFiniteKernel η swap; · simp [hη] by_cases hξ : IsSFiniteKernel ξ swap · have : ¬ IsSFiniteKernel (ξ.comap MeasurableEquiv.prodAssoc (MeasurableEquiv.measurable _)) := by refine fun h_sfin ↦ hξ ?_ have : ξ = (ξ.comap MeasurableEquiv.prodAssoc (MeasurableEquiv.measurable _)).comap MeasurableEquiv.prodAssoc.symm (MeasurableEquiv.measurable _) := by simp [← comap_comp_right] rw [this] infer_instance simp [hξ, this] ext a s hs rw [compProd_apply hs, map_apply' _ (by fun_prop) _ hs, compProd_apply (hs.preimage (by fun_prop)), lintegral_compProd] swap; · exact measurable_kernel_prodMk_left' hs a congr with b rw [compProd_apply] · congr · exact hs.preimage (by fun_prop)
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_assoc
`Kernel.compProd` is associative. We have to insert `MeasurableEquiv.prodAssoc` in two places because the products of types `α × β × γ` and `(α × β) × γ` are different.
compProd_add_left (μ κ : Kernel α β) (η : Kernel (α × β) γ) [IsSFiniteKernel μ] [IsSFiniteKernel κ] : (μ + κ) ⊗ₖ η = μ ⊗ₖ η + κ ⊗ₖ η := by by_cases hη : IsSFiniteKernel η · ext _ _ hs simp [compProd_apply hs] · simp [hη]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_add_left
null
compProd_add_right (μ : Kernel α β) (κ η : Kernel (α × β) γ) [IsSFiniteKernel κ] [IsSFiniteKernel η] : μ ⊗ₖ (κ + η) = μ ⊗ₖ κ + μ ⊗ₖ η := by by_cases hμ : IsSFiniteKernel μ swap; · simp [hμ] ext a s hs simp only [compProd_apply hs, coe_add, Pi.add_apply, Measure.coe_add] rw [lintegral_add_left] exact measurable_kernel_prodMk_left' hs a
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_add_right
null
compProd_sum_left {ι : Type*} [Countable ι] {κ : ι → Kernel α β} {η : Kernel (α × β) γ} [∀ i, IsSFiniteKernel (κ i)] : Kernel.sum κ ⊗ₖ η = Kernel.sum (fun i ↦ (κ i) ⊗ₖ η) := by by_cases hη : IsSFiniteKernel η · ext a s hs simp_rw [sum_apply, compProd_apply hs, sum_apply, lintegral_sum_measure, Measure.sum_apply _ hs, compProd_apply hs] · simp [hη]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_sum_left
null
compProd_sum_right {ι : Type*} [Countable ι] {κ : Kernel α β} {η : ι → Kernel (α × β) γ} [∀ i, IsSFiniteKernel (η i)] : κ ⊗ₖ Kernel.sum η = Kernel.sum (fun i ↦ κ ⊗ₖ (η i)) := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] ext a s hs simp_rw [sum_apply, compProd_apply hs, Measure.sum_apply _ hs, sum_apply, compProd_apply hs] rw [← lintegral_tsum] · congr with i rw [Measure.sum_apply] exact measurable_prodMk_left hs · exact fun _ ↦ (measurable_kernel_prodMk_left' hs a).aemeasurable
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
compProd_sum_right
null
comapRight_compProd_id_prod {δ : Type*} {mδ : MeasurableSpace δ} (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ) [IsSFiniteKernel η] {f : δ → γ} (hf : MeasurableEmbedding f) : comapRight (κ ⊗ₖ η) (MeasurableEmbedding.id.prodMap hf) = κ ⊗ₖ (comapRight η hf) := by ext a t ht rw [comapRight_apply' _ _ _ ht, compProd_apply, compProd_apply ht] · refine lintegral_congr fun b ↦ ?_ rw [comapRight_apply'] · congr with x aesop · exact measurable_prodMk_left ht · exact (MeasurableEmbedding.id.prodMap hf).measurableSet_image.mpr ht
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
comapRight_compProd_id_prod
null
fst_compProd_apply (κ : Kernel α β) (η : Kernel (α × β) γ) [IsSFiniteKernel κ] [IsSFiniteKernel η] (x : α) {s : Set β} (hs : MeasurableSet s) : (κ ⊗ₖ η).fst x s = ∫⁻ b, s.indicator (fun b ↦ η (x, b) Set.univ) b ∂(κ x) := by rw [Kernel.fst_apply' _ _ hs, Kernel.compProd_apply] swap; · exact measurable_fst hs have h_eq b : η (x, b) {c | b ∈ s} = s.indicator (fun b ↦ η (x, b) Set.univ) b := by by_cases hb : b ∈ s <;> simp [hb] simp_rw [Set.preimage, Set.mem_setOf_eq, h_eq] @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
fst_compProd_apply
If `η` is a Markov kernel, use instead `fst_compProd` to get `(κ ⊗ₖ η).fst = κ`.
fst_compProd (κ : Kernel α β) (η : Kernel (α × β) γ) [IsSFiniteKernel κ] [IsMarkovKernel η] : fst (κ ⊗ₖ η) = κ := by ext x s hs; simp [fst_compProd_apply, hs]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.Comp", "Mathlib.Probability.Kernel.Composition.ParallelComp" ]
Mathlib/Probability/Kernel/Composition/CompProd.lean
fst_compProd
null
hasFiniteIntegral_prodMk_left (a : α) {s : Set (β × γ)} (h2s : (κ ⊗ₖ η) a s ≠ ∞) : HasFiniteIntegral (fun b => (η (a, b)).real (Prod.mk b ⁻¹' s)) (κ a) := by let t := toMeasurable ((κ ⊗ₖ η) a) s simp_rw [hasFiniteIntegral_iff_enorm, measureReal_def, enorm_eq_ofReal toReal_nonneg] calc ∫⁻ b, ENNReal.ofReal (η (a, b) (Prod.mk b ⁻¹' s)).toReal ∂κ a _ ≤ ∫⁻ b, η (a, b) (Prod.mk b ⁻¹' t) ∂κ a := by refine lintegral_mono_ae ?_ filter_upwards [ae_kernel_lt_top a h2s] with b hb rw [ofReal_toReal hb.ne] exact measure_mono (preimage_mono (subset_toMeasurable _ _)) _ ≤ (κ ⊗ₖ η) a t := le_compProd_apply _ _ _ _ _ = (κ ⊗ₖ η) a s := measure_toMeasurable s _ < ⊤ := h2s.lt_top @[deprecated (since := "2025-03-05")] alias hasFiniteIntegral_prod_mk_left := hasFiniteIntegral_prodMk_left
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
hasFiniteIntegral_prodMk_left
null
integrable_kernel_prodMk_left (a : α) {s : Set (β × γ)} (hs : MeasurableSet s) (h2s : (κ ⊗ₖ η) a s ≠ ∞) : Integrable (fun b => (η (a, b)).real (Prod.mk b ⁻¹' s)) (κ a) := by constructor · exact (measurable_kernel_prodMk_left' hs a).ennreal_toReal.aestronglyMeasurable · exact hasFiniteIntegral_prodMk_left a h2s @[deprecated (since := "2025-03-05")] alias integrable_kernel_prod_mk_left := integrable_kernel_prodMk_left
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_kernel_prodMk_left
null
_root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_compProd [NormedSpace ℝ E] ⦃f : β × γ → E⦄ (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) : AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂η (a, x)) (κ a) := ⟨fun x => ∫ y, hf.mk f (x, y) ∂η (a, x), hf.stronglyMeasurable_mk.integral_kernel_prod_right'', by filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_compProd
null
_root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left {δ : Type*} [TopologicalSpace δ] {f : β × γ → δ} (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) : ∀ᵐ x ∂κ a, AEStronglyMeasurable (fun y => f (x, y)) (η (a, x)) := by filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with x hx using ⟨fun y => hf.mk f (x, y), hf.stronglyMeasurable_mk.comp_measurable measurable_prodMk_left, hx⟩ /-! ### Integrability -/
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left
null
hasFiniteIntegral_compProd_iff ⦃f : β × γ → E⦄ (h1f : StronglyMeasurable f) : HasFiniteIntegral f ((κ ⊗ₖ η) a) ↔ (∀ᵐ x ∂κ a, HasFiniteIntegral (fun y => f (x, y)) (η (a, x))) ∧ HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a) := by simp only [hasFiniteIntegral_iff_enorm] rw [lintegral_compProd _ _ _ h1f.enorm] have : ∀ x, ∀ᵐ y ∂η (a, x), 0 ≤ ‖f (x, y)‖ := fun x => Eventually.of_forall fun y => norm_nonneg _ simp_rw [integral_eq_lintegral_of_nonneg_ae (this _) (h1f.norm.comp_measurable measurable_prodMk_left).aestronglyMeasurable, enorm_eq_ofReal toReal_nonneg, ofReal_norm_eq_enorm] have : ∀ {p q r : Prop} (_ : r → p), (r ↔ p ∧ q) ↔ p → (r ↔ q) := fun {p q r} h1 => by rw [← and_congr_right_iff, and_iff_right_of_imp h1] rw [this] · intro h2f; rw [lintegral_congr_ae] filter_upwards [h2f] with x hx rw [ofReal_toReal]; finiteness · intro h2f; refine ae_lt_top ?_ h2f.ne; exact h1f.enorm.lintegral_kernel_prod_right''
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
hasFiniteIntegral_compProd_iff
null
hasFiniteIntegral_compProd_iff' ⦃f : β × γ → E⦄ (h1f : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) : HasFiniteIntegral f ((κ ⊗ₖ η) a) ↔ (∀ᵐ x ∂κ a, HasFiniteIntegral (fun y => f (x, y)) (η (a, x))) ∧ HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a) := by rw [hasFiniteIntegral_congr h1f.ae_eq_mk, hasFiniteIntegral_compProd_iff h1f.stronglyMeasurable_mk] apply and_congr · apply eventually_congr filter_upwards [ae_ae_of_ae_compProd h1f.ae_eq_mk.symm] with x hx using hasFiniteIntegral_congr hx · apply hasFiniteIntegral_congr filter_upwards [ae_ae_of_ae_compProd h1f.ae_eq_mk.symm] with _ hx using integral_congr_ae (EventuallyEq.fun_comp hx _)
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
hasFiniteIntegral_compProd_iff'
null
integrable_compProd_iff ⦃f : β × γ → E⦄ (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) : Integrable f ((κ ⊗ₖ η) a) ↔ (∀ᵐ x ∂κ a, Integrable (fun y => f (x, y)) (η (a, x))) ∧ Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a) := by simp only [Integrable, hasFiniteIntegral_compProd_iff' hf, hf.norm.integral_kernel_compProd, hf, hf.compProd_mk_left, eventually_and, true_and]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_compProd_iff
null
_root_.MeasureTheory.Integrable.ae_of_compProd ⦃f : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) : ∀ᵐ x ∂κ a, Integrable (fun y => f (x, y)) (η (a, x)) := ((integrable_compProd_iff hf.aestronglyMeasurable).mp hf).1
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.ae_of_compProd
null
_root_.MeasureTheory.Integrable.integral_norm_compProd ⦃f : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) : Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a) := ((integrable_compProd_iff hf.aestronglyMeasurable).mp hf).2
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.integral_norm_compProd
null
_root_.MeasureTheory.Integrable.integral_compProd [NormedSpace ℝ E] ⦃f : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) : Integrable (fun x => ∫ y, f (x, y) ∂η (a, x)) (κ a) := Integrable.mono hf.integral_norm_compProd hf.aestronglyMeasurable.integral_kernel_compProd <| Eventually.of_forall fun x => (norm_integral_le_integral_norm _).trans_eq <| (norm_of_nonneg <| integral_nonneg_of_ae <| Eventually.of_forall fun y => (norm_nonneg (f (x, y)) :)).symm /-! ### Bochner integral -/ variable [NormedSpace ℝ E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace ℝ E']
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.integral_compProd
null
Kernel.integral_fn_integral_add ⦃f g : β × γ → E⦄ (F : E → E') (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, F (∫ y, f (x, y) + g (x, y) ∂η (a, x)) ∂κ a = ∫ x, F (∫ y, f (x, y) ∂η (a, x) + ∫ y, g (x, y) ∂η (a, x)) ∂κ a := by refine integral_congr_ae ?_ filter_upwards [hf.ae_of_compProd, hg.ae_of_compProd] with _ h2f h2g simp [integral_add h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_fn_integral_add
null
Kernel.integral_fn_integral_sub ⦃f g : β × γ → E⦄ (F : E → E') (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, F (∫ y, f (x, y) - g (x, y) ∂η (a, x)) ∂κ a = ∫ x, F (∫ y, f (x, y) ∂η (a, x) - ∫ y, g (x, y) ∂η (a, x)) ∂κ a := by refine integral_congr_ae ?_ filter_upwards [hf.ae_of_compProd, hg.ae_of_compProd] with _ h2f h2g simp [integral_sub h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_fn_integral_sub
null
Kernel.lintegral_fn_integral_sub ⦃f g : β × γ → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂η (a, x)) ∂κ a = ∫⁻ x, F (∫ y, f (x, y) ∂η (a, x) - ∫ y, g (x, y) ∂η (a, x)) ∂κ a := by refine lintegral_congr_ae ?_ filter_upwards [hf.ae_of_compProd, hg.ae_of_compProd] with _ h2f h2g simp [integral_sub h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.lintegral_fn_integral_sub
null
Kernel.integral_integral_add ⦃f g : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, ∫ y, f (x, y) + g (x, y) ∂η (a, x) ∂κ a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a + ∫ x, ∫ y, g (x, y) ∂η (a, x) ∂κ a := (Kernel.integral_fn_integral_add id hf hg).trans <| integral_add hf.integral_compProd hg.integral_compProd
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_integral_add
null
Kernel.integral_integral_add' ⦃f g : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, ∫ y, (f + g) (x, y) ∂η (a, x) ∂κ a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a + ∫ x, ∫ y, g (x, y) ∂η (a, x) ∂κ a := Kernel.integral_integral_add hf hg
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_integral_add'
null
Kernel.integral_integral_sub ⦃f g : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, ∫ y, f (x, y) - g (x, y) ∂η (a, x) ∂κ a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a - ∫ x, ∫ y, g (x, y) ∂η (a, x) ∂κ a := (Kernel.integral_fn_integral_sub id hf hg).trans <| integral_sub hf.integral_compProd hg.integral_compProd
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_integral_sub
null
Kernel.integral_integral_sub' ⦃f g : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) : ∫ x, ∫ y, (f - g) (x, y) ∂η (a, x) ∂κ a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a - ∫ x, ∫ y, g (x, y) ∂η (a, x) ∂κ a := Kernel.integral_integral_sub hf hg
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.integral_integral_sub'
null
Kernel.continuous_integral_integral : Continuous fun f : β × γ →₁[(κ ⊗ₖ η) a] E => ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by rw [continuous_iff_continuousAt]; intro g refine tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_compProd (Eventually.of_forall fun h => (L1.integrable_coeFn h).integral_compProd) ?_ simp_rw [← lintegral_fn_integral_sub (‖·‖ₑ) (L1.integrable_coeFn _) (L1.integrable_coeFn g)] apply tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds _ (fun i => zero_le _) _ · exact fun i => ∫⁻ x, ∫⁻ y, ‖i (x, y) - g (x, y)‖ₑ ∂η (a, x) ∂κ a swap; · exact fun i => lintegral_mono fun x => enorm_integral_le_lintegral_enorm _ change Tendsto (fun i : β × γ →₁[(κ ⊗ₖ η) a] E => ∫⁻ x, ∫⁻ y : γ, ‖i (x, y) - g (x, y)‖ₑ ∂η (a, x) ∂κ a) (𝓝 g) (𝓝 0) have this (i : Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))) : Measurable fun z => ‖i z - g z‖ₑ := ((Lp.stronglyMeasurable i).sub (Lp.stronglyMeasurable g)).enorm simp_rw [← lintegral_compProd _ _ _ (this _), ← L1.ofReal_norm_sub_eq_lintegral, ← ofReal_zero] refine (continuous_ofReal.tendsto 0).comp ?_ rw [← tendsto_iff_norm_sub_tendsto_zero] exact tendsto_id
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
Kernel.continuous_integral_integral
null
integral_compProd : ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)), ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by by_cases hE : CompleteSpace E; swap · simp [integral, hE] apply Integrable.induction · intro c s hs h2s simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp_def, integral_indicator (measurable_prodMk_left hs), MeasureTheory.setIntegral_const, integral_smul_const, measureReal_def] congr 1 rw [integral_toReal] rotate_left · exact (Kernel.measurable_kernel_prodMk_left' hs _).aemeasurable · exact ae_kernel_lt_top a h2s.ne rw [Kernel.compProd_apply hs] · intro f g _ i_f i_g hf hg simp_rw [integral_add' i_f i_g, Kernel.integral_integral_add' i_f i_g, hf, hg] · exact isClosed_eq continuous_integral Kernel.continuous_integral_integral · intro f g hfg _ hf convert hf using 1 · exact integral_congr_ae hfg.symm · apply integral_congr_ae filter_upwards [ae_ae_of_ae_compProd hfg] with x hfgx using integral_congr_ae (ae_eq_symm hfgx)
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_compProd
null
setIntegral_compProd {f : β × γ → E} {s : Set β} {t : Set γ} (hs : MeasurableSet s) (ht : MeasurableSet t) (hf : IntegrableOn f (s ×ˢ t) ((κ ⊗ₖ η) a)) : ∫ z in s ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫ x in s, ∫ y in t, f (x, y) ∂η (a, x) ∂κ a := by rw [← Kernel.restrict_apply (κ ⊗ₖ η) (hs.prod ht), ← compProd_restrict hs ht, integral_compProd] · simp_rw [Kernel.restrict_apply] · rw [compProd_restrict, Kernel.restrict_apply]; exact hf
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
setIntegral_compProd
null
setIntegral_compProd_univ_right (f : β × γ → E) {s : Set β} (hs : MeasurableSet s) (hf : IntegrableOn f (s ×ˢ univ) ((κ ⊗ₖ η) a)) : ∫ z in s ×ˢ univ, f z ∂(κ ⊗ₖ η) a = ∫ x in s, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by simp_rw [setIntegral_compProd hs MeasurableSet.univ hf, Measure.restrict_univ]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
setIntegral_compProd_univ_right
null
setIntegral_compProd_univ_left (f : β × γ → E) {t : Set γ} (ht : MeasurableSet t) (hf : IntegrableOn f (univ ×ˢ t) ((κ ⊗ₖ η) a)) : ∫ z in univ ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y in t, f (x, y) ∂η (a, x) ∂κ a := by simp_rw [setIntegral_compProd MeasurableSet.univ ht hf, Measure.restrict_univ]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
setIntegral_compProd_univ_left
null
_root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_comp [NormedSpace ℝ E] ⦃f : γ → E⦄ (hf : AEStronglyMeasurable f ((η ∘ₖ κ) a)) : AEStronglyMeasurable (fun x ↦ ∫ y, f y ∂η x) (κ a) := ⟨fun x ↦ ∫ y, hf.mk f y ∂η x, hf.stronglyMeasurable_mk.integral_kernel, by filter_upwards [ae_ae_of_ae_comp hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_comp
null
_root_.MeasureTheory.AEStronglyMeasurable.comp {δ : Type*} [TopologicalSpace δ] {f : γ → δ} (hf : AEStronglyMeasurable f ((η ∘ₖ κ) a)) : ∀ᵐ x ∂κ a, AEStronglyMeasurable f (η x) := by filter_upwards [ae_ae_of_ae_comp hf.ae_eq_mk] with x hx using ⟨hf.mk f, hf.stronglyMeasurable_mk, hx⟩ /-! ### Integrability with respect to composition -/
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.AEStronglyMeasurable.comp
null
hasFiniteIntegral_comp_iff ⦃f : γ → E⦄ (hf : StronglyMeasurable f) : HasFiniteIntegral f ((η ∘ₖ κ) a) ↔ (∀ᵐ x ∂κ a, HasFiniteIntegral f (η x)) ∧ HasFiniteIntegral (fun x ↦ ∫ y, ‖f y‖ ∂η x) (κ a) := by simp_rw [hasFiniteIntegral_iff_enorm, lintegral_comp _ _ _ hf.enorm] simp_rw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ fun y ↦ norm_nonneg _) hf.norm.aestronglyMeasurable, enorm_eq_ofReal toReal_nonneg, ofReal_norm_eq_enorm] have : ∀ {p q r : Prop} (_ : r → p), (r ↔ p ∧ q) ↔ p → (r ↔ q) := fun h ↦ by rw [← and_congr_right_iff, and_iff_right_of_imp h] rw [this] · intro h rw [lintegral_congr_ae] filter_upwards [h] with x hx rw [ofReal_toReal] finiteness · exact fun h ↦ ae_lt_top hf.enorm.lintegral_kernel h.ne
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
hasFiniteIntegral_comp_iff
null
hasFiniteIntegral_comp_iff' ⦃f : γ → E⦄ (hf : AEStronglyMeasurable f ((η ∘ₖ κ) a)) : HasFiniteIntegral f ((η ∘ₖ κ) a) ↔ (∀ᵐ x ∂κ a, HasFiniteIntegral f (η x)) ∧ HasFiniteIntegral (fun x ↦ ∫ y, ‖f y‖ ∂η x) (κ a) := by rw [hasFiniteIntegral_congr hf.ae_eq_mk, hasFiniteIntegral_comp_iff hf.stronglyMeasurable_mk] refine and_congr (eventually_congr ?_) (hasFiniteIntegral_congr ?_) · filter_upwards [ae_ae_of_ae_comp hf.ae_eq_mk.symm] with _ hx using hasFiniteIntegral_congr hx · filter_upwards [ae_ae_of_ae_comp hf.ae_eq_mk.symm] with _ hx using integral_congr_ae (EventuallyEq.fun_comp hx _)
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
hasFiniteIntegral_comp_iff'
null
integrable_comp_iff ⦃f : γ → E⦄ (hf : AEStronglyMeasurable f ((η ∘ₖ κ) a)) : Integrable f ((η ∘ₖ κ) a) ↔ (∀ᵐ y ∂κ a, Integrable f (η y)) ∧ Integrable (fun y ↦ ∫ z, ‖f z‖ ∂η y) (κ a) := by simp only [Integrable, hf, hasFiniteIntegral_comp_iff' hf, true_and, eventually_and, hf.comp, hf.norm.integral_kernel_comp]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_comp_iff
null
_root_.MeasureTheory.Integrable.ae_of_comp ⦃f : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) : ∀ᵐ x ∂κ a, Integrable f (η x) := ((integrable_comp_iff hf.1).1 hf).1
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.ae_of_comp
null
_root_.MeasureTheory.Integrable.integral_norm_comp ⦃f : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) : Integrable (fun x ↦ ∫ y, ‖f y‖ ∂η x) (κ a) := ((integrable_comp_iff hf.1).1 hf).2
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.integral_norm_comp
null
_root_.MeasureTheory.Integrable.integral_comp [NormedSpace ℝ E] ⦃f : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) : Integrable (fun x ↦ ∫ y, f y ∂η x) (κ a) := Integrable.mono hf.integral_norm_comp hf.1.integral_kernel_comp <| ae_of_all _ fun _ ↦ (norm_integral_le_integral_norm _).trans_eq (norm_of_nonneg <| integral_nonneg_of_ae <| ae_of_all _ fun _ ↦ norm_nonneg _).symm /-! ### Bochner integral with respect to the composition -/ variable [NormedSpace ℝ E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace ℝ E']
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.Integrable.integral_comp
null
integral_fn_integral_add_comp ⦃f g : γ → E⦄ (F : E → E') (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, F (∫ y, f y + g y ∂η x) ∂κ a = ∫ x, F (∫ y, f y ∂η x + ∫ y, g y ∂η x) ∂κ a := by refine integral_congr_ae ?_ filter_upwards [hf.ae_of_comp, hg.ae_of_comp] with _ h2f h2g simp [integral_add h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_fn_integral_add_comp
null
integral_fn_integral_sub_comp ⦃f g : γ → E⦄ (F : E → E') (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, F (∫ y, f y - g y ∂η x) ∂κ a = ∫ x, F (∫ y, f y ∂η x - ∫ y, g y ∂η x) ∂κ a := by refine integral_congr_ae ?_ filter_upwards [hf.ae_of_comp, hg.ae_of_comp] with _ h2f h2g simp [integral_sub h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_fn_integral_sub_comp
null
lintegral_fn_integral_sub_comp ⦃f g : γ → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫⁻ x, F (∫ y, f y - g y ∂η x) ∂κ a = ∫⁻ x, F (∫ y, f y ∂η x - ∫ y, g y ∂η x) ∂κ a := by refine lintegral_congr_ae ?_ filter_upwards [hf.ae_of_comp, hg.ae_of_comp] with _ h2f h2g simp [integral_sub h2f h2g]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
lintegral_fn_integral_sub_comp
null
integral_integral_add_comp ⦃f g : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, ∫ y, f y + g y ∂η x ∂κ a = ∫ x, ∫ y, f y ∂η x ∂κ a + ∫ x, ∫ y, g y ∂η x ∂κ a := (integral_fn_integral_add_comp id hf hg).trans <| integral_add hf.integral_comp hg.integral_comp
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_integral_add_comp
null
integral_integral_add'_comp ⦃f g : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, ∫ y, (f + g) y ∂η x ∂κ a = ∫ x, ∫ y, f y ∂η x ∂κ a + ∫ x, ∫ y, g y ∂η x ∂κ a := integral_integral_add_comp hf hg
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_integral_add'_comp
null
integral_integral_sub_comp ⦃f g : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, ∫ y, f y - g y ∂η x ∂κ a = ∫ x, ∫ y, f y ∂η x ∂κ a - ∫ x, ∫ y, g y ∂η x ∂κ a := (integral_fn_integral_sub_comp id hf hg).trans <| integral_sub hf.integral_comp hg.integral_comp
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_integral_sub_comp
null
integral_integral_sub'_comp ⦃f g : γ → E⦄ (hf : Integrable f ((η ∘ₖ κ) a)) (hg : Integrable g ((η ∘ₖ κ) a)) : ∫ x, ∫ y, (f - g) y ∂η x ∂κ a = ∫ x, ∫ y, f y ∂η x ∂κ a - ∫ x, ∫ y, g y ∂η x ∂κ a := integral_integral_sub_comp hf hg
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_integral_sub'_comp
null
continuous_integral_integral_comp : Continuous fun f : γ →₁[(η ∘ₖ κ) a] E ↦ ∫ x, ∫ y, f y ∂η x ∂κ a := by refine continuous_iff_continuousAt.2 fun g ↦ ?_ refine tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_comp (Eventually.of_forall fun h ↦ (L1.integrable_coeFn h).integral_comp) ?_ simp_rw [← lintegral_fn_integral_sub_comp (‖·‖ₑ) (L1.integrable_coeFn _) (L1.integrable_coeFn g)] refine tendsto_of_tendsto_of_tendsto_of_le_of_le (h := fun i ↦ ∫⁻ x, ∫⁻ y, ‖i y - g y‖ₑ ∂η x ∂κ a) tendsto_const_nhds ?_ (fun _ ↦ zero_le _) ?_ swap; · exact fun _ ↦ lintegral_mono fun _ ↦ enorm_integral_le_lintegral_enorm _ have (i : γ →₁[(η ∘ₖ κ) a] E) : Measurable fun z ↦ ‖i z - g z‖ₑ := ((Lp.stronglyMeasurable i).sub (Lp.stronglyMeasurable g)).enorm simp_rw [← lintegral_comp _ _ _ (this _), ← L1.ofReal_norm_sub_eq_lintegral, ← ofReal_zero] exact (continuous_ofReal.tendsto 0).comp (tendsto_iff_norm_sub_tendsto_zero.1 tendsto_id)
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
continuous_integral_integral_comp
null
integral_comp : ∀ {f : γ → E} (_ : Integrable f ((η ∘ₖ κ) a)), ∫ z, f z ∂(η ∘ₖ κ) a = ∫ x, ∫ y, f y ∂η x ∂κ a := by by_cases hE : CompleteSpace E; swap · simp [integral, hE] apply Integrable.induction · intro c s hs ms simp_rw [integral_indicator hs, MeasureTheory.setIntegral_const, integral_smul_const, measureReal_def] congr rw [integral_toReal, Kernel.comp_apply' _ _ _ hs] · exact (Kernel.measurable_coe _ hs).aemeasurable · exact ae_lt_top_of_comp_ne_top a ms.ne · rintro f g - i_f i_g hf hg simp_rw [integral_add' i_f i_g, integral_integral_add'_comp i_f i_g, hf, hg] · exact isClosed_eq continuous_integral Kernel.continuous_integral_integral_comp · rintro f g hfg - hf convert hf using 1 · exact integral_congr_ae hfg.symm · apply integral_congr_ae filter_upwards [ae_ae_of_ae_comp hfg] with x hfgx using integral_congr_ae (ae_eq_symm hfgx)
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_comp
null
setIntegral_comp {f : γ → E} {s : Set γ} (hs : MeasurableSet s) (hf : IntegrableOn f s ((η ∘ₖ κ) a)) : ∫ z in s, f z ∂(η ∘ₖ κ) a = ∫ x, ∫ y in s, f y ∂η x ∂κ a := by rw [← restrict_apply (η ∘ₖ κ) hs, ← comp_restrict hs, integral_comp] · simp_rw [restrict_apply] · rwa [comp_restrict, restrict_apply]
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
setIntegral_comp
null
_root_.MeasureTheory.AEStronglyMeasurable.ae_of_compProd [SFinite μ] [IsSFiniteKernel κ] {E : Type*} [NormedAddCommGroup E] {f : α → β → E} (hf : AEStronglyMeasurable f.uncurry (μ ⊗ₘ κ)) : ∀ᵐ x ∂μ, AEStronglyMeasurable (f x) (κ x) := by simpa using hf.compProd_mk_left
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
_root_.MeasureTheory.AEStronglyMeasurable.ae_of_compProd
null
integrable_compProd_iff [SFinite μ] [IsSFiniteKernel κ] {E : Type*} [NormedAddCommGroup E] {f : α × β → E} (hf : AEStronglyMeasurable f (μ ⊗ₘ κ)) : Integrable f (μ ⊗ₘ κ) ↔ (∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) (κ x)) ∧ Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂(κ x)) μ := by simp_rw [Measure.compProd, ProbabilityTheory.integrable_compProd_iff hf, Kernel.prodMkLeft_apply, Kernel.const_apply]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_compProd_iff
null
integral_compProd [SFinite μ] [IsSFiniteKernel κ] {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : α × β → E} (hf : Integrable f (μ ⊗ₘ κ)) : ∫ x, f x ∂(μ ⊗ₘ κ) = ∫ a, ∫ b, f (a, b) ∂(κ a) ∂μ := by rw [Measure.compProd, ProbabilityTheory.integral_compProd hf] simp
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integral_compProd
null
setIntegral_compProd [SFinite μ] [IsSFiniteKernel κ] {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {s : Set α} (hs : MeasurableSet s) {t : Set β} (ht : MeasurableSet t) {f : α × β → E} (hf : IntegrableOn f (s ×ˢ t) (μ ⊗ₘ κ)) : ∫ x in s ×ˢ t, f x ∂(μ ⊗ₘ κ) = ∫ a in s, ∫ b in t, f (a, b) ∂(κ a) ∂μ := by rw [Measure.compProd, ProbabilityTheory.setIntegral_compProd hs ht hf] simp
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
setIntegral_compProd
null
integrable_compProd_snd_iff [SFinite μ] [IsSFiniteKernel κ] (hf : AEStronglyMeasurable f (κ ∘ₘ μ)) : Integrable (fun p ↦ f p.2) (μ ⊗ₘ κ) ↔ Integrable f (κ ∘ₘ μ) := by rw [← Measure.snd_compProd, Measure.snd, integrable_map_measure _ measurable_snd.aemeasurable, Function.comp_def] rwa [← Measure.snd, Measure.snd_compProd]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_compProd_snd_iff
null
ae_integrable_of_integrable_comp (h_int : Integrable f (κ ∘ₘ μ)) : ∀ᵐ x ∂μ, Integrable f (κ x) := by rw [Measure.comp_eq_comp_const_apply, integrable_comp_iff h_int.1] at h_int exact h_int.1
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
ae_integrable_of_integrable_comp
null
integrable_integral_norm_of_integrable_comp (h_int : Integrable f (κ ∘ₘ μ)) : Integrable (fun x ↦ ∫ y, ‖f y‖ ∂κ x) μ := by rw [Measure.comp_eq_comp_const_apply, integrable_comp_iff h_int.1] at h_int exact h_int.2
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp", "Mathlib.Probability.Kernel.MeasurableIntegral" ]
Mathlib/Probability/Kernel/Composition/IntegralCompProd.lean
integrable_integral_norm_of_integrable_comp
null
comp_eq_snd_compProd (η : Kernel Y Z) [IsSFiniteKernel η] (κ : Kernel X Y) [IsSFiniteKernel κ] : η ∘ₖ κ = snd (κ ⊗ₖ prodMkLeft X η) := by ext a s hs rw [comp_apply' _ _ _ hs, snd_apply' _ _ hs, compProd_apply (measurable_snd hs)] simp [← Set.preimage_comp] @[simp] lemma snd_compProd_prodMkLeft (κ : Kernel X Y) (η : Kernel Y Z) [IsSFiniteKernel κ] [IsSFiniteKernel η] : snd (κ ⊗ₖ prodMkLeft X η) = η ∘ₖ κ := (comp_eq_snd_compProd η κ).symm
theorem
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
comp_eq_snd_compProd
null
compProd_prodMkLeft_eq_comp (κ : Kernel X Y) [IsSFiniteKernel κ] (η : Kernel Y Z) [IsSFiniteKernel η] : κ ⊗ₖ (prodMkLeft X η) = (Kernel.id ×ₖ η) ∘ₖ κ := by ext a s hs rw [comp_eq_snd_compProd, compProd_apply hs, snd_apply' _ _ hs, compProd_apply] swap; · exact measurable_snd hs simp only [prodMkLeft_apply, ← Set.preimage_comp, Prod.snd_comp_mk, Set.preimage_id_eq, id_eq, prod_apply' _ _ _ hs, id_apply] congr with b rw [lintegral_dirac'] exact measurable_measure_prodMk_left hs
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
compProd_prodMkLeft_eq_comp
null
swap_parallelComp : swap Y T ∘ₖ (κ ∥ₖ η) = η ∥ₖ κ ∘ₖ swap X Z := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] by_cases hη : IsSFiniteKernel η swap; · simp [hη] ext ac s hs simp_rw [comp_apply, parallelComp_apply, Measure.bind_apply hs (Kernel.aemeasurable _), swap_apply, lintegral_dirac' _ (Kernel.measurable_coe _ hs), parallelComp_apply' hs, Prod.fst_swap, Prod.snd_swap] rw [MeasureTheory.lintegral_prod_symm] swap; · exact ((Kernel.id.measurable_coe hs).comp measurable_swap).aemeasurable congr with d simp_rw [Prod.swap_prod_mk, Measure.dirac_apply' _ hs, ← Set.indicator_comp_right, lintegral_indicator (measurable_prodMk_left hs)] simp
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
swap_parallelComp
null
deterministic_comp_copy {f : X → Y} (hf : Measurable f) : (deterministic f hf ∥ₖ deterministic f hf) ∘ₖ copy X = copy Y ∘ₖ deterministic f hf := by simp_rw [parallelComp_comp_copy, deterministic_prod_deterministic, copy, deterministic_comp_deterministic, Function.comp_def]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
deterministic_comp_copy
For a deterministic kernel, copying then applying the kernel to the two copies is the same as first applying the kernel then copying.
parallelComp_id_left_comp_parallelComp {η : Kernel X' Z} [IsSFiniteKernel η] {ξ : Kernel Z T} [IsSFiniteKernel ξ] : (Kernel.id ∥ₖ ξ) ∘ₖ (κ ∥ₖ η) = κ ∥ₖ (ξ ∘ₖ η) := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] ext a s hs rw [comp_apply' _ _ _ hs, parallelComp_apply, MeasureTheory.lintegral_prod _ (Kernel.measurable_coe _ hs).aemeasurable] rw [parallelComp_apply, Measure.prod_apply hs] congr with x rw [comp_apply' _ _ _ (measurable_prodMk_left hs)] congr with y rw [parallelComp_apply' hs, Kernel.id_apply, lintegral_dirac' _ (measurable_measure_prodMk_left hs)]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
parallelComp_id_left_comp_parallelComp
null
parallelComp_id_right_comp_parallelComp {η : Kernel X' Z} [IsSFiniteKernel η] {ξ : Kernel Z T} [IsSFiniteKernel ξ] : (ξ ∥ₖ Kernel.id) ∘ₖ (η ∥ₖ κ) = (ξ ∘ₖ η) ∥ₖ κ := by suffices swap T Y ∘ₖ (ξ ∥ₖ Kernel.id) ∘ₖ (η ∥ₖ κ) = swap T Y ∘ₖ ((ξ ∘ₖ η) ∥ₖ κ) by calc ξ ∥ₖ Kernel.id ∘ₖ (η ∥ₖ κ) _ = swap Y T ∘ₖ (swap T Y ∘ₖ (ξ ∥ₖ Kernel.id) ∘ₖ (η ∥ₖ κ)) := by simp_rw [← comp_assoc, swap_swap, id_comp] _ = swap Y T ∘ₖ (swap T Y ∘ₖ ((ξ ∘ₖ η) ∥ₖ κ)) := by rw [this] _ = ξ ∘ₖ η ∥ₖ κ := by simp_rw [← comp_assoc, swap_swap, id_comp] simp_rw [swap_parallelComp, comp_assoc, swap_parallelComp, ← comp_assoc, parallelComp_id_left_comp_parallelComp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
parallelComp_id_right_comp_parallelComp
null
parallelComp_comp_parallelComp [IsSFiniteKernel κ] {η : Kernel Y Z} [IsSFiniteKernel η] {κ' : Kernel X' Y'} [IsSFiniteKernel κ'] {η' : Kernel Y' Z'} [IsSFiniteKernel η'] : (η ∥ₖ η') ∘ₖ (κ ∥ₖ κ') = (η ∘ₖ κ) ∥ₖ (η' ∘ₖ κ') := by rw [← parallelComp_id_left_comp_parallelComp, ← parallelComp_id_right_comp_parallelComp, ← comp_assoc, parallelComp_id_left_comp_parallelComp, comp_id]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
parallelComp_comp_parallelComp
null
parallelComp_comp_prod [IsSFiniteKernel κ] {η : Kernel Y Z} [IsSFiniteKernel η] {κ' : Kernel X Y'} [IsSFiniteKernel κ'] {η' : Kernel Y' Z'} [IsSFiniteKernel η'] : (η ∥ₖ η') ∘ₖ (κ ×ₖ κ') = (η ∘ₖ κ) ×ₖ (η' ∘ₖ κ') := by rw [← parallelComp_comp_copy, ← comp_assoc, parallelComp_comp_parallelComp, ← parallelComp_comp_copy]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
parallelComp_comp_prod
null
parallelComp_comm {η : Kernel Z T} : (Kernel.id ∥ₖ κ) ∘ₖ (η ∥ₖ Kernel.id) = (η ∥ₖ Kernel.id) ∘ₖ (Kernel.id ∥ₖ κ) := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] by_cases hη : IsSFiniteKernel η swap; · simp [hη] rw [parallelComp_id_left_comp_parallelComp, parallelComp_id_right_comp_parallelComp, comp_id, comp_id]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.CompProd", "Mathlib.Probability.Kernel.Composition.Prod" ]
Mathlib/Probability/Kernel/Composition/KernelLemmas.lean
parallelComp_comm
null
prod_prodMkLeft_comp_prod_deterministic {β' ε : Type*} {mβ' : MeasurableSpace β'} {mε : MeasurableSpace ε} (κ : Kernel γ β) [IsSFiniteKernel κ] (η : Kernel ε β') [IsSFiniteKernel η] (ξ : Kernel (β × ε) δ) [IsSFiniteKernel ξ] {f : γ → ε} (hf : Measurable f) : (ξ ×ₖ η.prodMkLeft β) ∘ₖ (κ ×ₖ deterministic f hf) = (ξ ∘ₖ (κ ×ₖ deterministic f hf)) ×ₖ (η ∘ₖ deterministic f hf) := by ext ω s hs rw [prod_apply' _ _ _ hs, comp_apply' _ _ _ hs, lintegral_prod_deterministic, lintegral_comp, lintegral_prod_deterministic] · congr with b rw [prod_apply' _ _ _ hs, prodMkLeft_apply, comp_deterministic_eq_comap, comap_apply] · exact (measurable_measure_prodMk_left hs).lintegral_kernel · exact measurable_measure_prodMk_left hs · exact Kernel.measurable_coe _ hs
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
prod_prodMkLeft_comp_prod_deterministic
The composition of two product kernels `(ξ ×ₖ η') ∘ₖ (κ ×ₖ ζ)` is the product of the compositions `(ξ ∘ₖ (κ ×ₖ ζ)) ×ₖ (η' ∘ₖ (κ ×ₖ ζ))`, if `ζ` is deterministic (of the form `.deterministic f hf`) and `η'` does not depend on the output of `κ`. That is, `η'` has the form `η.prodMkLeft β` for a kernel `η`. If `κ` was deterministic, this would be true even if `η.prodMkLeft β` was a more general kernel since `κ ×ₖ Kernel.deterministic f hf` would be deterministic and commute with copying. Here `κ` is not deterministic, but it is discarded in one branch of the copy.
prod_prodMkRight_comp_deterministic_prod {β' ε : Type*} {mβ' : MeasurableSpace β'} {mε : MeasurableSpace ε} (κ : Kernel γ β) [IsSFiniteKernel κ] (η : Kernel ε β') [IsSFiniteKernel η] (ξ : Kernel (ε × β) δ) [IsSFiniteKernel ξ] {f : γ → ε} (hf : Measurable f) : (ξ ×ₖ η.prodMkRight β) ∘ₖ (deterministic f hf ×ₖ κ) = (ξ ∘ₖ (deterministic f hf ×ₖ κ)) ×ₖ (η ∘ₖ deterministic f hf) := by ext ω s hs rw [prod_apply' _ _ _ hs, comp_apply' _ _ _ hs, lintegral_deterministic_prod, lintegral_comp, lintegral_deterministic_prod] · congr with b rw [prod_apply' _ _ _ hs, prodMkRight_apply, comp_deterministic_eq_comap, comap_apply] · exact (measurable_measure_prodMk_left hs).lintegral_kernel · exact measurable_measure_prodMk_left hs · exact Kernel.measurable_coe _ hs
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
prod_prodMkRight_comp_deterministic_prod
The composition of two product kernels `(ξ ×ₖ η') ∘ₖ (ζ ×ₖ κ)` is the product of the compositions, `(ξ ∘ₖ (ζ ×ₖ κ)) ×ₖ (η' ∘ₖ (ζ ×ₖ κ))`, if `ζ` is deterministic (of the form `.deterministic f hf`) and `η'` does not depend on the output of `κ`. That is, `η'` has the form `η.prodMkRight β` for a kernel `η`. If `κ` was deterministic, this would be true even if `η.prodMkRight β` was a more general kernel since `Kernel.deterministic f hf ×ₖ κ` would be deterministic and commute with copying. Here `κ` is not deterministic, but it is discarded in one branch of the copy.
compProd_eq_parallelComp_comp_copy_comp [SFinite μ] : μ ⊗ₘ κ = (Kernel.id ∥ₖ κ) ∘ₘ Kernel.copy α ∘ₘ μ := by by_cases hκ : IsSFiniteKernel κ swap; · simp [hκ] rw [compProd_eq_comp_prod, ← Kernel.parallelComp_comp_copy, Measure.comp_assoc]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
compProd_eq_parallelComp_comp_copy_comp
null
prod_comp_right [SFinite ν] {κ : Kernel β γ} [IsSFiniteKernel κ] : μ.prod (κ ∘ₘ ν) = (Kernel.id ∥ₖ κ) ∘ₘ (μ.prod ν) := by ext s hs rw [Measure.prod_apply hs, Measure.bind_apply hs (Kernel.aemeasurable _)] simp_rw [Measure.bind_apply (measurable_prodMk_left hs) (Kernel.aemeasurable _)] rw [MeasureTheory.lintegral_prod] swap; · exact (Kernel.measurable_coe _ hs).aemeasurable congr with a congr with b rw [Kernel.parallelComp_apply, Kernel.id_apply, Measure.prod_apply hs, lintegral_dirac'] exact measurable_measure_prodMk_left hs
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
prod_comp_right
null
prod_comp_left [SFinite μ] [SFinite ν] {κ : Kernel α γ} [IsSFiniteKernel κ] : (κ ∘ₘ μ).prod ν = (κ ∥ₖ Kernel.id) ∘ₘ (μ.prod ν) := by have h1 : (κ ∘ₘ μ).prod ν = (ν.prod (κ ∘ₘ μ)).map Prod.swap := by rw [Measure.prod_swap] have h2 : (κ ∥ₖ Kernel.id) ∘ₘ (μ.prod ν) = ((Kernel.id ∥ₖ κ) ∘ₘ (ν.prod μ)).map Prod.swap := by calc (κ ∥ₖ Kernel.id) ∘ₘ (μ.prod ν) _ = (κ ∥ₖ Kernel.id) ∘ₘ ((ν.prod μ).map Prod.swap) := by rw [Measure.prod_swap] _ = (κ ∥ₖ Kernel.id) ∘ₘ ((Kernel.swap _ _) ∘ₘ (ν.prod μ)) := by rw [Kernel.swap, Measure.deterministic_comp_eq_map] _ = (Kernel.swap _ _) ∘ₘ ((Kernel.id ∥ₖ κ) ∘ₘ (ν.prod μ)) := by rw [Measure.comp_assoc, Measure.comp_assoc, Kernel.swap_parallelComp] _ = ((Kernel.id ∥ₖ κ) ∘ₘ (ν.prod μ)).map Prod.swap := by rw [Kernel.swap, Measure.deterministic_comp_eq_map] rw [← Measure.prod_comp_right, ← h1] at h2 exact h2.symm
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
prod_comp_left
null
parallelComp_comp_compProd [IsSFiniteKernel κ] {η : Kernel β γ} [IsSFiniteKernel η] : (Kernel.id ∥ₖ η) ∘ₘ (μ ⊗ₘ κ) = μ ⊗ₘ (η ∘ₖ κ) := by by_cases hμ : SFinite μ swap; · simp [hμ] rw [Measure.compProd_eq_comp_prod, Measure.compProd_eq_comp_prod, Measure.comp_assoc, Kernel.parallelComp_comp_prod, Kernel.id_comp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
parallelComp_comp_compProd
null
compProd_map [SFinite μ] [IsSFiniteKernel κ] {f : β → γ} (hf : Measurable f) : μ ⊗ₘ (κ.map f) = (μ ⊗ₘ κ).map (Prod.map id f) := by calc μ ⊗ₘ (κ.map f) _ = (Kernel.id ∥ₖ Kernel.deterministic f hf) ∘ₘ (Kernel.id ×ₖ κ) ∘ₘ μ := by rw [comp_assoc, Kernel.parallelComp_comp_prod, compProd_eq_comp_prod, Kernel.id_comp, Kernel.deterministic_comp_eq_map] _ = (Kernel.id ∥ₖ Kernel.deterministic f hf) ∘ₘ (μ ⊗ₘ κ) := by rw [compProd_eq_comp_prod] _ = (μ ⊗ₘ κ).map (Prod.map id f) := by rw [Kernel.id, Kernel.deterministic_parallelComp_deterministic, deterministic_comp_eq_map]
lemma
Probability
[ "Mathlib.Probability.Kernel.Composition.MeasureComp" ]
Mathlib/Probability/Kernel/Composition/Lemmas.lean
compProd_map
null
noncomputable mapOfMeasurable (κ : Kernel α β) (f : β → γ) (hf : Measurable f) : Kernel α γ where toFun a := (κ a).map f measurable' := by fun_prop open Classical in
def
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
mapOfMeasurable
The pushforward of a kernel along a measurable function. This is an implementation detail, use `map κ f` instead.
noncomputable map [MeasurableSpace γ] (κ : Kernel α β) (f : β → γ) : Kernel α γ := if hf : Measurable f then mapOfMeasurable κ f hf else 0
def
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map
The pushforward of a kernel along a function. If the function is not measurable, we use zero instead. This choice of junk value ensures that typeclass inference can infer that the `map` of a kernel satisfying `IsZeroOrMarkovKernel` again satisfies this property.
map_of_not_measurable (κ : Kernel α β) {f : β → γ} (hf : ¬(Measurable f)) : map κ f = 0 := by simp [map, hf] @[simp] theorem mapOfMeasurable_eq_map (κ : Kernel α β) {f : β → γ} (hf : Measurable f) : mapOfMeasurable κ f hf = map κ f := by simp [map, hf]
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_of_not_measurable
null
map_apply (κ : Kernel α β) (hf : Measurable f) (a : α) : map κ f a = (κ a).map f := by simp only [map, hf, ↓reduceDIte, mapOfMeasurable, coe_mk]
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_apply
null
map_apply' (κ : Kernel α β) (hf : Measurable f) (a : α) {s : Set γ} (hs : MeasurableSet s) : map κ f a s = κ a (f ⁻¹' s) := by rw [map_apply _ hf, Measure.map_apply hf hs]
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_apply'
null
map_comp_right (κ : Kernel α β) {f : β → γ} (hf : Measurable f) {g : γ → δ} (hg : Measurable g) : κ.map (g ∘ f) = (κ.map f).map g := by ext1 x rw [map_apply _ hg, map_apply _ hf, Measure.map_map hg hf, ← map_apply _ (hg.comp hf)] @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_comp_right
null
map_zero : Kernel.map (0 : Kernel α β) f = 0 := by ext by_cases hf : Measurable f · simp [map_apply, hf] · simp [map_of_not_measurable _ hf] @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_zero
null
map_id (κ : Kernel α β) : map κ id = κ := by ext a simp [map_apply, measurable_id] @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_id
null
map_id' (κ : Kernel α β) : map κ (fun a ↦ a) = κ := map_id κ nonrec theorem lintegral_map (κ : Kernel α β) (hf : Measurable f) (a : α) {g' : γ → ℝ≥0∞} (hg : Measurable g') : ∫⁻ b, g' b ∂map κ f a = ∫⁻ a, g' (f a) ∂κ a := by rw [map_apply _ hf, lintegral_map hg hf]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_id'
null
map_apply_eq_iff_map_symm_apply_eq (κ : Kernel α β) {f : β ≃ᵐ γ} (η : Kernel α γ) : κ.map f = η ↔ κ = η.map f.symm := by simp_rw [Kernel.ext_iff, map_apply _ f.measurable, map_apply _ f.symm.measurable, f.map_apply_eq_iff_map_symm_apply_eq]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_apply_eq_iff_map_symm_apply_eq
null
sum_map_seq (κ : Kernel α β) [IsSFiniteKernel κ] (f : β → γ) : (Kernel.sum fun n => map (seq κ n) f) = map κ f := by by_cases hf : Measurable f · ext a s hs rw [Kernel.sum_apply, map_apply' κ hf a hs, Measure.sum_apply _ hs, ← measure_sum_seq κ, Measure.sum_apply _ (hf hs)] simp_rw [map_apply' _ hf _ hs] · simp [map_of_not_measurable _ hf]
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
sum_map_seq
null
IsMarkovKernel.map (κ : Kernel α β) [IsMarkovKernel κ] (hf : Measurable f) : IsMarkovKernel (map κ f) := ⟨fun a => ⟨by rw [map_apply' κ hf a MeasurableSet.univ, Set.preimage_univ, measure_univ]⟩⟩
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
IsMarkovKernel.map
null
IsZeroOrMarkovKernel.map (κ : Kernel α β) [IsZeroOrMarkovKernel κ] (f : β → γ) : IsZeroOrMarkovKernel (map κ f) := by by_cases hf : Measurable f · rcases eq_zero_or_isMarkovKernel κ with rfl | h · simp only [map_zero]; infer_instance · have := IsMarkovKernel.map κ hf; infer_instance · simp only [map_of_not_measurable _ hf]; infer_instance
instance
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
IsZeroOrMarkovKernel.map
null
IsFiniteKernel.map (κ : Kernel α β) [IsFiniteKernel κ] (f : β → γ) : IsFiniteKernel (map κ f) := by refine ⟨⟨κ.bound, κ.bound_lt_top, fun a => ?_⟩⟩ by_cases hf : Measurable f · rw [map_apply' κ hf a MeasurableSet.univ] exact measure_le_bound κ a _ · simp [map_of_not_measurable _ hf]
instance
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
IsFiniteKernel.map
null
IsSFiniteKernel.map (κ : Kernel α β) [IsSFiniteKernel κ] (f : β → γ) : IsSFiniteKernel (map κ f) := ⟨⟨fun n => Kernel.map (seq κ n) f, inferInstance, (sum_map_seq κ f).symm⟩⟩ @[simp]
instance
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
IsSFiniteKernel.map
null
map_const (μ : Measure α) {f : α → β} (hf : Measurable f) : map (const γ μ) f = const γ (μ.map f) := by ext x s hs rw [map_apply' _ hf _ hs, const_apply, const_apply, Measure.map_apply hf hs]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
map_const
null
comap (κ : Kernel α β) (g : γ → α) (hg : Measurable g) : Kernel γ β where toFun a := κ (g a) measurable' := κ.measurable.comp hg @[simp, norm_cast]
def
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap
Pullback of a kernel, such that for each set s `comap κ g hg c s = κ (g c) s`. We include measurability in the assumptions instead of using junk values to make sure that typeclass inference can infer that the `comap` of a Markov kernel is again a Markov kernel.
coe_comap (κ : Kernel α β) (g : γ → α) (hg : Measurable g) : κ.comap g hg = κ ∘ g := rfl
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
coe_comap
null
comap_apply (κ : Kernel α β) (hg : Measurable g) (c : γ) : comap κ g hg c = κ (g c) := rfl
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap_apply
null
comap_apply' (κ : Kernel α β) (hg : Measurable g) (c : γ) (s : Set β) : comap κ g hg c s = κ (g c) s := rfl @[simp]
theorem
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap_apply'
null
comap_zero (hg : Measurable g) : Kernel.comap (0 : Kernel α β) g hg = 0 := by ext; rw [Kernel.comap_apply]; simp @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap_zero
null
comap_id (κ : Kernel α β) : comap κ id measurable_id = κ := by ext a; rw [comap_apply]; simp @[simp]
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap_id
null
comap_id' (κ : Kernel α β) : comap κ (fun a ↦ a) measurable_id = κ := comap_id κ
lemma
Probability
[ "Mathlib.Probability.Kernel.Basic" ]
Mathlib/Probability/Kernel/Composition/MapComap.lean
comap_id'
null