Theorem: MeasureTheory.condexp_stronglyMeasurable_mul
File: Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean

Proof steps:
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : ¬m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: by_cases hm : m ≤ m0
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : ¬m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : ¬m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: swap
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : ¬SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: by_cases hμm : SigmaFinite (μ.trim hm)
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : ¬SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : ¬SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]

case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: swap
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: haveI : SigmaFinite (μ.trim hm) := hμm
state_before: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
sets_prop : ∀ (n : ℕ), MeasurableSet (sets n) ∧ μ (sets n) < ⊤ ∧ ∀ x ∈ sets n, ‖f x‖ ≤ ↑n
h_univ : ⋃ i, sets i = Set.univ
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: obtain ⟨sets, sets_prop, h_univ⟩ := hf.exists_spanning_measurableSet_norm_le hm μ
state_before: case pos.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
sets_prop : ∀ (n : ℕ), MeasurableSet (sets n) ∧ μ (sets n) < ⊤ ∧ ∀ x ∈ sets n, ‖f x‖ ≤ ↑n
h_univ : ⋃ i, sets i = Set.univ
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
sets_prop : (∀ (x : ℕ), MeasurableSet (sets x)) ∧ (∀ (x : ℕ), μ (sets x) < ⊤) ∧ ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: simp_rw [forall_and] at sets_prop
state_before: case pos.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
sets_prop : (∀ (x : ℕ), MeasurableSet (sets x)) ∧ (∀ (x : ℕ), μ (sets x) < ⊤) ∧ ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
tactic: obtain ⟨h_meas, h_finite, h_norm⟩ := sets_prop
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ μ[f * g|m] =ᶠ[ae μ] f * μ[g|m]
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x
tactic: suffices ∀ n, ∀ᵐ x ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x by
    rw [← ae_all_iff] at this
    filter_upwards [this] with x hx
    obtain ⟨i, hi⟩ : ∃ i, x ∈ sets i := by
      have h_mem : x ∈ ⋃ i, sets i := by rw [h_univ]; exact Set.mem_univ _
      simpa using h_mem
    exact hx i hi
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
⊢ ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, x ∈ sets n → (μ[f * g|m]) x = f x * (μ[g|m]) x
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
⊢ ∀ᵐ (x : α) ∂μ.restrict (sets n), (μ[f * g|m]) x = f x * (μ[g|m]) x
tactic: refine fun n => ae_imp_of_ae_restrict ?_
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
⊢ ∀ᵐ (x : α) ∂μ.restrict (sets n), (μ[f * g|m]) x = f x * (μ[g|m]) x
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
⊢ μ.restrict (sets n)[f * g|m] =ᶠ[ae (μ.restrict (sets n))] f * μ.restrict (sets n)[g|m]
tactic: suffices (μ.restrict (sets n))[f * g|m] =ᵐ[μ.restrict (sets n)] f * (μ.restrict (sets n))[g|m] by
    refine (condexp_restrict_ae_eq_restrict hm (h_meas n) hfg).symm.trans ?_
    exact this.trans (EventuallyEq.rfl.mul (condexp_restrict_ae_eq_restrict hm (h_meas n) hg))
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
⊢ μ.restrict (sets n)[(sets n).indicator f * g|m] =ᶠ[ae (μ.restrict (sets n))]
    (sets n).indicator f * μ.restrict (sets n)[g|m]
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
⊢ μ.restrict (sets n)[(sets n).indicator f * g|m] =ᶠ[ae (μ.restrict (sets n))]
    (sets n).indicator f * μ.restrict (sets n)[g|m]
tactic: have : IsFiniteMeasure (μ.restrict (sets n)) := by
    constructor
    rw [Measure.restrict_apply_univ]
    exact h_finite n
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
⊢ μ.restrict (sets n)[(sets n).indicator f * g|m] =ᶠ[ae (μ.restrict (sets n))]
    (sets n).indicator f * μ.restrict (sets n)[g|m]
state_after: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
⊢ ∀ᵐ (x : α) ∂μ.restrict (sets n), ‖(sets n).indicator f x‖ ≤ ↑n
tactic: refine condexp_stronglyMeasurable_mul_of_bound hm (hf.indicator (h_meas n)) hg.integrableOn n ?_
state_before: case pos.intro.intro.intro.intro
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
⊢ ∀ᵐ (x : α) ∂μ.restrict (sets n), ‖(sets n).indicator f x‖ ≤ ↑n
state_after: case pos.intro.intro.intro.intro.h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
x : α
⊢ ‖(sets n).indicator f x‖ ≤ ↑n
tactic: filter_upwards with x
state_before: case pos.intro.intro.intro.intro.h
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
x : α
⊢ ‖(sets n).indicator f x‖ ≤ ↑n
state_after: case pos
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
x : α
hxs : x ∈ sets n
⊢ ‖(sets n).indicator f x‖ ≤ ↑n

case neg
α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
f g : α → ℝ
hf : StronglyMeasurable f
hfg : Integrable (f * g) μ
hg : Integrable g μ
hm : m ≤ m0
hμm this✝ : SigmaFinite (μ.trim hm)
sets : ℕ → Set α
h_univ : ⋃ i, sets i = Set.univ
h_meas : ∀ (x : ℕ), MeasurableSet (sets x)
h_finite : ∀ (x : ℕ), μ (sets x) < ⊤
h_norm : ∀ (x : ℕ), ∀ x_1 ∈ sets x, ‖f x_1‖ ≤ ↑x
n : ℕ
this : IsFiniteMeasure (μ.restrict (sets n))
x : α
hxs : x ∉ sets n
⊢ ‖(sets n).indicator f x‖ ≤ ↑n
tactic: by_cases hxs : x ∈ sets n