l3lab/ntp-mathlib huggingface dataset:
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
⊢ ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l',
    dist (OfNat.ofNat 0 n.2)
        (ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) <
      ε

Next tactic:
apply (hf' q hq).mono
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
⊢ ∀ (x : (ι × ι) × 𝕜),
    dist (OfNat.ofNat 0 x.2) (f' x.1.1 x.2 - f' x.1.2 x.2) < q →
      dist (OfNat.ofNat 0 x.2)
          (ContinuousLinearMap.smulRight 1 (f' x.1.1 x.2) - ContinuousLinearMap.smulRight 1 (f' x.1.2 x.2)) <
        ε

Next tactic:
intro n hn
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < q
⊢ dist (OfNat.ofNat 0 n.2)
      (ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) <
    ε

Next tactic:
refine' lt_of_le_of_lt _ hq'
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < q
⊢ dist (OfNat.ofNat 0 n.2)
      (ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) ≤
    q

Next tactic:
simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ < q
⊢ ‖ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)‖ ≤ q

Next tactic:
refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
  refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ < q
⊢ ∀ (x : 𝕜),
    ‖(ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) x‖ ≤ q * ‖x‖

Next tactic:
intro z
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
  refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
  intro z
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ < q
z : 𝕜
⊢ ‖(ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) z‖ ≤ q * ‖z‖

Next tactic:
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
    ContinuousLinearMap.one_apply]
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
  refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
  intro z
  simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
    ContinuousLinearMap.one_apply]
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ < q
z : 𝕜
⊢ ‖z • f' n.1.1 n.2 - z • f' n.1.2 n.2‖ ≤ q * ‖z‖

Next tactic:
rw [← smul_sub, norm_smul, mul_comm]
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l' := by
  -- The tricky part of this proof is that operator norms are written in terms of `≤` whereas
  -- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
  -- property of `ℝ`
  rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
    Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
  intro ε hε
  obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
  apply (hf' q hq).mono
  intro n hn
  refine' lt_of_le_of_lt _ hq'
  simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
  refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
  intro z
  simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
    ContinuousLinearMap.one_apply]
  rw [← smul_sub, norm_smul, mul_comm]
  

Proof state:
case intro.intro
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
l' : Filter 𝕜
hf' : ∀ ε > 0, ∀ᶠ (n : (ι × ι) × 𝕜) in (l ×ˢ l) ×ˢ l', dist (OfNat.ofNat 0 n.2) (f' n.1.1 n.2 - f' n.1.2 n.2) < ε
ε : ℝ
hε : ε > 0
q : ℝ
hq : 0 < q
hq' : q < ε
n : (ι × ι) × 𝕜
hn : ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ < q
z : 𝕜
⊢ ‖f' n.1.1 n.2 - f' n.1.2 n.2‖ * ‖z‖ ≤ q * ‖z‖

Next tactic:
gcongr
theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) := by
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
hf' : UniformCauchySeqOnFilter f' l (𝓝 x)
hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2
hfg : Cauchy (map (fun n => f n x) l)
⊢ UniformCauchySeqOnFilter f l (𝓝 x)

Next tactic:
simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
hf' : UniformCauchySeqOnFilter f' l (𝓝 x)
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasFDerivAt (f n.1) (ContinuousLinearMap.smulRight 1 (f' n.1 n.2)) n.2
⊢ UniformCauchySeqOnFilter f l (𝓝 x)

Next tactic:
exact uniformCauchySeqOnFilter_of_fderiv hf'.one_smulRight hf hfg
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf' : UniformCauchySeqOn f' l (Metric.ball x r)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasDerivAt (f n) (f' n y) y
hfg : Cauchy (map (fun n => f n x) l)
⊢ UniformCauchySeqOn f l (Metric.ball x r)

Next tactic:
simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf' : UniformCauchySeqOn f' l (Metric.ball x r)
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (ContinuousLinearMap.smulRight 1 (f' n y)) y
⊢ UniformCauchySeqOn f l (Metric.ball x r)

Next tactic:
rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf' : UniformCauchySeqOnFilter f' l (𝓟 (Metric.ball x r))
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (ContinuousLinearMap.smulRight 1 (f' n y)) y
⊢ UniformCauchySeqOn f l (Metric.ball x r)

Next tactic:
have hf' :
    UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l
      (Metric.ball x r) := by
    rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter]
    exact hf'.one_smulRight
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
  have hf' :
    UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l
      (Metric.ball x r) := by
    

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf' : UniformCauchySeqOnFilter f' l (𝓟 (Metric.ball x r))
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (ContinuousLinearMap.smulRight 1 (f' n y)) y
⊢ UniformCauchySeqOn (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l (Metric.ball x r)

Next tactic:
rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter]
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
  have hf' :
    UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l
      (Metric.ball x r) := by
    rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter]
    

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf' : UniformCauchySeqOnFilter f' l (𝓟 (Metric.ball x r))
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (ContinuousLinearMap.smulRight 1 (f' n y)) y
⊢ UniformCauchySeqOnFilter (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l (𝓟 (Metric.ball x r))

Next tactic:
exact hf'.one_smulRight
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
  simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
  rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
  have hf' :
    UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l
      (Metric.ball x r) := by
    rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter]
    exact hf'.one_smulRight
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝² : IsROrC 𝕜
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
r : ℝ
hf'✝ : UniformCauchySeqOnFilter f' l (𝓟 (Metric.ball x r))
hfg : Cauchy (map (fun n => f n x) l)
hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (ContinuousLinearMap.smulRight 1 (f' n y)) y
hf' : UniformCauchySeqOn (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l (Metric.ball x r)
⊢ UniformCauchySeqOn f l (Metric.ball x r)

Next tactic:
exact uniformCauchySeqOn_ball_of_fderiv hf' hf hfg
theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
    (hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : ∀ᶠ y in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) : HasDerivAt g (g' x) x := by
  -- The first part of the proof rewrites `hf` and the goal to be functions so that Lean
  -- can recognize them when we apply `hasFDerivAt_of_tendstoUniformlyOnFilter`
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
inst✝ : NeBot l
hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x)
hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2
hfg : ∀ᶠ (y : 𝕜) in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))
⊢ HasDerivAt g (g' x) x

Next tactic:
let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)
theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
    (hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : ∀ᶠ y in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) : HasDerivAt g (g' x) x := by
  -- The first part of the proof rewrites `hf` and the goal to be functions so that Lean
  -- can recognize them when we apply `hasFDerivAt_of_tendstoUniformlyOnFilter`
  let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
inst✝ : NeBot l
hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x)
hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2
hfg : ∀ᶠ (y : 𝕜) in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))
F' : ι → 𝕜 → 𝕜 →L[𝕜] G := fun n z => ContinuousLinearMap.smulRight 1 (f' n z)
⊢ HasDerivAt g (g' x) x

Next tactic:
let G' z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (g' z)
theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
    (hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : ∀ᶠ y in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) : HasDerivAt g (g' x) x := by
  -- The first part of the proof rewrites `hf` and the goal to be functions so that Lean
  -- can recognize them when we apply `hasFDerivAt_of_tendstoUniformlyOnFilter`
  let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)
  let G' z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (g' z)
  

Proof state:
ι : Type u_1
l : Filter ι
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f : ι → 𝕜 → G
g : 𝕜 → G
f' : ι → 𝕜 → G
g' : 𝕜 → G
x : 𝕜
inst✝ : NeBot l
hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x)
hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2
hfg : ∀ᶠ (y : 𝕜) in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))
F' : ι → 𝕜 → 𝕜 →L[𝕜] G := fun n z => ContinuousLinearMap.smulRight 1 (f' n z)
G' : 𝕜 → 𝕜 →L[𝕜] G := fun z => ContinuousLinearMap.smulRight 1 (g' z)
⊢ HasDerivAt g (g' x) x

Next tactic:
simp_rw [hasDerivAt_iff_hasFDerivAt] at hf ⊢