Module: Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas

Goal state before:
pp: case succ
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
n✝ : ℕ
x : 𝕜
s : Set 𝕜
hx : x ∈ s
h : UniqueDiffOn 𝕜 s
𝔸 : Type u_5
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕜 𝔸
inst✝² : Module 𝔸 F
inst✝¹ : IsBoundedSMul 𝔸 F
inst✝ : IsScalarTower 𝕜 𝔸 F
n : ℕ
IH :
  ∀ {f : 𝕜 → 𝔸} {g : 𝕜 → F},
    ContDiffWithinAt 𝕜 (↑n) f s x →
      ContDiffWithinAt 𝕜 (↑n) g s x →
        iteratedDerivWithin n (f • g) s x =
          ∑ i ∈ Finset.range (n + 1), n.choose i • iteratedDerivWithin i f s x • iteratedDerivWithin (n - i) g s x
f : 𝕜 → 𝔸
g : 𝕜 → F
hf : ContDiffWithinAt 𝕜 (↑(n + 1)) f s x
hg : ContDiffWithinAt 𝕜 (↑(n + 1)) g s x
U : Set 𝕜
hU : U ∈ 𝓝[insert x s] x
H : ∀ y ∈ U, ContDiffWithinAt 𝕜 (↑(n + 1)) f s y ∧ ContDiffWithinAt 𝕜 (↑(n + 1)) g s y
this : ∀ i ∈ Finset.range n, 1 ≤ n - i
⊢ ∑ k ∈ Finset.range n,
          n.choose (k + 1) •
            iteratedDerivWithin (k + 1) f s x • iteratedDerivWithin (n - (k + 1)) (derivWithin g s) s x +
        n.choose 0 • iteratedDerivWithin 0 f s x • iteratedDerivWithin (n - 0) (derivWithin g s) s x +
      ∑ i ∈ Finset.range (n + 1),
        n.choose i • iteratedDerivWithin i (derivWithin f s) s x • iteratedDerivWithin (n - i) g s x =
    ∑ x_1 ∈ Finset.range (n + 1),
          n.choose x_1 • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n + 1 - (x_1 + 1)) g s x +
        (∑ x_1 ∈ Finset.range n,
            n.choose (x_1 + 1) • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n + 1 - (x_1 + 1)) g s x +
          n.choose (n + 1) • iteratedDerivWithin (n + 1) f s x • iteratedDerivWithin (n + 1 - (n + 1)) g s x) +
      (n + 1).choose 0 • iteratedDerivWithin 0 f s x • iteratedDerivWithin (n + 1 - 0) g s x

Tactic:
simp +contextual [← iteratedDerivWithin_succ', ← n.sub_sub, Nat.sub_add_cancel, this]

Goal state after:
case succ
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
n✝ : ℕ
x : 𝕜
s : Set 𝕜
hx : x ∈ s
h : UniqueDiffOn 𝕜 s
𝔸 : Type u_5
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕜 𝔸
inst✝² : Module 𝔸 F
inst✝¹ : IsBoundedSMul 𝔸 F
inst✝ : IsScalarTower 𝕜 𝔸 F
n : ℕ
IH :
  ∀ {f : 𝕜 → 𝔸} {g : 𝕜 → F},
    ContDiffWithinAt 𝕜 (↑n) f s x →
      ContDiffWithinAt 𝕜 (↑n) g s x →
        iteratedDerivWithin n (f • g) s x =
          ∑ i ∈ Finset.range (n + 1), n.choose i • iteratedDerivWithin i f s x • iteratedDerivWithin (n - i) g s x
f : 𝕜 → 𝔸
g : 𝕜 → F
hf : ContDiffWithinAt 𝕜 (↑(n + 1)) f s x
hg : ContDiffWithinAt 𝕜 (↑(n + 1)) g s x
U : Set 𝕜
hU : U ∈ 𝓝[insert x s] x
H : ∀ y ∈ U, ContDiffWithinAt 𝕜 (↑(n + 1)) f s y ∧ ContDiffWithinAt 𝕜 (↑(n + 1)) g s y
this : ∀ i ∈ Finset.range n, 1 ≤ n - i
⊢ ∑ x_1 ∈ Finset.range n,
          n.choose (x_1 + 1) • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n - x_1) g s x +
        f x • iteratedDerivWithin (n + 1) g s x +
      ∑ x_1 ∈ Finset.range (n + 1),
        n.choose x_1 • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n - x_1) g s x =
    ∑ x_1 ∈ Finset.range (n + 1),
          n.choose x_1 • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n - x_1) g s x +
        ∑ x_1 ∈ Finset.range n,
          n.choose (x_1 + 1) • iteratedDerivWithin (x_1 + 1) f s x • iteratedDerivWithin (n - x_1) g s x +
      f x • iteratedDerivWithin (n + 1) g s x