Theorem: AddMonoidAlgebra.decomposeAux_single
File: Mathlib/Algebra/MonoidAlgebra/Grading.lean

Proof steps:
state_before: M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ (decomposeAux f) (Finsupp.single m r) = (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f m)) ⟨Finsupp.single m r, ⋯⟩
state_after: M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ r •
      {
          toFun := fun m =>
            (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f (Multiplicative.toAdd m)))
              ⟨Finsupp.single (Multiplicative.toAdd m) 1, ⋯⟩,
          map_one' := ⋯, map_mul' := ⋯ }
        (Multiplicative.ofAdd m) =
    (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f m)) ⟨Finsupp.single m r, ⋯⟩
tactic: refine (lift_single _ _ _).trans ?_
state_before: M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ r •
      {
          toFun := fun m =>
            (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f (Multiplicative.toAdd m)))
              ⟨Finsupp.single (Multiplicative.toAdd m) 1, ⋯⟩,
          map_one' := ⋯, map_mul' := ⋯ }
        (Multiplicative.ofAdd m) =
    (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f m)) ⟨Finsupp.single m r, ⋯⟩
state_after: M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f (Multiplicative.toAdd (Multiplicative.ofAdd m))))
      (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩) =
    (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f m)) ⟨Finsupp.single m r, ⋯⟩
tactic: refine (DirectSum.of_smul R _ _ _).symm.trans ?_
state_before: M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f (Multiplicative.toAdd (Multiplicative.ofAdd m))))
      (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩) =
    (DirectSum.of (fun i => ↥(gradeBy R (⇑f) i)) (f m)) ⟨Finsupp.single m r, ⋯⟩
state_after: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ GradedMonoid.mk (f (Multiplicative.toAdd (Multiplicative.ofAdd m)))
      (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩) =
    GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩
tactic: apply DirectSum.of_eq_of_gradedMonoid_eq
state_before: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ GradedMonoid.mk (f (Multiplicative.toAdd (Multiplicative.ofAdd m)))
      (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩) =
    GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩
state_after: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ ↑(GradedMonoid.mk (f (Multiplicative.toAdd (Multiplicative.ofAdd m)))
          (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩)).snd =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
tactic: refine Sigma.subtype_ext rfl ?_
state_before: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ ↑(GradedMonoid.mk (f (Multiplicative.toAdd (Multiplicative.ofAdd m)))
          (r • ⟨Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) 1, ⋯⟩)).snd =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
state_after: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) (r * 1) =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
tactic: refine (Finsupp.smul_single' _ _ _).trans ?_
state_before: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) (r * 1) =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
state_after: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) r =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
tactic: rw [mul_one]
state_before: case h
M : Type u_1
ι : Type u_2
R : Type u_3
inst✝³ : AddMonoid M
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : CommSemiring R
f : M →+ ι
m : M
r : R
⊢ Finsupp.single (Multiplicative.toAdd (Multiplicative.ofAdd m)) r =
    ↑(GradedMonoid.mk (f m) ⟨Finsupp.single m r, ⋯⟩).snd
state_after: no goals
tactic: rfl