Theorem: AddMonoidAlgebra.toDirectSum_mul
File: Mathlib/Algebra/MonoidAlgebra/ToDirectSum.lean

tactic: let to_hom : AddMonoidAlgebra M ι →+ ⨁ _ : ι, M :=
{ toFun := toDirectSum
  map_zero' := toDirectSum_zero
  map_add' := toDirectSum_add }
state_before: ι : 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

tactic: show to_hom (f * g) = to_hom f * to_hom g
state_before: ι : 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

tactic: let _ : NonUnitalNonAssocSemiring (ι →₀ M) := AddMonoidAlgebra.nonUnitalNonAssocSemiring
state_before: ι : 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

tactic: revert f g
state_before: ι : 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

tactic: rw [AddMonoidHom.map_mul_iff]
state_before: ι : 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

tactic: refine Finsupp.addHom_ext' fun xi => AddMonoidHom.ext fun xv => ?_
state_before: ι : 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

tactic: refine Finsupp.addHom_ext' fun yi => AddMonoidHom.ext fun yv => ?_
state_before: ι : 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

tactic: dsimp only [AddMonoidHom.comp_apply, AddMonoidHom.compl₂_apply, AddMonoidHom.compr₂_apply,
  AddMonoidHom.mul_apply, Finsupp.singleAddHom_apply]
state_before: ι : 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

tactic: simp only [AddMonoidHom.coe_mk, ZeroHom.coe_mk, toDirectSum_single]
state_before: ι : 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)

tactic: erw [AddMonoidAlgebra.single_mul_single, AddMonoidHom.coe_mk, ZeroHom.coe_mk,
  AddMonoidAlgebra.toDirectSum_single]
state_before: ι : 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

tactic: 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]
state_before: ι : 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

tactic: erw [DirectSum.of_mul_of, Mul.gMul_mul]
state_before: ι : 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