l3lab/ntp-mathlib huggingface dataset:
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0 → ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
intro h
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0 → ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0

Next tactic:
intro h
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
rw [← h]
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0

Next tactic:
rw [← h]
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = ↑↑μ ({x | f x = c}ᶜ ∩ s)

Next tactic:
congr
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = ↑↑μ {x | x ∈ s → f x = c}ᶜ

Next tactic:
congr
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> 

Proof state:
case mp.e_a
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ {x | x ∈ s → f x = c}ᶜ = {x | f x = c}ᶜ ∩ s

Next tactic:
ext x
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> 

Proof state:
case mpr.e_a
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ {x | f x = c}ᶜ ∩ s = {x | x ∈ s → f x = c}ᶜ

Next tactic:
ext x
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> 

Proof state:
case mp.e_a.h
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
x : α
⊢ x ∈ {x | x ∈ s → f x = c}ᶜ ↔ x ∈ {x | f x = c}ᶜ ∩ s

Next tactic:
aesop
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> 

Proof state:
case mpr.e_a.h
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
x : α
⊢ x ∈ {x | f x = c}ᶜ ∩ s ↔ x ∈ {x | x ∈ s → f x = c}ᶜ

Next tactic:
aesop
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> aesop
  · 

Proof state:
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
⊢ NullMeasurableSet {x | f x = c}ᶜ

Next tactic:
apply NullMeasurableSet.compl
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem {E : Type*} [MeasurableSpace E]
    [MeasurableSingletonClass E] {f : α → E} (c : E) {s : Set α}
    (f_mble : NullMeasurable f (μ.restrict s)) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply₀]
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> aesop
  · apply NullMeasurableSet.compl
    

Proof state:
case h
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝² : NormedSpace ℝ E✝
E : Type u_5
inst✝¹ : MeasurableSpace E
inst✝ : MeasurableSingletonClass E
f : α → E
c : E
s : Set α
f_mble : NullMeasurable f
⊢ NullMeasurableSet {x | f x = c}

Next tactic:
convert f_mble (MeasurableSet.singleton c)
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  

Proof state:
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ (f =ᵐ[Measure.restrict μ s] fun x => c) ↔ ∀ᵐ (x : α) ∂μ, x ∈ s → f x = c

Next tactic:
simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  

Proof state:
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ ↑↑(Measure.restrict μ s) {x | f x = c}ᶜ = 0 ↔ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
rw [Measure.restrict_apply_eq_zero']
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · 

Proof state:
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0 ↔ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
constructor
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0 → ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
intro h
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0 → ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0

Next tactic:
intro h
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0

Next tactic:
rw [← h]
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0

Next tactic:
rw [← h]
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ ↑↑μ {x | x ∈ s → f x = c}ᶜ = ↑↑μ ({x | f x = c}ᶜ ∩ s)

Next tactic:
congr
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> 

Proof state:
case mpr
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ ↑↑μ ({x | f x = c}ᶜ ∩ s) = ↑↑μ {x | x ∈ s → f x = c}ᶜ

Next tactic:
congr
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> congr <;> 

Proof state:
case mp.e_a
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
⊢ {x | x ∈ s → f x = c}ᶜ = {x | f x = c}ᶜ ∩ s

Next tactic:
ext x
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> congr <;> 

Proof state:
case mpr.e_a
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
⊢ {x | f x = c}ᶜ ∩ s = {x | x ∈ s → f x = c}ᶜ

Next tactic:
ext x
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> 

Proof state:
case mp.e_a.h
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ ({x | f x = c}ᶜ ∩ s) = 0
x : α
⊢ x ∈ {x | x ∈ s → f x = c}ᶜ ↔ x ∈ {x | f x = c}ᶜ ∩ s

Next tactic:
aesop
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> 

Proof state:
case mpr.e_a.h
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
h : ↑↑μ {x | x ∈ s → f x = c}ᶜ = 0
x : α
⊢ x ∈ {x | f x = c}ᶜ ∩ s ↔ x ∈ {x | x ∈ s → f x = c}ᶜ

Next tactic:
aesop
lemma ae_restrict_eq_const_iff_ae_eq_const_of_mem' {E : Type*} (c : E) (f : α → E) {s : Set α}
    (s_mble : MeasurableSet s) :
    f =ᵐ[Measure.restrict μ s] (fun _ ↦ c) ↔ ∀ᵐ x ∂μ, x ∈ s → f x = c := by
  simp only [Measure.ae, MeasurableSet.compl_iff, EventuallyEq, Filter.Eventually,
             Pi.zero_apply, Filter.mem_mk, mem_setOf_eq]
  rw [Measure.restrict_apply_eq_zero']
  · constructor <;> intro h <;> rw [← h] <;> congr <;> ext x <;> aesop
  · 

Proof state:
α : Type u_1
β : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E✝
f✝ g : α → E✝
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E✝
E : Type u_5
c : E
f : α → E
s : Set α
s_mble : MeasurableSet s
⊢ MeasurableSet s

Next tactic:
exact s_mble
/-- If a function equals zero almost everywhere w.r.t. restriction of the measure to `sᶜ`, then its
integral on `s` coincides with its integral on the whole space. -/
lemma set_integral_eq_integral_of_ae_restrict_eq_zero (hs : f =ᵐ[μ.restrict sᶜ] 0) :
    ∫ ω in s, f ω ∂μ = ∫ ω, f ω ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E
hs : f =ᵐ[Measure.restrict μ sᶜ] 0
⊢ ∫ (ω : α) in s, f ω ∂μ = ∫ (ω : α), f ω ∂μ

Next tactic:
borelize E
/-- If a function equals zero almost everywhere w.r.t. restriction of the measure to `sᶜ`, then its
integral on `s` coincides with its integral on the whole space. -/
lemma set_integral_eq_integral_of_ae_restrict_eq_zero (hs : f =ᵐ[μ.restrict sᶜ] 0) :
    ∫ ω in s, f ω ∂μ = ∫ ω, f ω ∂μ := by
  borelize E
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
l l' : Filter α
inst✝ : NormedSpace ℝ E
hs : f =ᵐ[Measure.restrict μ sᶜ] 0
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
⊢ ∫ (ω : α) in s, f ω ∂μ = ∫ (ω : α), f ω ∂μ

Next tactic:
refine set_integral_eq_integral_of_ae_compl_eq_zero ?_