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

tactic: have h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0} := by
  simp_rw [le_iff_lt_or_eq, setOf_or]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x ≤ 0}, f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x ≤ 0}, f x ∂μ

tactic: rw [h_union]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x ≤ 0}, f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ

tactic: have B : NullMeasurableSet {x | f x = 0} μ :=
  hf.nullMeasurableSet_eq_fun aestronglyMeasurable_zero
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ

tactic: symm
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∫ (x : X) in {x | f x < 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0}, f x ∂μ

tactic: refine integral_union_eq_left_of_ae ?_
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∫ (x : X) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ = ∫ (x : X) in {x | f x < 0}, f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∀ᵐ (x : X) ∂μ.restrict {x | f x = 0}, f x = 0

tactic: filter_upwards [ae_restrict_mem₀ B] with x hx using hx
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
B : NullMeasurableSet {x | f x = 0} μ
⊢ ∀ᵐ (x : X) ∂μ.restrict {x | f x = 0}, f x = 0
state_after: no goals

tactic: simp_rw [le_iff_lt_or_eq, setOf_or]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace X
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
inst✝ : LinearOrder E
f : X → E
hf : AEStronglyMeasurable f μ
⊢ {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}
state_after: no goals