l3lab/ntp-mathlib huggingface dataset:
lemma normalClosure_def'' : normalClosure F K L = ⨆ f : L ≃ₐ[F] L, K.map f := by
  refine' (normalClosure_def' K).trans (le_antisymm (iSup_le (fun f ↦ _)) (iSup_le (fun f ↦ _)))
  · 

Proof state:
case refine'_1
F : Type u_1
K✝ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝
inst✝³ : Field L
inst✝² : Algebra F K✝
inst✝¹ : Algebra F L
K K' : IntermediateField F L
inst✝ : Normal F L
f : L →ₐ[F] L
⊢ map f K ≤ ⨆ f, map (↑f) K

Next tactic:
exact le_iSup_of_le (f.restrictNormal' L)
      (fun b ⟨a, h⟩ ↦ ⟨a, h.1, h.2 ▸ f.restrictNormal_commutes L a⟩)
lemma normalClosure_def'' : normalClosure F K L = ⨆ f : L ≃ₐ[F] L, K.map f := by
  refine' (normalClosure_def' K).trans (le_antisymm (iSup_le (fun f ↦ _)) (iSup_le (fun f ↦ _)))
  · exact le_iSup_of_le (f.restrictNormal' L)
      (fun b ⟨a, h⟩ ↦ ⟨a, h.1, h.2 ▸ f.restrictNormal_commutes L a⟩)
  · 

Proof state:
case refine'_2
F : Type u_1
K✝ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝
inst✝³ : Field L
inst✝² : Algebra F K✝
inst✝¹ : Algebra F L
K K' : IntermediateField F L
inst✝ : Normal F L
f : L ≃ₐ[F] L
⊢ map (↑f) K ≤ ⨆ f, map f K

Next tactic:
exact le_iSup_of_le f le_rfl
lemma normalClosure_mono (h : K ≤ K') : normalClosure F K L ≤ normalClosure F K' L := by
  

Proof state:
F : Type u_1
K✝ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝
inst✝³ : Field L
inst✝² : Algebra F K✝
inst✝¹ : Algebra F L
K K' : IntermediateField F L
inst✝ : Normal F L
h : K ≤ K'
⊢ normalClosure F (↥K) L ≤ normalClosure F (↥K') L

Next tactic:
rw [normalClosure_def', normalClosure_def']
lemma normalClosure_mono (h : K ≤ K') : normalClosure F K L ≤ normalClosure F K' L := by
  rw [normalClosure_def', normalClosure_def']
  

Proof state:
F : Type u_1
K✝ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝
inst✝³ : Field L
inst✝² : Algebra F K✝
inst✝¹ : Algebra F L
K K' : IntermediateField F L
inst✝ : Normal F L
h : K ≤ K'
⊢ ⨆ f, map f K ≤ ⨆ f, map f K'

Next tactic:
exact iSup_mono (fun f ↦ map_mono f h)
lemma normal_iff_forall_fieldRange_le : Normal F K ↔ ∀ σ : K →ₐ[F] L, σ.fieldRange ≤ K :=
by 

Proof state:
F : Type u_1
K✝¹ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝¹
inst✝³ : Field L
inst✝² : Algebra F K✝¹
inst✝¹ : Algebra F L
K✝ K' : IntermediateField F L
inst✝ : Normal F L
K : IntermediateField F L
⊢ Normal F ↥K ↔ ∀ (σ : ↥K →ₐ[F] L), AlgHom.fieldRange σ ≤ K

Next tactic:
rw [normal_iff_normalClosure_le, normalClosure_def, iSup_le_iff]
lemma normal_iff_forall_map_le : Normal F K ↔ ∀ σ : L →ₐ[F] L, K.map σ ≤ K :=
by 

Proof state:
F : Type u_1
K✝¹ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝¹
inst✝³ : Field L
inst✝² : Algebra F K✝¹
inst✝¹ : Algebra F L
K✝ K' : IntermediateField F L
inst✝ : Normal F L
K : IntermediateField F L
⊢ Normal F ↥K ↔ ∀ (σ : L →ₐ[F] L), map σ K ≤ K

Next tactic:
rw [normal_iff_normalClosure_le, normalClosure_def', iSup_le_iff]
lemma normal_iff_forall_map_le' : Normal F K ↔ ∀ σ : L ≃ₐ[F] L, K.map ↑σ ≤ K :=
by 

Proof state:
F : Type u_1
K✝¹ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝¹
inst✝³ : Field L
inst✝² : Algebra F K✝¹
inst✝¹ : Algebra F L
K✝ K' : IntermediateField F L
inst✝ : Normal F L
K : IntermediateField F L
⊢ Normal F ↥K ↔ ∀ (σ : L ≃ₐ[F] L), map (↑σ) K ≤ K

Next tactic:
rw [normal_iff_normalClosure_le, normalClosure_def'', iSup_le_iff]
theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z := 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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
y : L
⊢ ∃ t, ∃ z ∈ I, y = t • x + z

Next tactic:
have hy : y ∈ (⊤ : Submodule R L) := Submodule.mem_top
theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z := by
  have hy : y ∈ (⊤ : Submodule R L) := Submodule.mem_top
  

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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
y : L
hy : y ∈ ⊤
⊢ ∃ t, ∃ z ∈ I, y = t • x + z

Next tactic:
simp only [← hxI, Submodule.mem_sup, Submodule.mem_span_singleton] at hy
theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z := by
  have hy : y ∈ (⊤ : Submodule R L) := Submodule.mem_top
  simp only [← hxI, Submodule.mem_sup, Submodule.mem_span_singleton] at hy
  

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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
y : L
hy : ∃ y_1, (∃ a, a • x = y_1) ∧ ∃ z ∈ (lieIdealSubalgebra R L I).toSubmodule, y_1 + z = y
⊢ ∃ t, ∃ z ∈ I, y = t • x + z

Next tactic:
obtain ⟨-, ⟨t, rfl⟩, z, hz, rfl⟩ := hy
theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z := by
  have hy : y ∈ (⊤ : Submodule R L) := Submodule.mem_top
  simp only [← hxI, Submodule.mem_sup, Submodule.mem_span_singleton] at hy
  obtain ⟨-, ⟨t, rfl⟩, z, hz, rfl⟩ := hy
  

Proof state:
case intro.intro.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
t : R
z : L
hz : z ∈ (lieIdealSubalgebra R L I).toSubmodule
⊢ ∃ t_1, ∃ z_1 ∈ I, t • x + z = t_1 • x + z_1

Next tactic:
exact ⟨t, z, hz, rfl⟩
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := 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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
⊢ ↑⁅⊤, N⁆ = Submodule.map ((toEndomorphism R L M) x) ↑N ⊔ ↑⁅I, N⁆

Next tactic:
simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  

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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
⊢ Submodule.span R {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m} =
    Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m})

Next tactic:
refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · 

Proof state:
case refine'_1
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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
⊢ {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m} ⊆ ↑(Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}))

Next tactic:
rintro z ⟨y, n, hn : n ∈ N, rfl⟩
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    

Proof state:
case refine'_1.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
y : L
n : M
hn : n ∈ N
⊢ ⁅y, n⁆ ∈ ↑(Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}))

Next tactic:
obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
    

Proof state:
case refine'_1.intro.intro.intro.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
n : M
hn : n ∈ N
t : R
z : L
hz : z ∈ I
⊢ ⁅t • x + z, n⁆ ∈ ↑(Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}))

Next tactic:
simp only [SetLike.mem_coe, Submodule.span_union, Submodule.mem_sup]
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
    simp only [SetLike.mem_coe, Submodule.span_union, Submodule.mem_sup]
    

Proof state:
case refine'_1.intro.intro.intro.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
n : M
hn : n ∈ N
t : R
z : L
hz : z ∈ I
⊢ ∃ y ∈ Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N),
    ∃ z_1 ∈ Submodule.span R {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}, y + z_1 = ⁅t • x + z, n⁆

Next tactic:
exact
      ⟨t • ⁅x, n⁆, Submodule.subset_span ⟨t • n, N.smul_mem' t hn, lie_smul t x n⟩, ⁅z, n⁆,
        Submodule.subset_span ⟨z, hz, n, hn, rfl⟩, by simp⟩
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
    simp only [SetLike.mem_coe, Submodule.span_union, Submodule.mem_sup]
    exact
      ⟨t • ⁅x, n⁆, Submodule.subset_span ⟨t • n, N.smul_mem' t hn, lie_smul t x n⟩, ⁅z, n⁆,
        Submodule.subset_span ⟨z, hz, n, hn, rfl⟩, 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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
n : M
hn : n ∈ N
t : R
z : L
hz : z ∈ I
⊢ t • ⁅x, n⁆ + ⁅z, n⁆ = ⁅t • x + z, n⁆

Next tactic:
simp
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
    simp only [SetLike.mem_coe, Submodule.span_union, Submodule.mem_sup]
    exact
      ⟨t • ⁅x, n⁆, Submodule.subset_span ⟨t • n, N.smul_mem' t hn, lie_smul t x n⟩, ⁅z, n⁆,
        Submodule.subset_span ⟨z, hz, n, hn, rfl⟩, by simp⟩
  · 

Proof state:
case refine'_2
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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
z : M
hz : z ∈ (fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}
⊢ z ∈ {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m}

Next tactic:
rcases hz with (⟨m, hm, rfl⟩ | ⟨y, -, m, hm, rfl⟩)
theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
    (↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
      (N : Submodule R M).map (toEndomorphism R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by
  simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
    true_and, Submodule.map_coe, toEndomorphism_apply_apply]
  refine' le_antisymm (Submodule.span_le.mpr _) (Submodule.span_mono fun z hz => _)
  · rintro z ⟨y, n, hn : n ∈ N, rfl⟩
    obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_eq_top hxI y
    simp only [SetLike.mem_coe, Submodule.span_union, Submodule.mem_sup]
    exact
      ⟨t • ⁅x, n⁆, Submodule.subset_span ⟨t • n, N.smul_mem' t hn, lie_smul t x n⟩, ⁅z, n⁆,
        Submodule.subset_span ⟨z, hz, n, hn, rfl⟩, by simp⟩
  · rcases hz with (⟨m, hm, rfl⟩ | ⟨y, -, m, hm, rfl⟩)
    

Proof state:
case refine'_2.inl.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
m : M
hm : m ∈ ↑↑N
⊢ (fun a => ⁅x, a⁆) m ∈ {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m}
case refine'_2.inr.intro.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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
N : LieSubmodule R L M
y : L
m : M
hm : m ∈ N
⊢ ⁅y, m⁆ ∈ {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m}

Next tactic:
exacts [⟨x, m, hm, rfl⟩, ⟨y, m, hm, rfl⟩]
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := 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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
⊢ lowerCentralSeries R L M (i + n) ≤ LieIdeal.lcs I M (j + 1)

Next tactic:
suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by
  suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
this :
  ∀ (l : ℕ),
    ↑(LieIdeal.lcs ⊤ M (i + l)) ≤
      Submodule.map ((toEndomorphism R L M) x ^ l) ↑(LieIdeal.lcs I M j) ⊔ ↑(LieIdeal.lcs I M (j + 1))
⊢ lowerCentralSeries R L M (i + n) ≤ LieIdeal.lcs I M (j + 1)

Next tactic:
simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by
  suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
  

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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
⊢ ∀ (l : ℕ),
    ↑(LieIdeal.lcs ⊤ M (i + l)) ≤
      Submodule.map ((toEndomorphism R L M) x ^ l) ↑(LieIdeal.lcs I M j) ⊔ ↑(LieIdeal.lcs I M (j + 1))

Next tactic:
intro l
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by
  suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
  intro l
  

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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
l : ℕ
⊢ ↑(LieIdeal.lcs ⊤ M (i + l)) ≤
    Submodule.map ((toEndomorphism R L M) x ^ l) ↑(LieIdeal.lcs I M j) ⊔ ↑(LieIdeal.lcs I M (j + 1))

Next tactic:
induction' l with l ih
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by
  suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
  intro l
  induction' l with l ih
  · 

Proof state:
case zero
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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
⊢ ↑(LieIdeal.lcs ⊤ M (i + Nat.zero)) ≤
    Submodule.map ((toEndomorphism R L M) x ^ Nat.zero) ↑(LieIdeal.lcs I M j) ⊔ ↑(LieIdeal.lcs I M (j + 1))

Next tactic:
simp only [Nat.zero_eq, add_zero, LieIdeal.lcs_succ, pow_zero, LinearMap.one_eq_id,
      Submodule.map_id]
theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEndomorphism R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by
  suffices
    ∀ l,
      ((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
        (I.lcs M j : Submodule R M).map (toEndomorphism R L M x ^ l) ⊔
          (I.lcs M (j + 1) : Submodule R M)
    by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
  intro l
  induction' l with l ih
  · simp only [Nat.zero_eq, add_zero, LieIdeal.lcs_succ, pow_zero, LinearMap.one_eq_id,
      Submodule.map_id]
    

Proof state:
case zero
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
I : LieIdeal R L
x : L
hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤
n i j : ℕ
hxn : (toEndomorphism R L M) x ^ n = 0
hIM : lowerCentralSeries R L M i ≤ LieIdeal.lcs I M j
⊢ ↑(LieIdeal.lcs ⊤ M i) ≤ ↑(LieIdeal.lcs I M j) ⊔ ↑⁅I, LieIdeal.lcs I M j⁆

Next tactic:
exact le_sup_of_le_left hIM