Theorem: MeasureTheory.SimpleFunc.tendsto_approxOn
File: Mathlib/MeasureTheory/Function/SimpleFuncDense.lean

tactic: haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
hx : f x ∈ closure s
⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))

tactic: rw [← @Subtype.range_coe _ s, ← image_univ, ← (denseRange_denseSeq s).closure_eq] at hx
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
hx : f x ∈ closure s
this : Nonempty ↑s
⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))

tactic: simp (config := { iota := false }) only [approxOn, coe_comp]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
this : Nonempty ↑s
hx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))
⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))

tactic: refine' tendsto_nearestPt (closure_minimal _ isClosed_closure hx)
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
this : Nonempty ↑s
hx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))
⊢ Tendsto (fun n => (↑(nearestPt (fun k => Nat.casesOn k y₀ (Subtype.val ∘ denseSeq ↑s)) n) ∘ f) x) atTop (𝓝 (f x))

tactic: simp (config := { iota := false }) only [Nat.range_casesOn, closure_union, range_comp]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
this : Nonempty ↑s
hx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))
⊢ Subtype.val '' closure (Set.range (denseSeq ↑s)) ⊆
    closure (Set.range fun k => Nat.casesOn k y₀ (Subtype.val ∘ denseSeq ↑s))

tactic: exact
  Subset.trans (image_closure_subset_closure_image continuous_subtype_val)
    (subset_union_right _ _)
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.59478
E : Type ?u.59481
F : Type ?u.59484
𝕜 : Type ?u.59487
inst✝⁴ : MeasurableSpace α
inst✝³ : PseudoEMetricSpace α
inst✝² : OpensMeasurableSpace α
inst✝¹ : MeasurableSpace β
f✝ f : β → α
hf : Measurable f
s : Set α
y₀ : α
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
x : β
this : Nonempty ↑s
hx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))
⊢ Subtype.val '' closure (Set.range (denseSeq ↑s)) ⊆ closure {y₀} ∪ closure (Subtype.val '' Set.range (denseSeq ↑s))