Theorem: integral_withDensity_eq_integral_smul
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: by_cases hg : Integrable g (μ.withDensity fun x => f x)
state_before: α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ

tactic: swap
state_before: case pos
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ

case neg
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : ¬Integrable g
⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ

tactic: refine' Integrable.induction
  (P := fun g => (∫ a, g a ∂μ.withDensity fun x => f x) = ∫ a, f a • g a ∂μ) _ _ _ _ hg
state_before: case pos
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ

tactic: rw [integral_undef hg, integral_undef]
state_before: case neg
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : ¬Integrable g
⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ

tactic: rwa [← integrable_withDensity_iff_integrable_smul f_meas]
state_before: case neg
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : ¬Integrable g
⊢ ¬Integrable fun a => f a • g a

tactic: intro c s s_meas hs
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ ∀ (c : E) ⦃s : Set α⦄,
    MeasurableSet s →
      ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤ →
        (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ)
          (indicator s fun x => c)

tactic: rw [integral_indicator s_meas]
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ (∫ (a : α), indicator s (fun x => c) a ∂Measure.withDensity μ fun x => ↑(f x)) =
    ∫ (a : α), f a • indicator s (fun x => c) a ∂μ

tactic: simp_rw [← indicator_smul_apply, integral_indicator s_meas]
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ (∫ (x : α) in s, c ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • indicator s (fun x => c) a ∂μ

tactic: simp only [s_meas, integral_const, Measure.restrict_apply', univ_inter, withDensity_apply]
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ (∫ (x : α) in s, c ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (x : α) in s, f x • c ∂μ

tactic: rw [lintegral_coe_eq_integral, ENNReal.toReal_ofReal, ← integral_smul_const]
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ ENNReal.toReal (∫⁻ (x : α) in s, ↑(f x) ∂μ) • c = ∫ (x : α) in s, f x • c ∂μ

tactic: rfl
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ (∫ (x : α) in s, ↑(f x) • c ∂μ) = ∫ (x : α) in s, f x • c ∂μ

tactic: exact integral_nonneg fun x => NNReal.coe_nonneg _
state_before: case pos.refine'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ 0 ≤ ∫ (a : α) in s, ↑(f a) ∂μ

tactic: refine' ⟨f_meas.coe_nnreal_real.aemeasurable.aestronglyMeasurable, _⟩
state_before: case pos.refine'_1.hfi
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ Integrable fun x => ↑(f x)

tactic: rw [withDensity_apply _ s_meas] at hs
state_before: case pos.refine'_1.hfi
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤
⊢ HasFiniteIntegral fun x => ↑(f x)

tactic: rw [HasFiniteIntegral]
state_before: case pos.refine'_1.hfi
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : (∫⁻ (a : α) in s, ↑(f a) ∂μ) < ⊤
⊢ HasFiniteIntegral fun x => ↑(f x)

tactic: convert hs with x
state_before: case pos.refine'_1.hfi
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : (∫⁻ (a : α) in s, ↑(f a) ∂μ) < ⊤
⊢ (∫⁻ (a : α) in s, ↑‖↑(f a)‖₊ ∂μ) < ⊤

tactic: simp only [NNReal.nnnorm_eq]
state_before: case h.e'_3.h.e'_4.h.h.e'_1
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
c : E
s : Set α
s_meas : MeasurableSet s
hs : (∫⁻ (a : α) in s, ↑(f a) ∂μ) < ⊤
x : α
⊢ ‖↑(f x)‖₊ = f x

tactic: intro u u' _ u_int u'_int h h'
state_before: case pos.refine'_2
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ ∀ ⦃f_1 g : α → E⦄,
    Disjoint (support f_1) (support g) →
      Integrable f_1 →
        Integrable g →
          (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) f_1 →
            (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) g →
              (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) (f_1 + g)

tactic: change
  (∫ a : α, u a + u' a ∂μ.withDensity fun x : α => ↑(f x)) = ∫ a : α, f a • (u a + u' a) ∂μ
state_before: case pos.refine'_2
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u u' : α → E
a✝ : Disjoint (support u) (support u')
u_int : Integrable u
u'_int : Integrable u'
h : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
h' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ
⊢ (∫ (a : α), (u + u') a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • (u + u') a ∂μ

tactic: simp_rw [smul_add]
state_before: case pos.refine'_2
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u u' : α → E
a✝ : Disjoint (support u) (support u')
u_int : Integrable u
u'_int : Integrable u'
h : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
h' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ
⊢ (∫ (a : α), u a + u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • (u a + u' a) ∂μ

tactic: rw [integral_add u_int u'_int, h, h', integral_add]
state_before: case pos.refine'_2
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u u' : α → E
a✝ : Disjoint (support u) (support u')
u_int : Integrable u
u'_int : Integrable u'
h : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
h' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ
⊢ (∫ (a : α), u a + u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a + f a • u' a ∂μ

tactic: exact (integrable_withDensity_iff_integrable_smul f_meas).1 u_int
state_before: case pos.refine'_2.hf
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u u' : α → E
a✝ : Disjoint (support u) (support u')
u_int : Integrable u
u'_int : Integrable u'
h : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
h' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ
⊢ Integrable fun a => f a • u a

tactic: exact (integrable_withDensity_iff_integrable_smul f_meas).1 u'_int
state_before: case pos.refine'_2.hg
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u u' : α → E
a✝ : Disjoint (support u) (support u')
u_int : Integrable u
u'_int : Integrable u'
h : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
h' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ
⊢ Integrable fun a => f a • u' a

tactic: have C1 :
  Continuous fun u : Lp E 1 (μ.withDensity fun x => f x) =>
    ∫ x, u x ∂μ.withDensity fun x => f x :=
  continuous_integral
state_before: case pos.refine'_3
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}

tactic: have C2 : Continuous fun u : Lp E 1 (μ.withDensity fun x => f x) => ∫ x, f x • u x ∂μ := by
  have : Continuous ((fun u : Lp E 1 μ => ∫ x, u x ∂μ) ∘ withDensitySMulLI (E := E) μ f_meas) :=
    continuous_integral.comp (withDensitySMulLI (E := E) μ f_meas).continuous
  convert this with u
  simp only [Function.comp_apply, withDensitySMulLI_apply]
  exact integral_congr_ae (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp.symm
state_before: case pos.refine'_3
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}

tactic: exact isClosed_eq C1 C2
state_before: case pos.refine'_3
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
C2 : Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ
⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}

tactic: have : Continuous ((fun u : Lp E 1 μ => ∫ x, u x ∂μ) ∘ withDensitySMulLI (E := E) μ f_meas) :=
  continuous_integral.comp (withDensitySMulLI (E := E) μ f_meas).continuous
state_before: α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
⊢ Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ

tactic: convert this with u
state_before: α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
this : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))
⊢ Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ

tactic: simp only [Function.comp_apply, withDensitySMulLI_apply]
state_before: case h.e'_5.h
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
this : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))
u : { x // x ∈ Lp E 1 }
⊢ (∫ (x : α), f x • ↑↑u x ∂μ) = ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas)) u

tactic: exact integral_congr_ae (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp.symm
state_before: case h.e'_5.h
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
C1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)
this : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))
u : { x // x ∈ Lp E 1 }
⊢ (∫ (x : α), f x • ↑↑u x ∂μ) =
    ∫ (x : α), ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x ∂μ

tactic: intro u v huv _ hu
state_before: case pos.refine'_4
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
⊢ ∀ ⦃f_1 g : α → E⦄,
    f_1 =ᵐ[Measure.withDensity μ fun x => ↑(f x)] g →
      Integrable f_1 →
        (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) f_1 →
          (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) g

tactic: rw [← integral_congr_ae huv, hu]
state_before: case pos.refine'_4
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
⊢ (∫ (a : α), v a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • v a ∂μ

tactic: apply integral_congr_ae
state_before: case pos.refine'_4
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
⊢ (∫ (a : α), f a • u a ∂μ) = ∫ (a : α), f a • v a ∂μ

tactic: filter_upwards [(ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 huv] with x hx
state_before: case pos.refine'_4.h
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
⊢ (fun a => f a • u a) =ᵐ[μ] fun a => f a • v a

tactic: rcases eq_or_ne (f x) 0 with (h'x | h'x)
state_before: case h
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
x : α
hx : ↑(f x) ≠ 0 → u x = v x
⊢ f x • u x = f x • v x

tactic: simp only [h'x, zero_smul]
state_before: case h.inl
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
x : α
hx : ↑(f x) ≠ 0 → u x = v x
h'x : f x = 0
⊢ f x • u x = f x • v x

tactic: rw [hx _]
state_before: case h.inr
α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
x : α
hx : ↑(f x) ≠ 0 → u x = v x
h'x : f x ≠ 0
⊢ f x • u x = f x • v x

tactic: simpa only [Ne.def, ENNReal.coe_eq_zero] using h'x
state_before: α : Type u_1
β : Type ?u.4336751
E : Type u_2
F : Type ?u.4336757
inst✝⁹ : MeasurableSpace α
ι : Type ?u.4336763
inst✝⁸ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
𝕜 : Type ?u.4451571
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
p : ℝ≥0∞
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace F
inst✝ : NormedSpace ℝ F
f : α → ℝ≥0
f_meas : Measurable f
g : α → E
hg : Integrable g
u v : α → E
huv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v
a✝ : Integrable u
hu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ
x : α
hx : ↑(f x) ≠ 0 → u x = v x
h'x : f x ≠ 0
⊢ ↑(f x) ≠ 0