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

tactic: by_cases h'X : X =ᵐ[μ] 0
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: by_cases h'Y : Y =ᵐ[μ] 0
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: by_cases h : Integrable (X * Y) μ
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: have h' : X * Y =ᵐ[μ] 0 := by
  filter_upwards [h'X] with ω hω
  simp [hω]
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : X =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: 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]
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : X =ᵐ[μ] 0
h' : X * Y =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: filter_upwards [h'X] with ω hω
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : X =ᵐ[μ] 0
⊢ X * Y =ᵐ[μ] 0

tactic: simp [hω]
state_before: case h
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : X =ᵐ[μ] 0
ω : Ω
hω : X ω = OfNat.ofNat 0 ω
⊢ (X * Y) ω = OfNat.ofNat 0 ω

tactic: have h' : X * Y =ᵐ[μ] 0 := by
  filter_upwards [h'Y] with ω hω
  simp [hω]
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : Y =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: 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]
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : Y =ᵐ[μ] 0
h' : X * Y =ᵐ[μ] 0
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: filter_upwards [h'Y] with ω hω
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : Y =ᵐ[μ] 0
⊢ X * Y =ᵐ[μ] 0

tactic: simp [hω]
state_before: case h
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : Y =ᵐ[μ] 0
ω : Ω
hω : Y ω = OfNat.ofNat 0 ω
⊢ (X * Y) ω = OfNat.ofNat 0 ω

tactic: have HX : Integrable X μ := hXY.integrable_left_of_integrable_mul h hX hY h'Y
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : Integrable (X * Y)
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: have HY : Integrable Y μ := hXY.integrable_right_of_integrable_mul h hX hY h'X
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : Integrable (X * Y)
HX : Integrable X
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: exact hXY.integral_mul_of_integrable HX HY
state_before: case pos
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : Integrable (X * Y)
HX : Integrable X
HY : Integrable Y
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: rw [integral_undef h]
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
⊢ integral μ (X * Y) = integral μ X * integral μ Y

tactic: have I : ¬(Integrable X μ ∧ Integrable Y μ) := by
  rintro ⟨HX, HY⟩
  exact h (hXY.integrable_mul HX HY)
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
⊢ 0 = integral μ X * integral μ Y

tactic: rw [not_and_or] at I
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
I : ¬(Integrable X ∧ Integrable Y)
⊢ 0 = integral μ X * integral μ Y

tactic: cases' I with I I <;> simp [integral_undef I]
state_before: case neg
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
I : ¬Integrable X ∨ ¬Integrable Y
⊢ 0 = integral μ X * integral μ Y

tactic: rintro ⟨HX, HY⟩
state_before: Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
⊢ ¬(Integrable X ∧ Integrable Y)

tactic: exact h (hXY.integrable_mul HX HY)
state_before: case intro
Ω : Type u_1
mΩ : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
f g : Ω → ℝ≥0∞
X Y : Ω → ℝ
hXY : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
h'X : ¬X =ᵐ[μ] 0
h'Y : ¬Y =ᵐ[μ] 0
h : ¬Integrable (X * Y)
HX : Integrable X
HY : Integrable Y
⊢ False