Theorem: measurableSet_eq_fun'
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

tactic: have : {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0} := by
  ext
  simp only [Set.mem_setOf_eq, Pi.sub_apply, tsub_eq_zero_iff_le, Set.mem_inter_iff]
  exact ⟨fun h ↦ ⟨h.le, h.symm.le⟩, fun h ↦ le_antisymm h.1 h.2⟩
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
⊢ MeasurableSet {x | f x = g x}
state_after: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
this : {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
⊢ MeasurableSet {x | f x = g x}

tactic: rw [this]
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
this : {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
⊢ MeasurableSet {x | f x = g x}
state_after: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
this : {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
⊢ MeasurableSet ({a | (f - g) a = 0} ∩ {a | (g - f) a = 0})

tactic: exact ((hf.sub hg) (measurableSet_singleton 0)).inter ((hg.sub hf) (measurableSet_singleton 0))
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
this : {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
⊢ MeasurableSet ({a | (f - g) a = 0} ∩ {a | (g - f) a = 0})
state_after: no goals

tactic: ext
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
⊢ {a | f a = g a} = {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
state_after: case h
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝¹ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
x✝ : α
⊢ x✝ ∈ {a | f a = g a} ↔ x✝ ∈ {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}

tactic: simp only [Set.mem_setOf_eq, Pi.sub_apply, tsub_eq_zero_iff_le, Set.mem_inter_iff]
state_before: case h
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝¹ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
x✝ : α
⊢ x✝ ∈ {a | f a = g a} ↔ x✝ ∈ {a | (f - g) a = 0} ∩ {a | (g - f) a = 0}
state_after: case h
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝¹ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
x✝ : α
⊢ f x✝ = g x✝ ↔ f x✝ ≤ g x✝ ∧ g x✝ ≤ f x✝

tactic: exact ⟨fun h ↦ ⟨h.le, h.symm.le⟩, fun h ↦ le_antisymm h.1 h.2⟩
state_before: case h
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁶ : MeasurableSpace G
inst✝⁵ : Div G
m : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
β : Type u_4
inst✝⁴ : CanonicallyOrderedAddCommMonoid β
inst✝³ : Sub β
inst✝² : OrderedSub β
x✝¹ : MeasurableSpace β
inst✝¹ : MeasurableSub₂ β
inst✝ : MeasurableSingletonClass β
f g : α → β
hf : Measurable f
hg : Measurable g
x✝ : α
⊢ f x✝ = g x✝ ↔ f x✝ ≤ g x✝ ∧ g x✝ ≤ f x✝
state_after: no goals