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

tactic: change mulHom _ a a' = _
state_before: ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ a * a' = Dfinsupp.sum a fun i ai => Dfinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)

tactic: rw [mulHom,toAddMonoid,Dfinsupp.liftAddHom_apply,Dfinsupp.sumAddHom_apply,
  AddMonoidHom.dfinsupp_sum_apply]
state_before: ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ ↑(↑(mulHom fun i => A i) a) a' =
    Dfinsupp.sum a fun i ai => Dfinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)

tactic: apply congrArg _
state_before: ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ (Dfinsupp.sum a fun a b =>
      ↑(↑(AddMonoidHom.flip
                (toAddMonoid fun x =>
                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (a + x))) (gMulHom fun i => A i))))
            b)
        a') =
    Dfinsupp.sum a fun i ai => Dfinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)

tactic: funext x
state_before: ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ (fun a b =>
      ↑(↑(AddMonoidHom.flip
                (toAddMonoid fun x =>
                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (a + x))) (gMulHom fun i => A i))))
            b)
        a') =
    fun i ai => Dfinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)

tactic: simp_rw [flip_apply]
state_before: case h
ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
x : ι
⊢ (fun b =>
      ↑(↑(AddMonoidHom.flip
                (toAddMonoid fun x_1 =>
                  AddMonoidHom.flip
                    (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_1))) (gMulHom fun i => A i))))
            b)
        a') =
    fun ai => Dfinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)

tactic: erw [Dfinsupp.sumAddHom_apply]
state_before: case h
ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
x : ι
⊢ (fun b =>
      ↑(↑(toAddMonoid fun x_1 =>
                AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_1))) (gMulHom fun i => A i)))
            a')
        b) =
    fun ai => Dfinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)

tactic: simp only [gMulHom, AddMonoidHom.dfinsupp_sum_apply, flip_apply, coe_comp, AddMonoidHom.coe_mk,
ZeroHom.coe_mk, Function.comp_apply, AddMonoidHom.compHom_apply_apply]
state_before: case h
ι : Type u_2
inst✝⁴ : DecidableEq ι
A : ι → Type u_1
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
x : ι
⊢ (fun b =>
      ↑(Dfinsupp.sum a' fun x_1 =>
            ↑((fun x_2 =>
                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_2))) (gMulHom fun i => A i)))
                x_1))
        b) =
    fun ai => Dfinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)