/-- 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]
  

Proof state:
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ 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)) =
    mk fun p => Finset.sum (Finset.range n) fun k => ↑k ^ p * (algebraMap ℚ A) (↑p !)⁻¹

Next tactic:
ext