Theorem: DirectSum.Gmodule.mul_smul'
File: Mathlib/Algebra/Module/GradedModule.lean

tactic: suffices
  (smulAddMonoidHom
            A M).compHom.comp
      (DirectSum.mulHom A) =
    (AddMonoidHom.compHom AddMonoidHom.flipHom <|
        (smulAddMonoidHom A M).flip.compHom.comp <| smulAddMonoidHom A M).flip
  fromFunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
state_before: ι : Type u_1
A : ι → Type u_2
M : ι → Type u_3
inst✝⁵ : AddMonoid ι
inst✝⁴ : (i : ι) → AddCommMonoid (A i)
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : DecidableEq ι
inst✝¹ : GSemiring A
inst✝ : Gmodule A M
a b : ⨁ (i : ι), A i
c : ⨁ (i : ι), M i
⊢ (a * b) • c = a • b • c

tactic: ext (ai ax bi bx ci cx) : 6
state_before: ι : Type u_1
A : ι → Type u_2
M : ι → Type u_3
inst✝⁵ : AddMonoid ι
inst✝⁴ : (i : ι) → AddCommMonoid (A i)
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : DecidableEq ι
inst✝¹ : GSemiring A
inst✝ : Gmodule A M
a b : ⨁ (i : ι), A i
c : ⨁ (i : ι), M i
⊢ comp (↑compHom (smulAddMonoidHom A M)) (mulHom A) =
    AddMonoidHom.flip
      (↑(↑compHom flipHom) (comp (↑compHom (AddMonoidHom.flip (smulAddMonoidHom A M))) (smulAddMonoidHom A M)))

tactic: dsimp only [coe_comp, Function.comp_apply, compHom_apply_apply, flip_apply, flipHom_apply]
state_before: case H.h.H.h.H.h
ι : Type u_1
A : ι → Type u_2
M : ι → Type u_3
inst✝⁵ : AddMonoid ι
inst✝⁴ : (i : ι) → AddCommMonoid (A i)
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : DecidableEq ι
inst✝¹ : GSemiring A
inst✝ : Gmodule A M
a b : ⨁ (i : ι), A i
c : ⨁ (i : ι), M i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : M ci
⊢ ↑(comp
          (↑(comp (↑(comp (comp (↑compHom (smulAddMonoidHom A M)) (mulHom A)) (of (fun i => A i) ai)) ax)
                (of (fun i => A i) bi))
            bx)
          (of (fun i => M i) ci))
      cx =
    ↑(comp
          (↑(comp
                (↑(comp
                      (AddMonoidHom.flip
                        (↑(↑compHom flipHom)
                          (comp (↑compHom (AddMonoidHom.flip (smulAddMonoidHom A M))) (smulAddMonoidHom A M))))
                      (of (fun i => A i) ai))
                  ax)
                (of (fun i => A i) bi))
            bx)
          (of (fun i => M i) ci))
      cx

tactic: rw [smulAddMonoidHom_apply_of_of, smulAddMonoidHom_apply_of_of, DirectSum.mulHom_of_of,
  smulAddMonoidHom_apply_of_of]
state_before: case H.h.H.h.H.h
ι : Type u_1
A : ι → Type u_2
M : ι → Type u_3
inst✝⁵ : AddMonoid ι
inst✝⁴ : (i : ι) → AddCommMonoid (A i)
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : DecidableEq ι
inst✝¹ : GSemiring A
inst✝ : Gmodule A M
a b : ⨁ (i : ι), A i
c : ⨁ (i : ι), M i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : M ci
⊢ ↑(↑(smulAddMonoidHom A M) (↑(↑(mulHom A) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) bi) bx)))
      (↑(of (fun i => M i) ci) cx) =
    ↑(↑(smulAddMonoidHom A M) (↑(of (fun i => A i) ai) ax))
      (↑(↑(smulAddMonoidHom A M) (↑(of (fun i => A i) bi) bx)) (↑(of (fun i => M i) ci) cx))

tactic: exact
  DirectSum.of_eq_of_gradedMonoid_eq
    (mul_smul (GradedMonoid.mk ai ax) (GradedMonoid.mk bi bx) (GradedMonoid.mk ci cx))
state_before: case H.h.H.h.H.h
ι : Type u_1
A : ι → Type u_2
M : ι → Type u_3
inst✝⁵ : AddMonoid ι
inst✝⁴ : (i : ι) → AddCommMonoid (A i)
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : DecidableEq ι
inst✝¹ : GSemiring A
inst✝ : Gmodule A M
a b : ⨁ (i : ι), A i
c : ⨁ (i : ι), M i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : M ci
⊢ ↑(of M (ai + bi + ci)) (GSmul.smul (GMul.mul ax bx) cx) = ↑(of M (ai + (bi + ci))) (GSmul.smul ax (GSmul.smul bx cx))