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

tactic: by_cases hf : AEStronglyMeasurable f (μ.restrict t)
state_before: α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
⊢ (∫ (x : α) in t, f x ∂μ) = 0

tactic: swap
state_before: case pos
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (∫ (x : α) in t, f x ∂μ) = 0

case neg
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : ¬AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (∫ (x : α) in t, f x ∂μ) = 0

tactic: have : (∫ x in t, hf.mk f x ∂μ) = 0 := by
  refine' integral_eq_zero_of_ae _
  rw [EventuallyEq,
    ae_restrict_iff (hf.stronglyMeasurable_mk.measurableSet_eq_fun stronglyMeasurable_zero)]
  filter_upwards [ae_imp_of_ae_restrict hf.ae_eq_mk, ht_eq] with x hx h'x h''x
  rw [← hx h''x]
  exact h'x h''x
state_before: case pos
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (∫ (x : α) in t, f x ∂μ) = 0

tactic: rw [← this]
state_before: case pos
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
this : (∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ) = 0
⊢ (∫ (x : α) in t, f x ∂μ) = 0

tactic: exact integral_congr_ae hf.ae_eq_mk
state_before: case pos
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
this : (∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ) = 0
⊢ (∫ (x : α) in t, f x ∂μ) = ∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ

tactic: rw [integral_undef]
state_before: case neg
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : ¬AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (∫ (x : α) in t, f x ∂μ) = 0

tactic: contrapose! hf
state_before: case neg
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : ¬AEStronglyMeasurable f (Measure.restrict μ t)
⊢ ¬Integrable fun x => f x

tactic: exact hf.1
state_before: case neg
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : Integrable fun x => f x
⊢ AEStronglyMeasurable f (Measure.restrict μ t)

tactic: refine' integral_eq_zero_of_ae _
state_before: α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ) = 0

tactic: rw [EventuallyEq,
  ae_restrict_iff (hf.stronglyMeasurable_mk.measurableSet_eq_fun stronglyMeasurable_zero)]
state_before: α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
⊢ (fun x => AEStronglyMeasurable.mk f hf x) =ᵐ[Measure.restrict μ t] 0

tactic: filter_upwards [ae_imp_of_ae_restrict hf.ae_eq_mk, ht_eq] with x hx h'x h''x
state_before: α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
⊢ ∀ᵐ (x : α) ∂μ, x ∈ t → AEStronglyMeasurable.mk f hf x = OfNat.ofNat 0 x

tactic: rw [← hx h''x]
state_before: case h
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
x : α
hx : x ∈ t → f x = AEStronglyMeasurable.mk f hf x
h'x : x ∈ t → f x = 0
h''x : x ∈ t
⊢ AEStronglyMeasurable.mk f hf x = OfNat.ofNat 0 x

tactic: exact h'x h''x
state_before: case h
α : Type u_1
β : Type ?u.72393
E : Type u_2
F : Type ?u.72399
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
ht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0
hf : AEStronglyMeasurable f (Measure.restrict μ t)
x : α
hx : x ∈ t → f x = AEStronglyMeasurable.mk f hf x
h'x : x ∈ t → f x = 0
h''x : x ∈ t
⊢ f x = OfNat.ofNat 0 x