l3lab/ntp-mathlib huggingface dataset:
/-- A more convenient version of `le_sup_seminorm_apply`.

The set `Finset.Iic m` is the set of all pairs `(k', n')` with `k' ≤ m.1` and `n' ≤ m.2`.
Note that the constant is far from optimal. -/
theorem one_add_le_sup_seminorm_apply {m : ℕ × ℕ} {k n : ℕ} (hk : k ≤ m.1) (hn : n ≤ m.2)
    (f : 𝓢(E, F)) (x : E) :
    (1 + ‖x‖) ^ k * ‖iteratedFDeriv ℝ n f x‖ ≤
      2 ^ m.1 * (Finset.Iic m).sup (fun m => SchwartzMap.seminorm 𝕜 m.1 m.2) f := by
  rw [add_comm, add_pow]
  simp only [one_pow, mul_one, Finset.sum_congr, Finset.sum_mul]
  norm_cast
  rw [← Nat.sum_range_choose m.1]
  push_cast
  rw [Finset.sum_mul]
  have hk' : Finset.range (k + 1) ⊆ Finset.range (m.1 + 1) := by
    rwa [Finset.range_subset, add_le_add_iff_right]
  refine' le_trans (Finset.sum_le_sum_of_subset_of_nonneg hk' fun _ _ _ => by positivity) _
  refine' Finset.sum_le_sum fun i hi => _
  rw [mul_comm (‖x‖ ^ i), mul_assoc]
  refine' mul_le_mul _ _ (by positivity) (by positivity)
  · exact mod_cast Nat.choose_le_choose i hk
  · trans
    · exact le_seminorm 𝕜 i n f x
    · apply Seminorm.le_def.1
      

Proof state:
case a
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
m : ℕ × ℕ
k n : ℕ
hk : k ≤ m.1
hn : n ≤ m.2
f : 𝓢(E, F)
x : E
hk' : Finset.range (k + 1) ⊆ Finset.range (m.1 + 1)
i : ℕ
hi : i ∈ Finset.range (m.1 + 1)
⊢ SchwartzMap.seminorm 𝕜 i n ≤ Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.1 m.2

Next tactic:
exact
        Finset.le_sup_of_le (Finset.mem_Iic.2 <|
          Prod.mk_le_mk.2 ⟨Finset.mem_range_succ_iff.mp hi, hn⟩) le_rfl
theorem _root_.schwartz_withSeminorms : WithSeminorms (schwartzSeminormFamily 𝕜 E F) := by
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
⊢ WithSeminorms (schwartzSeminormFamily 𝕜 E F)

Next tactic:
have A : WithSeminorms (schwartzSeminormFamily ℝ E F) := ⟨rfl⟩
theorem _root_.schwartz_withSeminorms : WithSeminorms (schwartzSeminormFamily 𝕜 E F) := by
  have A : WithSeminorms (schwartzSeminormFamily ℝ E F) := ⟨rfl⟩
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
A : WithSeminorms (schwartzSeminormFamily ℝ E F)
⊢ WithSeminorms (schwartzSeminormFamily 𝕜 E F)

Next tactic:
rw [SeminormFamily.withSeminorms_iff_nhds_eq_iInf] at A ⊢
theorem _root_.schwartz_withSeminorms : WithSeminorms (schwartzSeminormFamily 𝕜 E F) := by
  have A : WithSeminorms (schwartzSeminormFamily ℝ E F) := ⟨rfl⟩
  rw [SeminormFamily.withSeminorms_iff_nhds_eq_iInf] at A ⊢
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
A : nhds 0 = ⨅ i, Filter.comap (⇑(schwartzSeminormFamily ℝ E F i)) (nhds 0)
⊢ nhds 0 = ⨅ i, Filter.comap (⇑(schwartzSeminormFamily 𝕜 E F i)) (nhds 0)

Next tactic:
rw [A]
theorem _root_.schwartz_withSeminorms : WithSeminorms (schwartzSeminormFamily 𝕜 E F) := by
  have A : WithSeminorms (schwartzSeminormFamily ℝ E F) := ⟨rfl⟩
  rw [SeminormFamily.withSeminorms_iff_nhds_eq_iInf] at A ⊢
  rw [A]
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
A : nhds 0 = ⨅ i, Filter.comap (⇑(schwartzSeminormFamily ℝ E F i)) (nhds 0)
⊢ ⨅ i, Filter.comap (⇑(schwartzSeminormFamily ℝ E F i)) (nhds 0) =
    ⨅ i, Filter.comap (⇑(schwartzSeminormFamily 𝕜 E F i)) (nhds 0)

Next tactic:
rfl
instance instContinuousSMul : ContinuousSMul 𝕜 𝓢(E, F) := by
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
⊢ ContinuousSMul 𝕜 𝓢(E, F)

Next tactic:
rw [(schwartz_withSeminorms 𝕜 E F).withSeminorms_eq]
instance instContinuousSMul : ContinuousSMul 𝕜 𝓢(E, F) := by
  rw [(schwartz_withSeminorms 𝕜 E F).withSeminorms_eq]
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 F
inst✝ : SMulCommClass ℝ 𝕜 F
⊢ ContinuousSMul 𝕜 𝓢(E, F)

Next tactic:
exact (schwartzSeminormFamily 𝕜 E F).moduleFilterBasis.continuousSMul
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
hf_temperate : Function.HasTemperateGrowth f
n : ℕ
⊢ ∃ k C, ∃ (_ : 0 ≤ C), ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k

Next tactic:
choose k C f using hf_temperate.2
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
⊢ ∃ k C, ∃ (_ : 0 ≤ C), ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ k

Next tactic:
use (Finset.range (n + 1)).sup k
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
⊢ ∃ C,
    ∃ (_ : 0 ≤ C), ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by 

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
⊢ Finset.Nonempty (Finset.range (n + 1))

Next tactic:
simp
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
⊢ ∃ C,
    ∃ (_ : 0 ≤ C), ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by 

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
⊢ 0 ≤ C'

Next tactic:
simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
⊢ ∃ C,
    ∃ (_ : 0 ≤ C), ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
use C', hC'
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
⊢ ∀ N ≤ n, ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
intro N hN x
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ≤ n
x : E
⊢ ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
rw [← Finset.mem_range_succ_iff] at hN
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  

Proof state:
case h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by 

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ 0 ≤ (1 + ‖x‖) ^ k N

Next tactic:
positivity
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · 

Proof state:
case h.refine'_1
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ C N ≤ C'

Next tactic:
simp only [Finset.le_sup'_iff, le_max_iff]
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · simp only [Finset.le_sup'_iff, le_max_iff]
    

Proof state:
case h.refine'_1
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ C N ≤ 0 ∨ ∃ b ∈ Finset.range (n + 1), C N ≤ C b

Next tactic:
right
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · simp only [Finset.le_sup'_iff, le_max_iff]
    right
    

Proof state:
case h.refine'_1.h
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ ∃ b ∈ Finset.range (n + 1), C N ≤ C b

Next tactic:
exact ⟨N, hN, rfl.le⟩
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · simp only [Finset.le_sup'_iff, le_max_iff]
    right
    exact ⟨N, hN, rfl.le⟩
  

Proof state:
case h.refine'_2
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ (1 + ‖x‖) ^ k N ≤ (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k

Next tactic:
refine' pow_le_pow_right (by simp only [le_add_iff_nonneg_right, norm_nonneg]) _
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · simp only [Finset.le_sup'_iff, le_max_iff]
    right
    exact ⟨N, hN, rfl.le⟩
  refine' pow_le_pow_right (by 

Proof state:
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ 1 ≤ 1 + ‖x‖

Next tactic:
simp only [le_add_iff_nonneg_right, norm_nonneg]
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ) (_ : 0 ≤ C), ∀ (N : ℕ) (_ : N ≤ n) (x : E),
      ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k := by
  choose k C f using hf_temperate.2
  use (Finset.range (n + 1)).sup k
  let C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)
  have hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]
  use C', hC'
  intro N hN x
  rw [← Finset.mem_range_succ_iff] at hN
  refine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')
  · simp only [Finset.le_sup'_iff, le_max_iff]
    right
    exact ⟨N, hN, rfl.le⟩
  refine' pow_le_pow_right (by simp only [le_add_iff_nonneg_right, norm_nonneg]) _
  

Proof state:
case h.refine'_2
𝕜 : Type u_1
𝕜' : Type u_2
D : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f✝ : E → F
hf_temperate : Function.HasTemperateGrowth f✝
n : ℕ
k : ℕ → ℕ
C : ℕ → ℝ
f : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n
C' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)
hC' : 0 ≤ C'
N : ℕ
hN : N ∈ Finset.range (Nat.succ n)
x : E
⊢ k N ≤ Finset.sup (Finset.range (n + 1)) k

Next tactic:
exact Finset.le_sup hN