Theorem: ContinuousOn.measurable_piecewise
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: refine' measurable_of_isOpen fun t ht => _
state_before: α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t u : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
⊢ Measurable (Set.piecewise s f g)

tactic: rw [piecewise_preimage, Set.ite]
state_before: α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
⊢ MeasurableSet (Set.piecewise s f g ⁻¹' t)

tactic: apply MeasurableSet.union
state_before: α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
⊢ MeasurableSet (f ⁻¹' t ∩ s ∪ g ⁻¹' t \ s)

tactic: rcases _root_.continuousOn_iff'.1 hf t ht with ⟨u, u_open, hu⟩
state_before: case h₁
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
⊢ MeasurableSet (f ⁻¹' t ∩ s)

tactic: rw [hu]
state_before: case h₁.intro.intro
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u✝ : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet (f ⁻¹' t ∩ s)

tactic: exact u_open.measurableSet.inter hs
state_before: case h₁.intro.intro
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u✝ : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet (u ∩ s)

tactic: rcases _root_.continuousOn_iff'.1 hg t ht with ⟨u, u_open, hu⟩
state_before: case h₂
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
⊢ MeasurableSet (g ⁻¹' t \ s)

tactic: rw [diff_eq_compl_inter, inter_comm, hu]
state_before: case h₂.intro.intro
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u✝ : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : g ⁻¹' t ∩ sᶜ = u ∩ sᶜ
⊢ MeasurableSet (g ⁻¹' t \ s)

tactic: exact u_open.measurableSet.inter hs.compl
state_before: case h₂.intro.intro
α : Type u_1
β : Type ?u.930878
γ : Type u_2
γ₂ : Type ?u.930884
δ : Type ?u.930887
ι : Sort y
s✝ t✝ u✝ : Set α
inst✝¹⁵ : TopologicalSpace α
inst✝¹⁴ : MeasurableSpace α
inst✝¹³ : OpensMeasurableSpace α
inst✝¹² : TopologicalSpace β
inst✝¹¹ : MeasurableSpace β
inst✝¹⁰ : OpensMeasurableSpace β
inst✝⁹ : TopologicalSpace γ
inst✝⁸ : MeasurableSpace γ
inst✝⁷ : BorelSpace γ
inst✝⁶ : TopologicalSpace γ₂
inst✝⁵ : MeasurableSpace γ₂
inst✝⁴ : BorelSpace γ₂
inst✝³ : MeasurableSpace δ
α' : Type ?u.930980
inst✝² : TopologicalSpace α'
inst✝¹ : MeasurableSpace α'
f g : α → γ
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
hf : ContinuousOn f s
hg : ContinuousOn g (sᶜ)
hs : MeasurableSet s
t : Set γ
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : g ⁻¹' t ∩ sᶜ = u ∩ sᶜ
⊢ MeasurableSet (u ∩ sᶜ)