Theorem: MeasureTheory.integral_map_of_stronglyMeasurable
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: by_cases hfi : Integrable f (Measure.map φ μ)
state_before: α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

tactic: swap
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

case neg
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : ¬Integrable f
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

tactic: borelize E
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

tactic: haveI : SeparableSpace (range f ∪ {0} : Set E) := hfm.separableSpace_range_union_singleton
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
⊢ (∫ (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) _
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

tactic: convert tendsto_integral_approxOn_of_measurable_of_range_subset (hfm.measurable.comp hφ)
  ((integrable_map_measure hfm.aestronglyMeasurable hφ.aemeasurable).1 hfi) (range f ∪ {0})
  (by simp [insert_subset_insert, Set.range_comp_subset_range]) using 1
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
⊢ Tendsto
    (fun n =>
      SimpleFunc.integral (Measure.map φ μ) (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) n))
    atTop (𝓝 (∫ (x : α), f (φ x) ∂μ))

tactic: ext1 i
state_before: case h.e'_3
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
⊢ (fun n =>
      SimpleFunc.integral (Measure.map φ μ)
        (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) n)) =
    fun n =>
    SimpleFunc.integral μ (approxOn (f ∘ φ) (_ : Measurable (f ∘ φ)) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) n)

tactic: simp only [SimpleFunc.approxOn_comp, SimpleFunc.integral_eq, Measure.map_apply, hφ,
  SimpleFunc.measurableSet_preimage, ← preimage_comp, SimpleFunc.coe_comp]
state_before: case h.e'_3.h
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
⊢ SimpleFunc.integral (Measure.map φ μ) (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) =
    SimpleFunc.integral μ (approxOn (f ∘ φ) (_ : Measurable (f ∘ φ)) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i)

tactic: refine' (Finset.sum_subset (SimpleFunc.range_comp_subset_range _ hφ) fun y _ hy => _).symm
state_before: case h.e'_3.h
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
⊢ ∑ x in SimpleFunc.range (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i),
      ENNReal.toReal (↑↑μ (↑(approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ∘ φ ⁻¹' {x})) •
        x =
    ∑ x in SimpleFunc.range (approxOn (f ∘ φ) (_ : Measurable (f ∘ φ)) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i),
      ENNReal.toReal
          (↑↑μ (↑(approxOn (f ∘ φ) (_ : Measurable (f ∘ φ)) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ⁻¹' {x})) •
        x

tactic: rw [SimpleFunc.mem_range, ← Set.preimage_singleton_eq_empty, SimpleFunc.coe_comp] at hy
state_before: case h.e'_3.h
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
y : E
x✝ : y ∈ SimpleFunc.range (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i)
hy :
  ¬y ∈
      SimpleFunc.range
        (SimpleFunc.comp (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) φ hφ)
⊢ ENNReal.toReal (↑↑μ (↑(approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ∘ φ ⁻¹' {y})) • y =
    0

tactic: rw [hy]
state_before: case h.e'_3.h
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
y : E
x✝ : y ∈ SimpleFunc.range (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i)
hy : ↑(approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ∘ φ ⁻¹' {y} = ∅
⊢ ENNReal.toReal (↑↑μ (↑(approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ∘ φ ⁻¹' {y})) • y =
    0

tactic: simp
state_before: case h.e'_3.h
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
i : ℕ
y : E
x✝ : y ∈ SimpleFunc.range (approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i)
hy : ↑(approxOn f (_ : Measurable f) (range f ∪ {0}) 0 (_ : 0 ∈ range f ∪ {0}) i) ∘ φ ⁻¹' {y} = ∅
⊢ ENNReal.toReal (↑↑μ ∅) • y = 0

tactic: rw [integral_undef hfi, integral_undef]
state_before: case neg
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : ¬Integrable f
⊢ (∫ (y : β), f y ∂Measure.map φ μ) = ∫ (x : α), f (φ x) ∂μ

tactic: exact fun hfφ => hfi ((integrable_map_measure hfm.aestronglyMeasurable hφ.aemeasurable).2 hfφ)
state_before: case neg
α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : ¬Integrable f
⊢ ¬Integrable fun x => f (φ x)

tactic: simp [insert_subset_insert, Set.range_comp_subset_range]
state_before: α : Type u_2
E : Type u_3
F : Type ?u.1359600
𝕜 : Type ?u.1359603
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1362294
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : Measurable φ
f : β → E
hfm : StronglyMeasurable f
hfi : Integrable f
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : SeparableSpace ↑(range f ∪ {0})
⊢ range (f ∘ φ) ∪ {0} ⊆ range f ∪ {0}