instance : Algebra R (⨁ i, A i) where
  toFun := (DirectSum.of A 0).comp GAlgebra.toFun
  map_zero' := AddMonoidHom.map_zero _
  map_add' := AddMonoidHom.map_add _
  map_one' := (DirectSum.of A 0).congr_arg GAlgebra.map_one
  map_mul' a b := by
    simp only [AddMonoidHom.comp_apply]
    rw [of_mul_of]
    apply DFinsupp.single_eq_of_sigma_eq (GAlgebra.map_mul a b)
  commutes' r x := by
    

Proof state:
ι : Type uι
R : Type uR
A : ι → Type uA
B : Type uB
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (A i)
inst✝⁵ : (i : ι) → Module R (A i)
inst✝⁴ : AddMonoid ι
inst✝³ : GSemiring A
inst✝² : Semiring B
inst✝¹ : GAlgebra R A
inst✝ : Algebra R B
r : R
x : ⨁ (i : ι), A i
⊢ {
          toMonoidHom :=
            {
              toOneHom :=
                { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                  map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) },
              map_mul' :=
                (_ :
                  ∀ (a b : R),
                    OneHom.toFun
                        { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                          map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                        (a * b) =
                      OneHom.toFun
                          { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                            map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                          a *
                        OneHom.toFun
                          { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                            map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                          b) },
          map_zero' := (_ : (AddMonoidHom.comp (of A 0) GAlgebra.toFun) 0 = 0),
          map_add' :=
            (_ :
              ∀ (a b : R),
                (AddMonoidHom.comp (of A 0) GAlgebra.toFun) (a + b) =
                  (AddMonoidHom.comp (of A 0) GAlgebra.toFun) a + (AddMonoidHom.comp (of A 0) GAlgebra.toFun) b) }
        r *
      x =
    x *
      {
          toMonoidHom :=
            {
              toOneHom :=
                { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                  map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) },
              map_mul' :=
                (_ :
                  ∀ (a b : R),
                    OneHom.toFun
                        { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                          map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                        (a * b) =
                      OneHom.toFun
                          { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                            map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                          a *
                        OneHom.toFun
                          { toFun := ⇑(AddMonoidHom.comp (of A 0) GAlgebra.toFun),
                            map_one' := (_ : (of A 0) (GAlgebra.toFun 1) = (of A 0) GradedMonoid.GOne.one) }
                          b) },
          map_zero' := (_ : (AddMonoidHom.comp (of A 0) GAlgebra.toFun) 0 = 0),
          map_add' :=
            (_ :
              ∀ (a b : R),
                (AddMonoidHom.comp (of A 0) GAlgebra.toFun) (a + b) =
                  (AddMonoidHom.comp (of A 0) GAlgebra.toFun) a + (AddMonoidHom.comp (of A 0) GAlgebra.toFun) b) }
        r

Next tactic:
change AddMonoidHom.mul (DirectSum.of _ _ _) x = AddMonoidHom.mul.flip (DirectSum.of _ _ _) x