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

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
⊢ (f * g).toDirectSum = f.toDirectSum * g.toDirectSum
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
⊢ (f * g).toDirectSum = f.toDirectSum * g.toDirectSum
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_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
⊢ (f * g).toDirectSum = f.toDirectSum * g.toDirectSum
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
⊢ to_hom (f * g) = to_hom f * to_hom g
tactic: show to_hom (f * g) = to_hom f * to_hom g
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
⊢ to_hom (f * g) = to_hom f * to_hom g
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ to_hom (f * g) = to_hom f * to_hom g
tactic: let _ : NonUnitalNonAssocSemiring (ι →₀ M) := AddMonoidAlgebra.nonUnitalNonAssocSemiring
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
f g : M[ι]
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ to_hom (f * g) = to_hom f * to_hom g
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ∀ (f g : M[ι]), to_hom (f * g) = to_hom f * to_hom g
tactic: revert f g
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ ∀ (f g : M[ι]), to_hom (f * g) = to_hom f * to_hom g
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ AddMonoidHom.mul.compr₂ to_hom = (AddMonoidHom.mul.comp to_hom).compl₂ to_hom
tactic: rw [AddMonoidHom.map_mul_iff]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
⊢ AddMonoidHom.mul.compr₂ to_hom = (AddMonoidHom.mul.comp to_hom).compl₂ to_hom
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom).comp (Finsupp.singleAddHom xi)) xv =
    (((AddMonoidHom.mul.comp to_hom).compl₂ to_hom).comp (Finsupp.singleAddHom xi)) xv
tactic: refine Finsupp.addHom_ext' fun xi => AddMonoidHom.ext fun xv => ?_
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom).comp (Finsupp.singleAddHom xi)) xv =
    (((AddMonoidHom.mul.comp to_hom).compl₂ to_hom).comp (Finsupp.singleAddHom xi)) xv
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((((AddMonoidHom.mul.compr₂ to_hom).comp (Finsupp.singleAddHom xi)) xv).comp (Finsupp.singleAddHom yi)) yv =
    (((((AddMonoidHom.mul.comp to_hom).compl₂ to_hom).comp (Finsupp.singleAddHom xi)) xv).comp
        (Finsupp.singleAddHom yi))
      yv
tactic: refine Finsupp.addHom_ext' fun yi => AddMonoidHom.ext fun yv => ?_
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((((AddMonoidHom.mul.compr₂ to_hom).comp (Finsupp.singleAddHom xi)) xv).comp (Finsupp.singleAddHom yi)) yv =
    (((((AddMonoidHom.mul.comp to_hom).compl₂ to_hom).comp (Finsupp.singleAddHom xi)) xv).comp
        (Finsupp.singleAddHom yi))
      yv
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv) =
    (((AddMonoidHom.mul.comp to_hom).compl₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv)
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_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv) =
    (((AddMonoidHom.mul.comp to_hom).compl₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv)
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
tactic: erw [AddMonoidHom.compl₂_apply]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ ((AddMonoidHom.mul.compr₂ to_hom) (Finsupp.single xi xv)) (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ { toFun := ⇑to_hom ∘ ⇑(AddMonoidHom.mul (Finsupp.single xi xv)), map_zero' := ⋯ } (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
tactic: erw [AddMonoidHom.coe_mk]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ { toFun := ⇑to_hom ∘ ⇑(AddMonoidHom.mul (Finsupp.single xi xv)), map_zero' := ⋯ } (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (⇑to_hom ∘ ⇑(AddMonoidHom.mul (Finsupp.single xi xv))) (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
tactic: simp only [AddMonoidHom.coe_mk, ZeroHom.coe_mk, toDirectSum_single]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (⇑to_hom ∘ ⇑(AddMonoidHom.mul (Finsupp.single xi xv))) (Finsupp.single yi yv) =
    ((AddMonoidHom.mul.comp to_hom) (Finsupp.single xi xv)) (to_hom (Finsupp.single yi yv))
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ to_hom (Finsupp.single xi xv * Finsupp.single yi yv) = to_hom (Finsupp.single xi xv) * to_hom (Finsupp.single yi yv)
tactic: dsimp
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ to_hom (Finsupp.single xi xv * Finsupp.single yi yv) = to_hom (Finsupp.single xi xv) * to_hom (Finsupp.single yi yv)
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (DirectSum.of (fun i => M) (xi + yi)) (xv * yv) =
    toDirectSum (Finsupp.single xi xv) * toDirectSum (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_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (DirectSum.of (fun i => M) (xi + yi)) (xv * yv) =
    toDirectSum (Finsupp.single xi xv) * toDirectSum (Finsupp.single yi yv)
state_after: ι : Type u_1
R : Type u_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (DirectSum.of (fun i => M) (xi + yi)) (xv * 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_2
M : Type u_3
A : Type u_4
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : Semiring M
to_hom : M[ι] →+ ⨁ (x : ι), M := { toFun := toDirectSum, map_zero' := ⋯, map_add' := ⋯ }
x✝ : NonUnitalNonAssocSemiring (ι →₀ M) := nonUnitalNonAssocSemiring
xi : ι
xv : M
yi : ι
yv : M
⊢ (DirectSum.of (fun i => M) (xi + yi)) (xv * yv) =
    (DirectSum.of (fun i => M) xi) xv * (DirectSum.of (fun i => M) yi) yv
state_after: no goals
tactic: erw [DirectSum.of_mul_of, Mul.gMul_mul]