Theorem: ProbabilityTheory.IndepFun.integral_mul_of_nonneg
File: Mathlib/Probability/Integration.lean

Proof steps:
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
tactic: have h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ :=
    ENNReal.measurable_ofReal.comp_aemeasurable hXm
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
tactic: have h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ :=
    ENNReal.measurable_ofReal.comp_aemeasurable hYm
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
tactic: have h3 : AEMeasurable (X * Y) μ := hXm.mul hYm
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ integral μ (X * Y) = integral μ X * integral μ Y
tactic: have h4 : 0 ≤ᵐ[μ] X * Y := ae_of_all _ fun ω => mul_nonneg (hXp ω) (hYp ω)
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ integral μ (X * Y) = integral μ X * integral μ Y
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ (∫⁻ (a : Ω), ENNReal.ofReal ((X * Y) a) ∂μ).toReal =
    (∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ).toReal * (∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ).toReal
tactic: rw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hXp) hXm.aestronglyMeasurable,
    integral_eq_lintegral_of_nonneg_ae (ae_of_all _ hYp) hYm.aestronglyMeasurable,
    integral_eq_lintegral_of_nonneg_ae h4 h3.aestronglyMeasurable]
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ (∫⁻ (a : Ω), ENNReal.ofReal ((X * Y) a) ∂μ).toReal =
    (∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ).toReal * (∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ).toReal
state_after: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ (∫⁻ (a : Ω), ENNReal.ofReal (X a) * ENNReal.ofReal (Y a) ∂μ).toReal =
    ((∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ) * ∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ).toReal
tactic: simp_rw [← ENNReal.toReal_mul, Pi.mul_apply, ENNReal.ofReal_mul (hXp _)]
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ (∫⁻ (a : Ω), ENNReal.ofReal (X a) * ENNReal.ofReal (Y a) ∂μ).toReal =
    ((∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ) * ∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ).toReal
state_after: case e_a
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ ∫⁻ (a : Ω), ENNReal.ofReal (X a) * ENNReal.ofReal (Y a) ∂μ =
    (∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ) * ∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ
tactic: congr
state_before: case e_a
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ ∫⁻ (a : Ω), ENNReal.ofReal (X a) * ENNReal.ofReal (Y a) ∂μ =
    (∫⁻ (a : Ω), ENNReal.ofReal (X a) ∂μ) * ∫⁻ (a : Ω), ENNReal.ofReal (Y a) ∂μ
state_after: case e_a
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ IndepFun (fun a => ENNReal.ofReal (X a)) (fun a => ENNReal.ofReal (Y a)) μ
tactic: apply lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun' h1 h2
state_before: case e_a
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y μ
hXp : 0 ≤ X
hYp : 0 ≤ Y
hXm : AEMeasurable X μ
hYm : AEMeasurable Y μ
h1 : AEMeasurable (fun a => ENNReal.ofReal (X a)) μ
h2 : AEMeasurable (fun a => ENNReal.ofReal (Y a)) μ
h3 : AEMeasurable (X * Y) μ
h4 : 0 ≤ᶠ[ae μ] X * Y
⊢ IndepFun (fun a => ENNReal.ofReal (X a)) (fun a => ENNReal.ofReal (Y a)) μ
state_after: no goals
tactic: exact hXY.comp ENNReal.measurable_ofReal ENNReal.measurable_ofReal