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

tactic: let g_seq_s : ℕ → @SimpleFunc α m β := fun n => (hf.approx n).restrict s
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0

tactic: have hg_eq : ∀ x ∈ s, ∀ n, g_seq_s n x = hf.approx n x := by
  intro x hx n
  rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_mem hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0

tactic: have hg_zero : ∀ x ∉ s, ∀ n, g_seq_s n x = 0 := by
  intro x hx n
  rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_not_mem hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0

tactic: refine ⟨g_seq_s, fun x => ?_, hg_zero⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ x ∉ s, ∀ (n : ℕ), ↑(fs n) x = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f 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 β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f 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 β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∉ s
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))

tactic: intro x hx n
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
⊢ ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
x : α
hx : x ∈ s
n : ℕ
⊢ ↑(g_seq_s n) x = ↑(hf.approx n) x

tactic: rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_mem hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
x : α
hx : x ∈ s
n : ℕ
⊢ ↑(g_seq_s n) x = ↑(hf.approx n) x
state_after: no goals

tactic: intro x hx n
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
⊢ ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
x : α
hx : x ∉ s
n : ℕ
⊢ ↑(g_seq_s n) x = 0

tactic: rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_not_mem hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
x : α
hx : x ∉ s
n : ℕ
⊢ ↑(g_seq_s n) x = 0
state_after: no goals

tactic: simp_rw [hg_eq x hx]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f 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 β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑(hf.approx n) x) atTop (𝓝 (f x))

tactic: exact 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 β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∈ s
⊢ Tendsto (fun n => ↑(hf.approx n) x) atTop (𝓝 (f x))
state_after: no goals

tactic: simp_rw [hg_zero x hx, hf_zero x hx]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∉ s
⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∉ s
⊢ Tendsto (fun n => 0) atTop (𝓝 0)

tactic: exact tendsto_const_nhds
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
f✝ g : α → β
m : MeasurableSpace α
inst✝¹ : TopologicalSpace β
inst✝ : Zero β
s : Set α
f : α → β
hs : MeasurableSet s
hf : StronglyMeasurable f
hf_zero : ∀ x ∉ s, f x = 0
g_seq_s : ℕ → α →ₛ β := fun n => (hf.approx n).restrict s
hg_eq : ∀ x ∈ s, ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(hf.approx n) x
hg_zero : ∀ x ∉ s, ∀ (n : ℕ), ↑(g_seq_s n) x = 0
x : α
hx : x ∉ s
⊢ Tendsto (fun n => 0) atTop (𝓝 0)
state_after: no goals