/-- A Lie module yields a Lie algebra morphism into the linear endomorphisms of the module.

See also `LieModule.toModuleHom`. -/
@[simps]
def LieModule.toEndomorphism : L →ₗ⁅R⁆ Module.End R M where
  toFun x :=
    { toFun := fun m => ⁅x, m⁆
      map_add' := lie_add x
      map_smul' := fun t => lie_smul t x }
  map_add' x y := by ext m; apply add_lie
  map_smul' t x := by ext m; 

Proof state:
case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
t : R
x : L
m : M
⊢ (AddHom.toFun
        {
          toFun := fun x =>
            { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
              map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },
          map_add' :=
            (_ :
              ∀ (x y : L),
                (fun x =>
                      {
                        toAddHom :=
                          { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                        map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                    (x + y) =
                  (fun x =>
                        {
                          toAddHom :=
                            { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                          map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                      x +
                    (fun x =>
                        {
                          toAddHom :=
                            { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                          map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                      y) }
        (t • x))
      m =
    ((RingHom.id R) t •
        AddHom.toFun
          {
            toFun := fun x =>
              { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },
            map_add' :=
              (_ :
                ∀ (x y : L),
                  (fun x =>
                        {
                          toAddHom :=
                            { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                          map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                      (x + y) =
                    (fun x =>
                          {
                            toAddHom :=
                              { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                            map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                        x +
                      (fun x =>
                          {
                            toAddHom :=
                              { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },
                            map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })
                        y) }
          x)
      m

Next tactic:
apply smul_lie