Theorem: MeasureTheory.L1.SimpleFunc.integral_eq_norm_posPart_sub
File: Mathlib/MeasureTheory/Integral/Bochner.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
⊢ integral f = ‖posPart f‖ - ‖negPart f‖
state_after: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
⊢ integral f = ‖posPart f‖ - ‖negPart f‖
tactic: have ae_eq₁ : (toSimpleFunc f).posPart =ᵐ[μ] (toSimpleFunc (posPart f)).map norm := by
    filter_upwards [posPart_toSimpleFunc f] with _ h
    rw [SimpleFunc.map_apply, h]
    conv_lhs => rw [← SimpleFunc.posPart_map_norm, SimpleFunc.map_apply]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
⊢ integral f = ‖posPart f‖ - ‖negPart f‖
state_after: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
ae_eq₂ : ↑(toSimpleFunc f).negPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))
⊢ integral f = ‖posPart f‖ - ‖negPart f‖
tactic: have ae_eq₂ : (toSimpleFunc f).negPart =ᵐ[μ] (toSimpleFunc (negPart f)).map norm := by
    filter_upwards [negPart_toSimpleFunc f] with _ h
    rw [SimpleFunc.map_apply, h]
    conv_lhs => rw [← SimpleFunc.negPart_map_norm, SimpleFunc.map_apply]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
ae_eq₂ : ↑(toSimpleFunc f).negPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))
⊢ integral f = ‖posPart f‖ - ‖negPart f‖
state_after: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
ae_eq₂ : ↑(toSimpleFunc f).negPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))
⊢ MeasureTheory.SimpleFunc.integral μ (toSimpleFunc f) =
    MeasureTheory.SimpleFunc.integral μ
      (SimpleFunc.map norm (toSimpleFunc (posPart f)) - SimpleFunc.map norm (toSimpleFunc (negPart f)))

case hf
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
ae_eq₂ : ↑(toSimpleFunc f).negPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))
⊢ Integrable (↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))) μ

case hg
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace ℝ F'
E' : Type u_6
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace ℝ E'
inst✝ : NormedSpace 𝕜 E'
f : ↥(simpleFunc ℝ 1 μ)
ae_eq₁ : ↑(toSimpleFunc f).posPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (posPart f)))
ae_eq₂ : ↑(toSimpleFunc f).negPart =ᶠ[ae μ] ↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))
⊢ Integrable (↑(SimpleFunc.map norm (toSimpleFunc (negPart f)))) μ
tactic: rw [integral, norm_eq_integral, norm_eq_integral, ← SimpleFunc.integral_sub]