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

Proof steps:
state_before: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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)
state_after: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ ((mulHom A) a) a' =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
tactic: change mulHom _ a a' = _
state_before: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ ((mulHom A) a) a' =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
state_after: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ ((DFinsupp.sumAddHom fun x => (toAddMonoid fun x_1 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip) 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]
state_before: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (A i)
inst✝² : AddMonoid ι
inst✝¹ : GSemiring A
inst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)
a a' : ⨁ (i : ι), A i
⊢ ((DFinsupp.sumAddHom fun x => (toAddMonoid fun x_1 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip) a)
      a' =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
state_after: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 x => ⇑(toAddMonoid fun x_1 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip) a' =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
tactic: erw [DFinsupp.sumAddHom_apply]
state_before: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 x => ⇑(toAddMonoid fun x_1 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip) a' =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
state_after: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((toAddMonoid fun x => ((compHom (of A (a + x))).comp (gMulHom A)).flip).flip b) a') =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
tactic: rw [AddMonoidHom.dfinsupp_sum_apply]
state_before: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((toAddMonoid fun x => ((compHom (of A (a + x))).comp (gMulHom A)).flip).flip b) a') =
    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
state_after: ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((toAddMonoid fun x => ((compHom (of A (a + x))).comp (gMulHom A)).flip).flip b) 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_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((toAddMonoid fun x => ((compHom (of A (a + x))).comp (gMulHom A)).flip).flip b) a') = fun i ai =>
    DFinsupp.sum a' fun j aj => (of A (i + j)) (GradedMonoid.GMul.mul ai aj)
state_after: case h
ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip b) a') = fun ai =>
    DFinsupp.sum a' fun j aj => (of A (x + j)) (GradedMonoid.GMul.mul ai aj)
tactic: funext x
state_before: case h
ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip).flip b) a') = fun ai =>
    DFinsupp.sum a' fun j aj => (of A (x + j)) (GradedMonoid.GMul.mul ai aj)
state_after: case h
ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip) a') b) = fun ai =>
    DFinsupp.sum a' fun j aj => (of A (x + j)) (GradedMonoid.GMul.mul ai aj)
tactic: simp_rw [flip_apply]
state_before: case h
ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ((compHom (of A (x + x_1))).comp (gMulHom A)).flip) a') b) = fun ai =>
    DFinsupp.sum a' fun j aj => (of A (x + j)) (GradedMonoid.GMul.mul ai aj)
state_after: case h
ι : Type u_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ⇑((compHom (of A (x + x_1))).comp (gMulHom A)).flip) b) = 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_1
inst✝⁴ : DecidableEq ι
A : ι → Type u_2
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 => ⇑((compHom (of A (x + x_1))).comp (gMulHom A)).flip) b) = fun ai =>
    DFinsupp.sum a' fun j aj => (of A (x + j)) (GradedMonoid.GMul.mul ai aj)
state_after: no goals
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]