-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_map_of_stronglyMeasurable {β} [MeasurableSpace β] {φ : α → β} (hφ : Measurable φ)
    {f : β → G} (hfm : StronglyMeasurable f) : ∫ y, f y ∂Measure.map φ μ = ∫ x, f (φ x) ∂μ

Proof state:
case h.e'_3.h
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
y : G
x✝ : y ∈ (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i).range
hy : ⇑(approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i) ∘ φ ⁻¹' {y} = ∅
⊢ (μ ∅).toReal • y = 0

Tactic:
simp

Result:
no goals

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Tactic:
borelize G

Result:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Tactic:
have : SeparableSpace (range f ∪ {0} : Set G) := hfm.separableSpace_range_union_singleton

Result:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Tactic:
by_cases hfi : Integrable f (Measure.map φ μ)

Result:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

case neg
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : ¬Integrable f (Measure.map φ μ)
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Proof state:
case h.e'_3.h
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
⊢ ∑ x ∈ (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i).range, (μ (⇑(approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i) ∘ φ ⁻¹' {x})).toReal • x =
    ∑ x ∈ (approxOn (f ∘ φ) ⋯ (range f ∪ {0}) 0 ⋯ i).range,
      (μ (⇑(approxOn (f ∘ φ) ⋯ (range f ∪ {0}) 0 ⋯ i) ⁻¹' {x})).toReal • x

Tactic:
refine (Finset.sum_subset (SimpleFunc.range_comp_subset_range _ hφ) fun y _ hy => ?_).symm

Result:
case h.e'_3.h
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
y : G
x✝ : y ∈ (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i).range
hy : y ∉ ((approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i).comp φ hφ).range
⊢ (μ (⇑(approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i) ∘ φ ⁻¹' {y})).toReal • y = 0

Proof state:
case h.e'_3.h
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
⊢ SimpleFunc.integral (Measure.map φ μ) (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i) =
    SimpleFunc.integral μ (approxOn (f ∘ φ) ⋯ (range f ∪ {0}) 0 ⋯ i)

Tactic:
simp only [SimpleFunc.approxOn_comp, SimpleFunc.integral_eq, Measure.map_apply, hφ,
  SimpleFunc.measurableSet_preimage, ← preimage_comp, SimpleFunc.coe_comp]

Result:
case h.e'_3.h
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
⊢ ∑ x ∈ (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i).range, (μ (⇑(approxOn f ⋯ (range f ∪ {0}) 0 ⋯ i) ∘ φ ⁻¹' {x})).toReal • x =
    ∑ x ∈ (approxOn (f ∘ φ) ⋯ (range f ∪ {0}) 0 ⋯ i).range,
      (μ (⇑(approxOn (f ∘ φ) ⋯ (range f ∪ {0}) 0 ⋯ i) ⁻¹' {x})).toReal • x

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Tactic:
refine tendsto_nhds_unique
  (tendsto_integral_approxOn_of_measurable_of_range_subset hfm.measurable hfi _ Subset.rfl) ?_

Result:
case pos
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : CompleteSpace G
hfi : Integrable f (Measure.map φ μ)
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(range f ∪ {0})
⊢ Tendsto (fun n => SimpleFunc.integral (Measure.map φ μ) (approxOn f ⋯ (range f ∪ {0}) 0 ⋯ n)) atTop
    (𝓝 (∫ (x : α), f (φ x) ∂μ))

Proof state:
case neg
α : Type u_1
G : Type u_5
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
m : MeasurableSpace α
μ : Measure α
β : Type u_7
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → G
hfm : StronglyMeasurable f
hG : ¬CompleteSpace G
⊢ ∫ (y : β), f y ∂Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ

Tactic:
simp [integral, hG]

Result:
no goals