-- Module: Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries
Goal:
𝕜 : Type u
inst : NontriviallyNormedField 𝕜
E : Type uE
inst_1 : NormedAddCommGroup E
inst_2 : NormedSpace 𝕜 E
F : Type uF
inst_3 : NormedAddCommGroup F
inst_4 : NormedSpace 𝕜 F
s : Set E
f : E → F
x : E
n : ℕ
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
m : Fin (n + 1) → E
zero :
  ∀ {x : E} (hx : x ∈ s) (m : Fin (HAdd.hAdd (α := ℕ) 0 1) → E),
    Eq.{uF + 1} (α := F)
      ((iteratedFDerivWithin 𝕜 (HAdd.hAdd (α := ℕ) 0 1) f s x : (a : (i : Fin (0 + 1)) → E) → F) m : F)
      ((((iteratedFDerivWithin 𝕜 0 (fun (y : E) ↦ fderivWithin 𝕜 f s y) s x : (a : (i : Fin 0) → E) → E →L[𝕜] F)
                (init (α := fun (i : Fin (HAdd.hAdd (α := ℕ) 0 1)) ↦ E) m) :
              E →L[𝕜] F) :
            (a : E) → F)
          (m (last 0)) :
        F)
succ :
  ∀ (n : ℕ)
    (IH :
      ∀ {x : E} (hx : x ∈ s) (m : Fin (n + 1) → E),
        Eq.{uF + 1} (α := F) ((iteratedFDerivWithin 𝕜 (n + 1) f s x : (a : (i : Fin (n + 1)) → E) → F) m : F)
          ((((iteratedFDerivWithin 𝕜 n (fun (y : E) ↦ fderivWithin 𝕜 f s y) s x : (a : (i : Fin n) → E) → E →L[𝕜] F)
                    (init (α := fun (i : Fin (n + 1)) ↦ E) m) :
                  E →L[𝕜] F) :
                (a : E) → F)
              (m (last n)) :
            F))
    {x : E} (hx : x ∈ s) (m : Fin (n + 1 + 1) → E),
    Eq.{uF + 1} (α := F) ((iteratedFDerivWithin 𝕜 (n + 1 + 1) f s x : (a : (i : Fin (n + 1 + 1)) → E) → F) m : F)
      ((((iteratedFDerivWithin 𝕜 (n + 1) (fun (y : E) ↦ fderivWithin 𝕜 f s y) s x :
                  (a : (i : Fin (n + 1)) → E) → E →L[𝕜] F)
                (init (α := fun (i : Fin (n + 1 + 1)) ↦ E) m) :
              E →L[𝕜] F) :
            (a : E) → F)
          (m (last (n + 1))) :
        F)
⊢ Eq.{uF + 1} (α := F) ((iteratedFDerivWithin 𝕜 (n + 1) f s x : (a : (i : Fin (n + 1)) → E) → F) m : F)
    ((((iteratedFDerivWithin 𝕜 n (fun (y : E) ↦ fderivWithin 𝕜 f s y) s x : (a : (i : Fin n) → E) → E →L[𝕜] F)
              (init (α := fun (i : Fin (n + 1)) ↦ E) m) :
            E →L[𝕜] F) :
          (a : E) → F)
        (m (last n)) :
      F)

Tactic:
induction n generalizing x with
  | zero =>
    rw [iteratedFDerivWithin_succ_eq_comp_left, iteratedFDerivWithin_zero_eq_comp,
      iteratedFDerivWithin_zero_apply, Function.comp_apply,
      LinearIsometryEquiv.comp_fderivWithin _ (hs x hx)]
    simp
  | succ n IH =>
    let I := (continuousMultilinearCurryRightEquiv' 𝕜 n E F).symm
    have A : ∀ y ∈ s, iteratedFDerivWithin 𝕜 n.succ f s y =
        (I ∘ iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 f s y) s) y := fun y hy ↦ by
      ext m
      simp [IH hy m, I]
    calc
      (iteratedFDerivWithin 𝕜 (n + 2) f s x : (Fin (n + 2) → E) → F) m =
          (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n.succ f s) s x : E → E [×n + 1]→L[𝕜] F) (m 0)
            (tail m) := by
        simp [iteratedFDerivWithin_succ_eq_comp_left]
      _ = (fderivWithin 𝕜 (I ∘ iteratedFDerivWithin 𝕜 n (fderivWithin 𝕜 f s) s) s x :
              E → E [×n + 1]→L[𝕜] F) (m 0) (tail m) := by
        rw [fderivWithin_congr A (A x hx)]
      _ = (I ∘ fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n (fderivWithin 𝕜 f s) s) s x :
              E → E [×n + 1]→L[𝕜] F) (m 0) (tail m) := by
        simp [LinearIsometryEquiv.comp_fderivWithin _ (hs x hx)]
      _ = (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 f s y) s) s x :
              E → E [×n]→L[𝕜] E →L[𝕜] F) (m 0) (init (tail m)) ((tail m) (last n)) := by
        simp [I]
      _ = iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => fderivWithin 𝕜 f s y) s x (init m)
            (m (last (n + 1))) := by
        rw [iteratedFDerivWithin_succ_apply_left, tail_init_eq_init_tail]
        simp [init, tail]

Premises used: LinearIsometryEquiv.comp_fderivWithin, iteratedFDerivWithin_succ_eq_comp_left, Fin.succ, iteratedFDerivWithin_zero_eq_comp, Function.comp_apply, iteratedFDerivWithin_zero_apply