/-- Shows that
$\sum_{k = 0}^{n - 1} (e^{X})^k = \sum_{p = 0}^{\infty} \sum_{k = 0}^{n - 1} \frac{k^p}{p!}X^p$. -/
theorem exp_pow_sum [Algebra ℚ A] (n : ℕ) :
    ((Finset.range n).sum fun k => exp A ^ k) =
      PowerSeries.mk fun p => (Finset.range n).sum
        fun k => (k ^ p : A) * algebraMap ℚ A p.factorial⁻¹ := by
  simp only [exp_pow_eq_rescale_exp, rescale]
  ext
  

Proof state:
case h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n n✝ : ℕ
⊢ (coeff A n✝)
      (Finset.sum (Finset.range n) fun x =>
        {
            toMonoidHom :=
              {
                toOneHom :=
                  { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                    map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) },
                map_mul' :=
                  (_ :
                    ∀ (f g : A⟦X⟧),
                      OneHom.toFun
                          { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                            map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                          (f * g) =
                        OneHom.toFun
                            { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                              map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                            f *
                          OneHom.toFun
                            { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                              map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                            g) },
            map_zero' :=
              (_ :
                OneHom.toFun
                    (↑{
                        toOneHom :=
                          { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                            map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) },
                        map_mul' :=
                          (_ :
                            ∀ (f g : A⟦X⟧),
                              OneHom.toFun
                                  { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                    map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                  (f * g) =
                                OneHom.toFun
                                    { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                      map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                    f *
                                  OneHom.toFun
                                    { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                      map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                    g) })
                    0 =
                  0),
            map_add' :=
              (_ :
                ∀ (x_1 y : A⟦X⟧),
                  OneHom.toFun
                      (↑{
                          toOneHom :=
                            { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                              map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) },
                          map_mul' :=
                            (_ :
                              ∀ (f g : A⟦X⟧),
                                OneHom.toFun
                                    { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                      map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                    (f * g) =
                                  OneHom.toFun
                                      { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                        map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                      f *
                                    OneHom.toFun
                                      { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                        map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                      g) })
                      (x_1 + y) =
                    OneHom.toFun
                        (↑{
                            toOneHom :=
                              { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (f g : A⟦X⟧),
                                  OneHom.toFun
                                      { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                        map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                      (f * g) =
                                    OneHom.toFun
                                        { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                          map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                        f *
                                      OneHom.toFun
                                        { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                          map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                        g) })
                        x_1 +
                      OneHom.toFun
                        (↑{
                            toOneHom :=
                              { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (f g : A⟦X⟧),
                                  OneHom.toFun
                                      { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                        map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                      (f * g) =
                                    OneHom.toFun
                                        { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                          map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                        f *
                                      OneHom.toFun
                                        { toFun := fun f => mk fun n => ↑x ^ n * (coeff A n) f,
                                          map_one' := (_ : (fun f => mk fun n => ↑x ^ n * (coeff A n) f) 1 = 1) }
                                        g) })
                        y) }
          (exp A)) =
    (coeff A n✝) (mk fun p => Finset.sum (Finset.range n) fun k => ↑k ^ p * (algebraMap ℚ A) (↑p !)⁻¹)

Next tactic:
simp only [one_div, coeff_mk, cast_pow, coe_mk, MonoidHom.coe_mk, OneHom.coe_mk,
    coeff_exp, factorial, map_sum]