Theorem: measurableSet_eq_fun_of_countable
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

Proof steps:
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁴ : MeasurableSpace G
inst✝³ : Div G
m✝ : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
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 α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
⊢ MeasurableSet {x | f x = g x}
tactic: have : { x | f x = g x } = ⋃ j, { x | f x = j } ∩ { x | g x = j } := by
    ext1 x
    simp only [Set.mem_setOf_eq, Set.mem_iUnion, Set.mem_inter_iff, exists_eq_right']
state_before: α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁴ : MeasurableSpace G
inst✝³ : Div G
m✝ : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
⊢ 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 α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
⊢ MeasurableSet (⋃ j, {x | f x = j} ∩ {x | g x = j})
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 α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
⊢ MeasurableSet (⋃ j, {x | f x = j} ∩ {x | g x = j})
state_after: case refine_1
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁴ : MeasurableSpace G
inst✝³ : Div G
m✝ : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
j : E
⊢ MeasurableSet {x | f x = j}

case refine_2
α✝ : Type u_1
G : Type u_2
α : Type u_3
inst✝⁴ : MeasurableSpace G
inst✝³ : Div G
m✝ : MeasurableSpace α
f✝ g✝ : α → G
μ : Measure α
m : MeasurableSpace α
E : Type u_4
inst✝² : MeasurableSpace E
inst✝¹ : MeasurableSingletonClass E
inst✝ : Countable E
f g : α → E
hf : Measurable f
hg : Measurable g
this : {x | f x = g x} = ⋃ j, {x | f x = j} ∩ {x | g x = j}
j : E
⊢ MeasurableSet {x | g x = j}
tactic: refine MeasurableSet.iUnion fun j => MeasurableSet.inter ?_ ?_