/-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A) where
  toFun f :=
    { liftAddHom fun x => (smulAddHom k A).flip (f x) with
      toFun := fun a => a.sum fun m t => t • f m
      map_smul' := fun t' a => by
        -- Porting note: `dsimp` is required for beta reduction.
        dsimp only []
        rw [Finsupp.smul_sum, sum_smul_index']
        · simp_rw [smul_assoc]
        · intro m
          exact zero_smul k (f m)
      map_mul' := fun a₁ a₂ => by
        let g : G → k → A := fun m t => t • f m
        have h₁ : ∀ m, g m 0 = 0 := by
          intro m
          exact zero_smul k (f m)
        

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (G →₀ k) →+ A := liftAddHom fun x => (AddMonoidHom.flip (smulAddHom k A)) (f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • f m
h₁ : ∀ (m : G), g m 0 = 0
⊢ MulActionHom.toFun
      {
          toMulActionHom :=
            { toFun := fun a => sum a fun m t => t • f m,
              map_smul' :=
                (_ :
                  ∀ (t' : k) (a : MonoidAlgebra k G),
                    (fun a => sum a fun m t => t • f m) (t' • a) = t' • (fun a => sum a fun m t => t • f m) a) },
          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
          map_add' :=
            (_ :
              ∀ (x y : G →₀ k),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
      (a₁ * a₂) =
    MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • f m) (t' • a) = t' • (fun a => sum a fun m t => t • f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₁ *
      MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • f m) (t' • a) = t' • (fun a => sum a fun m t => t • f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₂

Next tactic:
have h₂ : ∀ (m) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂ := by
          intros
          rw [← add_smul]