ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
⊢ toDirectSum (f * g) = toDirectSum f * toDirectSum g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
⊢ toDirectSum (f * g) = toDirectSum f * toDirectSum g
let to_hom : AddMonoidAlgebra M ι →+ ⨁ _ : ι, M :=
{ toFun := toDirectSum
  map_zero' := toDirectSum_zero
  map_add' := toDirectSum_add }
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
⊢ ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
⊢ toDirectSum (f * g) = toDirectSum f * toDirectSum g
show to_hom (f * g) = to_hom f * to_hom g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
⊢ ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
let _ : NonUnitalNonAssocSemiring (ι →₀ M) := AddMonoidAlgebra.nonUnitalNonAssocSemiring
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ∀ (f g : AddMonoidAlgebra M ι), ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : AddMonoidAlgebra M ι
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
revert f g
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ AddMonoidHom.compr₂ AddMonoidHom.mul to_hom = AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ∀ (f g : AddMonoidAlgebra M ι), ↑to_hom (f * g) = ↑to_hom f * ↑to_hom g
rw [AddMonoidHom.map_mul_iff]
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
⊢ ↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul to_hom) (Finsupp.singleAddHom xi)) xv =
    ↑(AddMonoidHom.comp (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom)
          (Finsupp.singleAddHom xi))
      xv
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ AddMonoidHom.compr₂ AddMonoidHom.mul to_hom = AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom
refine Finsupp.addHom_ext' fun xi => AddMonoidHom.ext fun xv => ?_
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(AddMonoidHom.comp (↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul to_hom) (Finsupp.singleAddHom xi)) xv)
          (Finsupp.singleAddHom yi))
      yv =
    ↑(AddMonoidHom.comp
          (↑(AddMonoidHom.comp (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom)
                (Finsupp.singleAddHom xi))
            xv)
          (Finsupp.singleAddHom yi))
      yv
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
⊢ ↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul to_hom) (Finsupp.singleAddHom xi)) xv =
    ↑(AddMonoidHom.comp (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom)
          (Finsupp.singleAddHom xi))
      xv
refine Finsupp.addHom_ext' fun yi => AddMonoidHom.ext fun yv => ?_
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
          map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
      (Finsupp.single xi xv * Finsupp.single yi yv) =
    ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
            map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
        (Finsupp.single xi xv) *
      ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
            map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
        (Finsupp.single yi yv)
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(AddMonoidHom.comp (↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul to_hom) (Finsupp.singleAddHom xi)) xv)
          (Finsupp.singleAddHom yi))
      yv =
    ↑(AddMonoidHom.comp
          (↑(AddMonoidHom.comp (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul to_hom) to_hom)
                (Finsupp.singleAddHom xi))
            xv)
          (Finsupp.singleAddHom yi))
      yv
dsimp only [AddMonoidHom.comp_apply, AddMonoidHom.compl₂_apply, AddMonoidHom.compr₂_apply,
  AddMonoidHom.mul_apply, Finsupp.singleAddHom_apply]
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ toDirectSum (Finsupp.single xi xv * Finsupp.single yi yv) =
    ↑(DirectSum.of (fun i => M) xi) xv * ↑(DirectSum.of (fun i => M) yi) yv
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
          map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
      (Finsupp.single xi xv * Finsupp.single yi yv) =
    ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
            map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
        (Finsupp.single xi xv) *
      ↑{ toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
            map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
        (Finsupp.single yi yv)
simp only [AddMonoidHom.coe_mk, ZeroHom.coe_mk, toDirectSum_single]
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(DirectSum.of (fun i => M) (xi + yi)) (xv * yv) = Dfinsupp.single xi xv * ↑(DirectSum.of (fun i => M) yi) yv
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ toDirectSum (Finsupp.single xi xv * Finsupp.single yi yv) =
    ↑(DirectSum.of (fun i => M) xi) xv * ↑(DirectSum.of (fun i => M) yi) yv
erw [AddMonoidAlgebra.single_mul_single, AddMonoidHom.coe_mk, ZeroHom.coe_mk,
  AddMonoidAlgebra.toDirectSum_single]
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(DirectSum.of (fun i => M) (xi + yi)) (xv * yv) = Dfinsupp.single xi xv * ↑(DirectSum.of (fun i => M) yi) yv
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(DirectSum.of (fun i => M) (xi + yi)) (xv * yv) = Dfinsupp.single xi xv * ↑(DirectSum.of (fun i => M) yi) yv
simp only [AddMonoidHom.coe_comp, AddMonoidHom.coe_mul, AddMonoidHom.coe_mk, ZeroHom.coe_mk,
  Function.comp_apply, toDirectSum_single, AddMonoidHom.id_apply, Finsupp.singleAddHom_apply,
  AddMonoidHom.coe_mulLeft]
no goals
ι : Type u_1
R : Type ?u.48243
M : Type u_2
A : Type ?u.48249
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : AddMonoidAlgebra M ι →+ ⨁ (x : ι), M :=
  { toZeroHom := { toFun := toDirectSum, map_zero' := (_ : toDirectSum 0 = 0) },
    map_add' := (_ : ∀ (f g : AddMonoidAlgebra M ι), toDirectSum (f + g) = toDirectSum f + toDirectSum g) }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ↑(DirectSum.of (fun i => M) (xi + yi)) (xv * yv) = Dfinsupp.single xi xv * ↑(DirectSum.of (fun i => M) yi) yv
erw [DirectSum.of_mul_of, Mul.gMul_mul]