l3lab/ntp-mathlib huggingface dataset:
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  

Proof state:
case intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
⊢ IsEngelian R ↥K'

Next tactic:
intro M _i1 _i2 _i3 _i4 h
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  

Proof state:
case intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
⊢ LieModule.IsNilpotent R (↥K') M

Next tactic:
obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  

Proof state:
case intro.intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
⊢ LieModule.IsNilpotent R (↥K') M

Next tactic:
have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
    simp
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    

Proof state:
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
⊢ Submodule.span R {{ val := x, property := hxK' }} ⊔ ↑I = ⊤

Next tactic:
rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    

Proof state:
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
⊢ Submodule.span R {{ val := x, property := hxK' }} ⊔ (LieSubalgebra.ofLe hKK').toSubmodule = ⊤

Next tactic:
apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
    

Proof state:
case a
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
⊢ Submodule.map (Submodule.subtype K'.toSubmodule)
      (Submodule.span R {{ val := x, property := hxK' }} ⊔ (LieSubalgebra.ofLe hKK').toSubmodule) =
    Submodule.map (Submodule.subtype K'.toSubmodule) ⊤

Next tactic:
simp
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
    simp
  

Proof state:
case intro.intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
hI₂ : Submodule.span R {{ val := x, property := hxK' }} ⊔ ↑I = ⊤
⊢ LieModule.IsNilpotent R (↥K') M

Next tactic:
have e : K ≃ₗ⁅R⁆ I :=
    (LieSubalgebra.equivOfLe hKK').trans
      (LieEquiv.ofEq _ _ ((LieSubalgebra.coe_set_eq _ _).mpr hI₁.symm))
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
    simp
  have e : K ≃ₗ⁅R⁆ I :=
    (LieSubalgebra.equivOfLe hKK').trans
      (LieEquiv.ofEq _ _ ((LieSubalgebra.coe_set_eq _ _).mpr hI₁.symm))
  

Proof state:
case intro.intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
hI₂ : Submodule.span R {{ val := x, property := hxK' }} ⊔ ↑I = ⊤
e : ↥K ≃ₗ⁅R⁆ ↥↑I
⊢ LieModule.IsNilpotent R (↥K') M

Next tactic:
have hI₃ : LieAlgebra.IsEngelian R I := e.isEngelian_iff.mp hK₁
theorem LieAlgebra.exists_engelian_lieSubalgebra_of_lt_normalizer {K : LieSubalgebra R L}
    (hK₁ : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K) (hK₂ : K < K.normalizer) :
    ∃ (K' : LieSubalgebra R L), LieAlgebra.IsEngelian.{u₁, u₂, u₄} R K' ∧ K < K' := by
  obtain ⟨x, hx₁, hx₂⟩ := SetLike.exists_of_lt hK₂
  let K' : LieSubalgebra R L :=
    { (R ∙ x) ⊔ (K : Submodule R L) with
      lie_mem' := fun {y z} => LieSubalgebra.lie_mem_sup_of_mem_normalizer hx₁ }
  have hxK' : x ∈ K' := Submodule.mem_sup_left (Submodule.subset_span (Set.mem_singleton _))
  have hKK' : K ≤ K' := (LieSubalgebra.coe_submodule_le_coe_submodule K K').mp le_sup_right
  have hK' : K' ≤ K.normalizer := by
    rw [← LieSubalgebra.coe_submodule_le_coe_submodule]
    exact sup_le ((Submodule.span_singleton_le_iff_mem _ _).mpr hx₁) hK₂.le
  refine' ⟨K', _, lt_iff_le_and_ne.mpr ⟨hKK', fun contra => hx₂ (contra.symm ▸ hxK')⟩⟩
  intro M _i1 _i2 _i3 _i4 h
  obtain ⟨I, hI₁ : (I : LieSubalgebra R K') = LieSubalgebra.ofLe hKK'⟩ :=
    LieSubalgebra.exists_nested_lieIdeal_ofLe_normalizer hKK' hK'
  have hI₂ : (R ∙ (⟨x, hxK'⟩ : K')) ⊔ (LieSubmodule.toSubmodule I) = ⊤ := by
    rw [← LieIdeal.coe_to_lieSubalgebra_to_submodule R K' I, hI₁]
    apply Submodule.map_injective_of_injective (K' : Submodule R L).injective_subtype
    simp
  have e : K ≃ₗ⁅R⁆ I :=
    (LieSubalgebra.equivOfLe hKK').trans
      (LieEquiv.ofEq _ _ ((LieSubalgebra.coe_set_eq _ _).mpr hI₁.symm))
  have hI₃ : LieAlgebra.IsEngelian R I := e.isEngelian_iff.mp hK₁
  

Proof state:
case intro.intro.intro
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieRing L₂
inst✝⁴ : LieAlgebra R L₂
inst✝³ : AddCommGroup M✝
inst✝² : Module R M✝
inst✝¹ : LieRingModule L M✝
inst✝ : LieModule R L M✝
K : LieSubalgebra R L
hK₁ : IsEngelian R ↥K
hK₂ : K < LieSubalgebra.normalizer K
x : L
hx₁ : x ∈ LieSubalgebra.normalizer K
hx₂ : x ∉ K
K' : LieSubalgebra R L :=
  let src := Submodule.span R {x} ⊔ K.toSubmodule;
  {
    toSubmodule :=
      { toAddSubmonoid := src.toAddSubmonoid,
        smul_mem' := (_ : ∀ (c : R) {x : L}, x ∈ src.carrier → c • x ∈ src.carrier) },
    lie_mem' :=
      (_ :
        ∀ {y z : L},
          y ∈ Submodule.span R {x} ⊔ K.toSubmodule →
            z ∈ Submodule.span R {x} ⊔ K.toSubmodule → ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ K.toSubmodule) }
hxK' : x ∈ K'
hKK' : K ≤ K'
hK' : K' ≤ LieSubalgebra.normalizer K
M : Type u₄
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule (↥K') M
_i4 : LieModule R (↥K') M
h : ∀ (x : ↥K'), _root_.IsNilpotent ((toEndomorphism R (↥K') M) x)
I : LieIdeal R ↥K'
hI₁ : lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe hKK'
hI₂ : Submodule.span R {{ val := x, property := hxK' }} ⊔ ↑I = ⊤
e : ↥K ≃ₗ⁅R⁆ ↥↑I
hI₃ : IsEngelian R ↥↑I
⊢ LieModule.IsNilpotent R (↥K') M

Next tactic:
exact LieSubmodule.isNilpotentOfIsNilpotentSpanSupEqTop hI₂ (h _) (hI₃ _ fun x => h x)
/-- *Engel's theorem*.

Note that this implies all traditional forms of Engel's theorem via
`LieModule.nontrivial_max_triv_of_isNilpotent`, `LieModule.isNilpotent_iff_forall`,
`LieAlgebra.isNilpotent_iff_forall`. -/
theorem LieAlgebra.isEngelian_of_isNoetherian [IsNoetherian R L] : LieAlgebra.IsEngelian R L := by
  

Proof state:
R : Type u₁
L : Type u₂
L₂ : Type u₃
M : Type u₄
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieRing L₂
inst✝⁵ : LieAlgebra R L₂
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : IsNoetherian R L
⊢ IsEngelian R L

Next tactic:
intro M _i1 _i2 _i3 _i4 h
/-- *Engel's theorem*.

Note that this implies all traditional forms of Engel's theorem via
`LieModule.nontrivial_max_triv_of_isNilpotent`, `LieModule.isNilpotent_iff_forall`,
`LieAlgebra.isNilpotent_iff_forall`. -/
theorem LieAlgebra.isEngelian_of_isNoetherian [IsNoetherian R L] : LieAlgebra.IsEngelian R L := by
  intro M _i1 _i2 _i3 _i4 h
  

Proof state:
R : Type u₁
L : Type u₂
L₂ : Type u₃
M✝ : Type u₄
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieRing L₂
inst✝⁵ : LieAlgebra R L₂
inst✝⁴ : AddCommGroup M✝
inst✝³ : Module R M✝
inst✝² : LieRingModule L M✝
inst✝¹ : LieModule R L M✝
inst✝ : IsNoetherian R L
M : Type u_1
_i1 : AddCommGroup M
_i2 : Module R M
_i3 : LieRingModule L M
_i4 : LieModule R L M
h : ∀ (x : L), _root_.IsNilpotent ((toEndomorphism R L M) x)
⊢ LieModule.IsNilpotent R L M

Next tactic:
rw [← isNilpotent_range_toEndomorphism_iff]