Theorem: iteratedDerivWithin_eq_iterate
File: Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean

tactic: induction' n with n IH generalizing x
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
⊢ iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x
state_after: case zero
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
x : 𝕜
hx : x ∈ s
⊢ iteratedDerivWithin 0 f s x = (fun g => derivWithin g s)^[0] f x

case succ
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n✝ : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
n : ℕ
IH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x
x : 𝕜
hx : x ∈ s
⊢ iteratedDerivWithin (n + 1) f s x = (fun g => derivWithin g s)^[n + 1] f x

tactic: simp
state_before: case zero
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
x : 𝕜
hx : x ∈ s
⊢ iteratedDerivWithin 0 f s x = (fun g => derivWithin g s)^[0] f x
state_after: no goals

tactic: rw [iteratedDerivWithin_succ (hs x hx), Function.iterate_succ']
state_before: case succ
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n✝ : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
n : ℕ
IH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x
x : 𝕜
hx : x ∈ s
⊢ iteratedDerivWithin (n + 1) f s x = (fun g => derivWithin g s)^[n + 1] f x
state_after: case succ
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n✝ : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
n : ℕ
IH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x
x : 𝕜
hx : x ∈ s
⊢ derivWithin (iteratedDerivWithin n f s) s x = ((fun g => derivWithin g s) ∘ (fun g => derivWithin g s)^[n]) f x

tactic: exact derivWithin_congr (fun y hy => IH hy) (IH hx)
state_before: case succ
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n✝ : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
hs : UniqueDiffOn 𝕜 s
n : ℕ
IH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x
x : 𝕜
hx : x ∈ s
⊢ derivWithin (iteratedDerivWithin n f s) s x = ((fun g => derivWithin g s) ∘ (fun g => derivWithin g s)^[n]) f x
state_after: no goals