/-- Auxiliary definition; the canonical grade decomposition, used to provide
`DirectSum.decompose`. -/
def decomposeAux : R[M] →ₐ[R] ⨁ i : ι, gradeBy R f i :=
  AddMonoidAlgebra.lift R M _
    { toFun := fun m =>
        DirectSum.of (fun i : ι => gradeBy R f i) (f (Multiplicative.toAdd m))
          ⟨Finsupp.single (Multiplicative.toAdd m) 1, single_mem_gradeBy _ _ _⟩
      map_one' :=
        DirectSum.of_eq_of_gradedMonoid_eq
          (by congr 2 <;> simp)
      map_mul' := fun i j => by
        symm
        dsimp only [toAdd_one, Eq.ndrec, Set.mem_setOf_eq, ne_eq, OneHom.toFun_eq_coe,
          OneHom.coe_mk, toAdd_mul]
        convert DirectSum.of_mul_of (A := (fun i : ι => gradeBy R f i)) _ _
        

Proof state:
case h.e'_3.h.e'_1.h.e'_1.h.e'_2.h.h.e'_5.h.e'_7
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
x✝ : R[M]
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_1.h.e'_3.e'_2.e'_2.e'_8
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_1✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
x✝ : R[M]
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_1✝¹ :
  (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) =
    (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i))
e_2✝¹ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
e_3✝ : HEq (fun x => ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) fun x => ⨁ (i : ι), ↥(gradeBy R (⇑f) i)
e_2✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
e_1✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_1✝² :
  (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) =
    (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i))
e_2✝¹ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
e_3✝ : HEq (fun x => ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) fun x => ⨁ (i : ι), ↥(gradeBy R (⇑f) i)
e_1✝¹ :
  (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) =
    (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i))
e_2✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
e_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd
e_1✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_5.e'_5
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_1✝ :
  (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i)) =
    (↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j))) →+ ⨁ (i : ι), ↥(gradeBy R (⇑f) i))
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_2✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
x✝ : R[M]
⊢ f (Multiplicative.toAdd i + Multiplicative.toAdd j) = f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)
case h.e'_3.h.e'_6.e'_3
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝⁴ : DecidableEq M
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
i j : Multiplicative M
e_2✝ :
  ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i + Multiplicative.toAdd j))) =
    ↥(gradeBy R (⇑f) (f (Multiplicative.toAdd i) + f (Multiplicative.toAdd j)))
⊢ (fun₀ | Multiplicative.toAdd i + Multiplicative.toAdd j => 1) =
    ↑(GradedMonoid.GMul.mul
        { val := fun₀ | Multiplicative.toAdd i => 1,
          property := (_ : (fun₀ | Multiplicative.toAdd i => 1) ∈ gradeBy R (⇑f) (f (Multiplicative.toAdd i))) }
        { val := fun₀ | Multiplicative.toAdd j => 1,
          property := (_ : (fun₀ | Multiplicative.toAdd j => 1) ∈ gradeBy R (⇑f) (f (Multiplicative.toAdd j))) })

Next tactic:
repeat { rw [ AddMonoidHom.map_add] }