theorem toEquiv_injective : Function.Injective (toEquiv : (M ≃ₗ⁅R,L⁆ N) → M ≃ N) := by
  rintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩
  intro h
  

Proof state:
case mk.mk.mk.mk.mk.mk.mk.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f_inv : N → M
f : M → N
map_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y
map_smul'✝¹ :
  ∀ (r : R) (x : M),
    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x
map_lie'✝¹ :
  ∀ {x : L} {m : M},
    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =
      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆
left_inv✝¹ :
  LeftInverse f_inv
    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
            map_lie' := map_lie'✝¹ }).toAddHom.toFun
right_inv✝¹ :
  Function.RightInverse f_inv
    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
            map_lie' := map_lie'✝¹ }).toAddHom.toFun
g_inv : N → M
g : M → N
map_add'✝ : ∀ (x y : M), g (x + y) = g x + g y
map_smul'✝ :
  ∀ (r : R) (x : M),
    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x
map_lie'✝ :
  ∀ {x : L} {m : M},
    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =
      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆
left_inv✝ :
  LeftInverse g_inv
    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
            map_lie' := map_lie'✝ }).toAddHom.toFun
right_inv✝ :
  Function.RightInverse g_inv
    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
            map_lie' := map_lie'✝ }).toAddHom.toFun
h :
  toEquiv
      {
        toLieModuleHom :=
          { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
            map_lie' := map_lie'✝¹ },
        invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    toEquiv
      {
        toLieModuleHom :=
          { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
            map_lie' := map_lie'✝ },
        invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }
⊢ {
      toLieModuleHom :=
        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
          map_lie' := map_lie'✝¹ },
      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    {
      toLieModuleHom :=
        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
          map_lie' := map_lie'✝ },
      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
simp only [toEquiv_mk, LieModuleHom.coe_mk, LinearMap.coe_mk, AddHom.coe_mk, Equiv.mk.injEq] at h