[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
m : MeasurableSpace α
μ : Measure α
f : α → E
hf : Integrable f
⊢ (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
m : MeasurableSpace α
μ : Measure α
f : α → E
hf : Integrable f
s : ℕ → Set α
hs₁ : ∀ (i : ℕ), MeasurableSet (s i)
hs₂ : Pairwise (Disjoint on s)
⊢ HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))
    ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ (i : ℕ), s i))
[PROOFSTEP]
dsimp only
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
m : MeasurableSpace α
μ : Measure α
f : α → E
hf : Integrable f
s : ℕ → Set α
hs₁ : ∀ (i : ℕ), MeasurableSet (s i)
hs₂ : Pairwise (Disjoint on s)
⊢ HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s i, f x ∂μ else 0)
    (if MeasurableSet (⋃ (i : ℕ), s i) then ∫ (x : α) in ⋃ (i : ℕ), s i, f x ∂μ else 0)
[PROOFSTEP]
convert hasSum_integral_iUnion hs₁ hs₂ hf.integrableOn with n
[GOAL]
case h.e'_5.h
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
m : MeasurableSpace α
μ : Measure α
f : α → E
hf : Integrable f
s : ℕ → Set α
hs₁ : ∀ (i : ℕ), MeasurableSet (s i)
hs₂ : Pairwise (Disjoint on s)
n : ℕ
⊢ (if MeasurableSet (s n) then ∫ (x : α) in s n, f x ∂μ else 0) = ∫ (a : α) in s n, f a ∂μ
[PROOFSTEP]
rw [if_pos (hs₁ n)]
[GOAL]
case h.e'_6
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
m : MeasurableSpace α
μ : Measure α
f : α → E
hf : Integrable f
s : ℕ → Set α
hs₁ : ∀ (i : ℕ), MeasurableSet (s i)
hs₂ : Pairwise (Disjoint on s)
⊢ (if MeasurableSet (⋃ (i : ℕ), s i) then ∫ (x : α) in ⋃ (i : ℕ), s i, f x ∂μ else 0) =
    ∫ (a : α) in ⋃ (n : ℕ), s n, f a ∂μ
[PROOFSTEP]
rw [if_pos (MeasurableSet.iUnion hs₁)]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
s : Set α
hs : MeasurableSet s
⊢ ↑(withDensityᵥ μ f) s = ∫ (x : α) in s, f x ∂μ
[PROOFSTEP]
rw [withDensityᵥ, dif_pos hf]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
s : Set α
hs : MeasurableSet s
⊢ ↑{ measureOf' := fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0,
          empty' := (_ : (if MeasurableSet ∅ then ∫ (x : α) in ∅, f x ∂μ else 0) = 0),
          not_measurable' :=
            (_ : ∀ (s : Set α), ¬MeasurableSet s → (if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) = 0),
          m_iUnion' :=
            (_ :
              ∀ (s : ℕ → Set α),
                (∀ (i : ℕ), MeasurableSet (s i)) →
                  Pairwise (Disjoint on s) →
                    HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))
                      ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ (i : ℕ), s i))) }
      s =
    ∫ (x : α) in s, f x ∂μ
[PROOFSTEP]
exact dif_pos hs
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
⊢ withDensityᵥ μ 0 = 0
[PROOFSTEP]
ext1 s hs
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
s : Set α
hs : MeasurableSet s
⊢ ↑(withDensityᵥ μ 0) s = ↑0 s
[PROOFSTEP]
erw [withDensityᵥ_apply (integrable_zero α E μ) hs]
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
s : Set α
hs : MeasurableSet s
⊢ ∫ (x : α) in s, 0 ∂μ = ↑0 s
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
⊢ withDensityᵥ μ (-f) = -withDensityᵥ μ f
[PROOFSTEP]
by_cases hf : Integrable f μ
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
⊢ withDensityᵥ μ (-f) = -withDensityᵥ μ f
[PROOFSTEP]
ext1 i hi
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ (-f)) i = ↑(-withDensityᵥ μ f) i
[PROOFSTEP]
rw [VectorMeasure.neg_apply, withDensityᵥ_apply hf hi, ← integral_neg, withDensityᵥ_apply hf.neg hi]
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ∫ (x : α) in i, (-f) x ∂μ = ∫ (a : α) in i, -f a ∂μ
[PROOFSTEP]
rfl
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : ¬Integrable f
⊢ withDensityᵥ μ (-f) = -withDensityᵥ μ f
[PROOFSTEP]
rw [withDensityᵥ, withDensityᵥ, dif_neg hf, dif_neg, neg_zero]
[GOAL]
case neg.hnc
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : ¬Integrable f
⊢ ¬Integrable (-f)
[PROOFSTEP]
rwa [integrable_neg_iff]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
⊢ withDensityᵥ μ (f + g) = withDensityᵥ μ f + withDensityᵥ μ g
[PROOFSTEP]
ext1 i hi
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ (f + g)) i = ↑(withDensityᵥ μ f + withDensityᵥ μ g) i
[PROOFSTEP]
rw [withDensityᵥ_apply (hf.add hg) hi, VectorMeasure.add_apply, withDensityᵥ_apply hf hi, withDensityᵥ_apply hg hi]
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ ∫ (x : α) in i, (f + g) x ∂μ = ∫ (x : α) in i, f x ∂μ + ∫ (x : α) in i, g x ∂μ
[PROOFSTEP]
simp_rw [Pi.add_apply]
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ ∫ (x : α) in i, f x + g x ∂μ = ∫ (x : α) in i, f x ∂μ + ∫ (x : α) in i, g x ∂μ
[PROOFSTEP]
rw [integral_add]
[GOAL]
case h.hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ Integrable fun x => f x
[PROOFSTEP]
rw [← integrableOn_univ]
[GOAL]
case h.hg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ Integrable fun x => g x
[PROOFSTEP]
rw [← integrableOn_univ]
[GOAL]
case h.hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ IntegrableOn (fun x => f x) Set.univ
[PROOFSTEP]
exact hf.integrableOn.restrict MeasurableSet.univ
[GOAL]
case h.hg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
i : Set α
hi : MeasurableSet i
⊢ IntegrableOn (fun x => g x) Set.univ
[PROOFSTEP]
exact hg.integrableOn.restrict MeasurableSet.univ
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
hf : Integrable f
hg : Integrable g
⊢ withDensityᵥ μ (f - g) = withDensityᵥ μ f - withDensityᵥ μ g
[PROOFSTEP]
rw [sub_eq_add_neg, sub_eq_add_neg, withDensityᵥ_add hf hg.neg, withDensityᵥ_neg]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
⊢ withDensityᵥ μ (r • f) = r • withDensityᵥ μ f
[PROOFSTEP]
by_cases hf : Integrable f μ
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : Integrable f
⊢ withDensityᵥ μ (r • f) = r • withDensityᵥ μ f
[PROOFSTEP]
ext1 i hi
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ (r • f)) i = ↑(r • withDensityᵥ μ f) i
[PROOFSTEP]
rw [withDensityᵥ_apply (hf.smul r) hi, VectorMeasure.smul_apply, withDensityᵥ_apply hf hi, ← integral_smul r f]
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ∫ (x : α) in i, (r • f) x ∂μ = ∫ (a : α) in i, r • f a ∂μ
[PROOFSTEP]
rfl
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : ¬Integrable f
⊢ withDensityᵥ μ (r • f) = r • withDensityᵥ μ f
[PROOFSTEP]
by_cases hr : r = 0
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : ¬Integrable f
hr : r = 0
⊢ withDensityᵥ μ (r • f) = r • withDensityᵥ μ f
[PROOFSTEP]
rw [hr, zero_smul, zero_smul, withDensityᵥ_zero]
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : ¬Integrable f
hr : ¬r = 0
⊢ withDensityᵥ μ (r • f) = r • withDensityᵥ μ f
[PROOFSTEP]
rw [withDensityᵥ, withDensityᵥ, dif_neg hf, dif_neg, smul_zero]
[GOAL]
case neg.hnc
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
f✝ g : α → E
𝕜 : Type u_4
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedSpace 𝕜 E
inst✝ : SMulCommClass ℝ 𝕜 E
f : α → E
r : 𝕜
hf : ¬Integrable f
hr : ¬r = 0
⊢ ¬Integrable (r • f)
[PROOFSTEP]
rwa [integrable_smul_iff hr f]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
⊢ withDensityᵥ μ f ≪ᵥ toENNRealVectorMeasure μ
[PROOFSTEP]
by_cases hf : Integrable f μ
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
hf : Integrable f
⊢ withDensityᵥ μ f ≪ᵥ toENNRealVectorMeasure μ
[PROOFSTEP]
refine' VectorMeasure.AbsolutelyContinuous.mk fun i hi₁ hi₂ => _
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
hf : Integrable f
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑(toENNRealVectorMeasure μ) i = 0
⊢ ↑(withDensityᵥ μ f) i = 0
[PROOFSTEP]
rw [toENNRealVectorMeasure_apply_measurable hi₁] at hi₂ 
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
hf : Integrable f
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑↑μ i = 0
⊢ ↑(withDensityᵥ μ f) i = 0
[PROOFSTEP]
rw [withDensityᵥ_apply hf hi₁, Measure.restrict_zero_set hi₂, integral_zero_measure]
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
hf : ¬Integrable f
⊢ withDensityᵥ μ f ≪ᵥ toENNRealVectorMeasure μ
[PROOFSTEP]
rw [withDensityᵥ, dif_neg hf]
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
μ : Measure α
f : α → ℝ
hf : ¬Integrable f
⊢ 0 ≪ᵥ toENNRealVectorMeasure μ
[PROOFSTEP]
exact VectorMeasure.AbsolutelyContinuous.zero _
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
hf : Integrable f
hg : Integrable g
hfg : withDensityᵥ μ f = withDensityᵥ μ g
⊢ f =ᶠ[ae μ] g
[PROOFSTEP]
refine' hf.ae_eq_of_forall_set_integral_eq f g hg fun i hi _ => _
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
hf : Integrable f
hg : Integrable g
hfg : withDensityᵥ μ f = withDensityᵥ μ g
i : Set α
hi : MeasurableSet i
x✝ : ↑↑μ i < ⊤
⊢ ∫ (x : α) in i, f x ∂μ = ∫ (x : α) in i, g x ∂μ
[PROOFSTEP]
rw [← withDensityᵥ_apply hf hi, hfg, withDensityᵥ_apply hg hi]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
⊢ withDensityᵥ μ f = withDensityᵥ μ g
[PROOFSTEP]
by_cases hf : Integrable f μ
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : Integrable f
⊢ withDensityᵥ μ f = withDensityᵥ μ g
[PROOFSTEP]
ext i hi
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ f) i = ↑(withDensityᵥ μ g) i
[PROOFSTEP]
rw [withDensityᵥ_apply hf hi, withDensityᵥ_apply (hf.congr h) hi]
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ∫ (x : α) in i, f x ∂μ = ∫ (x : α) in i, g x ∂μ
[PROOFSTEP]
exact integral_congr_ae (ae_restrict_of_ae h)
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : ¬Integrable f
⊢ withDensityᵥ μ f = withDensityᵥ μ g
[PROOFSTEP]
have hg : ¬Integrable g μ := by intro hg; exact hf (hg.congr h.symm)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : ¬Integrable f
⊢ ¬Integrable g
[PROOFSTEP]
intro hg
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : ¬Integrable f
hg : Integrable g
⊢ False
[PROOFSTEP]
exact hf (hg.congr h.symm)
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
hf : ¬Integrable f
hg : ¬Integrable g
⊢ withDensityᵥ μ f = withDensityᵥ μ g
[PROOFSTEP]
rw [withDensityᵥ, withDensityᵥ, dif_neg hf, dif_neg hg]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
⊢ (withDensityᵥ μ fun x => ENNReal.toReal (f x)) = toSignedMeasure (withDensity μ f)
[PROOFSTEP]
have hfi := integrable_toReal_of_lintegral_ne_top hfm hf
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
⊢ (withDensityᵥ μ fun x => ENNReal.toReal (f x)) = toSignedMeasure (withDensity μ f)
[PROOFSTEP]
haveI := isFiniteMeasure_withDensity hf
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
⊢ (withDensityᵥ μ fun x => ENNReal.toReal (f x)) = toSignedMeasure (withDensity μ f)
[PROOFSTEP]
ext i hi
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ fun x => ENNReal.toReal (f x)) i = ↑(toSignedMeasure (withDensity μ f)) i
[PROOFSTEP]
rw [withDensityᵥ_apply hfi hi, toSignedMeasure_apply_measurable hi, withDensity_apply _ hi,
  integral_toReal hfm.restrict]
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
⊢ ∀ᵐ (x : α) ∂restrict μ i, f x < ⊤
[PROOFSTEP]
refine' ae_lt_top' hfm.restrict (ne_top_of_le_ne_top hf _)
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
⊢ ∫⁻ (x : α) in i, f x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
[PROOFSTEP]
conv_rhs => rw [← set_lintegral_univ]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
| ∫⁻ (x : α), f x ∂μ
[PROOFSTEP]
rw [← set_lintegral_univ]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
| ∫⁻ (x : α), f x ∂μ
[PROOFSTEP]
rw [← set_lintegral_univ]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
| ∫⁻ (x : α), f x ∂μ
[PROOFSTEP]
rw [← set_lintegral_univ]
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hfi : Integrable fun x => ENNReal.toReal (f x)
this : IsFiniteMeasure (withDensity μ fun a => f a)
i : Set α
hi : MeasurableSet i
⊢ ∫⁻ (x : α) in i, f x ∂μ ≤ ∫⁻ (x : α) in Set.univ, f x ∂μ
[PROOFSTEP]
exact lintegral_mono_set (Set.subset_univ _)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ
hfi : Integrable f
⊢ withDensityᵥ μ f =
    toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (f x)) -
      toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (-f x))
[PROOFSTEP]
haveI := isFiniteMeasure_withDensity_ofReal hfi.2
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ
hfi : Integrable f
this : IsFiniteMeasure (withDensity μ fun x => ENNReal.ofReal (f x))
⊢ withDensityᵥ μ f =
    toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (f x)) -
      toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (-f x))
[PROOFSTEP]
haveI := isFiniteMeasure_withDensity_ofReal hfi.neg.2
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ
hfi : Integrable f
this✝ : IsFiniteMeasure (withDensity μ fun x => ENNReal.ofReal (f x))
this : IsFiniteMeasure (withDensity μ fun x => ENNReal.ofReal ((-f) x))
⊢ withDensityᵥ μ f =
    toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (f x)) -
      toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (-f x))
[PROOFSTEP]
ext i hi
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
f : α → ℝ
hfi : Integrable f
this✝ : IsFiniteMeasure (withDensity μ fun x => ENNReal.ofReal (f x))
this : IsFiniteMeasure (withDensity μ fun x => ENNReal.ofReal ((-f) x))
i : Set α
hi : MeasurableSet i
⊢ ↑(withDensityᵥ μ f) i =
    ↑(toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (f x)) -
          toSignedMeasure (withDensity μ fun x => ENNReal.ofReal (-f x)))
      i
[PROOFSTEP]
rw [withDensityᵥ_apply hfi hi, integral_eq_lintegral_pos_part_sub_lintegral_neg_part hfi.integrableOn,
  VectorMeasure.sub_apply, toSignedMeasure_apply_measurable hi, toSignedMeasure_apply_measurable hi,
  withDensity_apply _ hi, withDensity_apply _ hi]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → ℝ
hf : Integrable f
i : Set α
hi : MeasurableSet i
⊢ ↑(VectorMeasure.trim (withDensityᵥ μ f) hm) i = ∫ (x : α) in i, f x ∂μ
[PROOFSTEP]
rw [VectorMeasure.trim_measurableSet_eq hm hi, withDensityᵥ_apply hf (hm _ hi)]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hfi : Integrable f
⊢ VectorMeasure.trim (withDensityᵥ μ f) hm ≪ᵥ toENNRealVectorMeasure (Measure.trim μ hm)
[PROOFSTEP]
refine' VectorMeasure.AbsolutelyContinuous.mk fun j hj₁ hj₂ => _
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hfi : Integrable f
j : Set α
hj₁ : MeasurableSet j
hj₂ : ↑(toENNRealVectorMeasure (Measure.trim μ hm)) j = 0
⊢ ↑(VectorMeasure.trim (withDensityᵥ μ f) hm) j = 0
[PROOFSTEP]
rw [Measure.toENNRealVectorMeasure_apply_measurable hj₁, trim_measurableSet_eq hm hj₁] at hj₂ 
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hfi : Integrable f
j : Set α
hj₁ : MeasurableSet j
hj₂ : ↑↑μ j = 0
⊢ ↑(VectorMeasure.trim (withDensityᵥ μ f) hm) j = 0
[PROOFSTEP]
rw [VectorMeasure.trim_measurableSet_eq hm hj₁, withDensityᵥ_apply hfi (hm _ hj₁)]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
hfi : Integrable f
j : Set α
hj₁ : MeasurableSet j
hj₂ : ↑↑μ j = 0
⊢ ∫ (x : α) in j, f x ∂μ = 0
[PROOFSTEP]
simp only [Measure.restrict_eq_zero.mpr hj₂, integral_zero_measure]
