Theorem: Measurable.measurable_of_countable_ne
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: intro t ht
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
⊢ Measurable g

tactic: have : g ⁻¹' t = g ⁻¹' t ∩ { x | f x = g x }ᶜ ∪ g ⁻¹' t ∩ { x | f x = g x } := by
  simp [← inter_union_distrib_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
⊢ MeasurableSet (g ⁻¹' t)

tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
⊢ MeasurableSet (g ⁻¹' t)

tactic: refine (h.mono (inter_subset_right _ _)).measurableSet.union ?_
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
⊢ MeasurableSet (g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x})

tactic: have : g ⁻¹' t ∩ { x : α | f x = g x } = f ⁻¹' t ∩ { x : α | f x = g x } := by
  ext x
  simp (config := { contextual := true })
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
⊢ MeasurableSet (g ⁻¹' t ∩ {x | f x = g x})

tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this✝ : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
this : g ⁻¹' t ∩ {x | f x = g x} = f ⁻¹' t ∩ {x | f x = g x}
⊢ MeasurableSet (g ⁻¹' t ∩ {x | f x = g x})

tactic: exact (hf ht).inter h.measurableSet.of_compl
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this✝ : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
this : g ⁻¹' t ∩ {x | f x = g x} = f ⁻¹' t ∩ {x | f x = g x}
⊢ MeasurableSet (f ⁻¹' t ∩ {x | f x = g x})

tactic: simp [← inter_union_distrib_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
⊢ g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
⊢ g ⁻¹' t ∩ {x | f x = g x} = f ⁻¹' t ∩ {x | f x = g x}

tactic: simp (config := { contextual := true })
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.44496
δ : Type ?u.44499
δ' : Type ?u.44502
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSingletonClass α
hf : Measurable f
h : Set.Countable {x | f x ≠ g x}
t : Set β
ht : MeasurableSet t
this : g ⁻¹' t = g ⁻¹' t ∩ {x | f x = g x}ᶜ ∪ g ⁻¹' t ∩ {x | f x = g x}
x : α
⊢ x ∈ g ⁻¹' t ∩ {x | f x = g x} ↔ x ∈ f ⁻¹' t ∩ {x | f x = g x}