Theorem: MeasureTheory.lintegral_withDensity_eq_lintegral_mul_non_measurable₀
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: let f' := hf.mk f
state_before: α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: calc
  (∫⁻ a, g a ∂μ.withDensity f) = ∫⁻ a, g a ∂μ.withDensity f' := by
    rw [withDensity_congr_ae hf.ae_eq_mk]
  _ = ∫⁻ a, (f' * g) a ∂μ := by
    apply lintegral_withDensity_eq_lintegral_mul_non_measurable _ hf.measurable_mk
    filter_upwards [h'f, hf.ae_eq_mk]
    intro x hx h'x
    rwa [← h'x]
  _ = ∫⁻ a, (f * g) a ∂μ := by
    apply lintegral_congr_ae
    filter_upwards [hf.ae_eq_mk]
    intro x hx
    simp only [hx, Pi.mul_apply]
state_before: α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: rw [withDensity_congr_ae hf.ae_eq_mk]
state_before: α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), g a ∂Measure.withDensity μ f'

tactic: apply lintegral_withDensity_eq_lintegral_mul_non_measurable _ hf.measurable_mk
state_before: α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f') = ∫⁻ (a : α), (f' * g) a ∂μ

tactic: filter_upwards [h'f, hf.ae_eq_mk]
state_before: case hf
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ ∀ᵐ (x : α) ∂μ, AEMeasurable.mk f hf x < ⊤

tactic: intro x hx h'x
state_before: case h
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ ∀ (a : α), f a < ⊤ → f a = AEMeasurable.mk f hf a → AEMeasurable.mk f hf a < ⊤

tactic: rwa [← h'x]
state_before: case h
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
x : α
hx : f x < ⊤
h'x : f x = AEMeasurable.mk f hf x
⊢ AEMeasurable.mk f hf x < ⊤

tactic: apply lintegral_congr_ae
state_before: α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (∫⁻ (a : α), (f' * g) a ∂μ) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: filter_upwards [hf.ae_eq_mk]
state_before: case h
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (fun a => (f' * g) a) =ᵐ[μ] fun a => (f * g) a

tactic: intro x hx
state_before: case h
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ ∀ (a : α), f a = AEMeasurable.mk f hf a → (AEMeasurable.mk f hf * g) a = (f * g) a

tactic: simp only [hx, Pi.mul_apply]
state_before: case h
α : Type u_1
β : Type ?u.1811893
γ : Type ?u.1811896
δ : Type ?u.1811899
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
x : α
hx : f x = AEMeasurable.mk f hf x
⊢ (AEMeasurable.mk f hf * g) x = (f * g) x