Theorem: DirectSum.mul_assoc
File: Mathlib/Algebra/DirectSum/Ring.lean

tactic: suffices (mulHom A).compHom.comp (mulHom A) =
    (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
    have sol := DFunLike.congr_fun (DFunLike.congr_fun (DFunLike.congr_fun this a) b) c
    have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
    simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
      AddMonoidHom.flipHom_apply] at sol
    exact sol
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
⊢ a * b * c = a * (b * c)
state_after: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
⊢ (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip

tactic: ext ai ax bi bx ci cx
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
⊢ (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
state_after: case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ (((((((compHom (mulHom A)).comp (mulHom A)).comp (of A ai)) ax).comp (of A bi)) bx).comp (of A ci)) cx =
    (((((((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip.comp (of A ai)) ax).comp (of A bi))
            bx).comp
        (of A ci))
      cx

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

tactic: simp_rw [mulHom_of_of]
state_before: case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ ((mulHom A) (((mulHom A) ((of A ai) ax)) ((of A bi) bx))) ((of A ci) cx) =
    ((mulHom A) ((of A ai) ax)) (((mulHom A) ((of A bi) bx)) ((of A ci) cx))
state_after: case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ (of A (ai + bi + ci)) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul ax bx) cx) =
    (of A (ai + (bi + ci))) (GradedMonoid.GMul.mul ax (GradedMonoid.GMul.mul bx cx))

tactic: exact of_eq_of_gradedMonoid_eq (_root_.mul_assoc (GradedMonoid.mk ai ax) ⟨bi, bx⟩ ⟨ci, cx⟩)
state_before: case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ (of A (ai + bi + ci)) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul ax bx) cx) =
    (of A (ai + (bi + ci))) (GradedMonoid.GMul.mul ax (GradedMonoid.GMul.mul bx cx))
state_after: no goals

tactic: have sol := DFunLike.congr_fun (DFunLike.congr_fun (DFunLike.congr_fun this a) b) c
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
⊢ a * b * c = a * (b * c)
state_after: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
sol :
  ((((compHom (mulHom A)).comp (mulHom A)) a) b) c =
    ((((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip a) b) c
⊢ a * b * c = a * (b * c)

tactic: have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
sol :
  ((((compHom (mulHom A)).comp (mulHom A)) a) b) c =
    ((((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip a) b) c
⊢ a * b * c = a * (b * c)
state_after: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
sol :
  ((((compHom (mulHom A)).comp (mulHom A)) a) b) c =
    ((((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip a) b) c
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
⊢ a * b * c = a * (b * c)

tactic: simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
  AddMonoidHom.flipHom_apply] at sol
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
sol :
  ((((compHom (mulHom A)).comp (mulHom A)) a) b) c =
    ((((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip a) b) c
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
⊢ a * b * c = a * (b * c)
state_after: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
sol : a * b * c = a * (b * c)
⊢ a * b * c = a * (b * c)

tactic: exact sol
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this : (compHom (mulHom A)).comp (mulHom A) = ((compHom flipHom) ((compHom (mulHom A).flip).comp (mulHom A))).flip
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
sol : a * b * c = a * (b * c)
⊢ a * b * c = a * (b * c)
state_after: no goals