Theorem: MeasureTheory.lintegral_withDensity_eq_lintegral_mul₀'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: let f' := hf.mk f
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
hg : AEMeasurable g
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: have : μ.withDensity f = μ.withDensity f' := withDensity_congr_ae hf.ae_eq_mk
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
hg : AEMeasurable g
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: rw [this] at hg⊢
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
hg : AEMeasurable g
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
this : Measure.withDensity μ f = Measure.withDensity μ f'
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: let g' := hg.mk g
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
⊢ (∫⁻ (a : α), g a ∂Measure.withDensity μ f') = ∫⁻ (a : α), (f * g) a ∂μ

tactic: apply lintegral_congr_ae
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ (∫⁻ (a : α), (f' * g') a ∂μ) = ∫⁻ (a : α), (f' * g) a ∂μ

tactic: apply ae_of_ae_restrict_of_ae_restrict_compl { x | f' x ≠ 0 }
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ (fun a => (f' * g') a) =ᵐ[μ] fun a => (f' * g) a

tactic: have Z := hg.ae_eq_mk
state_before: case h.ht
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f' x ≠ 0}, (fun a => (f' * g') a) x = (fun a => (f' * g) a) x

tactic: rw [EventuallyEq, ae_withDensity_iff_ae_restrict hf.measurable_mk] at Z
state_before: case h.ht
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
Z : g =ᵐ[Measure.withDensity μ f'] AEMeasurable.mk g hg
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f' x ≠ 0}, (fun a => (f' * g') a) x = (fun a => (f' * g) a) x

tactic: filter_upwards [Z]
state_before: case h.ht
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
Z : ∀ᵐ (x : α) ∂Measure.restrict μ {x | AEMeasurable.mk f hf x ≠ 0}, g x = AEMeasurable.mk g hg x
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f' x ≠ 0}, (fun a => (f' * g') a) x = (fun a => (f' * g) a) x

tactic: intro x hx
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
Z : ∀ᵐ (x : α) ∂Measure.restrict μ {x | AEMeasurable.mk f hf x ≠ 0}, g x = AEMeasurable.mk g hg x
⊢ ∀ (a : α),
    g a = AEMeasurable.mk g hg a → (AEMeasurable.mk f hf * AEMeasurable.mk g hg) a = (AEMeasurable.mk f hf * g) a

tactic: simp only [hx, Pi.mul_apply]
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
Z : ∀ᵐ (x : α) ∂Measure.restrict μ {x | AEMeasurable.mk f hf x ≠ 0}, g x = AEMeasurable.mk g hg x
x : α
hx : g x = AEMeasurable.mk g hg x
⊢ (AEMeasurable.mk f hf * AEMeasurable.mk g hg) x = (AEMeasurable.mk f hf * g) x

tactic: have M : MeasurableSet ({ x : α | f' x ≠ 0 }ᶜ) :=
  (hf.measurable_mk (measurableSet_singleton 0).compl).compl
state_before: case h.htc
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ ({x | f' x ≠ 0}ᶜ), (fun a => (f' * g') a) x = (fun a => (f' * g) a) x

tactic: filter_upwards [ae_restrict_mem M]
state_before: case h.htc
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
M : MeasurableSet ({x | f' x ≠ 0}ᶜ)
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ ({x | f' x ≠ 0}ᶜ), (fun a => (f' * g') a) x = (fun a => (f' * g) a) x

tactic: intro x hx
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
M : MeasurableSet ({x | f' x ≠ 0}ᶜ)
⊢ ∀ (a : α),
    a ∈ {x | AEMeasurable.mk f hf x ≠ 0}ᶜ →
      (AEMeasurable.mk f hf * AEMeasurable.mk g hg) a = (AEMeasurable.mk f hf * g) a

tactic: simp only [Classical.not_not, mem_setOf_eq, mem_compl_iff] at hx
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
M : MeasurableSet ({x | f' x ≠ 0}ᶜ)
x : α
hx : x ∈ {x | AEMeasurable.mk f hf x ≠ 0}ᶜ
⊢ (AEMeasurable.mk f hf * AEMeasurable.mk g hg) x = (AEMeasurable.mk f hf * g) x

tactic: simp only [hx, MulZeroClass.zero_mul, Pi.mul_apply]
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
M : MeasurableSet ({x | f' x ≠ 0}ᶜ)
x : α
hx : AEMeasurable.mk f hf x = 0
⊢ (AEMeasurable.mk f hf * AEMeasurable.mk g hg) x = (AEMeasurable.mk f hf * g) x

tactic: apply lintegral_congr_ae
state_before: α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ (∫⁻ (a : α), (f' * g) a ∂μ) = ∫⁻ (a : α), (f * g) a ∂μ

tactic: filter_upwards [hf.ae_eq_mk]
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ (fun a => (f' * g) a) =ᵐ[μ] fun a => (f * g) a

tactic: intro x hx
state_before: case h
α : Type u_1
β : Type ?u.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
⊢ ∀ (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.1801681
γ : Type ?u.1801684
δ : Type ?u.1801687
m m0 : MeasurableSpace α
μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f
g : α → ℝ≥0∞
f' : α → ℝ≥0∞ := AEMeasurable.mk f hf
hg : AEMeasurable g
this : Measure.withDensity μ f = Measure.withDensity μ f'
g' : α → ℝ≥0∞ := AEMeasurable.mk g hg
x : α
hx : f x = AEMeasurable.mk f hf x
⊢ (AEMeasurable.mk f hf * g) x = (f * g) x