probability.integration
⟷
Mathlib.Probability.Integration
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.
(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)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -196,8 +196,8 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : ∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul
-/
@@ -222,8 +222,8 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpa
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : ∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul
-/
@@ -328,7 +328,7 @@ theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable
by
rintro ⟨HX, HY⟩
exact h (hXY.integrable_mul HX HY)
- rw [not_and_or] at I
+ rw [not_and_or] at I
cases I <;> simp [integral_undef, I, h]
#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFun.integral_mul
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Martin Zinkevich. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
-/
-import Mathbin.MeasureTheory.Integral.SetIntegral
-import Mathbin.Probability.Independence.Basic
+import MeasureTheory.Integral.SetIntegral
+import Probability.Independence.Basic
#align_import probability.integration from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Martin Zinkevich. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
-
-! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Integral.SetIntegral
import Mathbin.Probability.Independence.Basic
+#align_import probability.integration from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
+
/-!
# Integration in Probability Theory
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -45,6 +45,7 @@ variable {Ω : Type _} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f g : Ω
namespace ProbabilityTheory
+#print ProbabilityTheory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator /-
/-- If a random variable `f` in `ℝ≥0∞` is independent of an event `T`, then if you restrict the
random variable to `T`, then `E[f * indicator T c 0]=E[f] * E[indicator T c 0]`. It is useful for
`lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space`. -/
@@ -81,7 +82,9 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
· exact fun n => h_mul_indicator _ (h_measM_f n)
· exact fun m n h_le a => mul_le_mul_right' (h_mono_f h_le a) _
#align probability_theory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator ProbabilityTheory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator
+-/
+#print ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace /-
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
then `E[f * g] = E[f] * E[g]`. However, instead of directly using the independence
of the random variables, it uses the independence of measurable spaces for the
@@ -114,7 +117,9 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
· exact fun n => h_measM_f.mul (h_measM_f' n)
· exact fun n m (h_le : n ≤ m) a => mul_le_mul_left' (h_mono_f' h_le a) _
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
+-/
+#print ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun /-
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
then `E[f * g] = E[f] * E[g]`. -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measurable f)
@@ -124,7 +129,9 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measura
(measurable_iff_comap_le.1 h_meas_f) (measurable_iff_comap_le.1 h_meas_g) h_indep_fun
(Measurable.of_comap_le le_rfl) (Measurable.of_comap_le le_rfl)
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun
+-/
+#print ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' /-
/-- If `f` and `g` with values in `ℝ≥0∞` are independent and almost everywhere measurable,
then `E[f * g] = E[f] * E[g]` (slightly generalizing
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
@@ -140,13 +147,17 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeas
h_meas_g.measurable_mk
exact h_indep_fun.ae_eq h_meas_f.ae_eq_mk h_meas_g.ae_eq_mk
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'
+-/
+#print ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' /-
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
+-/
+#print ProbabilityTheory.IndepFun.integrable_mul /-
/-- The product of two independent, integrable, real_valued random variables is integrable. -/
theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (hX : Integrable X μ)
@@ -166,7 +177,9 @@ theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω →
simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
exact ennreal.mul_lt_top_iff.mpr (Or.inl ⟨hX.2, hY.2⟩)
#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFun.integrable_mul
+-/
+#print ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul /-
/-- If the product of two independent real_valued random variables is integrable and
the second one is not almost everywhere zero, then the first one is integrable. -/
theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
@@ -190,7 +203,9 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul
+-/
+#print ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul /-
/-- If the product of two independent real_valued random variables is integrable and the
first one is not almost everywhere zero, then the second one is integrable. -/
theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
@@ -214,7 +229,9 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpa
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul
+-/
+#print ProbabilityTheory.IndepFun.integral_mul_of_nonneg /-
/-- The (Bochner) integral of the product of two independent, nonnegative random
variables is the product of their integrals. The proof is just plumbing around
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'`. -/
@@ -236,7 +253,9 @@ theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X)
apply lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h1 h2
exact hXY.comp ENNReal.measurable_ofReal ENNReal.measurable_ofReal
#align probability_theory.indep_fun.integral_mul_of_nonneg ProbabilityTheory.IndepFun.integral_mul_of_nonneg
+-/
+#print ProbabilityTheory.IndepFun.integral_mul_of_integrable /-
/-- The (Bochner) integral of the product of two independent, integrable random
variables is the product of their integrals. The proof is pedestrian decomposition
into their positive and negative parts in order to apply `indep_fun.integral_mul_of_nonneg`
@@ -284,7 +303,9 @@ theorem IndepFun.integral_mul_of_integrable (hXY : IndepFun X Y μ) (hX : Integr
hi4.integral_mul_of_nonneg hp2 hp4 hm2 hm4]
ring
#align probability_theory.indep_fun.integral_mul_of_integrable ProbabilityTheory.IndepFun.integral_mul_of_integrable
+-/
+#print ProbabilityTheory.IndepFun.integral_mul /-
/-- The (Bochner) integral of the product of two independent random
variables is the product of their integrals. -/
theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
@@ -313,13 +334,17 @@ theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable
rw [not_and_or] at I
cases I <;> simp [integral_undef, I, h]
#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFun.integral_mul
+-/
+#print ProbabilityTheory.IndepFun.integral_mul' /-
theorem IndepFun.integral_mul' (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
(hY : AEStronglyMeasurable Y μ) :
(integral μ fun ω => X ω * Y ω) = integral μ X * integral μ Y :=
hXY.integral_mul hX hY
#align probability_theory.indep_fun.integral_mul' ProbabilityTheory.IndepFun.integral_mul'
+-/
+#print ProbabilityTheory.indepFun_iff_integral_comp_mul /-
/-- Independence of functions `f` and `g` into arbitrary types is characterized by the relation
`E[(φ ∘ f) * (ψ ∘ g)] = E[φ ∘ f] * E[ψ ∘ g]` for all measurable `φ` and `ψ` with values in `ℝ`
satisfying appropriate integrability conditions. -/
@@ -344,6 +369,7 @@ theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _} {m
integral_indicator_one (hgm hB), Set.inter_indicator_one]
exact ENNReal.mul_ne_top (measure_ne_top μ _) (measure_ne_top μ _)
#align probability_theory.indep_fun_iff_integral_comp_mul ProbabilityTheory.indepFun_iff_integral_comp_mul
+-/
end ProbabilityTheory
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -51,7 +51,7 @@ namespace ProbabilityTheory
theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : MeasurableSpace Ω}
{μ : Measure Ω} (hMf : Mf ≤ mΩ) (c : ℝ≥0∞) {T : Set Ω} (h_meas_T : MeasurableSet T)
(h_ind : IndepSets {s | measurable_set[Mf] s} {T} μ) (h_meas_f : measurable[Mf] f) :
- (∫⁻ ω, f ω * T.indicator (fun _ => c) ω ∂μ) =
+ ∫⁻ ω, f ω * T.indicator (fun _ => c) ω ∂μ =
(∫⁻ ω, f ω ∂μ) * ∫⁻ ω, T.indicator (fun _ => c) ω ∂μ :=
by
revert f
@@ -91,7 +91,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
{Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
(h_ind : Indep Mf Mg μ) (h_meas_f : measurable[Mf] f) (h_meas_g : measurable[Mg] g) :
- (∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
+ ∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
revert g
have h_measM_f : Measurable f := h_meas_f.mono hMf le_rfl
@@ -119,7 +119,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
then `E[f * g] = E[f] * E[g]`. -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measurable f)
(h_meas_g : Measurable g) (h_indep_fun : IndepFun f g μ) :
- (∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
+ ∫⁻ ω, (f * g) ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
(measurable_iff_comap_le.1 h_meas_f) (measurable_iff_comap_le.1 h_meas_g) h_indep_fun
(Measurable.of_comap_le le_rfl) (Measurable.of_comap_le le_rfl)
@@ -130,7 +130,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measura
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
- (∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
+ ∫⁻ ω, (f * g) ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
have fg_ae : f * g =ᵐ[μ] h_meas_f.mk _ * h_meas_g.mk _ := h_meas_f.ae_eq_mk.mul h_meas_g.ae_eq_mk
rw [lintegral_congr_ae h_meas_f.ae_eq_mk, lintegral_congr_ae h_meas_g.ae_eq_mk,
@@ -143,7 +143,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeas
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
- (∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
+ ∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
@@ -160,7 +160,7 @@ theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω →
hXY'.comp measurable_coe_nnreal_ennreal measurable_coe_nnreal_ennreal
have hnX : AEMeasurable nX μ := hX.1.AEMeasurable.nnnorm.coe_nnreal_ennreal
have hnY : AEMeasurable nY μ := hY.1.AEMeasurable.nnnorm.coe_nnreal_ennreal
- have hmul : (∫⁻ a, nX a * nY a ∂μ) = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ := by
+ have hmul : ∫⁻ a, nX a * nY a ∂μ = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ := by
convert lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' hnX hnY hXY''
refine' ⟨hX.1.mul hY.1, _⟩
simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
@@ -174,7 +174,7 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
(hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
Integrable X μ := by
refine' ⟨hX, _⟩
- have I : (∫⁻ ω, ‖Y ω‖₊ ∂μ) ≠ 0 := by
+ have I : ∫⁻ ω, ‖Y ω‖₊ ∂μ ≠ 0 := by
intro H
have I : (fun ω => ↑‖Y ω‖₊) =ᵐ[μ] 0 := (lintegral_eq_zero_iff' hY.ennnorm).1 H
apply h'Y
@@ -185,7 +185,7 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
by
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
- have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
+ have A : ∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ < ∞ := h'XY.2
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
@@ -198,7 +198,7 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpa
(hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
Integrable Y μ := by
refine' ⟨hY, _⟩
- have I : (∫⁻ ω, ‖X ω‖₊ ∂μ) ≠ 0 := by
+ have I : ∫⁻ ω, ‖X ω‖₊ ∂μ ≠ 0 := by
intro H
have I : (fun ω => ↑‖X ω‖₊) =ᵐ[μ] 0 := (lintegral_eq_zero_iff' hX.ennnorm).1 H
apply h'X
@@ -209,7 +209,7 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpa
by
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
- have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
+ have A : ∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ < ∞ := h'XY.2
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740
+! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
! 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.Independence.Basic
/-!
# Integration in Probability Theory
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
Integration results for independent random variables. Specifically, for two
independent random variables X and Y over the extended non-negative
reals, `E[X * Y] = E[X] * E[Y]`, and similar results.
mathlib commit https://github.com/leanprover-community/mathlib/commit/58a272265b5e05f258161260dd2c5d247213cbd3
@@ -125,7 +125,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measura
/-- If `f` and `g` with values in `ℝ≥0∞` are independent and almost everywhere measurable,
then `E[f * g] = E[f] * E[g]` (slightly generalizing
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
-theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AEMeasurable f μ)
+theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
@@ -136,13 +136,13 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AEMea
lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun h_meas_f.measurable_mk
h_meas_g.measurable_mk
exact h_indep_fun.ae_eq h_meas_f.ae_eq_mk h_meas_g.ae_eq_mk
-#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'
+#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'
-theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' (h_meas_f : AEMeasurable f μ)
+theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
- lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h_meas_f h_meas_g h_indep_fun
-#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun''
+ lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h_meas_f h_meas_g h_indep_fun
+#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
/-- The product of two independent, integrable, real_valued random variables is integrable. -/
theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -47,7 +47,7 @@ namespace ProbabilityTheory
`lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space`. -/
theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : MeasurableSpace Ω}
{μ : Measure Ω} (hMf : Mf ≤ mΩ) (c : ℝ≥0∞) {T : Set Ω} (h_meas_T : MeasurableSet T)
- (h_ind : IndepSetsCat { s | measurable_set[Mf] s } {T} μ) (h_meas_f : measurable[Mf] f) :
+ (h_ind : IndepSets {s | measurable_set[Mf] s} {T} μ) (h_meas_f : measurable[Mf] f) :
(∫⁻ ω, f ω * T.indicator (fun _ => c) ω ∂μ) =
(∫⁻ ω, f ω ∂μ) * ∫⁻ ω, T.indicator (fun _ => c) ω ∂μ :=
by
@@ -87,7 +87,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
a more common variant of the product of independent variables. -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
{Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
- (h_ind : IndepCat Mf Mg μ) (h_meas_f : measurable[Mf] f) (h_meas_g : measurable[Mg] g) :
+ (h_ind : Indep Mf Mg μ) (h_meas_f : measurable[Mf] f) (h_meas_g : measurable[Mg] g) :
(∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
revert g
@@ -114,19 +114,19 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
then `E[f * g] = E[f] * E[g]`. -/
-theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFunCat (h_meas_f : Measurable f)
- (h_meas_g : Measurable g) (h_indep_fun : IndepFunCat f g μ) :
+theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measurable f)
+ (h_meas_g : Measurable g) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
(measurable_iff_comap_le.1 h_meas_f) (measurable_iff_comap_le.1 h_meas_g) h_indep_fun
(Measurable.of_comap_le le_rfl) (Measurable.of_comap_le le_rfl)
-#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFunCat
+#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun
/-- If `f` and `g` with values in `ℝ≥0∞` are independent and almost everywhere measurable,
then `E[f * g] = E[f] * E[g]` (slightly generalizing
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AEMeasurable f μ)
- (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
+ (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
have fg_ae : f * g =ᵐ[μ] h_meas_f.mk _ * h_meas_g.mk _ := h_meas_f.ae_eq_mk.mul h_meas_g.ae_eq_mk
@@ -139,14 +139,14 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AEMea
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' (h_meas_f : AEMeasurable f μ)
- (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
+ (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun''
/-- The product of two independent, integrable, real_valued random variables is integrable. -/
-theorem IndepFunCat.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
- [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (hX : Integrable X μ)
+theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+ [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : Integrable (X * Y) μ :=
by
let nX : Ω → ENNReal := fun a => ‖X a‖₊
@@ -162,12 +162,12 @@ theorem IndepFunCat.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω
refine' ⟨hX.1.mul hY.1, _⟩
simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
exact ennreal.mul_lt_top_iff.mpr (Or.inl ⟨hX.2, hY.2⟩)
-#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFunCat.integrable_mul
+#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFun.integrable_mul
/-- If the product of two independent real_valued random variables is integrable and
the second one is not almost everywhere zero, then the first one is integrable. -/
-theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
- [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (h'XY : Integrable (X * Y) μ)
+theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+ [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
(hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
Integrable X μ := by
refine' ⟨hX, _⟩
@@ -175,7 +175,7 @@ theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableS
intro H
have I : (fun ω => ↑‖Y ω‖₊) =ᵐ[μ] 0 := (lintegral_eq_zero_iff' hY.ennnorm).1 H
apply h'Y
- filter_upwards [I]with ω hω
+ filter_upwards [I] with ω hω
simpa using hω
apply lt_top_iff_ne_top.2 fun H => _
have J : indep_fun (fun ω => ↑‖X ω‖₊) (fun ω => ↑‖Y ω‖₊) μ :=
@@ -186,21 +186,20 @@ theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableS
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
-#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_left_of_integrable_mul
+#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul
/-- If the product of two independent real_valued random variables is integrable and the
first one is not almost everywhere zero, then the second one is integrable. -/
-theorem IndepFunCat.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β]
- {X Y : Ω → β} [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ)
- (h'XY : Integrable (X * Y) μ) (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ)
- (h'X : ¬X =ᵐ[μ] 0) : Integrable Y μ :=
- by
+theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+ [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
+ (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
+ Integrable Y μ := by
refine' ⟨hY, _⟩
have I : (∫⁻ ω, ‖X ω‖₊ ∂μ) ≠ 0 := by
intro H
have I : (fun ω => ↑‖X ω‖₊) =ᵐ[μ] 0 := (lintegral_eq_zero_iff' hX.ennnorm).1 H
apply h'X
- filter_upwards [I]with ω hω
+ filter_upwards [I] with ω hω
simpa using hω
apply lt_top_iff_ne_top.2 fun H => _
have J : indep_fun (fun ω => ↑‖X ω‖₊) (fun ω => ↑‖Y ω‖₊) μ :=
@@ -211,12 +210,12 @@ theorem IndepFunCat.integrable_right_of_integrable_mul {β : Type _} [Measurable
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
-#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_right_of_integrable_mul
+#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul
/-- The (Bochner) integral of the product of two independent, nonnegative random
variables is the product of their integrals. The proof is just plumbing around
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'`. -/
-theorem IndepFunCat.integral_mul_of_nonneg (hXY : IndepFunCat X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
+theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
(hXm : AEMeasurable X μ) (hYm : AEMeasurable Y μ) :
integral μ (X * Y) = integral μ X * integral μ Y :=
by
@@ -233,13 +232,13 @@ theorem IndepFunCat.integral_mul_of_nonneg (hXY : IndepFunCat X Y μ) (hXp : 0
congr
apply lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h1 h2
exact hXY.comp ENNReal.measurable_ofReal ENNReal.measurable_ofReal
-#align probability_theory.indep_fun.integral_mul_of_nonneg ProbabilityTheory.IndepFunCat.integral_mul_of_nonneg
+#align probability_theory.indep_fun.integral_mul_of_nonneg ProbabilityTheory.IndepFun.integral_mul_of_nonneg
/-- The (Bochner) integral of the product of two independent, integrable random
variables is the product of their integrals. The proof is pedestrian decomposition
into their positive and negative parts in order to apply `indep_fun.integral_mul_of_nonneg`
four times. -/
-theorem IndepFunCat.integral_mul_of_integrable (hXY : IndepFunCat X Y μ) (hX : Integrable X μ)
+theorem IndepFun.integral_mul_of_integrable (hXY : IndepFun X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y :=
by
let pos : ℝ → ℝ := fun x => max x 0
@@ -281,22 +280,22 @@ theorem IndepFunCat.integral_mul_of_integrable (hXY : IndepFunCat X Y μ) (hX :
hi2.integral_mul_of_nonneg hp2 hp3 hm2 hm3, hi3.integral_mul_of_nonneg hp1 hp4 hm1 hm4,
hi4.integral_mul_of_nonneg hp2 hp4 hm2 hm4]
ring
-#align probability_theory.indep_fun.integral_mul_of_integrable ProbabilityTheory.IndepFunCat.integral_mul_of_integrable
+#align probability_theory.indep_fun.integral_mul_of_integrable ProbabilityTheory.IndepFun.integral_mul_of_integrable
/-- The (Bochner) integral of the product of two independent random
variables is the product of their integrals. -/
-theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeasurable X μ)
+theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
(hY : AEStronglyMeasurable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y :=
by
by_cases h'X : X =ᵐ[μ] 0
· have h' : X * Y =ᵐ[μ] 0 := by
- filter_upwards [h'X]with ω hω
+ filter_upwards [h'X] with ω hω
simp [hω]
simp only [integral_congr_ae h'X, integral_congr_ae h', Pi.zero_apply, integral_const,
Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
by_cases h'Y : Y =ᵐ[μ] 0
· have h' : X * Y =ᵐ[μ] 0 := by
- filter_upwards [h'Y]with ω hω
+ filter_upwards [h'Y] with ω hω
simp [hω]
simp only [integral_congr_ae h'Y, integral_congr_ae h', Pi.zero_apply, integral_const,
Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
@@ -310,20 +309,20 @@ theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeas
exact h (hXY.integrable_mul HX HY)
rw [not_and_or] at I
cases I <;> simp [integral_undef, I, h]
-#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFunCat.integral_mul
+#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFun.integral_mul
-theorem IndepFunCat.integral_mul' (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeasurable X μ)
+theorem IndepFun.integral_mul' (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
(hY : AEStronglyMeasurable Y μ) :
(integral μ fun ω => X ω * Y ω) = integral μ X * integral μ Y :=
hXY.integral_mul hX hY
-#align probability_theory.indep_fun.integral_mul' ProbabilityTheory.IndepFunCat.integral_mul'
+#align probability_theory.indep_fun.integral_mul' ProbabilityTheory.IndepFun.integral_mul'
/-- Independence of functions `f` and `g` into arbitrary types is characterized by the relation
`E[(φ ∘ f) * (ψ ∘ g)] = E[φ ∘ f] * E[ψ ∘ g]` for all measurable `φ` and `ψ` with values in `ℝ`
satisfying appropriate integrability conditions. -/
-theorem indepFunCat_iff_integral_comp_mul [FiniteMeasure μ] {β β' : Type _} {mβ : MeasurableSpace β}
+theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _} {mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'} {f : Ω → β} {g : Ω → β'} {hfm : Measurable f} {hgm : Measurable g} :
- IndepFunCat f g μ ↔
+ IndepFun f g μ ↔
∀ {φ : β → ℝ} {ψ : β' → ℝ},
Measurable φ →
Measurable ψ →
@@ -341,7 +340,7 @@ theorem indepFunCat_iff_integral_comp_mul [FiniteMeasure μ] {β β' : Type _} {
integral_indicator_one ((hfm hA).inter (hgm hB)), ← integral_indicator_one (hfm hA), ←
integral_indicator_one (hgm hB), Set.inter_indicator_one]
exact ENNReal.mul_ne_top (measure_ne_top μ _) (measure_ne_top μ _)
-#align probability_theory.indep_fun_iff_integral_comp_mul ProbabilityTheory.indepFunCat_iff_integral_comp_mul
+#align probability_theory.indep_fun_iff_integral_comp_mul ProbabilityTheory.indepFun_iff_integral_comp_mul
end ProbabilityTheory
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -183,8 +183,8 @@ theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableS
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_left_of_integrable_mul
@@ -208,8 +208,8 @@ theorem IndepFunCat.integrable_right_of_integrable_mul {β : Type _} [Measurable
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_right_of_integrable_mul
@@ -308,7 +308,7 @@ theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeas
by
rintro ⟨HX, HY⟩
exact h (hXY.integrable_mul HX HY)
- rw [not_and_or] at I
+ rw [not_and_or] at I
cases I <;> simp [integral_undef, I, h]
#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFunCat.integral_mul
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -36,7 +36,7 @@ noncomputable section
open Set MeasureTheory
-open ENNReal MeasureTheory
+open scoped ENNReal MeasureTheory
variable {Ω : Type _} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f g : Ω → ℝ≥0∞} {X Y : Ω → ℝ}
mathlib commit https://github.com/leanprover-community/mathlib/commit/75e7fca56381d056096ce5d05e938f63a6567828
@@ -168,7 +168,7 @@ theorem IndepFunCat.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω
the second one is not almost everywhere zero, then the first one is integrable. -/
theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (h'XY : Integrable (X * Y) μ)
- (hX : AeStronglyMeasurable X μ) (hY : AeStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
+ (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
Integrable X μ := by
refine' ⟨hX, _⟩
have I : (∫⁻ ω, ‖Y ω‖₊ ∂μ) ≠ 0 := by
@@ -192,7 +192,7 @@ theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableS
first one is not almost everywhere zero, then the second one is integrable. -/
theorem IndepFunCat.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β]
{X Y : Ω → β} [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ)
- (h'XY : Integrable (X * Y) μ) (hX : AeStronglyMeasurable X μ) (hY : AeStronglyMeasurable Y μ)
+ (h'XY : Integrable (X * Y) μ) (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ)
(h'X : ¬X =ᵐ[μ] 0) : Integrable Y μ :=
by
refine' ⟨hY, _⟩
@@ -285,8 +285,8 @@ theorem IndepFunCat.integral_mul_of_integrable (hXY : IndepFunCat X Y μ) (hX :
/-- The (Bochner) integral of the product of two independent random
variables is the product of their integrals. -/
-theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AeStronglyMeasurable X μ)
- (hY : AeStronglyMeasurable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y :=
+theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeasurable X μ)
+ (hY : AEStronglyMeasurable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y :=
by
by_cases h'X : X =ᵐ[μ] 0
· have h' : X * Y =ᵐ[μ] 0 := by
@@ -312,8 +312,8 @@ theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AeStronglyMeas
cases I <;> simp [integral_undef, I, h]
#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFunCat.integral_mul
-theorem IndepFunCat.integral_mul' (hXY : IndepFunCat X Y μ) (hX : AeStronglyMeasurable X μ)
- (hY : AeStronglyMeasurable Y μ) :
+theorem IndepFunCat.integral_mul' (hXY : IndepFunCat X Y μ) (hX : AEStronglyMeasurable X μ)
+ (hY : AEStronglyMeasurable Y μ) :
(integral μ fun ω => X ω * Y ω) = integral μ X * integral μ Y :=
hXY.integral_mul hX hY
#align probability_theory.indep_fun.integral_mul' ProbabilityTheory.IndepFunCat.integral_mul'
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -54,7 +54,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
revert f
have h_mul_indicator : ∀ g, Measurable g → Measurable fun a => g a * T.indicator (fun x => c) a :=
fun g h_mg => h_mg.mul (measurable_const.indicator h_meas_T)
- apply Measurable.eNNReal_induction
+ apply Measurable.ennreal_induction
· intro c' s' h_meas_s'
simp_rw [← inter_indicator_mul]
rw [lintegral_indicator _ (MeasurableSet.inter (hMf _ h_meas_s') h_meas_T),
@@ -92,7 +92,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
by
revert g
have h_measM_f : Measurable f := h_meas_f.mono hMf le_rfl
- apply Measurable.eNNReal_induction
+ apply Measurable.ennreal_induction
· intro c s h_s
apply lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator hMf _ (hMg _ h_s) _ h_meas_f
apply indep_sets_of_indep_sets_of_le_right h_ind
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -154,9 +154,9 @@ theorem IndepFunCat.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω
have hXY' : indep_fun (fun a => ‖X a‖₊) (fun a => ‖Y a‖₊) μ :=
hXY.comp measurable_nnnorm measurable_nnnorm
have hXY'' : indep_fun nX nY μ :=
- hXY'.comp measurable_coe_nNReal_eNNReal measurable_coe_nNReal_eNNReal
- have hnX : AEMeasurable nX μ := hX.1.AEMeasurable.nnnorm.coe_nNReal_eNNReal
- have hnY : AEMeasurable nY μ := hY.1.AEMeasurable.nnnorm.coe_nNReal_eNNReal
+ hXY'.comp measurable_coe_nnreal_ennreal measurable_coe_nnreal_ennreal
+ have hnX : AEMeasurable nX μ := hX.1.AEMeasurable.nnnorm.coe_nnreal_ennreal
+ have hnY : AEMeasurable nY μ := hY.1.AEMeasurable.nnnorm.coe_nnreal_ennreal
have hmul : (∫⁻ a, nX a * nY a ∂μ) = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ := by
convert lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' hnX hnY hXY''
refine' ⟨hX.1.mul hY.1, _⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -72,8 +72,8 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
right_distrib, h_ind_f', h_ind_g]
· intro f h_meas_f h_mono_f h_ind_f
have h_measM_f : ∀ n, Measurable (f n) := fun n => (h_meas_f n).mono hMf le_rfl
- simp_rw [ENNReal.supᵢ_mul]
- rw [lintegral_supr h_measM_f h_mono_f, lintegral_supr, ENNReal.supᵢ_mul]
+ simp_rw [ENNReal.iSup_mul]
+ rw [lintegral_supr h_measM_f h_mono_f, lintegral_supr, ENNReal.iSup_mul]
· simp_rw [← h_ind_f]
· exact fun n => h_mul_indicator _ (h_measM_f n)
· exact fun m n h_le a => mul_le_mul_right' (h_mono_f h_le a) _
@@ -105,8 +105,8 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
h_ind_f', h_ind_g']
· intro f' h_meas_f' h_mono_f' h_ind_f'
have h_measM_f' : ∀ n, Measurable (f' n) := fun n => (h_meas_f' n).mono hMg le_rfl
- simp_rw [ENNReal.mul_supᵢ]
- rw [lintegral_supr, lintegral_supr h_measM_f' h_mono_f', ENNReal.mul_supᵢ]
+ simp_rw [ENNReal.mul_iSup]
+ rw [lintegral_supr, lintegral_supr h_measM_f' h_mono_f', ENNReal.mul_iSup]
· simp_rw [← h_ind_f']
· exact fun n => h_measM_f.mul (h_measM_f' n)
· exact fun n m (h_le : n ≤ m) a => mul_le_mul_left' (h_mono_f' h_le a) _
mathlib commit https://github.com/leanprover-community/mathlib/commit/2f8347015b12b0864dfaf366ec4909eb70c78740
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 57ac39bd365c2f80589a700f9fbb664d3a1a30c2
+! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Integral.SetIntegral
-import Mathbin.Probability.Independence
+import Mathbin.Probability.Independence.Basic
/-!
# Integration in Probability Theory
mathlib commit https://github.com/leanprover-community/mathlib/commit/28b2a92f2996d28e580450863c130955de0ed398
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740
+! leanprover-community/mathlib commit 57ac39bd365c2f80589a700f9fbb664d3a1a30c2
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Integral.SetIntegral
-import Mathbin.Probability.Independence.Basic
+import Mathbin.Probability.Independence
/-!
# Integration in Probability Theory
mathlib commit https://github.com/leanprover-community/mathlib/commit/2f8347015b12b0864dfaf366ec4909eb70c78740
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 57ac39bd365c2f80589a700f9fbb664d3a1a30c2
+! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Integral.SetIntegral
-import Mathbin.Probability.Independence
+import Mathbin.Probability.Independence.Basic
/-!
# Integration in Probability Theory
mathlib commit https://github.com/leanprover-community/mathlib/commit/d4437c68c8d350fc9d4e95e1e174409db35e30d7
@@ -321,9 +321,8 @@ theorem IndepFunCat.integral_mul' (hXY : IndepFunCat X Y μ) (hX : AeStronglyMea
/-- Independence of functions `f` and `g` into arbitrary types is characterized by the relation
`E[(φ ∘ f) * (ψ ∘ g)] = E[φ ∘ f] * E[ψ ∘ g]` for all measurable `φ` and `ψ` with values in `ℝ`
satisfying appropriate integrability conditions. -/
-theorem indepFunCat_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _}
- {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'} {f : Ω → β} {g : Ω → β'}
- {hfm : Measurable f} {hgm : Measurable g} :
+theorem indepFunCat_iff_integral_comp_mul [FiniteMeasure μ] {β β' : Type _} {mβ : MeasurableSpace β}
+ {mβ' : MeasurableSpace β'} {f : Ω → β} {g : Ω → β'} {hfm : Measurable f} {hgm : Measurable g} :
IndepFunCat f g μ ↔
∀ {φ : β → ℝ} {ψ : β' → ℝ},
Measurable φ →
mathlib commit https://github.com/leanprover-community/mathlib/commit/92c69b77c5a7dc0f7eeddb552508633305157caa
@@ -125,8 +125,8 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFunCat (h_meas_f : Meas
/-- If `f` and `g` with values in `ℝ≥0∞` are independent and almost everywhere measurable,
then `E[f * g] = E[f] * E[g]` (slightly generalizing
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
-theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AeMeasurable f μ)
- (h_meas_g : AeMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
+theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AEMeasurable f μ)
+ (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
(∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
by
have fg_ae : f * g =ᵐ[μ] h_meas_f.mk _ * h_meas_g.mk _ := h_meas_f.ae_eq_mk.mul h_meas_g.ae_eq_mk
@@ -138,14 +138,14 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' (h_meas_f : AeMea
exact h_indep_fun.ae_eq h_meas_f.ae_eq_mk h_meas_g.ae_eq_mk
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'
-theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' (h_meas_f : AeMeasurable f μ)
- (h_meas_g : AeMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
+theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' (h_meas_f : AEMeasurable f μ)
+ (h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFunCat f g μ) :
(∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun''
/-- The product of two independent, integrable, real_valued random variables is integrable. -/
-theorem IndepFunCat.integrableMul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+theorem IndepFunCat.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : Integrable (X * Y) μ :=
by
@@ -155,18 +155,18 @@ theorem IndepFunCat.integrableMul {β : Type _} [MeasurableSpace β] {X Y : Ω
hXY.comp measurable_nnnorm measurable_nnnorm
have hXY'' : indep_fun nX nY μ :=
hXY'.comp measurable_coe_nNReal_eNNReal measurable_coe_nNReal_eNNReal
- have hnX : AeMeasurable nX μ := hX.1.AeMeasurable.nnnorm.coe_nNReal_eNNReal
- have hnY : AeMeasurable nY μ := hY.1.AeMeasurable.nnnorm.coe_nNReal_eNNReal
+ have hnX : AEMeasurable nX μ := hX.1.AEMeasurable.nnnorm.coe_nNReal_eNNReal
+ have hnY : AEMeasurable nY μ := hY.1.AEMeasurable.nnnorm.coe_nNReal_eNNReal
have hmul : (∫⁻ a, nX a * nY a ∂μ) = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ := by
convert lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' hnX hnY hXY''
refine' ⟨hX.1.mul hY.1, _⟩
simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
exact ennreal.mul_lt_top_iff.mpr (Or.inl ⟨hX.2, hY.2⟩)
-#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFunCat.integrableMul
+#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFunCat.integrable_mul
/-- If the product of two independent real_valued random variables is integrable and
the second one is not almost everywhere zero, then the first one is integrable. -/
-theorem IndepFunCat.integrableLeftOfIntegrableMul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+theorem IndepFunCat.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (h'XY : Integrable (X * Y) μ)
(hX : AeStronglyMeasurable X μ) (hY : AeStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
Integrable X μ := by
@@ -186,14 +186,15 @@ theorem IndepFunCat.integrableLeftOfIntegrableMul {β : Type _} [MeasurableSpace
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
-#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFunCat.integrableLeftOfIntegrableMul
+#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_left_of_integrable_mul
/-- If the product of two independent real_valued random variables is integrable and the
first one is not almost everywhere zero, then the second one is integrable. -/
-theorem IndepFunCat.integrableRightOfIntegrableMul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
- [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (h'XY : Integrable (X * Y) μ)
- (hX : AeStronglyMeasurable X μ) (hY : AeStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
- Integrable Y μ := by
+theorem IndepFunCat.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β]
+ {X Y : Ω → β} [NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ)
+ (h'XY : Integrable (X * Y) μ) (hX : AeStronglyMeasurable X μ) (hY : AeStronglyMeasurable Y μ)
+ (h'X : ¬X =ᵐ[μ] 0) : Integrable Y μ :=
+ by
refine' ⟨hY, _⟩
have I : (∫⁻ ω, ‖X ω‖₊ ∂μ) ≠ 0 := by
intro H
@@ -210,20 +211,20 @@ theorem IndepFunCat.integrableRightOfIntegrableMul {β : Type _} [MeasurableSpac
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
simpa [ENNReal.top_mul', I] using A
-#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFunCat.integrableRightOfIntegrableMul
+#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFunCat.integrable_right_of_integrable_mul
/-- The (Bochner) integral of the product of two independent, nonnegative random
variables is the product of their integrals. The proof is just plumbing around
`lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'`. -/
theorem IndepFunCat.integral_mul_of_nonneg (hXY : IndepFunCat X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
- (hXm : AeMeasurable X μ) (hYm : AeMeasurable Y μ) :
+ (hXm : AEMeasurable X μ) (hYm : AEMeasurable Y μ) :
integral μ (X * Y) = integral μ X * integral μ Y :=
by
- have h1 : AeMeasurable (fun a => ENNReal.ofReal (X a)) μ :=
+ have h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ :=
ennreal.measurable_of_real.comp_ae_measurable hXm
- have h2 : AeMeasurable (fun a => ENNReal.ofReal (Y a)) μ :=
+ have h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ :=
ennreal.measurable_of_real.comp_ae_measurable hYm
- have h3 : AeMeasurable (X * Y) μ := hXm.mul hYm
+ have h3 : AEMeasurable (X * Y) μ := hXm.mul hYm
have h4 : 0 ≤ᵐ[μ] X * Y := ae_of_all _ fun ω => mul_nonneg (hXp ω) (hYp ω)
rw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hXp) hXm.ae_strongly_measurable,
integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hYp) hYm.ae_strongly_measurable,
@@ -256,10 +257,10 @@ theorem IndepFunCat.integral_mul_of_integrable (hXY : IndepFunCat X Y μ) (hX :
have hp2 : 0 ≤ Xp := fun ω => le_max_right _ _
have hp3 : 0 ≤ Ym := fun ω => le_max_right _ _
have hp4 : 0 ≤ Yp := fun ω => le_max_right _ _
- have hm1 : AeMeasurable Xm μ := hX.1.AeMeasurable.neg.max aeMeasurableConst
- have hm2 : AeMeasurable Xp μ := hX.1.AeMeasurable.max aeMeasurableConst
- have hm3 : AeMeasurable Ym μ := hY.1.AeMeasurable.neg.max aeMeasurableConst
- have hm4 : AeMeasurable Yp μ := hY.1.AeMeasurable.max aeMeasurableConst
+ have hm1 : AEMeasurable Xm μ := hX.1.AEMeasurable.neg.max aemeasurable_const
+ have hm2 : AEMeasurable Xp μ := hX.1.AEMeasurable.max aemeasurable_const
+ have hm3 : AEMeasurable Ym μ := hY.1.AEMeasurable.neg.max aemeasurable_const
+ have hm4 : AEMeasurable Yp μ := hY.1.AEMeasurable.max aemeasurable_const
have hv1 : integrable Xm μ := hX.neg_part
have hv2 : integrable Xp μ := hX.pos_part
have hv3 : integrable Ym μ := hY.neg_part
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -292,13 +292,13 @@ theorem IndepFunCat.integral_mul (hXY : IndepFunCat X Y μ) (hX : AeStronglyMeas
filter_upwards [h'X]with ω hω
simp [hω]
simp only [integral_congr_ae h'X, integral_congr_ae h', Pi.zero_apply, integral_const,
- Algebra.id.smul_eq_mul, mul_zero, zero_mul]
+ Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
by_cases h'Y : Y =ᵐ[μ] 0
· have h' : X * Y =ᵐ[μ] 0 := by
filter_upwards [h'Y]with ω hω
simp [hω]
simp only [integral_congr_ae h'Y, integral_congr_ae h', Pi.zero_apply, integral_const,
- Algebra.id.smul_eq_mul, mul_zero, zero_mul]
+ Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
by_cases h : integrable (X * Y) μ
· have HX : integrable X μ := hXY.integrable_left_of_integrable_mul h hX hY h'Y
have HY : integrable Y μ := hXY.integrable_right_of_integrable_mul h hX hY h'X
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 17ef379e997badd73e5eabb4d38f11919ab3c4b3
+! leanprover-community/mathlib commit 57ac39bd365c2f80589a700f9fbb664d3a1a30c2
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -76,7 +76,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
rw [lintegral_supr h_measM_f h_mono_f, lintegral_supr, ENNReal.supᵢ_mul]
· simp_rw [← h_ind_f]
· exact fun n => h_mul_indicator _ (h_measM_f n)
- · exact fun m n h_le a => ENNReal.mul_le_mul (h_mono_f h_le a) le_rfl
+ · exact fun m n h_le a => mul_le_mul_right' (h_mono_f h_le a) _
#align probability_theory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator ProbabilityTheory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
@@ -109,7 +109,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
rw [lintegral_supr, lintegral_supr h_measM_f' h_mono_f', ENNReal.mul_supᵢ]
· simp_rw [← h_ind_f']
· exact fun n => h_measM_f.mul (h_measM_f' n)
- · exact fun n m (h_le : n ≤ m) a => ENNReal.mul_le_mul le_rfl (h_mono_f' h_le a)
+ · exact fun n m (h_le : n ≤ m) a => mul_le_mul_left' (h_mono_f' h_le a) _
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -36,7 +36,7 @@ noncomputable section
open Set MeasureTheory
-open Ennreal MeasureTheory
+open ENNReal MeasureTheory
variable {Ω : Type _} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f g : Ω → ℝ≥0∞} {X Y : Ω → ℝ}
@@ -54,7 +54,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
revert f
have h_mul_indicator : ∀ g, Measurable g → Measurable fun a => g a * T.indicator (fun x => c) a :=
fun g h_mg => h_mg.mul (measurable_const.indicator h_meas_T)
- apply Measurable.ennreal_induction
+ apply Measurable.eNNReal_induction
· intro c' s' h_meas_s'
simp_rw [← inter_indicator_mul]
rw [lintegral_indicator _ (MeasurableSet.inter (hMf _ h_meas_s') h_meas_T),
@@ -72,11 +72,11 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
right_distrib, h_ind_f', h_ind_g]
· intro f h_meas_f h_mono_f h_ind_f
have h_measM_f : ∀ n, Measurable (f n) := fun n => (h_meas_f n).mono hMf le_rfl
- simp_rw [Ennreal.supᵢ_mul]
- rw [lintegral_supr h_measM_f h_mono_f, lintegral_supr, Ennreal.supᵢ_mul]
+ simp_rw [ENNReal.supᵢ_mul]
+ rw [lintegral_supr h_measM_f h_mono_f, lintegral_supr, ENNReal.supᵢ_mul]
· simp_rw [← h_ind_f]
· exact fun n => h_mul_indicator _ (h_measM_f n)
- · exact fun m n h_le a => Ennreal.mul_le_mul (h_mono_f h_le a) le_rfl
+ · exact fun m n h_le a => ENNReal.mul_le_mul (h_mono_f h_le a) le_rfl
#align probability_theory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator ProbabilityTheory.lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
@@ -92,7 +92,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
by
revert g
have h_measM_f : Measurable f := h_meas_f.mono hMf le_rfl
- apply Measurable.ennreal_induction
+ apply Measurable.eNNReal_induction
· intro c s h_s
apply lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator hMf _ (hMg _ h_s) _ h_meas_f
apply indep_sets_of_indep_sets_of_le_right h_ind
@@ -105,11 +105,11 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
h_ind_f', h_ind_g']
· intro f' h_meas_f' h_mono_f' h_ind_f'
have h_measM_f' : ∀ n, Measurable (f' n) := fun n => (h_meas_f' n).mono hMg le_rfl
- simp_rw [Ennreal.mul_supᵢ]
- rw [lintegral_supr, lintegral_supr h_measM_f' h_mono_f', Ennreal.mul_supᵢ]
+ simp_rw [ENNReal.mul_supᵢ]
+ rw [lintegral_supr, lintegral_supr h_measM_f' h_mono_f', ENNReal.mul_supᵢ]
· simp_rw [← h_ind_f']
· exact fun n => h_measM_f.mul (h_measM_f' n)
- · exact fun n m (h_le : n ≤ m) a => Ennreal.mul_le_mul le_rfl (h_mono_f' h_le a)
+ · exact fun n m (h_le : n ≤ m) a => ENNReal.mul_le_mul le_rfl (h_mono_f' h_le a)
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
@@ -149,18 +149,18 @@ theorem IndepFunCat.integrableMul {β : Type _} [MeasurableSpace β] {X Y : Ω
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFunCat X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : Integrable (X * Y) μ :=
by
- let nX : Ω → Ennreal := fun a => ‖X a‖₊
- let nY : Ω → Ennreal := fun a => ‖Y a‖₊
+ let nX : Ω → ENNReal := fun a => ‖X a‖₊
+ let nY : Ω → ENNReal := fun a => ‖Y a‖₊
have hXY' : indep_fun (fun a => ‖X a‖₊) (fun a => ‖Y a‖₊) μ :=
hXY.comp measurable_nnnorm measurable_nnnorm
have hXY'' : indep_fun nX nY μ :=
- hXY'.comp measurable_coe_nNReal_ennreal measurable_coe_nNReal_ennreal
- have hnX : AeMeasurable nX μ := hX.1.AeMeasurable.nnnorm.coe_nNReal_ennreal
- have hnY : AeMeasurable nY μ := hY.1.AeMeasurable.nnnorm.coe_nNReal_ennreal
+ hXY'.comp measurable_coe_nNReal_eNNReal measurable_coe_nNReal_eNNReal
+ have hnX : AeMeasurable nX μ := hX.1.AeMeasurable.nnnorm.coe_nNReal_eNNReal
+ have hnY : AeMeasurable nY μ := hY.1.AeMeasurable.nnnorm.coe_nNReal_eNNReal
have hmul : (∫⁻ a, nX a * nY a ∂μ) = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ := by
convert lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' hnX hnY hXY''
refine' ⟨hX.1.mul hY.1, _⟩
- simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, Ennreal.coe_mul, hmul]
+ simp_rw [has_finite_integral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
exact ennreal.mul_lt_top_iff.mpr (Or.inl ⟨hX.2, hY.2⟩)
#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFunCat.integrableMul
@@ -183,9 +183,9 @@ theorem IndepFunCat.integrableLeftOfIntegrableMul {β : Type _} [MeasurableSpace
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, Ennreal.coe_mul] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
- simpa [Ennreal.top_mul, I] using A
+ simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFunCat.integrableLeftOfIntegrableMul
/-- If the product of two independent real_valued random variables is integrable and the
@@ -207,9 +207,9 @@ theorem IndepFunCat.integrableRightOfIntegrableMul {β : Type _} [MeasurableSpac
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply indep_fun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, Ennreal.coe_mul] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' hX.ennnorm hY.ennnorm J, H] at A
- simpa [Ennreal.top_mul, I] using A
+ simpa [ENNReal.top_mul', I] using A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFunCat.integrableRightOfIntegrableMul
/-- The (Bochner) integral of the product of two independent, nonnegative random
@@ -219,19 +219,19 @@ theorem IndepFunCat.integral_mul_of_nonneg (hXY : IndepFunCat X Y μ) (hXp : 0
(hXm : AeMeasurable X μ) (hYm : AeMeasurable Y μ) :
integral μ (X * Y) = integral μ X * integral μ Y :=
by
- have h1 : AeMeasurable (fun a => Ennreal.ofReal (X a)) μ :=
+ have h1 : AeMeasurable (fun a => ENNReal.ofReal (X a)) μ :=
ennreal.measurable_of_real.comp_ae_measurable hXm
- have h2 : AeMeasurable (fun a => Ennreal.ofReal (Y a)) μ :=
+ have h2 : AeMeasurable (fun a => ENNReal.ofReal (Y a)) μ :=
ennreal.measurable_of_real.comp_ae_measurable hYm
have h3 : AeMeasurable (X * Y) μ := hXm.mul hYm
have h4 : 0 ≤ᵐ[μ] X * Y := ae_of_all _ fun ω => mul_nonneg (hXp ω) (hYp ω)
rw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hXp) hXm.ae_strongly_measurable,
integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hYp) hYm.ae_strongly_measurable,
integral_eq_lintegral_of_nonneg_ae h4 h3.ae_strongly_measurable]
- simp_rw [← Ennreal.toReal_mul, Pi.mul_apply, Ennreal.ofReal_mul (hXp _)]
+ simp_rw [← ENNReal.toReal_mul, Pi.mul_apply, ENNReal.ofReal_mul (hXp _)]
congr
apply lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun' h1 h2
- exact hXY.comp Ennreal.measurable_ofReal Ennreal.measurable_ofReal
+ exact hXY.comp ENNReal.measurable_ofReal ENNReal.measurable_ofReal
#align probability_theory.indep_fun.integral_mul_of_nonneg ProbabilityTheory.IndepFunCat.integral_mul_of_nonneg
/-- The (Bochner) integral of the product of two independent, integrable random
@@ -337,10 +337,10 @@ theorem indepFunCat_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _}
h (measurable_one.indicator hA) (measurable_one.indicator hB)
((integrable_const 1).indicator (hfm.comp measurable_id hA))
((integrable_const 1).indicator (hgm.comp measurable_id hB))
- rwa [← Ennreal.toReal_eq_toReal (measure_ne_top μ _), Ennreal.toReal_mul, ←
+ rwa [← ENNReal.toReal_eq_toReal (measure_ne_top μ _), ENNReal.toReal_mul, ←
integral_indicator_one ((hfm hA).inter (hgm hB)), ← integral_indicator_one (hfm hA), ←
integral_indicator_one (hgm hB), Set.inter_indicator_one]
- exact Ennreal.mul_ne_top (measure_ne_top μ _) (measure_ne_top μ _)
+ exact ENNReal.mul_ne_top (measure_ne_top μ _) (measure_ne_top μ _)
#align probability_theory.indep_fun_iff_integral_comp_mul ProbabilityTheory.indepFunCat_iff_integral_comp_mul
end ProbabilityTheory
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -172,7 +172,7 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type*} [MeasurableSpace
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
- simp only [ENNReal.top_mul I] at A
+ simp only [ENNReal.top_mul I, lt_self_iff_false] at A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul
/-- If the product of two independent real-valued random variables is integrable and the
@@ -194,7 +194,7 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type*} [MeasurableSpac
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
simp only [nnnorm_mul, ENNReal.coe_mul] at A
rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
- simp only [ENNReal.mul_top I] at A
+ simp only [ENNReal.mul_top I, lt_self_iff_false] at A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul
/-- The (Bochner) integral of the product of two independent, nonnegative random
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -274,13 +274,13 @@ theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable
filter_upwards [h'X] with ω hω
simp [hω]
simp only [integral_congr_ae h'X, integral_congr_ae h', Pi.zero_apply, integral_const,
- Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
+ Algebra.id.smul_eq_mul, mul_zero, zero_mul]
by_cases h'Y : Y =ᵐ[μ] 0
· have h' : X * Y =ᵐ[μ] 0 := by
filter_upwards [h'Y] with ω hω
simp [hω]
simp only [integral_congr_ae h'Y, integral_congr_ae h', Pi.zero_apply, integral_const,
- Algebra.id.smul_eq_mul, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
+ Algebra.id.smul_eq_mul, mul_zero, zero_mul]
by_cases h : Integrable (X * Y) μ
· have HX : Integrable X μ := hXY.integrable_left_of_integrable_mul h hX hY h'Y
have HY : Integrable Y μ := hXY.integrable_right_of_integrable_mul h hX hY h'X
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -35,7 +35,7 @@ open Set MeasureTheory
open scoped ENNReal MeasureTheory
-variable {Ω : Type _} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f g : Ω → ℝ≥0∞} {X Y : Ω → ℝ}
+variable {Ω : Type*} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f g : Ω → ℝ≥0∞} {X Y : Ω → ℝ}
namespace ProbabilityTheory
@@ -135,7 +135,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMea
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
/-- The product of two independent, integrable, real-valued random variables is integrable. -/
-theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+theorem IndepFun.integrable_mul {β : Type*} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : Integrable (X * Y) μ := by
let nX : Ω → ENNReal := fun a => ‖X a‖₊
@@ -155,7 +155,7 @@ theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω →
/-- If the product of two independent real-valued random variables is integrable and
the second one is not almost everywhere zero, then the first one is integrable. -/
-theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+theorem IndepFun.integrable_left_of_integrable_mul {β : Type*} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
(hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'Y : ¬Y =ᵐ[μ] 0) :
Integrable X μ := by
@@ -177,7 +177,7 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
/-- If the product of two independent real-valued random variables is integrable and the
first one is not almost everywhere zero, then the second one is integrable. -/
-theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
+theorem IndepFun.integrable_right_of_integrable_mul {β : Type*} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
(hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
Integrable Y μ := by
@@ -302,7 +302,7 @@ theorem IndepFun.integral_mul' (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurabl
/-- Independence of functions `f` and `g` into arbitrary types is characterized by the relation
`E[(φ ∘ f) * (ψ ∘ g)] = E[φ ∘ f] * E[ψ ∘ g]` for all measurable `φ` and `ψ` with values in `ℝ`
satisfying appropriate integrability conditions. -/
-theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _} {mβ : MeasurableSpace β}
+theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type*} {mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'} {f : Ω → β} {g : Ω → β'} {hfm : Measurable f} {hgm : Measurable g} :
IndepFun f g μ ↔ ∀ {φ : β → ℝ} {ψ : β' → ℝ}, Measurable φ → Measurable ψ →
Integrable (φ ∘ f) μ → Integrable (ψ ∘ g) μ →
Independence is the special case of independence with respect to a kernel and a measure where the kernel is constant.
@@ -57,6 +57,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
lintegral_indicator _ (hMf _ h_meas_s'), lintegral_indicator _ h_meas_T]
simp only [measurable_const, lintegral_const, univ_inter, lintegral_const_mul,
MeasurableSet.univ, Measure.restrict_apply]
+ rw [IndepSets_iff] at h_ind
rw [mul_mul_mul_comm, h_ind s' T h_meas_s' (Set.mem_singleton _)]
· intro f' g _ h_meas_f' _ h_ind_f' h_ind_g
have h_measM_f' : Measurable f' := h_meas_f'.mono hMf le_rfl
@@ -307,6 +308,7 @@ theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _} {m
Integrable (φ ∘ f) μ → Integrable (ψ ∘ g) μ →
integral μ (φ ∘ f * ψ ∘ g) = integral μ (φ ∘ f) * integral μ (ψ ∘ g) := by
refine' ⟨fun hfg _ _ hφ hψ => IndepFun.integral_mul_of_integrable (hfg.comp hφ hψ), _⟩
+ rw [IndepFun_iff]
rintro h _ _ ⟨A, hA, rfl⟩ ⟨B, hB, rfl⟩
specialize
h (measurable_one.indicator hA) (measurable_one.indicator hB)
@@ -2,15 +2,12 @@
Copyright (c) 2021 Martin Zinkevich. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Martin Zinkevich, Vincent Beffara
-
-! This file was ported from Lean 3 source module probability.integration
-! leanprover-community/mathlib commit 2f8347015b12b0864dfaf366ec4909eb70c78740
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.Probability.Independence.Basic
+#align_import probability.integration from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740"
+
/-!
# Integration in Probability Theory
@@ -84,7 +84,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
{Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
(h_ind : Indep Mf Mg μ) (h_meas_f : Measurable[Mf] f) (h_meas_g : Measurable[Mg] g) :
- (∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ := by
+ ∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ := by
revert g
have h_measM_f : Measurable f := h_meas_f.mono hMf le_rfl
apply @Measurable.ennreal_induction _ Mg
@@ -132,7 +132,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeas
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
- (∫⁻ ω, f ω * g ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
+ ∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
@@ -148,7 +148,7 @@ theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω →
hXY'.comp measurable_coe_nnreal_ennreal measurable_coe_nnreal_ennreal
have hnX : AEMeasurable nX μ := hX.1.aemeasurable.nnnorm.coe_nnreal_ennreal
have hnY : AEMeasurable nY μ := hY.1.aemeasurable.nnnorm.coe_nnreal_ennreal
- have hmul : (∫⁻ a, nX a * nY a ∂μ) = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ :=
+ have hmul : ∫⁻ a, nX a * nY a ∂μ = (∫⁻ a, nX a ∂μ) * ∫⁻ a, nY a ∂μ :=
lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' hnX hnY hXY''
refine' ⟨hX.1.mul hY.1, _⟩
simp_rw [HasFiniteIntegral, Pi.mul_apply, nnnorm_mul, ENNReal.coe_mul, hmul]
@@ -25,8 +25,8 @@ will always pick the later typeclass in this situation, and does not care whethe
`[]`, `{}`, or `()`. All of these use the `MeasurableSpace` `M2` to define `μ`:
```lean
-example {M1 : MeasurableSpace Ω} [M2 : MeasurableSpace Ω] {μ : measure Ω} : sorry := sorry
-example [M1 : MeasurableSpace Ω] {M2 : MeasurableSpace Ω} {μ : measure Ω} : sorry := sorry
+example {M1 : MeasurableSpace Ω} [M2 : MeasurableSpace Ω] {μ : Measure Ω} : sorry := sorry
+example [M1 : MeasurableSpace Ω] {M2 : MeasurableSpace Ω} {μ : Measure Ω} : sorry := sorry
```
-/
@@ -44,7 +44,7 @@ namespace ProbabilityTheory
/-- If a random variable `f` in `ℝ≥0∞` is independent of an event `T`, then if you restrict the
random variable to `T`, then `E[f * indicator T c 0]=E[f] * E[indicator T c 0]`. It is useful for
- `lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurable_space`. -/
+ `lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace`. -/
theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : MeasurableSpace Ω}
{μ : Measure Ω} (hMf : Mf ≤ mΩ) (c : ℝ≥0∞) {T : Set Ω} (h_meas_T : MeasurableSet T)
(h_ind : IndepSets {s | MeasurableSet[Mf] s} {T} μ) (h_meas_f : Measurable[Mf] f) :
@@ -79,7 +79,7 @@ theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : M
then `E[f * g] = E[f] * E[g]`. However, instead of directly using the independence
of the random variables, it uses the independence of measurable spaces for the
domains of `f` and `g`. This is similar to the sigma-algebra approach to
- independence. See `lintegral_mul_eq_lintegral_mul_lintegral_of_independent_fn` for
+ independence. See `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun` for
a more common variant of the product of independent variables. -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
{Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
@@ -118,7 +118,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun (h_meas_f : Measura
/-- If `f` and `g` with values in `ℝ≥0∞` are independent and almost everywhere measurable,
then `E[f * g] = E[f] * E[g]` (slightly generalizing
- `lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun`). -/
+ `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun`). -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' (h_meas_f : AEMeasurable f μ)
(h_meas_g : AEMeasurable g μ) (h_indep_fun : IndepFun f g μ) :
(∫⁻ ω, (f * g) ω ∂μ) = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ := by
@@ -136,7 +136,7 @@ theorem lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' (h_meas_f : AEMea
lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h_meas_f h_meas_g h_indep_fun
#align probability_theory.lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'' ProbabilityTheory.lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun''
-/-- The product of two independent, integrable, real_valued random variables is integrable. -/
+/-- The product of two independent, integrable, real-valued random variables is integrable. -/
theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : Integrable (X * Y) μ := by
@@ -155,7 +155,7 @@ theorem IndepFun.integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω →
exact ENNReal.mul_lt_top hX.2.ne hY.2.ne
#align probability_theory.indep_fun.integrable_mul ProbabilityTheory.IndepFun.integrable_mul
-/-- If the product of two independent real_valued random variables is integrable and
+/-- If the product of two independent real-valued random variables is integrable and
the second one is not almost everywhere zero, then the first one is integrable. -/
theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
@@ -172,12 +172,12 @@ theorem IndepFun.integrable_left_of_integrable_mul {β : Type _} [MeasurableSpac
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply IndepFun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
simp only [ENNReal.top_mul I] at A
#align probability_theory.indep_fun.integrable_left_of_integrable_mul ProbabilityTheory.IndepFun.integrable_left_of_integrable_mul
-/-- If the product of two independent real_valued random variables is integrable and the
+/-- If the product of two independent real-valued random variables is integrable and the
first one is not almost everywhere zero, then the second one is integrable. -/
theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpace β] {X Y : Ω → β}
[NormedDivisionRing β] [BorelSpace β] (hXY : IndepFun X Y μ) (h'XY : Integrable (X * Y) μ)
@@ -194,14 +194,14 @@ theorem IndepFun.integrable_right_of_integrable_mul {β : Type _} [MeasurableSpa
have M : Measurable fun x : β => (‖x‖₊ : ℝ≥0∞) := measurable_nnnorm.coe_nnreal_ennreal
apply IndepFun.comp hXY M M
have A : (∫⁻ ω, ‖X ω * Y ω‖₊ ∂μ) < ∞ := h'XY.2
- simp only [nnnorm_mul, ENNReal.coe_mul] at A
- rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
+ simp only [nnnorm_mul, ENNReal.coe_mul] at A
+ rw [lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'' hX.ennnorm hY.ennnorm J, H] at A
simp only [ENNReal.mul_top I] at A
#align probability_theory.indep_fun.integrable_right_of_integrable_mul ProbabilityTheory.IndepFun.integrable_right_of_integrable_mul
/-- The (Bochner) integral of the product of two independent, nonnegative random
variables is the product of their integrals. The proof is just plumbing around
- `lintegral_mul_eq_lintegral_mul_lintegral_of_indep_fun'`. -/
+ `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'`. -/
theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
(hXm : AEMeasurable X μ) (hYm : AEMeasurable Y μ) :
integral μ (X * Y) = integral μ X * integral μ Y := by
@@ -222,7 +222,7 @@ theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X)
/-- The (Bochner) integral of the product of two independent, integrable random
variables is the product of their integrals. The proof is pedestrian decomposition
- into their positive and negative parts in order to apply `indep_fun.integral_mul_of_nonneg`
+ into their positive and negative parts in order to apply `IndepFun.integral_mul_of_nonneg`
four times. -/
theorem IndepFun.integral_mul_of_integrable (hXY : IndepFun X Y μ) (hX : Integrable X μ)
(hY : Integrable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y := by
@@ -291,7 +291,7 @@ theorem IndepFun.integral_mul (hXY : IndepFun X Y μ) (hX : AEStronglyMeasurable
have I : ¬(Integrable X μ ∧ Integrable Y μ) := by
rintro ⟨HX, HY⟩
exact h (hXY.integrable_mul HX HY)
- rw [not_and_or] at I
+ rw [not_and_or] at I
cases' I with I I <;> simp [integral_undef I]
#align probability_theory.indep_fun.integral_mul ProbabilityTheory.IndepFun.integral_mul
@@ -322,4 +322,3 @@ theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type _} {m
#align probability_theory.indep_fun_iff_integral_comp_mul ProbabilityTheory.indepFun_iff_integral_comp_mul
end ProbabilityTheory
-
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file