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

tactic: rw [← integral_add_compl₀ h_meas hfi.norm]
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ (∫ (x : α), ‖f x‖ ∂μ) = (∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ) + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ

tactic: congr 1
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ ((∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ) + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ) =
    (∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ

tactic: refine' set_integral_congr₀ h_meas fun x hx => _
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ (∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ) = ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ

tactic: dsimp only
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}
⊢ ‖f x‖ = f x

tactic: rw [Real.norm_eq_abs, abs_eq_self.mpr _]
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}
⊢ ‖f x‖ = f x

tactic: exact hx
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}
⊢ 0 ≤ f x

tactic: congr 1
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ ((∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ) =
    (∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ

tactic: rw [← integral_neg]
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ (∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ) = -∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ

tactic: refine' set_integral_congr₀ h_meas.compl fun x hx => _
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ (∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ) = ∫ (a : α) in {x | 0 ≤ f x}ᶜ, -f a ∂μ

tactic: dsimp only
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}ᶜ
⊢ ‖f x‖ = -f x

tactic: rw [Real.norm_eq_abs, abs_eq_neg_self.mpr _]
state_before: case e_a
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}ᶜ
⊢ ‖f x‖ = -f x

tactic: rw [Set.mem_compl_iff, Set.nmem_setOf_iff] at hx
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : x ∈ {x | 0 ≤ f x}ᶜ
⊢ f x ≤ 0

tactic: linarith
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
hx : ¬0 ≤ f x
⊢ f x ≤ 0

tactic: rw [← set_integral_neg_eq_set_integral_nonpos hfi.1]
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ ((∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ) =
    (∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ

tactic: congr
state_before: α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ ((∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ) =
    (∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ) - ∫ (x : α) in {x | f x < 0}, f x ∂μ

tactic: ext1 x
state_before: case e_a.e_μ.e_s
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
⊢ {x | 0 ≤ f x}ᶜ = {x | f x < 0}

tactic: simp
state_before: case e_a.e_μ.e_s.h
α : Type u_1
β : Type ?u.110031
E : Type ?u.110034
F : Type ?u.110037
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f✝ g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f : α → ℝ
hfi : Integrable f
h_meas : NullMeasurableSet {x | 0 ≤ f x}
x : α
⊢ x ∈ {x | 0 ≤ f x}ᶜ ↔ x ∈ {x | f x < 0}