l3lab/ntp-mathlib huggingface dataset:
theorem ext_iff {f g : L₁ →ₗ⁅R⁆ L₂} : f = g ↔ ∀ x, f x = g x :=
  ⟨by
    

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f g : L₁ →ₗ⁅R⁆ L₂
⊢ f = g → ∀ (x : L₁), f x = g x

Next tactic:
rintro rfl x
theorem ext_iff {f g : L₁ →ₗ⁅R⁆ L₂} : f = g ↔ ∀ x, f x = g x :=
  ⟨by
    rintro rfl x
    

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
x : L₁
⊢ f x = f x

Next tactic:
rfl
@[simp]
theorem mk_coe (f : L₁ →ₗ⁅R⁆ L₂) (h₁ h₂ h₃) : (⟨⟨⟨f, h₁⟩, h₂⟩, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) = f := by
  

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
h₁ : ∀ (x y : L₁), f (x + y) = f x + f y
h₂ :
  ∀ (r : R) (x : L₁),
    AddHom.toFun { toFun := ⇑f, map_add' := h₁ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := ⇑f, map_add' := h₁ } x
h₃ :
  ∀ {x y : L₁},
    AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom ⁅x, y⁆ =
      ⁅AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom x,
        AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom y⁆
⊢ { toLinearMap := { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }, map_lie' := h₃ } = f

Next tactic:
ext
@[simp]
theorem mk_coe (f : L₁ →ₗ⁅R⁆ L₂) (h₁ h₂ h₃) : (⟨⟨⟨f, h₁⟩, h₂⟩, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) = f := by
  ext
  

Proof state:
case h
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
h₁ : ∀ (x y : L₁), f (x + y) = f x + f y
h₂ :
  ∀ (r : R) (x : L₁),
    AddHom.toFun { toFun := ⇑f, map_add' := h₁ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := ⇑f, map_add' := h₁ } x
h₃ :
  ∀ {x y : L₁},
    AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom ⁅x, y⁆ =
      ⁅AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom x,
        AddHom.toFun { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom y⁆
x✝ : L₁
⊢ { toLinearMap := { toAddHom := { toFun := ⇑f, map_add' := h₁ }, map_smul' := h₂ }, map_lie' := h₃ } x✝ = f x✝

Next tactic:
rfl
/-- The composition of morphisms is a morphism. -/
def comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) : L₁ →ₗ⁅R⁆ L₃ :=
  { LinearMap.comp f.toLinearMap g.toLinearMap with
    map_lie' := by
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₂ →ₗ⁅R⁆ L₃
g : L₁ →ₗ⁅R⁆ L₂
src✝ : L₁ →ₗ[R] L₃ := ↑f ∘ₗ ↑g
⊢ ∀ {x y : L₁},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₁),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, y⁆ =
      ⁅AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : L₁),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : L₁),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          y⁆

Next tactic:
intros x y
/-- The composition of morphisms is a morphism. -/
def comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) : L₁ →ₗ⁅R⁆ L₃ :=
  { LinearMap.comp f.toLinearMap g.toLinearMap with
    map_lie' := by
      intros x y
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₂ →ₗ⁅R⁆ L₃
g : L₁ →ₗ⁅R⁆ L₂
src✝ : L₁ →ₗ[R] L₃ := ↑f ∘ₗ ↑g
x y : L₁
⊢ AddHom.toFun
      { toAddHom := src✝.toAddHom,
          map_smul' :=
            (_ :
              ∀ (r : R) (x : L₁),
                AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
      ⁅x, y⁆ =
    ⁅AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₁),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        x,
      AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₁),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        y⁆

Next tactic:
change f (g ⁅x, y⁆) = ⁅f (g x), f (g y)⁆
/-- The composition of morphisms is a morphism. -/
def comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) : L₁ →ₗ⁅R⁆ L₃ :=
  { LinearMap.comp f.toLinearMap g.toLinearMap with
    map_lie' := by
      intros x y
      change f (g ⁅x, y⁆) = ⁅f (g x), f (g y)⁆
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₂ →ₗ⁅R⁆ L₃
g : L₁ →ₗ⁅R⁆ L₂
src✝ : L₁ →ₗ[R] L₃ := ↑f ∘ₗ ↑g
x y : L₁
⊢ f (g ⁅x, y⁆) = ⁅f (g x), f (g y)⁆

Next tactic:
rw [map_lie, map_lie]
@[simp]
theorem comp_id (f : L₁ →ₗ⁅R⁆ L₂) : f.comp (id : L₁ →ₗ⁅R⁆ L₁) = f := by
  

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
⊢ comp f id = f

Next tactic:
ext
@[simp]
theorem comp_id (f : L₁ →ₗ⁅R⁆ L₂) : f.comp (id : L₁ →ₗ⁅R⁆ L₁) = f := by
  ext
  

Proof state:
case h
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
x✝ : L₁
⊢ (comp f id) x✝ = f x✝

Next tactic:
rfl
@[simp]
theorem id_comp (f : L₁ →ₗ⁅R⁆ L₂) : (id : L₂ →ₗ⁅R⁆ L₂).comp f = f := by
  

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
⊢ comp id f = f

Next tactic:
ext
@[simp]
theorem id_comp (f : L₁ →ₗ⁅R⁆ L₂) : (id : L₂ →ₗ⁅R⁆ L₂).comp f = f := by
  ext
  

Proof state:
case h
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
x✝ : L₁
⊢ (comp id f) x✝ = f x✝

Next tactic:
rfl
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : L₁ →ₗ⁅R⁆ L₂) (g : L₂ → L₁) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : L₂ →ₗ⁅R⁆ L₁ :=
  { LinearMap.inverse f.toLinearMap g h₁ h₂ with
    map_lie' := by
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
g : L₂ → L₁
h₁ : LeftInverse g ⇑f
h₂ : Function.RightInverse g ⇑f
src✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂
⊢ ∀ {x y : L₂},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₂),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, y⁆ =
      ⁅AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : L₂),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : L₂),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          y⁆

Next tactic:
intros x y
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : L₁ →ₗ⁅R⁆ L₂) (g : L₂ → L₁) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : L₂ →ₗ⁅R⁆ L₁ :=
  { LinearMap.inverse f.toLinearMap g h₁ h₂ with
    map_lie' := by
      intros x y
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
g : L₂ → L₁
h₁ : LeftInverse g ⇑f
h₂ : Function.RightInverse g ⇑f
src✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂
x y : L₂
⊢ AddHom.toFun
      { toAddHom := src✝.toAddHom,
          map_smul' :=
            (_ :
              ∀ (r : R) (x : L₂),
                AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
      ⁅x, y⁆ =
    ⁅AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₂),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        x,
      AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L₂),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        y⁆

Next tactic:
calc
        g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆ := by conv_lhs => rw [← h₂ x, ← h₂ y]
        _ = g (f ⁅g x, g y⁆) := by rw [map_lie]
        _ = ⁅g x, g y⁆ := h₁ _
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : L₁ →ₗ⁅R⁆ L₂) (g : L₂ → L₁) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : L₂ →ₗ⁅R⁆ L₁ :=
  { LinearMap.inverse f.toLinearMap g h₁ h₂ with
    map_lie' := by
      intros x y
      calc
        g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆ := by 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
g : L₂ → L₁
h₁ : LeftInverse g ⇑f
h₂ : Function.RightInverse g ⇑f
src✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂
x y : L₂
⊢ g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆

Next tactic:
conv_lhs => rw [← h₂ x, ← h₂ y]
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : L₁ →ₗ⁅R⁆ L₂) (g : L₂ → L₁) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : L₂ →ₗ⁅R⁆ L₁ :=
  { LinearMap.inverse f.toLinearMap g h₁ h₂ with
    map_lie' := by
      intros x y
      calc
        g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆ := by conv_lhs => 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
g : L₂ → L₁
h₁ : LeftInverse g ⇑f
h₂ : Function.RightInverse g ⇑f
src✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂
x y : L₂
| g ⁅x, y⁆

Next tactic:
rw [← h₂ x, ← h₂ y]
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : L₁ →ₗ⁅R⁆ L₂) (g : L₂ → L₁) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : L₂ →ₗ⁅R⁆ L₁ :=
  { LinearMap.inverse f.toLinearMap g h₁ h₂ with
    map_lie' := by
      intros x y
      calc
        g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆ := by conv_lhs => rw [← h₂ x, ← h₂ y]
        _ = g (f ⁅g x, g y⁆) := by 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : LieRing L₃
inst✝ : LieAlgebra R L₃
f : L₁ →ₗ⁅R⁆ L₂
g : L₂ → L₁
h₁ : LeftInverse g ⇑f
h₂ : Function.RightInverse g ⇑f
src✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂
x y : L₂
⊢ g ⁅f (g x), f (g y)⁆ = g (f ⁅g x, g y⁆)

Next tactic:
rw [map_lie]
/-- A Lie ring module may be pulled back along a morphism of Lie algebras.

See note [reducible non-instances]. -/
def LieRingModule.compLieHom : LieRingModule L₁ M where
  bracket x m := ⁅f x, m⁆
  lie_add x := lie_add (f x)
  add_lie x y m := by 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
M : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : AddCommGroup M
inst✝ : LieRingModule L₂ M
f : L₁ →ₗ⁅R⁆ L₂
x y : L₁
m : M
⊢ ⁅x + y, m⁆ = ⁅x, m⁆ + ⁅y, m⁆

Next tactic:
simp only [LieHom.map_add, add_lie]
/-- A Lie ring module may be pulled back along a morphism of Lie algebras.

See note [reducible non-instances]. -/
def LieRingModule.compLieHom : LieRingModule L₁ M where
  bracket x m := ⁅f x, m⁆
  lie_add x := lie_add (f x)
  add_lie x y m := by simp only [LieHom.map_add, add_lie]
  leibniz_lie x y m := by 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
M : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieAlgebra R L₁
inst✝³ : LieRing L₂
inst✝² : LieAlgebra R L₂
inst✝¹ : AddCommGroup M
inst✝ : LieRingModule L₂ M
f : L₁ →ₗ⁅R⁆ L₂
x y : L₁
m : M
⊢ ⁅x, ⁅y, m⁆⁆ = ⁅⁅x, y⁆, m⁆ + ⁅y, ⁅x, m⁆⁆

Next tactic:
simp only [lie_lie, sub_add_cancel, LieHom.map_lie]
/-- A Lie module may be pulled back along a morphism of Lie algebras. -/
theorem LieModule.compLieHom [Module R M] [LieModule R L₂ M] :
    @LieModule R L₁ M _ _ _ _ _ (LieRingModule.compLieHom M f) :=
  { LieRingModule.compLieHom M f with
    smul_lie := fun t x m => by
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
M : Type w₁
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L₁
inst✝⁶ : LieAlgebra R L₁
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M
inst✝² : LieRingModule L₂ M
f : L₁ →ₗ⁅R⁆ L₂
inst✝¹ : Module R M
inst✝ : LieModule R L₂ M
src✝ : LieRingModule L₁ M := LieRingModule.compLieHom M f
t : R
x : L₁
m : M
⊢ ⁅t • x, m⁆ = t • ⁅x, m⁆

Next tactic:
simp only [LieRingModule.compLieHom_apply, smul_lie, LieHom.map_smul]
/-- A Lie module may be pulled back along a morphism of Lie algebras. -/
theorem LieModule.compLieHom [Module R M] [LieModule R L₂ M] :
    @LieModule R L₁ M _ _ _ _ _ (LieRingModule.compLieHom M f) :=
  { LieRingModule.compLieHom M f with
    smul_lie := fun t x m => by
      simp only [LieRingModule.compLieHom_apply, smul_lie, LieHom.map_smul]
    lie_smul := fun t x m => by
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
M : Type w₁
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L₁
inst✝⁶ : LieAlgebra R L₁
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M
inst✝² : LieRingModule L₂ M
f : L₁ →ₗ⁅R⁆ L₂
inst✝¹ : Module R M
inst✝ : LieModule R L₂ M
src✝ : LieRingModule L₁ M := LieRingModule.compLieHom M f
t : R
x : L₁
m : M
⊢ ⁅x, t • m⁆ = t • ⁅x, m⁆

Next tactic:
simp only [LieRingModule.compLieHom_apply, lie_smul]
instance : EquivLike (L₁ ≃ₗ⁅R⁆ L₂) L₁ L₂ :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by 

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
f g : L₁ ≃ₗ⁅R⁆ L₂
h₁ : (fun f => f.toFun) f = (fun f => f.toFun) g
h₂ : (fun f => f.invFun) f = (fun f => f.invFun) g
⊢ f = g

Next tactic:
cases f
instance : EquivLike (L₁ ≃ₗ⁅R⁆ L₂) L₁ L₂ :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; 

Proof state:
case mk
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
g : L₁ ≃ₗ⁅R⁆ L₂
toLieHom✝ : L₁ →ₗ⁅R⁆ L₂
invFun✝ : L₂ → L₁
left_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun
h₁ :
  (fun f => f.toFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =
    (fun f => f.toFun) g
h₂ :
  (fun f => f.invFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =
    (fun f => f.invFun) g
⊢ { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } = g

Next tactic:
cases g
instance : EquivLike (L₁ ≃ₗ⁅R⁆ L₂) L₁ L₂ :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; cases g; 

Proof state:
case mk.mk
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
toLieHom✝¹ : L₁ →ₗ⁅R⁆ L₂
invFun✝¹ : L₂ → L₁
left_inv✝¹ : LeftInverse invFun✝¹ toLieHom✝¹.toFun
right_inv✝¹ : Function.RightInverse invFun✝¹ toLieHom✝¹.toFun
toLieHom✝ : L₁ →ₗ⁅R⁆ L₂
invFun✝ : L₂ → L₁
left_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun
h₁ :
  (fun f => f.toFun) { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    (fun f => f.toFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }
h₂ :
  (fun f => f.invFun) { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    (fun f => f.invFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }
⊢ { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
simp at h₁ h₂
instance : EquivLike (L₁ ≃ₗ⁅R⁆ L₂) L₁ L₂ :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; cases g; simp at h₁ h₂; 

Proof state:
case mk.mk
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
toLieHom✝¹ : L₁ →ₗ⁅R⁆ L₂
invFun✝¹ : L₂ → L₁
left_inv✝¹ : LeftInverse invFun✝¹ toLieHom✝¹.toFun
right_inv✝¹ : Function.RightInverse invFun✝¹ toLieHom✝¹.toFun
toLieHom✝ : L₁ →ₗ⁅R⁆ L₂
invFun✝ : L₂ → L₁
left_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun
h₂ : invFun✝¹ = invFun✝
h₁ : toLieHom✝¹ = toLieHom✝
⊢ { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
simp [*]
theorem coe_linearEquiv_injective : Injective ((↑) : (L₁ ≃ₗ⁅R⁆ L₂) → L₁ ≃ₗ[R] L₂) := by
  

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
⊢ Injective toLinearEquiv

Next tactic:
rintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩
theorem coe_linearEquiv_injective : Injective ((↑) : (L₁ ≃ₗ⁅R⁆ L₂) → L₁ ≃ₗ[R] L₂) := by
  rintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩
  intro h
  simp only [to_linearEquiv_mk, LinearEquiv.mk.injEq, LinearMap.mk.injEq, AddHom.mk.injEq] at h
  

Proof state:
case mk.mk.mk.mk.mk.mk.mk.mk
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
f_inv : L₂ → L₁
f : L₁ → L₂
map_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y
map_smul'✝¹ :
  ∀ (r : R) (x : L₁),
    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 y : L₁},
    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =
      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,
        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆
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 : L₂ → L₁
g : L₁ → L₂
map_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y
map_smul'✝ :
  ∀ (r : R) (x : L₁),
    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 y : L₁},
    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =
      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,
        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆
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 : f = g ∧ f_inv = g_inv
⊢ {
      toLieHom :=
        { 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✝¹ } =
    {
      toLieHom :=
        { 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:
congr
@[simp]
theorem symm_symm (e : L₁ ≃ₗ⁅R⁆ L₂) : e.symm.symm = e := by
  

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
e : L₁ ≃ₗ⁅R⁆ L₂
⊢ symm (symm e) = e

Next tactic:
ext
@[simp]
theorem symm_symm (e : L₁ ≃ₗ⁅R⁆ L₂) : e.symm.symm = e := by
  ext
  

Proof state:
case h
R : Type u
L₁ : Type v
L₂ : Type w
L₃ : Type w₁
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L₁
inst✝⁴ : LieRing L₂
inst✝³ : LieRing L₃
inst✝² : LieAlgebra R L₁
inst✝¹ : LieAlgebra R L₂
inst✝ : LieAlgebra R L₃
e : L₁ ≃ₗ⁅R⁆ L₂
x✝ : L₁
⊢ (symm (symm e)) x✝ = e x✝

Next tactic:
rfl