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

tactic: let k := f ⁻¹' {0}
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
⊢ (∫ (x : α) in t, f x ∂μ) = ∫ (x : α) in s, f x ∂μ

tactic: have hk : MeasurableSet k := by borelize E; exact haux.measurable (measurableSet_singleton _)
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
⊢ (∫ (x : α) in t, f x ∂μ) = ∫ (x : α) in s, f x ∂μ

tactic: borelize E
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
⊢ MeasurableSet k

tactic: exact haux.measurable (measurableSet_singleton _)
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
⊢ MeasurableSet k

tactic: rw [integral_inter_add_diff hk h'aux]
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ (∫ (x : α) in t, f x ∂μ) = (∫ (x : α) in t ∩ k, f x ∂μ) + ∫ (x : α) in t \ k, f x ∂μ

tactic: rw [set_integral_eq_zero_of_forall_eq_zero fun x hx => ?_, zero_add]
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ ((∫ (x : α) in t ∩ k, f x ∂μ) + ∫ (x : α) in t \ k, f x ∂μ) = ∫ (x : α) in t \ k, f x ∂μ

tactic: exact hx.2
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t ∩ k
⊢ f x = 0

tactic: apply set_integral_congr_set_ae
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ (∫ (x : α) in t \ k, f x ∂μ) = ∫ (x : α) in s \ k, f x ∂μ

tactic: filter_upwards [h't] with x hx
state_before: case hst
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ t \ k =ᵐ[μ] s \ k

tactic: change (x ∈ t \ k) = (x ∈ s \ k)
state_before: case h
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
⊢ (t \ f ⁻¹' {0}) x = (s \ f ⁻¹' {0}) x

tactic: simp only [mem_preimage, mem_singleton_iff, eq_iff_iff, and_congr_left_iff, mem_diff]
state_before: case h
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
⊢ (x ∈ t \ k) = (x ∈ s \ k)

tactic: intro h'x
state_before: case h
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
⊢ ¬f x = 0 → (x ∈ t ↔ x ∈ s)

tactic: by_cases xs : x ∈ s
state_before: case h
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
h'x : ¬f x = 0
⊢ x ∈ t ↔ x ∈ s

tactic: simp only [xs, hts xs]
state_before: case pos
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
h'x : ¬f x = 0
xs : x ∈ s
⊢ x ∈ t ↔ x ∈ s

tactic: simp only [xs, iff_false_iff]
state_before: case neg
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
h'x : ¬f x = 0
xs : ¬x ∈ s
⊢ x ∈ t ↔ x ∈ s

tactic: intro xt
state_before: case neg
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
h'x : ¬f x = 0
xs : ¬x ∈ s
⊢ ¬x ∈ t

tactic: exact h'x (hx ⟨xt, xs⟩)
state_before: case neg
α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
x : α
hx : x ∈ t \ s → f x = 0
h'x : ¬f x = 0
xs : ¬x ∈ s
xt : x ∈ t
⊢ False

tactic: have : ∀ x ∈ s ∩ k, f x = 0 := fun x hx => hx.2
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ (∫ (x : α) in s \ k, f x ∂μ) = (∫ (x : α) in s ∩ k, f x ∂μ) + ∫ (x : α) in s \ k, f x ∂μ

tactic: rw [set_integral_eq_zero_of_forall_eq_zero this, zero_add]
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
this : ∀ (x : α), x ∈ s ∩ k → f x = 0
⊢ (∫ (x : α) in s \ k, f x ∂μ) = (∫ (x : α) in s ∩ k, f x ∂μ) + ∫ (x : α) in s \ k, f x ∂μ

tactic: rw [integral_inter_add_diff hk (h'aux.mono hts le_rfl)]
state_before: α : Type u_1
β : Type ?u.88408
E : Type u_2
F : Type ?u.88414
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
hts : s ⊆ t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
haux : StronglyMeasurable f
h'aux : IntegrableOn f t
k : Set α := f ⁻¹' {0}
hk : MeasurableSet k
⊢ ((∫ (x : α) in s ∩ k, f x ∂μ) + ∫ (x : α) in s \ k, f x ∂μ) = ∫ (x : α) in s, f x ∂μ