-- Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
    (hf : ∀ᶠ n in l, ∀ x : 𝕜, HasDerivAt (f n) (f' n x) x)
    (hfg : ∀ x : 𝕜, Tendsto (fun n => f n x) l (𝓝 (g x))) (x : 𝕜) : HasDerivAt g (g' x) x

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
⊢ ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))

Tactic:
simp [hfg]

Result:
no goals

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf'✝ : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg✝ : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
hfg : ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))
hf' : TendstoUniformlyOn f' g' l Set.univ
⊢ HasDerivAt g (g' x) x

Tactic:
exact hasDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg (Set.mem_univ x)

Result:
no goals

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg✝ : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
hfg : ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))
⊢ TendstoUniformlyOn f' g' l Set.univ

Tactic:
rwa [tendstoUniformlyOn_univ]

Result:
no goals

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
⊢ HasDerivAt g (g' x) x

Tactic:
have hf : ∀ᶠ n in l, ∀ x : 𝕜, x ∈ Set.univ → HasDerivAt (f n) (f' n x) x := by
  filter_upwards [hf] with n h x _ using h x

Result:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
⊢ HasDerivAt g (g' x) x

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
⊢ ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x

Tactic:
filter_upwards [hf] with n h x _ using h x

Result:
no goals

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg✝ : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
hfg : ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))
⊢ HasDerivAt g (g' x) x

Tactic:
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]

Result:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf'✝ : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg✝ : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
hfg : ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))
hf' : TendstoUniformlyOn f' g' l Set.univ
⊢ HasDerivAt g (g' x) x

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
⊢ HasDerivAt g (g' x) x

Tactic:
have hfg : ∀ x : 𝕜, x ∈ Set.univ → Tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg]

Result:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝⁴ : NontriviallyNormedField 𝕜
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
inst✝¹ : IsRCLikeNormedField 𝕜
inst✝ : l.NeBot
hf' : TendstoUniformly f' g' l
hf✝ : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x
hfg✝ : ∀ (x : 𝕜), Tendsto (fun n => f n x) l (𝓝 (g x))
x : 𝕜
hf : ∀ᶠ (n : ι) in l, ∀ x ∈ Set.univ, HasDerivAt (f n) (f' n x) x
hfg : ∀ x ∈ Set.univ, Tendsto (fun n => f n x) l (𝓝 (g x))
⊢ HasDerivAt g (g' x) x