/-- The ring homomorphism taking a power series `f(X)` to `f(aX)`. -/
noncomputable def rescale (a : R) : R⟦X⟧ →+* R⟦X⟧ where
  toFun f := PowerSeries.mk fun n => a ^ n * PowerSeries.coeff R n f
  map_zero' := by
    ext
    simp only [LinearMap.map_zero, PowerSeries.coeff_mk, mul_zero]
  map_one' := by
    ext1
    simp only [mul_boole, PowerSeries.coeff_mk, PowerSeries.coeff_one]
    split_ifs with h
    · rw [h, pow_zero a]
    rfl
  map_add' := by
    intros
    

Proof state:
R : Type u_1
inst✝ : CommSemiring R
a : R
x✝ y✝ : R⟦X⟧
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
              map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (f g : R⟦X⟧),
                OneHom.toFun
                    { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                      map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                    (f * g) =
                  OneHom.toFun
                      { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                        map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                      f *
                    OneHom.toFun
                      { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                        map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                      g) })
      (x✝ + y✝) =
    OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (f g : R⟦X⟧),
                  OneHom.toFun
                      { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                        map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                      (f * g) =
                    OneHom.toFun
                        { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                          map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                        f *
                      OneHom.toFun
                        { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                          map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                        g) })
        x✝ +
      OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (f g : R⟦X⟧),
                  OneHom.toFun
                      { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                        map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                      (f * g) =
                    OneHom.toFun
                        { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                          map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                        f *
                      OneHom.toFun
                        { toFun := fun f => mk fun n => a ^ n * (coeff R n) f,
                          map_one' := (_ : (fun f => mk fun n => a ^ n * (coeff R n) f) 1 = 1) }
                        g) })
        y✝

Next tactic:
ext