Theorem: MeasureTheory.IntegrableOn.of_ae_diff_eq_zero
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: let u := { x ∈ s | f x ≠ 0 }
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
⊢ IntegrableOn f t

tactic: have hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
⊢ IntegrableOn f t

tactic: let v := toMeasurable μ u
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
⊢ IntegrableOn f t

tactic: apply (A.union B).mono_set _
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
B : IntegrableOn f (t \ v)
⊢ IntegrableOn f t

tactic: rw [union_diff_self]
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
B : IntegrableOn f (t \ v)
⊢ t ⊆ v ∪ t \ v

tactic: exact subset_union_right _ _
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
B : IntegrableOn f (t \ v)
⊢ t ⊆ v ∪ t

tactic: rw [IntegrableOn, hu.restrict_toMeasurable]
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
⊢ IntegrableOn f v

tactic: exact hu
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
⊢ Integrable f

tactic: intro x hx
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
⊢ ∀ (x : α), x ∈ u → f x ≠ 0

tactic: exact hx.2
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
x : α
hx : x ∈ u
⊢ f x ≠ 0

tactic: apply integrableOn_zero.congr
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
⊢ IntegrableOn f (t \ v)

tactic: filter_upwards [ae_restrict_of_ae h't,
  ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx
state_before: α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
⊢ (fun x => 0) =ᵐ[Measure.restrict μ (t \ v)] f

tactic: by_cases h'x : x ∈ s
state_before: case h
α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
x : α
hxt : x ∈ t \ s → f x = 0
hx : x ∈ t \ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}
⊢ 0 = f x

tactic: by_contra H
state_before: case pos
α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
x : α
hxt : x ∈ t \ s → f x = 0
hx : x ∈ t \ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}
h'x : x ∈ s
⊢ 0 = f x

tactic: exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩)
state_before: case pos
α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
x : α
hxt : x ∈ t \ s → f x = 0
hx : x ∈ t \ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}
h'x : x ∈ s
H : ¬0 = f x
⊢ False

tactic: exact (hxt ⟨hx.1, h'x⟩).symm
state_before: case neg
α : Type u_1
β : Type ?u.1647552
E : Type u_2
F : Type ?u.1647558
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
hf : IntegrableOn f s
ht : NullMeasurableSet t
h't : ∀ᵐ (x : α) ∂μ, x ∈ t \ s → f x = 0
u : Set α := {x | x ∈ s ∧ f x ≠ 0}
hu : IntegrableOn f u
v : Set α := toMeasurable μ u
A : IntegrableOn f v
x : α
hxt : x ∈ t \ s → f x = 0
hx : x ∈ t \ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}
h'x : ¬x ∈ s
⊢ 0 = f x