Theorem: MeasureTheory.StronglyMeasurable.piecewise
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: refine ⟨fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n), fun x => ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
⊢ StronglyMeasurable (s.piecewise f g)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))

tactic: by_cases hx : x ∈ s
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
hx : x ∉ s
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))

tactic: simpa [@Set.piecewise_eq_of_mem _ _ _ _ _ (fun _ => Classical.propDecidable _) _ hx,
  hx] using hf.tendsto_approx x
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))
state_after: no goals

tactic: simpa [@Set.piecewise_eq_of_not_mem _ _ _ _ _ (fun _ => Classical.propDecidable _) _ hx,
  hx] using hg.tendsto_approx x
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
s : Set α
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : StronglyMeasurable f
hg : StronglyMeasurable g
x : α
hx : x ∉ s
⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n)) n) x) atTop
    (𝓝 (s.piecewise f g x))
state_after: no goals