algebra.lie.nilpotentMathlib.Algebra.Lie.Nilpotent

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -7,7 +7,7 @@ import Algebra.Lie.Solvable
 import Algebra.Lie.Quotient
 import Algebra.Lie.Normalizer
 import LinearAlgebra.Eigenspace.Basic
-import RingTheory.Nilpotent
+import RingTheory.Nilpotent.Defs
 
 #align_import algebra.lie.nilpotent from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
 
Diff
@@ -166,7 +166,7 @@ theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries
   by
   constructor <;> intro h
   · erw [eq_bot_iff, LieSubmodule.lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn, h.trivial]; simp
-  · rw [LieSubmodule.eq_bot_iff] at h ; apply is_trivial.mk; intro x m; apply h
+  · rw [LieSubmodule.eq_bot_iff] at h; apply is_trivial.mk; intro x m; apply h
     apply LieSubmodule.subset_lieSpan; use x, m; rfl
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
 -/
@@ -294,7 +294,7 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
   suffices lowerCentralSeries R L M k ≤ N
     by
     replace this := LieSubmodule.mono_lie_right _ _ ⊤ (le_trans this h₁)
-    rwa [ideal_oper_max_triv_submodule_eq_bot, le_bot_iff] at this 
+    rwa [ideal_oper_max_triv_submodule_eq_bot, le_bot_iff] at this
   rw [← LieSubmodule.Quotient.map_mk'_eq_bot_le, ← le_bot_iff, ← hk]
   exact map_lower_central_series_le k (LieSubmodule.Quotient.mk' N)
 #align lie_module.nilpotent_of_nilpotent_quotient LieModule.nilpotentOfNilpotentQuotient
@@ -364,7 +364,7 @@ theorem lowerCentralSeriesLast_le_max_triv :
   cases' h : nilpotency_length R L M with k
   · exact bot_le
   · rw [le_max_triv_iff_bracket_eq_bot]
-    rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h 
+    rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h
     exact h.1
 #align lie_module.lower_central_series_last_le_max_triv LieModule.lowerCentralSeriesLast_le_max_triv
 -/
@@ -375,9 +375,9 @@ theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
   by
   rw [LieSubmodule.nontrivial_iff_ne_bot, lower_central_series_last]
   cases h : nilpotency_length R L M
-  · rw [nilpotency_length_eq_zero_iff, ← not_nontrivial_iff_subsingleton] at h 
+  · rw [nilpotency_length_eq_zero_iff, ← not_nontrivial_iff_subsingleton] at h
     contradiction
-  · rw [nilpotency_length_eq_succ_iff] at h 
+  · rw [nilpotency_length_eq_succ_iff] at h
     exact h.2
 #align lie_module.nontrivial_lower_central_series_last LieModule.nontrivial_lowerCentralSeriesLast
 -/
@@ -559,7 +559,7 @@ theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
       g '' {m | ∃ (x : L) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m} =
         {m | ∃ (x : L₂) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m}
       by
-      simp only [← LieSubmodule.mem_coeSubmodule] at this 
+      simp only [← LieSubmodule.mem_coeSubmodule] at this
       simp [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.lieIdeal_oper_eq_linear_span',
         Submodule.map_span, -Submodule.span_image, this]
     ext m₂
@@ -672,10 +672,10 @@ theorem coe_lowerCentralSeries_ideal_quot_eq {I : LieIdeal R L} (k : ℕ) :
     ext x
     constructor
     · rintro ⟨⟨y, -⟩, ⟨z, hz⟩, rfl : ⁅y, z⁆ = x⟩
-      erw [← LieSubmodule.mem_coeSubmodule, ih, LieSubmodule.mem_coeSubmodule] at hz 
+      erw [← LieSubmodule.mem_coeSubmodule, ih, LieSubmodule.mem_coeSubmodule] at hz
       exact ⟨⟨LieSubmodule.Quotient.mk y, LieSubmodule.mem_top _⟩, ⟨z, hz⟩, rfl⟩
     · rintro ⟨⟨⟨y⟩, -⟩, ⟨z, hz⟩, rfl : ⁅y, z⁆ = x⟩
-      erw [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.mem_coeSubmodule] at hz 
+      erw [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.mem_coeSubmodule] at hz
       exact ⟨⟨y, LieSubmodule.mem_top _⟩, ⟨z, hz⟩, rfl⟩
 #align coe_lower_central_series_ideal_quot_eq coe_lowerCentralSeries_ideal_quot_eq
 -/
Diff
@@ -3,11 +3,11 @@ Copyright (c) 2021 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 -/
-import Mathbin.Algebra.Lie.Solvable
-import Mathbin.Algebra.Lie.Quotient
-import Mathbin.Algebra.Lie.Normalizer
-import Mathbin.LinearAlgebra.Eigenspace.Basic
-import Mathbin.RingTheory.Nilpotent
+import Algebra.Lie.Solvable
+import Algebra.Lie.Quotient
+import Algebra.Lie.Normalizer
+import LinearAlgebra.Eigenspace.Basic
+import RingTheory.Nilpotent
 
 #align_import algebra.lie.nilpotent from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
 
Diff
@@ -262,7 +262,6 @@ theorem exists_forall_pow_toEndomorphism_eq_zero [hM : IsNilpotent R L M] :
 #align lie_module.nilpotent_endo_of_nilpotent_module LieModule.exists_forall_pow_toEndomorphism_eq_zero
 -/
 
-#print LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
 /-- For a nilpotent Lie module, the weight space of the 0 weight is the whole module.
 
 This result will be used downstream to show that weight spaces are Lie submodules, at which time
@@ -278,7 +277,6 @@ theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
   use k; rw [hk]
   exact LinearMap.zero_apply m
 #align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
--/
 
 #print LieModule.nilpotentOfNilpotentQuotient /-
 /-- If the quotient of a Lie module `M` by a Lie submodule on which the Lie algebra acts trivially
@@ -645,13 +643,11 @@ theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 -/
 
-#print LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
 /-- See also `lie_algebra.zero_root_space_eq_top_of_nilpotent`. -/
 theorem LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
     (⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0) = ⊤ :=
   LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
 #align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
--/
 
 -- TODO Generalise the below to Lie modules if / when we define morphisms, equivs of Lie modules
 -- covering a Lie algebra morphism of (possibly different) Lie algebras.
Diff
@@ -250,8 +250,8 @@ instance (priority := 100) trivialIsNilpotent [IsTrivial L M] : IsNilpotent R L
 #align lie_module.trivial_is_nilpotent LieModule.trivialIsNilpotent
 -/
 
-#print LieModule.nilpotent_endo_of_nilpotent_module /-
-theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
+#print LieModule.exists_forall_pow_toEndomorphism_eq_zero /-
+theorem exists_forall_pow_toEndomorphism_eq_zero [hM : IsNilpotent R L M] :
     ∃ k : ℕ, ∀ x : L, toEndomorphism R L M x ^ k = 0 :=
   by
   obtain ⟨k, hM⟩ := hM
@@ -259,7 +259,7 @@ theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
   intro x; ext m
   rw [LinearMap.pow_apply, LinearMap.zero_apply, ← @LieSubmodule.mem_bot R L M, ← hM]
   exact iterate_to_endomorphism_mem_lower_central_series R L M x m k
-#align lie_module.nilpotent_endo_of_nilpotent_module LieModule.nilpotent_endo_of_nilpotent_module
+#align lie_module.nilpotent_endo_of_nilpotent_module LieModule.exists_forall_pow_toEndomorphism_eq_zero
 -/
 
 #print LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
@@ -641,7 +641,7 @@ open LieAlgebra
 #print LieAlgebra.nilpotent_ad_of_nilpotent_algebra /-
 theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
     ∃ k : ℕ, ∀ x : L, ad R L x ^ k = 0 :=
-  LieModule.nilpotent_endo_of_nilpotent_module R L L
+  LieModule.exists_forall_pow_toEndomorphism_eq_zero R L L
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 -/
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2021 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
-
-! This file was ported from Lean 3 source module algebra.lie.nilpotent
-! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Lie.Solvable
 import Mathbin.Algebra.Lie.Quotient
@@ -14,6 +9,8 @@ import Mathbin.Algebra.Lie.Normalizer
 import Mathbin.LinearAlgebra.Eigenspace.Basic
 import Mathbin.RingTheory.Nilpotent
 
+#align_import algebra.lie.nilpotent from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
+
 /-!
 # Nilpotent Lie algebras
 
Diff
@@ -48,6 +48,7 @@ variable (k : ℕ) (N : LieSubmodule R L M)
 
 namespace LieSubmodule
 
+#print LieSubmodule.lcs /-
 /-- A generalisation of the lower central series. The zeroth term is a specified Lie submodule of
 a Lie module. In the case when we specify the top ideal `⊤` of the Lie algebra, regarded as a Lie
 module over itself, we get the usual lower central series of a Lie algebra.
@@ -62,16 +63,21 @@ See also `lie_module.lower_central_series_eq_lcs_comap` and
 def lcs : LieSubmodule R L M → LieSubmodule R L M :=
   (fun N => ⁅(⊤ : LieIdeal R L), N⁆)^[k]
 #align lie_submodule.lcs LieSubmodule.lcs
+-/
 
+#print LieSubmodule.lcs_zero /-
 @[simp]
 theorem lcs_zero (N : LieSubmodule R L M) : N.lcs 0 = N :=
   rfl
 #align lie_submodule.lcs_zero LieSubmodule.lcs_zero
+-/
 
+#print LieSubmodule.lcs_succ /-
 @[simp]
 theorem lcs_succ : N.lcs (k + 1) = ⁅(⊤ : LieIdeal R L), N.lcs k⁆ :=
   Function.iterate_succ_apply' (fun N' => ⁅⊤, N'⁆) k N
 #align lie_submodule.lcs_succ LieSubmodule.lcs_succ
+-/
 
 end LieSubmodule
 
@@ -79,21 +85,27 @@ namespace LieModule
 
 variable (R L M)
 
+#print LieModule.lowerCentralSeries /-
 /-- The lower central series of Lie submodules of a Lie module. -/
 def lowerCentralSeries : LieSubmodule R L M :=
   (⊤ : LieSubmodule R L M).lcs k
 #align lie_module.lower_central_series LieModule.lowerCentralSeries
+-/
 
+#print LieModule.lowerCentralSeries_zero /-
 @[simp]
 theorem lowerCentralSeries_zero : lowerCentralSeries R L M 0 = ⊤ :=
   rfl
 #align lie_module.lower_central_series_zero LieModule.lowerCentralSeries_zero
+-/
 
+#print LieModule.lowerCentralSeries_succ /-
 @[simp]
 theorem lowerCentralSeries_succ :
     lowerCentralSeries R L M (k + 1) = ⁅(⊤ : LieIdeal R L), lowerCentralSeries R L M k⁆ :=
   (⊤ : LieSubmodule R L M).lcs_succ k
 #align lie_module.lower_central_series_succ LieModule.lowerCentralSeries_succ
+-/
 
 end LieModule
 
@@ -103,12 +115,14 @@ open LieModule
 
 variable {R L M}
 
+#print LieSubmodule.lcs_le_self /-
 theorem lcs_le_self : N.lcs k ≤ N := by
   induction' k with k ih
   · simp
   · simp only [lcs_succ]
     exact (LieSubmodule.mono_lie_right _ _ ⊤ ih).trans (N.lie_le_right ⊤)
 #align lie_submodule.lcs_le_self LieSubmodule.lcs_le_self
+-/
 
 #print LieSubmodule.lowerCentralSeries_eq_lcs_comap /-
 theorem lowerCentralSeries_eq_lcs_comap : lowerCentralSeries R L N k = (N.lcs k).comap N.incl :=
@@ -137,6 +151,7 @@ namespace LieModule
 
 variable (R L M)
 
+#print LieModule.antitone_lowerCentralSeries /-
 theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M :=
   by
   intro l k
@@ -147,7 +162,9 @@ theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M :=
       exact (LieSubmodule.mono_lie_right _ _ ⊤ (ih hk)).trans (LieSubmodule.lie_le_right _ _)
     · exact hk.symm ▸ le_rfl
 #align lie_module.antitone_lower_central_series LieModule.antitone_lowerCentralSeries
+-/
 
+#print LieModule.trivial_iff_lower_central_eq_bot /-
 theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries R L M 1 = ⊥ :=
   by
   constructor <;> intro h
@@ -155,6 +172,7 @@ theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries
   · rw [LieSubmodule.eq_bot_iff] at h ; apply is_trivial.mk; intro x m; apply h
     apply LieSubmodule.subset_lieSpan; use x, m; rfl
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
+-/
 
 #print LieModule.iterate_toEndomorphism_mem_lowerCentralSeries /-
 theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ) :
@@ -186,6 +204,7 @@ variable (R L M)
 
 open LieAlgebra
 
+#print LieModule.derivedSeries_le_lowerCentralSeries /-
 theorem derivedSeries_le_lowerCentralSeries (k : ℕ) :
     derivedSeries R L k ≤ lowerCentralSeries R L L k :=
   by
@@ -196,17 +215,22 @@ theorem derivedSeries_le_lowerCentralSeries (k : ℕ) :
     rw [derived_series_def, derived_series_of_ideal_succ, lowerCentralSeries_succ]
     exact LieSubmodule.mono_lie _ _ _ _ h' h
 #align lie_module.derived_series_le_lower_central_series LieModule.derivedSeries_le_lowerCentralSeries
+-/
 
+#print LieModule.IsNilpotent /-
 /-- A Lie module is nilpotent if its lower central series reaches 0 (in a finite number of
 steps). -/
 class IsNilpotent : Prop where
   nilpotent : ∃ k, lowerCentralSeries R L M k = ⊥
 #align lie_module.is_nilpotent LieModule.IsNilpotent
+-/
 
+#print LieModule.isNilpotent_iff /-
 /-- See also `lie_module.is_nilpotent_iff_exists_ucs_eq_top`. -/
 theorem isNilpotent_iff : IsNilpotent R L M ↔ ∃ k, lowerCentralSeries R L M k = ⊥ :=
   ⟨fun h => h.nilpotent, fun h => ⟨h⟩⟩
 #align lie_module.is_nilpotent_iff LieModule.isNilpotent_iff
+-/
 
 variable {R L M}
 
@@ -223,9 +247,11 @@ theorem LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot (N : LieSubmodule R L M)
 
 variable (R L M)
 
+#print LieModule.trivialIsNilpotent /-
 instance (priority := 100) trivialIsNilpotent [IsTrivial L M] : IsNilpotent R L M :=
   ⟨by use 1; change ⁅⊤, ⊤⁆ = ⊥; simp⟩
 #align lie_module.trivial_is_nilpotent LieModule.trivialIsNilpotent
+-/
 
 #print LieModule.nilpotent_endo_of_nilpotent_module /-
 theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
@@ -279,6 +305,7 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
 #align lie_module.nilpotent_of_nilpotent_quotient LieModule.nilpotentOfNilpotentQuotient
 -/
 
+#print LieModule.nilpotencyLength /-
 /-- Given a nilpotent Lie module `M` with lower central series `M = C₀ ≥ C₁ ≥ ⋯ ≥ Cₖ = ⊥`, this is
 the natural number `k` (the number of inclusions).
 
@@ -286,7 +313,9 @@ For a non-nilpotent module, we use the junk value 0. -/
 noncomputable def nilpotencyLength : ℕ :=
   sInf {k | lowerCentralSeries R L M k = ⊥}
 #align lie_module.nilpotency_length LieModule.nilpotencyLength
+-/
 
+#print LieModule.nilpotencyLength_eq_zero_iff /-
 theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
     nilpotencyLength R L M = 0 ↔ Subsingleton M :=
   by
@@ -302,7 +331,9 @@ theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
   rw [Nat.sInf_eq_zero]
   exact Or.inl h
 #align lie_module.nilpotency_length_eq_zero_iff LieModule.nilpotencyLength_eq_zero_iff
+-/
 
+#print LieModule.nilpotencyLength_eq_succ_iff /-
 theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
     nilpotencyLength R L M = k + 1 ↔
       lowerCentralSeries R L M (k + 1) = ⊥ ∧ lowerCentralSeries R L M k ≠ ⊥ :=
@@ -315,6 +346,7 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
     exact eq_bot_iff.mpr (h₁ ▸ antitone_lower_central_series R L M h₁₂)
   exact Nat.sInf_upward_closed_eq_succ_iff hs k
 #align lie_module.nilpotency_length_eq_succ_iff LieModule.nilpotencyLength_eq_succ_iff
+-/
 
 #print LieModule.lowerCentralSeriesLast /-
 /-- Given a non-trivial nilpotent Lie module `M` with lower central series
@@ -329,6 +361,7 @@ noncomputable def lowerCentralSeriesLast : LieSubmodule R L M :=
 #align lie_module.lower_central_series_last LieModule.lowerCentralSeriesLast
 -/
 
+#print LieModule.lowerCentralSeriesLast_le_max_triv /-
 theorem lowerCentralSeriesLast_le_max_triv :
     lowerCentralSeriesLast R L M ≤ maxTrivSubmodule R L M :=
   by
@@ -339,7 +372,9 @@ theorem lowerCentralSeriesLast_le_max_triv :
     rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h 
     exact h.1
 #align lie_module.lower_central_series_last_le_max_triv LieModule.lowerCentralSeriesLast_le_max_triv
+-/
 
+#print LieModule.nontrivial_lowerCentralSeriesLast /-
 theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
     Nontrivial (lowerCentralSeriesLast R L M) :=
   by
@@ -350,6 +385,7 @@ theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
   · rw [nilpotency_length_eq_succ_iff] at h 
     exact h.2
 #align lie_module.nontrivial_lower_central_series_last LieModule.nontrivial_lowerCentralSeriesLast
+-/
 
 #print LieModule.nontrivial_max_triv_of_isNilpotent /-
 theorem nontrivial_max_triv_of_isNilpotent [Nontrivial M] [IsNilpotent R L M] :
@@ -518,8 +554,7 @@ variable {f : L →ₗ⁅R⁆ L₂} {g : M →ₗ[R] M₂}
 
 variable (hf : Surjective f) (hg : Surjective g) (hfg : ∀ x m, ⁅f x, g m⁆ = g ⁅x, m⁆)
 
-include hf hg hfg
-
+#print Function.Surjective.lieModule_lcs_map_eq /-
 theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
     (lowerCentralSeries R L M k : Submodule R M).map g = lowerCentralSeries R L₂ M₂ k :=
   by
@@ -540,7 +575,9 @@ theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
       obtain ⟨y, rfl⟩ := hf x
       exact ⟨⁅y, n⁆, ⟨y, n, hn, rfl⟩, (hfg y n).symm⟩
 #align function.surjective.lie_module_lcs_map_eq Function.Surjective.lieModule_lcs_map_eq
+-/
 
+#print Function.Surjective.lieModuleIsNilpotent /-
 theorem Function.Surjective.lieModuleIsNilpotent [IsNilpotent R L M] : IsNilpotent R L₂ M₂ :=
   by
   obtain ⟨k, hk⟩ := id (by infer_instance : IsNilpotent R L M)
@@ -548,9 +585,9 @@ theorem Function.Surjective.lieModuleIsNilpotent [IsNilpotent R L M] : IsNilpote
   rw [← LieSubmodule.coe_toSubmodule_eq_iff] at hk ⊢
   simp [← hf.lie_module_lcs_map_eq hg hfg k, hk]
 #align function.surjective.lie_module_is_nilpotent Function.Surjective.lieModuleIsNilpotent
+-/
 
-omit hf hg hfg
-
+#print Equiv.lieModule_isNilpotent_iff /-
 theorem Equiv.lieModule_isNilpotent_iff (f : L ≃ₗ⁅R⁆ L₂) (g : M ≃ₗ[R] M₂)
     (hfg : ∀ x m, ⁅f x, g m⁆ = g ⁅x, m⁆) : IsNilpotent R L M ↔ IsNilpotent R L₂ M₂ :=
   by
@@ -562,6 +599,7 @@ theorem Equiv.lieModule_isNilpotent_iff (f : L ≃ₗ⁅R⁆ L₂) (g : M ≃ₗ
     rw [LinearEquiv.coe_coe, LieEquiv.coe_to_lieHom, ← g.symm_apply_apply ⁅f.symm x, g.symm m⁆, ←
       hfg, f.apply_symm_apply, g.apply_symm_apply]
 #align equiv.lie_module_is_nilpotent_iff Equiv.lieModule_isNilpotent_iff
+-/
 
 #print LieModule.isNilpotent_of_top_iff /-
 @[simp]
@@ -603,10 +641,12 @@ abbrev LieAlgebra.IsNilpotent (R : Type u) (L : Type v) [CommRing R] [LieRing L]
 
 open LieAlgebra
 
+#print LieAlgebra.nilpotent_ad_of_nilpotent_algebra /-
 theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
     ∃ k : ℕ, ∀ x : L, ad R L x ^ k = 0 :=
   LieModule.nilpotent_endo_of_nilpotent_module R L L
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
+-/
 
 #print LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
 /-- See also `lie_algebra.zero_root_space_eq_top_of_nilpotent`. -/
@@ -662,6 +702,7 @@ theorem LieModule.coe_lowerCentralSeries_ideal_le {I : LieIdeal R L} (k : ℕ) :
 #align lie_module.coe_lower_central_series_ideal_le LieModule.coe_lowerCentralSeries_ideal_le
 -/
 
+#print LieAlgebra.nilpotent_of_nilpotent_quotient /-
 /-- A central extension of nilpotent Lie algebras is nilpotent. -/
 theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I ≤ center R L)
     (h₂ : IsNilpotent R (L ⧸ I)) : IsNilpotent R L :=
@@ -672,6 +713,7 @@ theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I
   use k
   simp [← LieSubmodule.coe_toSubmodule_eq_iff, coe_lowerCentralSeries_ideal_quot_eq, hk]
 #align lie_algebra.nilpotent_of_nilpotent_quotient LieAlgebra.nilpotent_of_nilpotent_quotient
+-/
 
 #print LieAlgebra.non_trivial_center_of_isNilpotent /-
 theorem LieAlgebra.non_trivial_center_of_isNilpotent [Nontrivial L] [IsNilpotent R L] :
@@ -680,6 +722,7 @@ theorem LieAlgebra.non_trivial_center_of_isNilpotent [Nontrivial L] [IsNilpotent
 #align lie_algebra.non_trivial_center_of_is_nilpotent LieAlgebra.non_trivial_center_of_isNilpotent
 -/
 
+#print LieIdeal.map_lowerCentralSeries_le /-
 theorem LieIdeal.map_lowerCentralSeries_le (k : ℕ) {f : L →ₗ⁅R⁆ L'} :
     LieIdeal.map f (lowerCentralSeries R L L k) ≤ lowerCentralSeries R L' L' k :=
   by
@@ -688,7 +731,9 @@ theorem LieIdeal.map_lowerCentralSeries_le (k : ℕ) {f : L →ₗ⁅R⁆ L'} :
   · simp only [LieModule.lowerCentralSeries_succ]
     exact le_trans (LieIdeal.map_bracket_le f) (LieSubmodule.mono_lie _ _ _ _ le_top ih)
 #align lie_ideal.map_lower_central_series_le LieIdeal.map_lowerCentralSeries_le
+-/
 
+#print LieIdeal.lowerCentralSeries_map_eq /-
 theorem LieIdeal.lowerCentralSeries_map_eq (k : ℕ) {f : L →ₗ⁅R⁆ L'} (h : Function.Surjective f) :
     LieIdeal.map f (lowerCentralSeries R L L k) = lowerCentralSeries R L' L' k :=
   by
@@ -700,7 +745,9 @@ theorem LieIdeal.lowerCentralSeries_map_eq (k : ℕ) {f : L →ₗ⁅R⁆ L'} (h
   · simp only [LieModule.lowerCentralSeries_zero]; exact h'
   · simp only [LieModule.lowerCentralSeries_succ, LieIdeal.map_bracket_eq f h, ih, h']
 #align lie_ideal.lower_central_series_map_eq LieIdeal.lowerCentralSeries_map_eq
+-/
 
+#print Function.Injective.lieAlgebra_isNilpotent /-
 theorem Function.Injective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L'] {f : L →ₗ⁅R⁆ L'}
     (h₂ : Function.Injective f) : IsNilpotent R L :=
   {
@@ -710,7 +757,9 @@ theorem Function.Injective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L'] {f :
       apply LieIdeal.bot_of_map_eq_bot h₂; rw [eq_bot_iff, ← hk]
       apply LieIdeal.map_lowerCentralSeries_le }
 #align function.injective.lie_algebra_is_nilpotent Function.Injective.lieAlgebra_isNilpotent
+-/
 
+#print Function.Surjective.lieAlgebra_isNilpotent /-
 theorem Function.Surjective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L] {f : L →ₗ⁅R⁆ L'}
     (h₂ : Function.Surjective f) : IsNilpotent R L' :=
   {
@@ -720,6 +769,7 @@ theorem Function.Surjective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L] {f :
       rw [← LieIdeal.lowerCentralSeries_map_eq k h₂, hk]
       simp only [LieIdeal.map_eq_bot_iff, bot_le] }
 #align function.surjective.lie_algebra_is_nilpotent Function.Surjective.lieAlgebra_isNilpotent
+-/
 
 #print LieEquiv.nilpotent_iff_equiv_nilpotent /-
 theorem LieEquiv.nilpotent_iff_equiv_nilpotent (e : L ≃ₗ⁅R⁆ L') :
@@ -737,6 +787,7 @@ theorem LieHom.isNilpotent_range [IsNilpotent R L] (f : L →ₗ⁅R⁆ L') : Is
 #align lie_hom.is_nilpotent_range LieHom.isNilpotent_range
 -/
 
+#print LieAlgebra.isNilpotent_range_ad_iff /-
 /-- Note that this result is not quite a special case of
 `lie_module.is_nilpotent_range_to_endomorphism_iff` which concerns nilpotency of the
 `(ad R L).range`-module `L`, whereas this result concerns nilpotency of the `(ad R L).range`-module
@@ -752,6 +803,7 @@ theorem LieAlgebra.isNilpotent_range_ad_iff : IsNilpotent R (ad R L).range ↔ I
   · intro h
     exact (ad R L).isNilpotent_range
 #align lie_algebra.is_nilpotent_range_ad_iff LieAlgebra.isNilpotent_range_ad_iff
+-/
 
 instance [h : LieAlgebra.IsNilpotent R L] : LieAlgebra.IsNilpotent R (⊤ : LieSubalgebra R L) :=
   LieSubalgebra.topEquiv.nilpotent_iff_equiv_nilpotent.mpr h
@@ -768,6 +820,7 @@ variable (M : Type _) [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModu
 
 variable (k : ℕ)
 
+#print LieIdeal.lcs /-
 /-- Given a Lie module `M` over a Lie algebra `L` together with an ideal `I` of `L`, this is the
 lower central series of `M` as an `I`-module. The advantage of using this definition instead of
 `lie_module.lower_central_series R I M` is that its terms are Lie submodules of `M` as an
@@ -777,21 +830,29 @@ See also `lie_ideal.coe_lcs_eq`. -/
 def lcs : LieSubmodule R L M :=
   ((fun N => ⁅I, N⁆)^[k]) ⊤
 #align lie_ideal.lcs LieIdeal.lcs
+-/
 
+#print LieIdeal.lcs_zero /-
 @[simp]
 theorem lcs_zero : I.lcs M 0 = ⊤ :=
   rfl
 #align lie_ideal.lcs_zero LieIdeal.lcs_zero
+-/
 
+#print LieIdeal.lcs_succ /-
 @[simp]
 theorem lcs_succ : I.lcs M (k + 1) = ⁅I, I.lcs M k⁆ :=
   Function.iterate_succ_apply' (fun N => ⁅I, N⁆) k ⊤
 #align lie_ideal.lcs_succ LieIdeal.lcs_succ
+-/
 
+#print LieIdeal.lcs_top /-
 theorem lcs_top : (⊤ : LieIdeal R L).lcs M k = lowerCentralSeries R L M k :=
   rfl
 #align lie_ideal.lcs_top LieIdeal.lcs_top
+-/
 
+#print LieIdeal.coe_lcs_eq /-
 theorem coe_lcs_eq : (I.lcs M k : Submodule R M) = lowerCentralSeries R I M k :=
   by
   induction' k with k ih
@@ -807,6 +868,7 @@ theorem coe_lcs_eq : (I.lcs M k : Submodule R M) = lowerCentralSeries R I M k :=
     · rintro ⟨⟨x, hx⟩, m, hm, rfl⟩
       exact ⟨x, hx, m, hm, rfl⟩
 #align lie_ideal.coe_lcs_eq LieIdeal.coe_lcs_eq
+-/
 
 end LieIdeal
 
@@ -814,6 +876,7 @@ section OfAssociative
 
 variable (R : Type u) {A : Type v} [CommRing R] [Ring A] [Algebra R A]
 
+#print LieAlgebra.ad_nilpotent_of_nilpotent /-
 theorem LieAlgebra.ad_nilpotent_of_nilpotent {a : A} (h : IsNilpotent a) :
     IsNilpotent (LieAlgebra.ad R A a) :=
   by
@@ -823,9 +886,11 @@ theorem LieAlgebra.ad_nilpotent_of_nilpotent {a : A} (h : IsNilpotent a) :
   have := @LinearMap.commute_mulLeft_right R A _ _ _ _ _ a a
   exact this.is_nilpotent_sub hl hr
 #align lie_algebra.ad_nilpotent_of_nilpotent LieAlgebra.ad_nilpotent_of_nilpotent
+-/
 
 variable {R}
 
+#print LieSubalgebra.isNilpotent_ad_of_isNilpotent_ad /-
 theorem LieSubalgebra.isNilpotent_ad_of_isNilpotent_ad {L : Type v} [LieRing L] [LieAlgebra R L]
     (K : LieSubalgebra R L) {x : K} (h : IsNilpotent (LieAlgebra.ad R L ↑x)) :
     IsNilpotent (LieAlgebra.ad R K x) :=
@@ -834,11 +899,14 @@ theorem LieSubalgebra.isNilpotent_ad_of_isNilpotent_ad {L : Type v} [LieRing L]
   use n
   exact LinearMap.submodule_pow_eq_zero_of_pow_eq_zero (K.ad_comp_incl_eq x) hn
 #align lie_subalgebra.is_nilpotent_ad_of_is_nilpotent_ad LieSubalgebra.isNilpotent_ad_of_isNilpotent_ad
+-/
 
+#print LieAlgebra.isNilpotent_ad_of_isNilpotent /-
 theorem LieAlgebra.isNilpotent_ad_of_isNilpotent {L : LieSubalgebra R A} {x : L}
     (h : IsNilpotent (x : A)) : IsNilpotent (LieAlgebra.ad R L x) :=
   L.isNilpotent_ad_of_isNilpotent_ad <| LieAlgebra.ad_nilpotent_of_nilpotent R h
 #align lie_algebra.is_nilpotent_ad_of_is_nilpotent LieAlgebra.isNilpotent_ad_of_isNilpotent
+-/
 
 end OfAssociative
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 
 ! This file was ported from Lean 3 source module algebra.lie.nilpotent
-! leanprover-community/mathlib commit 6b0169218d01f2837d79ea2784882009a0da1aa1
+! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -17,6 +17,9 @@ import Mathbin.RingTheory.Nilpotent
 /-!
 # Nilpotent Lie algebras
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Like groups, Lie algebras admit a natural concept of nilpotency. More generally, any Lie module
 carries a natural concept of nilpotency. We define these here via the lower central series.
 
Diff
@@ -107,6 +107,7 @@ theorem lcs_le_self : N.lcs k ≤ N := by
     exact (LieSubmodule.mono_lie_right _ _ ⊤ ih).trans (N.lie_le_right ⊤)
 #align lie_submodule.lcs_le_self LieSubmodule.lcs_le_self
 
+#print LieSubmodule.lowerCentralSeries_eq_lcs_comap /-
 theorem lowerCentralSeries_eq_lcs_comap : lowerCentralSeries R L N k = (N.lcs k).comap N.incl :=
   by
   induction' k with k ih
@@ -117,12 +118,15 @@ theorem lowerCentralSeries_eq_lcs_comap : lowerCentralSeries R L N k = (N.lcs k)
       apply lcs_le_self
     rw [ih, LieSubmodule.comap_bracket_eq _ _ N.incl N.ker_incl this]
 #align lie_submodule.lower_central_series_eq_lcs_comap LieSubmodule.lowerCentralSeries_eq_lcs_comap
+-/
 
+#print LieSubmodule.lowerCentralSeries_map_eq_lcs /-
 theorem lowerCentralSeries_map_eq_lcs : (lowerCentralSeries R L N k).map N.incl = N.lcs k :=
   by
   rw [lower_central_series_eq_lcs_comap, LieSubmodule.map_comap_incl, inf_eq_right]
   apply lcs_le_self
 #align lie_submodule.lower_central_series_map_eq_lcs LieSubmodule.lowerCentralSeries_map_eq_lcs
+-/
 
 end LieSubmodule
 
@@ -149,6 +153,7 @@ theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries
     apply LieSubmodule.subset_lieSpan; use x, m; rfl
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
 
+#print LieModule.iterate_toEndomorphism_mem_lowerCentralSeries /-
 theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ) :
     (toEndomorphism R L M x^[k]) m ∈ lowerCentralSeries R L M k :=
   by
@@ -158,9 +163,11 @@ theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ)
       to_endomorphism_apply_apply]
     exact LieSubmodule.lie_mem_lie _ _ (LieSubmodule.mem_top x) ih
 #align lie_module.iterate_to_endomorphism_mem_lower_central_series LieModule.iterate_toEndomorphism_mem_lowerCentralSeries
+-/
 
 variable {R L M}
 
+#print LieModule.map_lowerCentralSeries_le /-
 theorem map_lowerCentralSeries_le {M₂ : Type w₁} [AddCommGroup M₂] [Module R M₂]
     [LieRingModule L M₂] [LieModule R L M₂] (k : ℕ) (f : M →ₗ⁅R,L⁆ M₂) :
     LieSubmodule.map f (lowerCentralSeries R L M k) ≤ lowerCentralSeries R L M₂ k :=
@@ -170,6 +177,7 @@ theorem map_lowerCentralSeries_le {M₂ : Type w₁} [AddCommGroup M₂] [Module
   · simp only [LieModule.lowerCentralSeries_succ, LieSubmodule.map_bracket_eq]
     exact LieSubmodule.mono_lie_right _ _ ⊤ ih
 #align lie_module.map_lower_central_series_le LieModule.map_lowerCentralSeries_le
+-/
 
 variable (R L M)
 
@@ -199,6 +207,7 @@ theorem isNilpotent_iff : IsNilpotent R L M ↔ ∃ k, lowerCentralSeries R L M
 
 variable {R L M}
 
+#print LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot /-
 theorem LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot (N : LieSubmodule R L M) :
     LieModule.IsNilpotent R L N ↔ ∃ k, N.lcs k = ⊥ :=
   by
@@ -207,6 +216,7 @@ theorem LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot (N : LieSubmodule R L M)
   rw [N.lower_central_series_eq_lcs_comap k, LieSubmodule.comap_incl_eq_bot,
     inf_eq_right.mpr (N.lcs_le_self k)]
 #align lie_submodule.is_nilpotent_iff_exists_lcs_eq_bot LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot
+-/
 
 variable (R L M)
 
@@ -214,6 +224,7 @@ instance (priority := 100) trivialIsNilpotent [IsTrivial L M] : IsNilpotent R L
   ⟨by use 1; change ⁅⊤, ⊤⁆ = ⊥; simp⟩
 #align lie_module.trivial_is_nilpotent LieModule.trivialIsNilpotent
 
+#print LieModule.nilpotent_endo_of_nilpotent_module /-
 theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
     ∃ k : ℕ, ∀ x : L, toEndomorphism R L M x ^ k = 0 :=
   by
@@ -223,7 +234,9 @@ theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
   rw [LinearMap.pow_apply, LinearMap.zero_apply, ← @LieSubmodule.mem_bot R L M, ← hM]
   exact iterate_to_endomorphism_mem_lower_central_series R L M x m k
 #align lie_module.nilpotent_endo_of_nilpotent_module LieModule.nilpotent_endo_of_nilpotent_module
+-/
 
+#print LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
 /-- For a nilpotent Lie module, the weight space of the 0 weight is the whole module.
 
 This result will be used downstream to show that weight spaces are Lie submodules, at which time
@@ -239,7 +252,9 @@ theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
   use k; rw [hk]
   exact LinearMap.zero_apply m
 #align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
+-/
 
+#print LieModule.nilpotentOfNilpotentQuotient /-
 /-- If the quotient of a Lie module `M` by a Lie submodule on which the Lie algebra acts trivially
 is nilpotent then `M` is nilpotent.
 
@@ -259,6 +274,7 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
   rw [← LieSubmodule.Quotient.map_mk'_eq_bot_le, ← le_bot_iff, ← hk]
   exact map_lower_central_series_le k (LieSubmodule.Quotient.mk' N)
 #align lie_module.nilpotent_of_nilpotent_quotient LieModule.nilpotentOfNilpotentQuotient
+-/
 
 /-- Given a nilpotent Lie module `M` with lower central series `M = C₀ ≥ C₁ ≥ ⋯ ≥ Cₖ = ⊥`, this is
 the natural number `k` (the number of inclusions).
@@ -297,6 +313,7 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
   exact Nat.sInf_upward_closed_eq_succ_iff hs k
 #align lie_module.nilpotency_length_eq_succ_iff LieModule.nilpotencyLength_eq_succ_iff
 
+#print LieModule.lowerCentralSeriesLast /-
 /-- Given a non-trivial nilpotent Lie module `M` with lower central series
 `M = C₀ ≥ C₁ ≥ ⋯ ≥ Cₖ = ⊥`, this is the `k-1`th term in the lower central series (the last
 non-trivial term).
@@ -307,6 +324,7 @@ noncomputable def lowerCentralSeriesLast : LieSubmodule R L M :=
   | 0 => ⊥
   | k + 1 => lowerCentralSeries R L M k
 #align lie_module.lower_central_series_last LieModule.lowerCentralSeriesLast
+-/
 
 theorem lowerCentralSeriesLast_le_max_triv :
     lowerCentralSeriesLast R L M ≤ maxTrivSubmodule R L M :=
@@ -330,12 +348,15 @@ theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
     exact h.2
 #align lie_module.nontrivial_lower_central_series_last LieModule.nontrivial_lowerCentralSeriesLast
 
+#print LieModule.nontrivial_max_triv_of_isNilpotent /-
 theorem nontrivial_max_triv_of_isNilpotent [Nontrivial M] [IsNilpotent R L M] :
     Nontrivial (maxTrivSubmodule R L M) :=
   Set.nontrivial_mono (lowerCentralSeriesLast_le_max_triv R L M)
     (nontrivial_lowerCentralSeriesLast R L M)
 #align lie_module.nontrivial_max_triv_of_is_nilpotent LieModule.nontrivial_max_triv_of_isNilpotent
+-/
 
+#print LieModule.coe_lcs_range_toEndomorphism_eq /-
 @[simp]
 theorem coe_lcs_range_toEndomorphism_eq (k : ℕ) :
     (lowerCentralSeries R (toEndomorphism R L M).range M k : Submodule R M) =
@@ -354,7 +375,9 @@ theorem coe_lcs_range_toEndomorphism_eq (k : ℕ) :
       exact
         ⟨⟨to_endomorphism R L M x, LieHom.mem_range_self _ x⟩, LieSubmodule.mem_top _, n, hn, rfl⟩
 #align lie_module.coe_lcs_range_to_endomorphism_eq LieModule.coe_lcs_range_toEndomorphism_eq
+-/
 
+#print LieModule.isNilpotent_range_toEndomorphism_iff /-
 @[simp]
 theorem isNilpotent_range_toEndomorphism_iff :
     IsNilpotent R (toEndomorphism R L M).range M ↔ IsNilpotent R L M := by
@@ -362,6 +385,7 @@ theorem isNilpotent_range_toEndomorphism_iff :
       rw [← LieSubmodule.coe_toSubmodule_eq_iff] at hk ⊢ <;>
     simpa using hk
 #align lie_module.is_nilpotent_range_to_endomorphism_iff LieModule.isNilpotent_range_toEndomorphism_iff
+-/
 
 end LieModule
 
@@ -369,27 +393,36 @@ namespace LieSubmodule
 
 variable {N₁ N₂ : LieSubmodule R L M}
 
+#print LieSubmodule.ucs /-
 /-- The upper (aka ascending) central series.
 
 See also `lie_submodule.lcs`. -/
 def ucs (k : ℕ) : LieSubmodule R L M → LieSubmodule R L M :=
   normalizer^[k]
 #align lie_submodule.ucs LieSubmodule.ucs
+-/
 
+#print LieSubmodule.ucs_zero /-
 @[simp]
 theorem ucs_zero : N.ucs 0 = N :=
   rfl
 #align lie_submodule.ucs_zero LieSubmodule.ucs_zero
+-/
 
+#print LieSubmodule.ucs_succ /-
 @[simp]
 theorem ucs_succ (k : ℕ) : N.ucs (k + 1) = (N.ucs k).normalizer :=
   Function.iterate_succ_apply' normalizer k N
 #align lie_submodule.ucs_succ LieSubmodule.ucs_succ
+-/
 
+#print LieSubmodule.ucs_add /-
 theorem ucs_add (k l : ℕ) : N.ucs (k + l) = (N.ucs l).ucs k :=
   Function.iterate_add_apply normalizer k l N
 #align lie_submodule.ucs_add LieSubmodule.ucs_add
+-/
 
+#print LieSubmodule.ucs_mono /-
 @[mono]
 theorem ucs_mono (k : ℕ) (h : N₁ ≤ N₂) : N₁.ucs k ≤ N₂.ucs k :=
   by
@@ -397,11 +430,15 @@ theorem ucs_mono (k : ℕ) (h : N₁ ≤ N₂) : N₁.ucs k ≤ N₂.ucs k :=
   simp only [ucs_succ]
   mono
 #align lie_submodule.ucs_mono LieSubmodule.ucs_mono
+-/
 
+#print LieSubmodule.ucs_eq_self_of_normalizer_eq_self /-
 theorem ucs_eq_self_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) : N₁.ucs k = N₁ := by
   induction' k with k ih; · simp; · rwa [ucs_succ, ih]
 #align lie_submodule.ucs_eq_self_of_normalizer_eq_self LieSubmodule.ucs_eq_self_of_normalizer_eq_self
+-/
 
+#print LieSubmodule.ucs_le_of_normalizer_eq_self /-
 /-- If a Lie module `M` contains a self-normalizing Lie submodule `N`, then all terms of the upper
 central series of `M` are contained in `N`.
 
@@ -411,7 +448,9 @@ theorem ucs_le_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) :
     (⊥ : LieSubmodule R L M).ucs k ≤ N₁ := by rw [← ucs_eq_self_of_normalizer_eq_self h k]; mono;
   simp
 #align lie_submodule.ucs_le_of_normalizer_eq_self LieSubmodule.ucs_le_of_normalizer_eq_self
+-/
 
+#print LieSubmodule.lcs_add_le_iff /-
 theorem lcs_add_le_iff (l k : ℕ) : N₁.lcs (l + k) ≤ N₂ ↔ N₁.lcs l ≤ N₂.ucs k :=
   by
   revert l
@@ -419,35 +458,48 @@ theorem lcs_add_le_iff (l k : ℕ) : N₁.lcs (l + k) ≤ N₂ ↔ N₁.lcs l 
   intro l
   rw [(by abel : l + (k + 1) = l + 1 + k), ih, ucs_succ, lcs_succ, top_lie_le_iff_le_normalizer]
 #align lie_submodule.lcs_add_le_iff LieSubmodule.lcs_add_le_iff
+-/
 
+#print LieSubmodule.lcs_le_iff /-
 theorem lcs_le_iff (k : ℕ) : N₁.lcs k ≤ N₂ ↔ N₁ ≤ N₂.ucs k := by convert lcs_add_le_iff 0 k;
   rw [zero_add]
 #align lie_submodule.lcs_le_iff LieSubmodule.lcs_le_iff
+-/
 
+#print LieSubmodule.gc_lcs_ucs /-
 theorem gc_lcs_ucs (k : ℕ) :
     GaloisConnection (fun N : LieSubmodule R L M => N.lcs k) fun N : LieSubmodule R L M =>
       N.ucs k :=
   fun N₁ N₂ => lcs_le_iff k
 #align lie_submodule.gc_lcs_ucs LieSubmodule.gc_lcs_ucs
+-/
 
+#print LieSubmodule.ucs_eq_top_iff /-
 theorem ucs_eq_top_iff (k : ℕ) : N.ucs k = ⊤ ↔ LieModule.lowerCentralSeries R L M k ≤ N := by
   rw [eq_top_iff, ← lcs_le_iff]; rfl
 #align lie_submodule.ucs_eq_top_iff LieSubmodule.ucs_eq_top_iff
+-/
 
+#print LieModule.isNilpotent_iff_exists_ucs_eq_top /-
 theorem LieModule.isNilpotent_iff_exists_ucs_eq_top :
     LieModule.IsNilpotent R L M ↔ ∃ k, (⊥ : LieSubmodule R L M).ucs k = ⊤ := by
   rw [LieModule.isNilpotent_iff]; exact exists_congr fun k => by simp [ucs_eq_top_iff]
 #align lie_module.is_nilpotent_iff_exists_ucs_eq_top LieModule.isNilpotent_iff_exists_ucs_eq_top
+-/
 
+#print LieSubmodule.ucs_comap_incl /-
 theorem ucs_comap_incl (k : ℕ) :
     ((⊥ : LieSubmodule R L M).ucs k).comap N.incl = (⊥ : LieSubmodule R L N).ucs k := by
   induction' k with k ih; · exact N.ker_incl; · simp [← ih]
 #align lie_submodule.ucs_comap_incl LieSubmodule.ucs_comap_incl
+-/
 
+#print LieSubmodule.isNilpotent_iff_exists_self_le_ucs /-
 theorem isNilpotent_iff_exists_self_le_ucs :
     LieModule.IsNilpotent R L N ↔ ∃ k, N ≤ (⊥ : LieSubmodule R L M).ucs k := by
   simp_rw [LieModule.isNilpotent_iff_exists_ucs_eq_top, ← ucs_comap_incl, comap_incl_eq_top]
 #align lie_submodule.is_nilpotent_iff_exists_self_le_ucs LieSubmodule.isNilpotent_iff_exists_self_le_ucs
+-/
 
 end LieSubmodule
 
@@ -508,16 +560,19 @@ theorem Equiv.lieModule_isNilpotent_iff (f : L ≃ₗ⁅R⁆ L₂) (g : M ≃ₗ
       hfg, f.apply_symm_apply, g.apply_symm_apply]
 #align equiv.lie_module_is_nilpotent_iff Equiv.lieModule_isNilpotent_iff
 
+#print LieModule.isNilpotent_of_top_iff /-
 @[simp]
 theorem LieModule.isNilpotent_of_top_iff :
     IsNilpotent R (⊤ : LieSubalgebra R L) M ↔ IsNilpotent R L M :=
   Equiv.lieModule_isNilpotent_iff LieSubalgebra.topEquiv (1 : M ≃ₗ[R] M) fun x m => rfl
 #align lie_module.is_nilpotent_of_top_iff LieModule.isNilpotent_of_top_iff
+-/
 
 end Morphisms
 
 end NilpotentModules
 
+#print LieAlgebra.isSolvable_of_isNilpotent /-
 instance (priority := 100) LieAlgebra.isSolvable_of_isNilpotent (R : Type u) (L : Type v)
     [CommRing R] [LieRing L] [LieAlgebra R L] [hL : LieModule.IsNilpotent R L L] :
     LieAlgebra.IsSolvable R L :=
@@ -526,6 +581,7 @@ instance (priority := 100) LieAlgebra.isSolvable_of_isNilpotent (R : Type u) (L
   use k; rw [← le_bot_iff] at h ⊢
   exact le_trans (LieModule.derivedSeries_le_lowerCentralSeries R L k) h
 #align lie_algebra.is_solvable_of_is_nilpotent LieAlgebra.isSolvable_of_isNilpotent
+-/
 
 section NilpotentAlgebras
 
@@ -533,12 +589,14 @@ variable (R : Type u) (L : Type v) (L' : Type w)
 
 variable [CommRing R] [LieRing L] [LieAlgebra R L] [LieRing L'] [LieAlgebra R L']
 
+#print LieAlgebra.IsNilpotent /-
 /-- We say a Lie algebra is nilpotent when it is nilpotent as a Lie module over itself via the
 adjoint representation. -/
 abbrev LieAlgebra.IsNilpotent (R : Type u) (L : Type v) [CommRing R] [LieRing L] [LieAlgebra R L] :
     Prop :=
   LieModule.IsNilpotent R L L
 #align lie_algebra.is_nilpotent LieAlgebra.IsNilpotent
+-/
 
 open LieAlgebra
 
@@ -547,11 +605,13 @@ theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
   LieModule.nilpotent_endo_of_nilpotent_module R L L
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 
+#print LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent /-
 /-- See also `lie_algebra.zero_root_space_eq_top_of_nilpotent`. -/
 theorem LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
     (⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0) = ⊤ :=
   LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
 #align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
+-/
 
 -- TODO Generalise the below to Lie modules if / when we define morphisms, equivs of Lie modules
 -- covering a Lie algebra morphism of (possibly different) Lie algebras.
@@ -559,6 +619,7 @@ variable {R L L'}
 
 open LieModule (lowerCentralSeries)
 
+#print coe_lowerCentralSeries_ideal_quot_eq /-
 /-- Given an ideal `I` of a Lie algebra `L`, the lower central series of `L ⧸ I` is the same
 whether we regard `L ⧸ I` as an `L` module or an `L ⧸ I` module.
 
@@ -581,7 +642,9 @@ theorem coe_lowerCentralSeries_ideal_quot_eq {I : LieIdeal R L} (k : ℕ) :
       erw [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.mem_coeSubmodule] at hz 
       exact ⟨⟨y, LieSubmodule.mem_top _⟩, ⟨z, hz⟩, rfl⟩
 #align coe_lower_central_series_ideal_quot_eq coe_lowerCentralSeries_ideal_quot_eq
+-/
 
+#print LieModule.coe_lowerCentralSeries_ideal_le /-
 /-- Note that the below inequality can be strict. For example the ideal of strictly-upper-triangular
 2x2 matrices inside the Lie algebra of upper-triangular 2x2 matrices with `k = 1`. -/
 theorem LieModule.coe_lowerCentralSeries_ideal_le {I : LieIdeal R L} (k : ℕ) :
@@ -594,6 +657,7 @@ theorem LieModule.coe_lowerCentralSeries_ideal_le {I : LieIdeal R L} (k : ℕ) :
     rintro x ⟨⟨y, -⟩, ⟨z, hz⟩, rfl : ⁅y, z⁆ = x⟩
     exact ⟨⟨y.val, LieSubmodule.mem_top _⟩, ⟨z, ih hz⟩, rfl⟩
 #align lie_module.coe_lower_central_series_ideal_le LieModule.coe_lowerCentralSeries_ideal_le
+-/
 
 /-- A central extension of nilpotent Lie algebras is nilpotent. -/
 theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I ≤ center R L)
@@ -606,10 +670,12 @@ theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I
   simp [← LieSubmodule.coe_toSubmodule_eq_iff, coe_lowerCentralSeries_ideal_quot_eq, hk]
 #align lie_algebra.nilpotent_of_nilpotent_quotient LieAlgebra.nilpotent_of_nilpotent_quotient
 
+#print LieAlgebra.non_trivial_center_of_isNilpotent /-
 theorem LieAlgebra.non_trivial_center_of_isNilpotent [Nontrivial L] [IsNilpotent R L] :
     Nontrivial <| center R L :=
   LieModule.nontrivial_max_triv_of_isNilpotent R L L
 #align lie_algebra.non_trivial_center_of_is_nilpotent LieAlgebra.non_trivial_center_of_isNilpotent
+-/
 
 theorem LieIdeal.map_lowerCentralSeries_le (k : ℕ) {f : L →ₗ⁅R⁆ L'} :
     LieIdeal.map f (lowerCentralSeries R L L k) ≤ lowerCentralSeries R L' L' k :=
@@ -652,6 +718,7 @@ theorem Function.Surjective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L] {f :
       simp only [LieIdeal.map_eq_bot_iff, bot_le] }
 #align function.surjective.lie_algebra_is_nilpotent Function.Surjective.lieAlgebra_isNilpotent
 
+#print LieEquiv.nilpotent_iff_equiv_nilpotent /-
 theorem LieEquiv.nilpotent_iff_equiv_nilpotent (e : L ≃ₗ⁅R⁆ L') :
     IsNilpotent R L ↔ IsNilpotent R L' :=
   by
@@ -659,10 +726,13 @@ theorem LieEquiv.nilpotent_iff_equiv_nilpotent (e : L ≃ₗ⁅R⁆ L') :
   · exact e.symm.injective.lie_algebra_is_nilpotent
   · exact e.injective.lie_algebra_is_nilpotent
 #align lie_equiv.nilpotent_iff_equiv_nilpotent LieEquiv.nilpotent_iff_equiv_nilpotent
+-/
 
+#print LieHom.isNilpotent_range /-
 theorem LieHom.isNilpotent_range [IsNilpotent R L] (f : L →ₗ⁅R⁆ L') : IsNilpotent R f.range :=
   f.surjective_rangeRestrict.lieAlgebra_isNilpotent
 #align lie_hom.is_nilpotent_range LieHom.isNilpotent_range
+-/
 
 /-- Note that this result is not quite a special case of
 `lie_module.is_nilpotent_range_to_endomorphism_iff` which concerns nilpotency of the
Diff
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 
 ! This file was ported from Lean 3 source module algebra.lie.nilpotent
-! leanprover-community/mathlib commit 938fead7abdc0cbbca8eba7a1052865a169dc102
+! leanprover-community/mathlib commit 6b0169218d01f2837d79ea2784882009a0da1aa1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Lie.Solvable
 import Mathbin.Algebra.Lie.Quotient
 import Mathbin.Algebra.Lie.Normalizer
-import Mathbin.LinearAlgebra.Eigenspace
+import Mathbin.LinearAlgebra.Eigenspace.Basic
 import Mathbin.RingTheory.Nilpotent
 
 /-!
Diff
@@ -518,13 +518,14 @@ end Morphisms
 
 end NilpotentModules
 
-instance (priority := 100) LieAlgebra.isSolvableOfIsNilpotent (R : Type u) (L : Type v) [CommRing R]
-    [LieRing L] [LieAlgebra R L] [hL : LieModule.IsNilpotent R L L] : LieAlgebra.IsSolvable R L :=
+instance (priority := 100) LieAlgebra.isSolvable_of_isNilpotent (R : Type u) (L : Type v)
+    [CommRing R] [LieRing L] [LieAlgebra R L] [hL : LieModule.IsNilpotent R L L] :
+    LieAlgebra.IsSolvable R L :=
   by
   obtain ⟨k, h⟩ : ∃ k, LieModule.lowerCentralSeries R L L k = ⊥ := hL.nilpotent
   use k; rw [← le_bot_iff] at h ⊢
   exact le_trans (LieModule.derivedSeries_le_lowerCentralSeries R L k) h
-#align lie_algebra.is_solvable_of_is_nilpotent LieAlgebra.isSolvableOfIsNilpotent
+#align lie_algebra.is_solvable_of_is_nilpotent LieAlgebra.isSolvable_of_isNilpotent
 
 section NilpotentAlgebras
 
Diff
@@ -265,13 +265,13 @@ the natural number `k` (the number of inclusions).
 
 For a non-nilpotent module, we use the junk value 0. -/
 noncomputable def nilpotencyLength : ℕ :=
-  sInf { k | lowerCentralSeries R L M k = ⊥ }
+  sInf {k | lowerCentralSeries R L M k = ⊥}
 #align lie_module.nilpotency_length LieModule.nilpotencyLength
 
 theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
     nilpotencyLength R L M = 0 ↔ Subsingleton M :=
   by
-  let s := { k | lowerCentralSeries R L M k = ⊥ }
+  let s := {k | lowerCentralSeries R L M k = ⊥}
   have hs : s.nonempty :=
     by
     obtain ⟨k, hk⟩ := (by infer_instance : IsNilpotent R L M)
@@ -288,7 +288,7 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
     nilpotencyLength R L M = k + 1 ↔
       lowerCentralSeries R L M (k + 1) = ⊥ ∧ lowerCentralSeries R L M k ≠ ⊥ :=
   by
-  let s := { k | lowerCentralSeries R L M k = ⊥ }
+  let s := {k | lowerCentralSeries R L M k = ⊥}
   change Inf s = k + 1 ↔ k + 1 ∈ s ∧ k ∉ s
   have hs : ∀ k₁ k₂, k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s :=
     by
@@ -359,7 +359,7 @@ theorem coe_lcs_range_toEndomorphism_eq (k : ℕ) :
 theorem isNilpotent_range_toEndomorphism_iff :
     IsNilpotent R (toEndomorphism R L M).range M ↔ IsNilpotent R L M := by
   constructor <;> rintro ⟨k, hk⟩ <;> use k <;>
-      rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk ⊢ <;>
+      rw [← LieSubmodule.coe_toSubmodule_eq_iff] at hk ⊢ <;>
     simpa using hk
 #align lie_module.is_nilpotent_range_to_endomorphism_iff LieModule.isNilpotent_range_toEndomorphism_iff
 
@@ -471,8 +471,8 @@ theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
   induction' k with k ih
   · simp [LinearMap.range_eq_top, hg]
   · suffices
-      g '' { m | ∃ (x : L) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m } =
-        { m | ∃ (x : L₂) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m }
+      g '' {m | ∃ (x : L) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m} =
+        {m | ∃ (x : L₂) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m}
       by
       simp only [← LieSubmodule.mem_coeSubmodule] at this 
       simp [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.lieIdeal_oper_eq_linear_span',
@@ -490,7 +490,7 @@ theorem Function.Surjective.lieModuleIsNilpotent [IsNilpotent R L M] : IsNilpote
   by
   obtain ⟨k, hk⟩ := id (by infer_instance : IsNilpotent R L M)
   use k
-  rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk ⊢
+  rw [← LieSubmodule.coe_toSubmodule_eq_iff] at hk ⊢
   simp [← hf.lie_module_lcs_map_eq hg hfg k, hk]
 #align function.surjective.lie_module_is_nilpotent Function.Surjective.lieModuleIsNilpotent
 
@@ -602,7 +602,7 @@ theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I
     exact LieModule.nilpotentOfNilpotentQuotient R L L h₁ this
   obtain ⟨k, hk⟩ := h₂
   use k
-  simp [← LieSubmodule.coe_to_submodule_eq_iff, coe_lowerCentralSeries_ideal_quot_eq, hk]
+  simp [← LieSubmodule.coe_toSubmodule_eq_iff, coe_lowerCentralSeries_ideal_quot_eq, hk]
 #align lie_algebra.nilpotent_of_nilpotent_quotient LieAlgebra.nilpotent_of_nilpotent_quotient
 
 theorem LieAlgebra.non_trivial_center_of_isNilpotent [Nontrivial L] [IsNilpotent R L] :
Diff
@@ -111,7 +111,7 @@ theorem lowerCentralSeries_eq_lcs_comap : lowerCentralSeries R L N k = (N.lcs k)
   by
   induction' k with k ih
   · simp
-  · simp only [lcs_succ, lowerCentralSeries_succ] at ih⊢
+  · simp only [lcs_succ, lowerCentralSeries_succ] at ih ⊢
     have : N.lcs k ≤ N.incl.range := by
       rw [N.range_incl]
       apply lcs_le_self
@@ -145,7 +145,7 @@ theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries
   by
   constructor <;> intro h
   · erw [eq_bot_iff, LieSubmodule.lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn, h.trivial]; simp
-  · rw [LieSubmodule.eq_bot_iff] at h; apply is_trivial.mk; intro x m; apply h
+  · rw [LieSubmodule.eq_bot_iff] at h ; apply is_trivial.mk; intro x m; apply h
     apply LieSubmodule.subset_lieSpan; use x, m; rfl
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
 
@@ -255,7 +255,7 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
   suffices lowerCentralSeries R L M k ≤ N
     by
     replace this := LieSubmodule.mono_lie_right _ _ ⊤ (le_trans this h₁)
-    rwa [ideal_oper_max_triv_submodule_eq_bot, le_bot_iff] at this
+    rwa [ideal_oper_max_triv_submodule_eq_bot, le_bot_iff] at this 
   rw [← LieSubmodule.Quotient.map_mk'_eq_bot_le, ← le_bot_iff, ← hk]
   exact map_lower_central_series_le k (LieSubmodule.Quotient.mk' N)
 #align lie_module.nilpotent_of_nilpotent_quotient LieModule.nilpotentOfNilpotentQuotient
@@ -315,7 +315,7 @@ theorem lowerCentralSeriesLast_le_max_triv :
   cases' h : nilpotency_length R L M with k
   · exact bot_le
   · rw [le_max_triv_iff_bracket_eq_bot]
-    rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h
+    rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h 
     exact h.1
 #align lie_module.lower_central_series_last_le_max_triv LieModule.lowerCentralSeriesLast_le_max_triv
 
@@ -324,9 +324,9 @@ theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
   by
   rw [LieSubmodule.nontrivial_iff_ne_bot, lower_central_series_last]
   cases h : nilpotency_length R L M
-  · rw [nilpotency_length_eq_zero_iff, ← not_nontrivial_iff_subsingleton] at h
+  · rw [nilpotency_length_eq_zero_iff, ← not_nontrivial_iff_subsingleton] at h 
     contradiction
-  · rw [nilpotency_length_eq_succ_iff] at h
+  · rw [nilpotency_length_eq_succ_iff] at h 
     exact h.2
 #align lie_module.nontrivial_lower_central_series_last LieModule.nontrivial_lowerCentralSeriesLast
 
@@ -359,7 +359,7 @@ theorem coe_lcs_range_toEndomorphism_eq (k : ℕ) :
 theorem isNilpotent_range_toEndomorphism_iff :
     IsNilpotent R (toEndomorphism R L M).range M ↔ IsNilpotent R L M := by
   constructor <;> rintro ⟨k, hk⟩ <;> use k <;>
-      rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk⊢ <;>
+      rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk ⊢ <;>
     simpa using hk
 #align lie_module.is_nilpotent_range_to_endomorphism_iff LieModule.isNilpotent_range_toEndomorphism_iff
 
@@ -471,10 +471,10 @@ theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
   induction' k with k ih
   · simp [LinearMap.range_eq_top, hg]
   · suffices
-      g '' { m | ∃ (x : L)(n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m } =
-        { m | ∃ (x : L₂)(n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m }
+      g '' { m | ∃ (x : L) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m } =
+        { m | ∃ (x : L₂) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m }
       by
-      simp only [← LieSubmodule.mem_coeSubmodule] at this
+      simp only [← LieSubmodule.mem_coeSubmodule] at this 
       simp [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.lieIdeal_oper_eq_linear_span',
         Submodule.map_span, -Submodule.span_image, this]
     ext m₂
@@ -490,7 +490,7 @@ theorem Function.Surjective.lieModuleIsNilpotent [IsNilpotent R L M] : IsNilpote
   by
   obtain ⟨k, hk⟩ := id (by infer_instance : IsNilpotent R L M)
   use k
-  rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk⊢
+  rw [← LieSubmodule.coe_to_submodule_eq_iff] at hk ⊢
   simp [← hf.lie_module_lcs_map_eq hg hfg k, hk]
 #align function.surjective.lie_module_is_nilpotent Function.Surjective.lieModuleIsNilpotent
 
@@ -522,7 +522,7 @@ instance (priority := 100) LieAlgebra.isSolvableOfIsNilpotent (R : Type u) (L :
     [LieRing L] [LieAlgebra R L] [hL : LieModule.IsNilpotent R L L] : LieAlgebra.IsSolvable R L :=
   by
   obtain ⟨k, h⟩ : ∃ k, LieModule.lowerCentralSeries R L L k = ⊥ := hL.nilpotent
-  use k; rw [← le_bot_iff] at h⊢
+  use k; rw [← le_bot_iff] at h ⊢
   exact le_trans (LieModule.derivedSeries_le_lowerCentralSeries R L k) h
 #align lie_algebra.is_solvable_of_is_nilpotent LieAlgebra.isSolvableOfIsNilpotent
 
@@ -574,10 +574,10 @@ theorem coe_lowerCentralSeries_ideal_quot_eq {I : LieIdeal R L} (k : ℕ) :
     ext x
     constructor
     · rintro ⟨⟨y, -⟩, ⟨z, hz⟩, rfl : ⁅y, z⁆ = x⟩
-      erw [← LieSubmodule.mem_coeSubmodule, ih, LieSubmodule.mem_coeSubmodule] at hz
+      erw [← LieSubmodule.mem_coeSubmodule, ih, LieSubmodule.mem_coeSubmodule] at hz 
       exact ⟨⟨LieSubmodule.Quotient.mk y, LieSubmodule.mem_top _⟩, ⟨z, hz⟩, rfl⟩
     · rintro ⟨⟨⟨y⟩, -⟩, ⟨z, hz⟩, rfl : ⁅y, z⁆ = x⟩
-      erw [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.mem_coeSubmodule] at hz
+      erw [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.mem_coeSubmodule] at hz 
       exact ⟨⟨y, LieSubmodule.mem_top _⟩, ⟨z, hz⟩, rfl⟩
 #align coe_lower_central_series_ideal_quot_eq coe_lowerCentralSeries_ideal_quot_eq
 
Diff
@@ -111,7 +111,7 @@ theorem lowerCentralSeries_eq_lcs_comap : lowerCentralSeries R L N k = (N.lcs k)
   by
   induction' k with k ih
   · simp
-  · simp only [lcs_succ, lower_central_series_succ] at ih⊢
+  · simp only [lcs_succ, lowerCentralSeries_succ] at ih⊢
     have : N.lcs k ≤ N.incl.range := by
       rw [N.range_incl]
       apply lcs_le_self
@@ -136,7 +136,7 @@ theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M :=
   induction' k with k ih generalizing l <;> intro h
   · exact (le_zero_iff.mp h).symm ▸ le_rfl
   · rcases Nat.of_le_succ h with (hk | hk)
-    · rw [lower_central_series_succ]
+    · rw [lowerCentralSeries_succ]
       exact (LieSubmodule.mono_lie_right _ _ ⊤ (ih hk)).trans (LieSubmodule.lie_le_right _ _)
     · exact hk.symm ▸ le_rfl
 #align lie_module.antitone_lower_central_series LieModule.antitone_lowerCentralSeries
@@ -154,7 +154,7 @@ theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ)
   by
   induction' k with k ih
   · simp only [Function.iterate_zero]
-  · simp only [lower_central_series_succ, Function.comp_apply, Function.iterate_succ',
+  · simp only [lowerCentralSeries_succ, Function.comp_apply, Function.iterate_succ',
       to_endomorphism_apply_apply]
     exact LieSubmodule.lie_mem_lie _ _ (LieSubmodule.mem_top x) ih
 #align lie_module.iterate_to_endomorphism_mem_lower_central_series LieModule.iterate_toEndomorphism_mem_lowerCentralSeries
@@ -179,10 +179,10 @@ theorem derivedSeries_le_lowerCentralSeries (k : ℕ) :
     derivedSeries R L k ≤ lowerCentralSeries R L L k :=
   by
   induction' k with k h
-  · rw [derived_series_def, derived_series_of_ideal_zero, lower_central_series_zero]
+  · rw [derived_series_def, derived_series_of_ideal_zero, lowerCentralSeries_zero]
     exact le_rfl
   · have h' : derivedSeries R L k ≤ ⊤ := by simp only [le_top]
-    rw [derived_series_def, derived_series_of_ideal_succ, lower_central_series_succ]
+    rw [derived_series_def, derived_series_of_ideal_succ, lowerCentralSeries_succ]
     exact LieSubmodule.mono_lie _ _ _ _ h' h
 #align lie_module.derived_series_le_lower_central_series LieModule.derivedSeries_le_lowerCentralSeries
 
@@ -251,8 +251,8 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
   by
   obtain ⟨k, hk⟩ := h₂
   use k + 1
-  simp only [lower_central_series_succ]
-  suffices lower_central_series R L M k ≤ N
+  simp only [lowerCentralSeries_succ]
+  suffices lowerCentralSeries R L M k ≤ N
     by
     replace this := LieSubmodule.mono_lie_right _ _ ⊤ (le_trans this h₁)
     rwa [ideal_oper_max_triv_submodule_eq_bot, le_bot_iff] at this
@@ -271,14 +271,14 @@ noncomputable def nilpotencyLength : ℕ :=
 theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
     nilpotencyLength R L M = 0 ↔ Subsingleton M :=
   by
-  let s := { k | lower_central_series R L M k = ⊥ }
+  let s := { k | lowerCentralSeries R L M k = ⊥ }
   have hs : s.nonempty :=
     by
     obtain ⟨k, hk⟩ := (by infer_instance : IsNilpotent R L M)
     exact ⟨k, hk⟩
   change Inf s = 0 ↔ _
   rw [← LieSubmodule.subsingleton_iff R L M, ← subsingleton_iff_bot_eq_top, ←
-    lower_central_series_zero, @eq_comm (LieSubmodule R L M)]
+    lowerCentralSeries_zero, @eq_comm (LieSubmodule R L M)]
   refine' ⟨fun h => h ▸ Nat.sInf_mem hs, fun h => _⟩
   rw [Nat.sInf_eq_zero]
   exact Or.inl h
@@ -288,11 +288,11 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
     nilpotencyLength R L M = k + 1 ↔
       lowerCentralSeries R L M (k + 1) = ⊥ ∧ lowerCentralSeries R L M k ≠ ⊥ :=
   by
-  let s := { k | lower_central_series R L M k = ⊥ }
+  let s := { k | lowerCentralSeries R L M k = ⊥ }
   change Inf s = k + 1 ↔ k + 1 ∈ s ∧ k ∉ s
   have hs : ∀ k₁ k₂, k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s :=
     by
-    rintro k₁ k₂ h₁₂ (h₁ : lower_central_series R L M k₁ = ⊥)
+    rintro k₁ k₂ h₁₂ (h₁ : lowerCentralSeries R L M k₁ = ⊥)
     exact eq_bot_iff.mpr (h₁ ▸ antitone_lower_central_series R L M h₁₂)
   exact Nat.sInf_upward_closed_eq_succ_iff hs k
 #align lie_module.nilpotency_length_eq_succ_iff LieModule.nilpotencyLength_eq_succ_iff
@@ -315,7 +315,7 @@ theorem lowerCentralSeriesLast_le_max_triv :
   cases' h : nilpotency_length R L M with k
   · exact bot_le
   · rw [le_max_triv_iff_bracket_eq_bot]
-    rw [nilpotency_length_eq_succ_iff, lower_central_series_succ] at h
+    rw [nilpotency_length_eq_succ_iff, lowerCentralSeries_succ] at h
     exact h.1
 #align lie_module.lower_central_series_last_le_max_triv LieModule.lowerCentralSeriesLast_le_max_triv
 
@@ -343,8 +343,8 @@ theorem coe_lcs_range_toEndomorphism_eq (k : ℕ) :
   by
   induction' k with k ih
   · simp
-  · simp only [lower_central_series_succ, LieSubmodule.lieIdeal_oper_eq_linear_span', ←
-      (lower_central_series R (to_endomorphism R L M).range M k).mem_coe_submodule, ih]
+  · simp only [lowerCentralSeries_succ, LieSubmodule.lieIdeal_oper_eq_linear_span', ←
+      (lowerCentralSeries R (to_endomorphism R L M).range M k).mem_coe_submodule, ih]
     congr
     ext m
     constructor
@@ -471,8 +471,8 @@ theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
   induction' k with k ih
   · simp [LinearMap.range_eq_top, hg]
   · suffices
-      g '' { m | ∃ (x : L)(n : _), n ∈ lower_central_series R L M k ∧ ⁅x, n⁆ = m } =
-        { m | ∃ (x : L₂)(n : _), n ∈ lower_central_series R L M k ∧ ⁅x, g n⁆ = m }
+      g '' { m | ∃ (x : L)(n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m } =
+        { m | ∃ (x : L₂)(n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m }
       by
       simp only [← LieSubmodule.mem_coeSubmodule] at this
       simp [← LieSubmodule.mem_coeSubmodule, ← ih, LieSubmodule.lieIdeal_oper_eq_linear_span',
@@ -722,7 +722,7 @@ theorem coe_lcs_eq : (I.lcs M k : Submodule R M) = lowerCentralSeries R I M k :=
   by
   induction' k with k ih
   · simp
-  · simp_rw [lower_central_series_succ, lcs_succ, LieSubmodule.lieIdeal_oper_eq_linear_span', ←
+  · simp_rw [lowerCentralSeries_succ, lcs_succ, LieSubmodule.lieIdeal_oper_eq_linear_span', ←
       (I.lcs M k).mem_coe_submodule, ih, LieSubmodule.mem_coeSubmodule, LieSubmodule.mem_top,
       exists_true_left, (I : LieSubalgebra R L).coe_bracket_of_module]
     congr
Diff
@@ -144,17 +144,9 @@ theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M :=
 theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries R L M 1 = ⊥ :=
   by
   constructor <;> intro h
-  · erw [eq_bot_iff, LieSubmodule.lieSpan_le]
-    rintro m ⟨x, n, hn⟩
-    rw [← hn, h.trivial]
-    simp
-  · rw [LieSubmodule.eq_bot_iff] at h
-    apply is_trivial.mk
-    intro x m
-    apply h
-    apply LieSubmodule.subset_lieSpan
-    use x, m
-    rfl
+  · erw [eq_bot_iff, LieSubmodule.lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn, h.trivial]; simp
+  · rw [LieSubmodule.eq_bot_iff] at h; apply is_trivial.mk; intro x m; apply h
+    apply LieSubmodule.subset_lieSpan; use x, m; rfl
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
 
 theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ) :
@@ -219,10 +211,7 @@ theorem LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot (N : LieSubmodule R L M)
 variable (R L M)
 
 instance (priority := 100) trivialIsNilpotent [IsTrivial L M] : IsNilpotent R L M :=
-  ⟨by
-    use 1
-    change ⁅⊤, ⊤⁆ = ⊥
-    simp⟩
+  ⟨by use 1; change ⁅⊤, ⊤⁆ = ⊥; simp⟩
 #align lie_module.trivial_is_nilpotent LieModule.trivialIsNilpotent
 
 theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
@@ -409,11 +398,8 @@ theorem ucs_mono (k : ℕ) (h : N₁ ≤ N₂) : N₁.ucs k ≤ N₂.ucs k :=
   mono
 #align lie_submodule.ucs_mono LieSubmodule.ucs_mono
 
-theorem ucs_eq_self_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) : N₁.ucs k = N₁ :=
-  by
-  induction' k with k ih
-  · simp
-  · rwa [ucs_succ, ih]
+theorem ucs_eq_self_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) : N₁.ucs k = N₁ := by
+  induction' k with k ih; · simp; · rwa [ucs_succ, ih]
 #align lie_submodule.ucs_eq_self_of_normalizer_eq_self LieSubmodule.ucs_eq_self_of_normalizer_eq_self
 
 /-- If a Lie module `M` contains a self-normalizing Lie submodule `N`, then all terms of the upper
@@ -422,10 +408,7 @@ central series of `M` are contained in `N`.
 An important instance of this situation arises from a Cartan subalgebra `H ⊆ L` with the roles of
 `L`, `M`, `N` played by `H`, `L`, `H`, respectively. -/
 theorem ucs_le_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) :
-    (⊥ : LieSubmodule R L M).ucs k ≤ N₁ :=
-  by
-  rw [← ucs_eq_self_of_normalizer_eq_self h k]
-  mono
+    (⊥ : LieSubmodule R L M).ucs k ≤ N₁ := by rw [← ucs_eq_self_of_normalizer_eq_self h k]; mono;
   simp
 #align lie_submodule.ucs_le_of_normalizer_eq_self LieSubmodule.ucs_le_of_normalizer_eq_self
 
@@ -437,9 +420,7 @@ theorem lcs_add_le_iff (l k : ℕ) : N₁.lcs (l + k) ≤ N₂ ↔ N₁.lcs l 
   rw [(by abel : l + (k + 1) = l + 1 + k), ih, ucs_succ, lcs_succ, top_lie_le_iff_le_normalizer]
 #align lie_submodule.lcs_add_le_iff LieSubmodule.lcs_add_le_iff
 
-theorem lcs_le_iff (k : ℕ) : N₁.lcs k ≤ N₂ ↔ N₁ ≤ N₂.ucs k :=
-  by
-  convert lcs_add_le_iff 0 k
+theorem lcs_le_iff (k : ℕ) : N₁.lcs k ≤ N₂ ↔ N₁ ≤ N₂.ucs k := by convert lcs_add_le_iff 0 k;
   rw [zero_add]
 #align lie_submodule.lcs_le_iff LieSubmodule.lcs_le_iff
 
@@ -449,25 +430,18 @@ theorem gc_lcs_ucs (k : ℕ) :
   fun N₁ N₂ => lcs_le_iff k
 #align lie_submodule.gc_lcs_ucs LieSubmodule.gc_lcs_ucs
 
-theorem ucs_eq_top_iff (k : ℕ) : N.ucs k = ⊤ ↔ LieModule.lowerCentralSeries R L M k ≤ N :=
-  by
-  rw [eq_top_iff, ← lcs_le_iff]
-  rfl
+theorem ucs_eq_top_iff (k : ℕ) : N.ucs k = ⊤ ↔ LieModule.lowerCentralSeries R L M k ≤ N := by
+  rw [eq_top_iff, ← lcs_le_iff]; rfl
 #align lie_submodule.ucs_eq_top_iff LieSubmodule.ucs_eq_top_iff
 
 theorem LieModule.isNilpotent_iff_exists_ucs_eq_top :
-    LieModule.IsNilpotent R L M ↔ ∃ k, (⊥ : LieSubmodule R L M).ucs k = ⊤ :=
-  by
-  rw [LieModule.isNilpotent_iff]
-  exact exists_congr fun k => by simp [ucs_eq_top_iff]
+    LieModule.IsNilpotent R L M ↔ ∃ k, (⊥ : LieSubmodule R L M).ucs k = ⊤ := by
+  rw [LieModule.isNilpotent_iff]; exact exists_congr fun k => by simp [ucs_eq_top_iff]
 #align lie_module.is_nilpotent_iff_exists_ucs_eq_top LieModule.isNilpotent_iff_exists_ucs_eq_top
 
 theorem ucs_comap_incl (k : ℕ) :
-    ((⊥ : LieSubmodule R L M).ucs k).comap N.incl = (⊥ : LieSubmodule R L N).ucs k :=
-  by
-  induction' k with k ih
-  · exact N.ker_incl
-  · simp [← ih]
+    ((⊥ : LieSubmodule R L M).ucs k).comap N.incl = (⊥ : LieSubmodule R L N).ucs k := by
+  induction' k with k ih; · exact N.ker_incl; · simp [← ih]
 #align lie_submodule.ucs_comap_incl LieSubmodule.ucs_comap_incl
 
 theorem isNilpotent_iff_exists_self_le_ucs :
@@ -653,8 +627,7 @@ theorem LieIdeal.lowerCentralSeries_map_eq (k : ℕ) {f : L →ₗ⁅R⁆ L'} (h
     rw [← f.ideal_range_eq_map]
     exact f.ideal_range_eq_top_of_surjective h
   induction' k with k ih
-  · simp only [LieModule.lowerCentralSeries_zero]
-    exact h'
+  · simp only [LieModule.lowerCentralSeries_zero]; exact h'
   · simp only [LieModule.lowerCentralSeries_succ, LieIdeal.map_bracket_eq f h, ih, h']
 #align lie_ideal.lower_central_series_map_eq LieIdeal.lowerCentralSeries_map_eq
 
Diff
@@ -239,17 +239,17 @@ theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
 
 This result will be used downstream to show that weight spaces are Lie submodules, at which time
 it will be possible to state it in the language of weight spaces. -/
-theorem infᵢ_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
+theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
     (⨅ x : L, (toEndomorphism R L M x).maximalGeneralizedEigenspace 0) = ⊤ :=
   by
   ext m
   simp only [Module.End.mem_maximalGeneralizedEigenspace, Submodule.mem_top, sub_zero, iff_true_iff,
-    zero_smul, Submodule.mem_infᵢ]
+    zero_smul, Submodule.mem_iInf]
   intro x
   obtain ⟨k, hk⟩ := nilpotent_endo_of_nilpotent_module R L M
   use k; rw [hk]
   exact LinearMap.zero_apply m
-#align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.infᵢ_max_gen_zero_eigenspace_eq_top_of_nilpotent
+#align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
 
 /-- If the quotient of a Lie module `M` by a Lie submodule on which the Lie algebra acts trivially
 is nilpotent then `M` is nilpotent.
@@ -276,7 +276,7 @@ the natural number `k` (the number of inclusions).
 
 For a non-nilpotent module, we use the junk value 0. -/
 noncomputable def nilpotencyLength : ℕ :=
-  infₛ { k | lowerCentralSeries R L M k = ⊥ }
+  sInf { k | lowerCentralSeries R L M k = ⊥ }
 #align lie_module.nilpotency_length LieModule.nilpotencyLength
 
 theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
@@ -290,8 +290,8 @@ theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
   change Inf s = 0 ↔ _
   rw [← LieSubmodule.subsingleton_iff R L M, ← subsingleton_iff_bot_eq_top, ←
     lower_central_series_zero, @eq_comm (LieSubmodule R L M)]
-  refine' ⟨fun h => h ▸ Nat.infₛ_mem hs, fun h => _⟩
-  rw [Nat.infₛ_eq_zero]
+  refine' ⟨fun h => h ▸ Nat.sInf_mem hs, fun h => _⟩
+  rw [Nat.sInf_eq_zero]
   exact Or.inl h
 #align lie_module.nilpotency_length_eq_zero_iff LieModule.nilpotencyLength_eq_zero_iff
 
@@ -305,7 +305,7 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
     by
     rintro k₁ k₂ h₁₂ (h₁ : lower_central_series R L M k₁ = ⊥)
     exact eq_bot_iff.mpr (h₁ ▸ antitone_lower_central_series R L M h₁₂)
-  exact Nat.infₛ_upward_closed_eq_succ_iff hs k
+  exact Nat.sInf_upward_closed_eq_succ_iff hs k
 #align lie_module.nilpotency_length_eq_succ_iff LieModule.nilpotencyLength_eq_succ_iff
 
 /-- Given a non-trivial nilpotent Lie module `M` with lower central series
@@ -573,10 +573,10 @@ theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 
 /-- See also `lie_algebra.zero_root_space_eq_top_of_nilpotent`. -/
-theorem LieAlgebra.infᵢ_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
+theorem LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
     (⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0) = ⊤ :=
-  LieModule.infᵢ_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
-#align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.infᵢ_max_gen_zero_eigenspace_eq_top_of_nilpotent
+  LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
+#align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
 
 -- TODO Generalise the below to Lie modules if / when we define morphisms, equivs of Lie modules
 -- covering a Lie algebra morphism of (possibly different) Lie algebras.
Diff
@@ -189,7 +189,7 @@ theorem derivedSeries_le_lowerCentralSeries (k : ℕ) :
   induction' k with k h
   · rw [derived_series_def, derived_series_of_ideal_zero, lower_central_series_zero]
     exact le_rfl
-  · have h' : derived_series R L k ≤ ⊤ := by simp only [le_top]
+  · have h' : derivedSeries R L k ≤ ⊤ := by simp only [le_top]
     rw [derived_series_def, derived_series_of_ideal_succ, lower_central_series_succ]
     exact LieSubmodule.mono_lie _ _ _ _ h' h
 #align lie_module.derived_series_le_lower_central_series LieModule.derivedSeries_le_lowerCentralSeries

Changes in mathlib4

mathlib3
mathlib4
chore: split RingTheory.Nilpotent (#12184)

Mathlib.RingTheory.Nilpotent has a few very simple definitions (Mathlib.Data.Nat.Lattice is sufficient to state them), but needs some pretty heavy imports (ideals, linear algebra) towards the end. This change moves the heavier parts into a new file.

Diff
@@ -10,7 +10,7 @@ import Mathlib.Algebra.Lie.Normalizer
 import Mathlib.LinearAlgebra.Eigenspace.Basic
 import Mathlib.Order.Filter.AtTopBot
 import Mathlib.RingTheory.Artinian
-import Mathlib.RingTheory.Nilpotent
+import Mathlib.RingTheory.Nilpotent.Lemmas
 import Mathlib.Tactic.Monotonicity
 
 #align_import algebra.lie.nilpotent from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1"
chore: Reduce scope of LinearOrderedCommGroupWithZero (#11716)

Reconstitute the file Algebra.Order.Monoid.WithZero from three files:

  • Algebra.Order.Monoid.WithZero.Defs
  • Algebra.Order.Monoid.WithZero.Basic
  • Algebra.Order.WithZero

Avoid importing it in many files. Most uses were just to get le_zero_iff to work on Nat.

Before pre_11716

After post_11716

Diff
@@ -134,7 +134,7 @@ variable (R L M)
 theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M := by
   intro l k
   induction' k with k ih generalizing l <;> intro h
-  · exact (le_zero_iff.mp h).symm ▸ le_rfl
+  · exact (Nat.le_zero.mp h).symm ▸ le_rfl
   · rcases Nat.of_le_succ h with (hk | hk)
     · rw [lowerCentralSeries_succ]
       exact (LieSubmodule.mono_lie_right _ _ ⊤ (ih hk)).trans (LieSubmodule.lie_le_right _ _)
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -36,11 +36,8 @@ universe u v w w₁ w₂
 section NilpotentModules
 
 variable {R : Type u} {L : Type v} {M : Type w}
-
 variable [CommRing R] [LieRing L] [LieAlgebra R L] [AddCommGroup M] [Module R M]
-
 variable [LieRingModule L M] [LieModule R L M]
-
 variable (k : ℕ) (N : LieSubmodule R L M)
 
 namespace LieSubmodule
@@ -559,11 +556,8 @@ section Morphisms
 open LieModule Function
 
 variable {L₂ M₂ : Type*} [LieRing L₂] [LieAlgebra R L₂]
-
 variable [AddCommGroup M₂] [Module R M₂] [LieRingModule L₂ M₂] [LieModule R L₂ M₂]
-
 variable {f : L →ₗ⁅R⁆ L₂} {g : M →ₗ[R] M₂}
-
 variable (hf : Surjective f) (hg : Surjective g) (hfg : ∀ x m, ⁅f x, g m⁆ = g ⁅x, m⁆)
 
 theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
@@ -633,7 +627,6 @@ instance (priority := 100) LieAlgebra.isSolvable_of_isNilpotent (R : Type u) (L
 section NilpotentAlgebras
 
 variable (R : Type u) (L : Type v) (L' : Type w)
-
 variable [CommRing R] [LieRing L] [LieAlgebra R L] [LieRing L'] [LieAlgebra R L']
 
 /-- We say a Lie algebra is nilpotent when it is nilpotent as a Lie module over itself via the
@@ -780,9 +773,7 @@ namespace LieIdeal
 open LieModule
 
 variable {R L : Type*} [CommRing R] [LieRing L] [LieAlgebra R L] (I : LieIdeal R L)
-
 variable (M : Type*) [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
-
 variable (k : ℕ)
 
 /-- Given a Lie module `M` over a Lie algebra `L` together with an ideal `I` of `L`, this is the
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -273,7 +273,7 @@ theorem isNilpotent_toEndomorphism_of_isNilpotent₂ [IsNilpotent R L M] (x y :
     _root_.IsNilpotent (toEndomorphism R L M x ∘ₗ toEndomorphism R L M y) := by
   obtain ⟨k, hM⟩ := exists_lowerCentralSeries_eq_bot_of_isNilpotent R L M
   replace hM : lowerCentralSeries R L M (2 * k) = ⊥ := by
-    rw [eq_bot_iff, ← hM]; exact antitone_lowerCentralSeries R L M (by linarith)
+    rw [eq_bot_iff, ← hM]; exact antitone_lowerCentralSeries R L M (by omega)
   use k
   ext m
   rw [LinearMap.pow_apply, LinearMap.zero_apply, ← LieSubmodule.mem_bot (R := R) (L := L), ← hM]
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -151,7 +151,7 @@ theorem eventually_iInf_lowerCentralSeries_eq [IsArtinian R M] :
   obtain ⟨n, hn : ∀ m, n ≤ m → lowerCentralSeries R L M n = lowerCentralSeries R L M m⟩ :=
     WellFounded.monotone_chain_condition.mp h_wf ⟨_, antitone_lowerCentralSeries R L M⟩
   refine Filter.eventually_atTop.mpr ⟨n, fun l hl ↦ le_antisymm (iInf_le _ _) (le_iInf fun m ↦ ?_)⟩
-  cases' le_or_lt l m with h h
+  rcases le_or_lt l m with h | h
   · rw [← hn _ hl, ← hn _ (hl.trans h)]
   · exact antitone_lowerCentralSeries R L M (le_of_lt h)
 
chore: delete LinearMap.extendScalars which duplicates LinearMap.baseChange (#8617)

For consistency, we also rename Submodule.extendScalars to Submodule.baseChange and likewise for LieSubmodule.

Diff
@@ -866,11 +866,11 @@ variable (R A L M : Type*) [CommRing R] [LieRing L] [LieAlgebra R L]
   [CommRing A] [Algebra R A]
 
 @[simp]
-lemma LieSubmodule.lowerCentralSeries_tensor_eq_extendScalars (k : ℕ) :
+lemma LieSubmodule.lowerCentralSeries_tensor_eq_baseChange (k : ℕ) :
     lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] M) k =
-    (lowerCentralSeries R L M k).extendScalars A := by
+    (lowerCentralSeries R L M k).baseChange A := by
   induction' k with k ih; simp
-  simp only [lowerCentralSeries_succ, ih, ← extendScalars_top, lie_extendScalars]
+  simp only [lowerCentralSeries_succ, ih, ← baseChange_top, lie_baseChange]
 
 instance LieModule.instIsNilpotentTensor [IsNilpotent R L M] :
     IsNilpotent A (A ⊗[R] L) (A ⊗[R] M) := by
feat: remove triangularizability assumption from proof that Cartan subalgebras are Abelian (#8583)
Diff
@@ -3,6 +3,7 @@ Copyright (c) 2021 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 -/
+import Mathlib.Algebra.Lie.BaseChange
 import Mathlib.Algebra.Lie.Solvable
 import Mathlib.Algebra.Lie.Quotient
 import Mathlib.Algebra.Lie.Normalizer
@@ -30,7 +31,6 @@ carries a natural concept of nilpotency. We define these here via the lower cent
 lie algebra, lower central series, nilpotent
 -/
 
-
 universe u v w w₁ w₂
 
 section NilpotentModules
@@ -856,3 +856,25 @@ theorem _root_.LieAlgebra.isNilpotent_ad_of_isNilpotent {L : LieSubalgebra R A}
 #align lie_algebra.is_nilpotent_ad_of_is_nilpotent LieAlgebra.isNilpotent_ad_of_isNilpotent
 
 end OfAssociative
+
+section ExtendScalars
+
+open LieModule TensorProduct
+
+variable (R A L M : Type*) [CommRing R] [LieRing L] [LieAlgebra R L]
+  [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
+  [CommRing A] [Algebra R A]
+
+@[simp]
+lemma LieSubmodule.lowerCentralSeries_tensor_eq_extendScalars (k : ℕ) :
+    lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] M) k =
+    (lowerCentralSeries R L M k).extendScalars A := by
+  induction' k with k ih; simp
+  simp only [lowerCentralSeries_succ, ih, ← extendScalars_top, lie_extendScalars]
+
+instance LieModule.instIsNilpotentTensor [IsNilpotent R L M] :
+    IsNilpotent A (A ⊗[R] L) (A ⊗[R] M) := by
+  obtain ⟨k, hk⟩ := inferInstanceAs (IsNilpotent R L M)
+  exact ⟨k, by simp [hk]⟩
+
+end ExtendScalars
feat: if a Lie algebra has non-degenerate Killing form then its Cartan subalgebras are Abelian (#8430)

Note: the proof (due to Zassenhaus) makes no assumption about the characteristic of the coefficients.

Diff
@@ -325,6 +325,7 @@ noncomputable def nilpotencyLength : ℕ :=
   sInf {k | lowerCentralSeries R L M k = ⊥}
 #align lie_module.nilpotency_length LieModule.nilpotencyLength
 
+@[simp]
 theorem nilpotencyLength_eq_zero_iff [IsNilpotent R L M] :
     nilpotencyLength R L M = 0 ↔ Subsingleton M := by
   let s := {k | lowerCentralSeries R L M k = ⊥}
@@ -350,6 +351,19 @@ theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
   exact Nat.sInf_upward_closed_eq_succ_iff hs k
 #align lie_module.nilpotency_length_eq_succ_iff LieModule.nilpotencyLength_eq_succ_iff
 
+@[simp]
+theorem nilpotencyLength_eq_one_iff [Nontrivial M] :
+    nilpotencyLength R L M = 1 ↔ IsTrivial L M := by
+  rw [nilpotencyLength_eq_succ_iff, ← trivial_iff_lower_central_eq_bot]
+  simp
+
+theorem isTrivial_of_nilpotencyLength_le_one [IsNilpotent R L M] (h : nilpotencyLength R L M ≤ 1) :
+    IsTrivial L M := by
+  nontriviality M
+  cases' Nat.le_one_iff_eq_zero_or_eq_one.mp h with h h
+  · rw [nilpotencyLength_eq_zero_iff] at h; infer_instance
+  · rwa [nilpotencyLength_eq_one_iff] at h
+
 /-- Given a non-trivial nilpotent Lie module `M` with lower central series
 `M = C₀ ≥ C₁ ≥ ⋯ ≥ Cₖ = ⊥`, this is the `k-1`th term in the lower central series (the last
 non-trivial term).
@@ -381,6 +395,35 @@ theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
     exact h.2
 #align lie_module.nontrivial_lower_central_series_last LieModule.nontrivial_lowerCentralSeriesLast
 
+theorem lowerCentralSeriesLast_le_of_not_isTrivial [IsNilpotent R L M] (h : ¬ IsTrivial L M) :
+    lowerCentralSeriesLast R L M ≤ lowerCentralSeries R L M 1 := by
+  rw [lowerCentralSeriesLast]
+  replace h : 1 < nilpotencyLength R L M := by
+    by_contra contra
+    have := isTrivial_of_nilpotencyLength_le_one R L M (not_lt.mp contra)
+    contradiction
+  cases' hk : nilpotencyLength R L M with k <;> rw [hk] at h
+  · contradiction
+  · exact antitone_lowerCentralSeries _ _ _ (Nat.lt_succ.mp h)
+
+/-- For a nilpotent Lie module `M` of a Lie algebra `L`, the first term in the lower central series
+of `M` contains a non-zero element on which `L` acts trivially unless the entire action is trivial.
+
+Taking `M = L`, this provides a useful characterisation of Abelian-ness for nilpotent Lie
+algebras. -/
+lemma disjoint_lowerCentralSeries_maxTrivSubmodule_iff [IsNilpotent R L M] :
+    Disjoint (lowerCentralSeries R L M 1) (maxTrivSubmodule R L M) ↔ IsTrivial L M := by
+  refine ⟨fun h ↦ ?_, fun h ↦ by simp⟩
+  nontriviality M
+  by_contra contra
+  have : lowerCentralSeriesLast R L M ≤ lowerCentralSeries R L M 1 ⊓ maxTrivSubmodule R L M :=
+    le_inf_iff.mpr ⟨lowerCentralSeriesLast_le_of_not_isTrivial R L M contra,
+      lowerCentralSeriesLast_le_max_triv R L M⟩
+  suffices ¬ Nontrivial (lowerCentralSeriesLast R L M) by
+    exact this (nontrivial_lowerCentralSeriesLast R L M)
+  rw [h.eq_bot, le_bot_iff] at this
+  exact this ▸ not_nontrivial _
+
 theorem nontrivial_max_triv_of_isNilpotent [Nontrivial M] [IsNilpotent R L M] :
     Nontrivial (maxTrivSubmodule R L M) :=
   Set.nontrivial_mono (lowerCentralSeriesLast_le_max_triv R L M)
feat: miscellaneous Lie algebra lemmas (#7782)
Diff
@@ -506,6 +506,9 @@ theorem isNilpotent_iff_exists_self_le_ucs :
   simp_rw [LieModule.isNilpotent_iff_exists_ucs_eq_top, ← ucs_comap_incl, comap_incl_eq_top]
 #align lie_submodule.is_nilpotent_iff_exists_self_le_ucs LieSubmodule.isNilpotent_iff_exists_self_le_ucs
 
+theorem ucs_bot_one : (⊥ : LieSubmodule R L M).ucs 1 = LieModule.maxTrivSubmodule R L M := by
+  simp [LieSubmodule.normalizer_bot_eq_maxTrivSubmodule]
+
 end LieSubmodule
 
 section Morphisms
feat: various Lie algebra definitions / lemmas (#7507)

These are all motivated by a result I've proved but I believe they make sense in their own right so I have split them out in the hopes of simplifying review.

Diff
@@ -7,6 +7,8 @@ import Mathlib.Algebra.Lie.Solvable
 import Mathlib.Algebra.Lie.Quotient
 import Mathlib.Algebra.Lie.Normalizer
 import Mathlib.LinearAlgebra.Eigenspace.Basic
+import Mathlib.Order.Filter.AtTopBot
+import Mathlib.RingTheory.Artinian
 import Mathlib.RingTheory.Nilpotent
 import Mathlib.Tactic.Monotonicity
 
@@ -68,6 +70,13 @@ theorem lcs_succ : N.lcs (k + 1) = ⁅(⊤ : LieIdeal R L), N.lcs k⁆ :=
   Function.iterate_succ_apply' (fun N' => ⁅⊤, N'⁆) k N
 #align lie_submodule.lcs_succ LieSubmodule.lcs_succ
 
+@[simp]
+lemma lcs_sup {N₁ N₂ : LieSubmodule R L M} {k : ℕ} :
+    (N₁ ⊔ N₂).lcs k = N₁.lcs k ⊔ N₂.lcs k := by
+  induction' k with k ih
+  · simp
+  · simp only [LieSubmodule.lcs_succ, ih, LieSubmodule.lie_sup]
+
 end LieSubmodule
 
 namespace LieModule
@@ -135,6 +144,17 @@ theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M := by
     · exact hk.symm ▸ le_rfl
 #align lie_module.antitone_lower_central_series LieModule.antitone_lowerCentralSeries
 
+theorem eventually_iInf_lowerCentralSeries_eq [IsArtinian R M] :
+    ∀ᶠ l in Filter.atTop, ⨅ k, lowerCentralSeries R L M k = lowerCentralSeries R L M l := by
+  have h_wf : WellFounded ((· > ·) : (LieSubmodule R L M)ᵒᵈ → (LieSubmodule R L M)ᵒᵈ → Prop) :=
+    LieSubmodule.wellFounded_of_isArtinian R L M
+  obtain ⟨n, hn : ∀ m, n ≤ m → lowerCentralSeries R L M n = lowerCentralSeries R L M m⟩ :=
+    WellFounded.monotone_chain_condition.mp h_wf ⟨_, antitone_lowerCentralSeries R L M⟩
+  refine Filter.eventually_atTop.mpr ⟨n, fun l hl ↦ le_antisymm (iInf_le _ _) (le_iInf fun m ↦ ?_)⟩
+  cases' le_or_lt l m with h h
+  · rw [← hn _ hl, ← hn _ (hl.trans h)]
+  · exact antitone_lowerCentralSeries R L M (le_of_lt h)
+
 theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries R L M 1 = ⊥ := by
   constructor <;> intro h
   · erw [eq_bot_iff, LieSubmodule.lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn, h.trivial]; simp
feat: define the positive Fitting component of the representation of a nilpotent Lie algebra (#7360)
Diff
@@ -122,6 +122,7 @@ end LieSubmodule
 
 namespace LieModule
 
+variable {M₂ : Type w₁} [AddCommGroup M₂] [Module R M₂] [LieRingModule L M₂] [LieModule R L M₂]
 variable (R L M)
 
 theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M := by
@@ -166,15 +167,23 @@ theorem iterate_toEndomorphism_mem_lowerCentralSeries₂ (x y : L) (m : M) (k :
 
 variable {R L M}
 
-theorem map_lowerCentralSeries_le {M₂ : Type w₁} [AddCommGroup M₂] [Module R M₂]
-    [LieRingModule L M₂] [LieModule R L M₂] (k : ℕ) (f : M →ₗ⁅R,L⁆ M₂) :
-    LieSubmodule.map f (lowerCentralSeries R L M k) ≤ lowerCentralSeries R L M₂ k := by
+theorem map_lowerCentralSeries_le (f : M →ₗ⁅R,L⁆ M₂) :
+    (lowerCentralSeries R L M k).map f ≤ lowerCentralSeries R L M₂ k := by
   induction' k with k ih
   · simp only [Nat.zero_eq, lowerCentralSeries_zero, le_top]
   · simp only [LieModule.lowerCentralSeries_succ, LieSubmodule.map_bracket_eq]
     exact LieSubmodule.mono_lie_right _ _ ⊤ ih
 #align lie_module.map_lower_central_series_le LieModule.map_lowerCentralSeries_le
 
+lemma map_lowerCentralSeries_eq {f : M →ₗ⁅R,L⁆ M₂} (hf : Function.Surjective f) :
+    (lowerCentralSeries R L M k).map f = lowerCentralSeries R L M₂ k := by
+  apply le_antisymm (map_lowerCentralSeries_le k f)
+  induction' k with k ih
+  · rwa [lowerCentralSeries_zero, lowerCentralSeries_zero, top_le_iff, f.map_top, f.range_eq_top]
+  · simp only [lowerCentralSeries_succ, LieSubmodule.map_bracket_eq]
+    apply LieSubmodule.mono_lie_right
+    assumption
+
 variable (R L M)
 
 open LieAlgebra
@@ -198,6 +207,12 @@ theorem exists_lowerCentralSeries_eq_bot_of_isNilpotent [IsNilpotent R L M] :
     ∃ k, lowerCentralSeries R L M k = ⊥ :=
   IsNilpotent.nilpotent
 
+@[simp] lemma iInf_lowerCentralSeries_eq_bot_of_isNilpotent [IsNilpotent R L M] :
+    ⨅ k, lowerCentralSeries R L M k = ⊥ := by
+  obtain ⟨k, hk⟩ := exists_lowerCentralSeries_eq_bot_of_isNilpotent R L M
+  rw [eq_bot_iff, ← hk]
+  exact iInf_le _ _
+
 /-- See also `LieModule.isNilpotent_iff_exists_ucs_eq_top`. -/
 theorem isNilpotent_iff : IsNilpotent R L M ↔ ∃ k, lowerCentralSeries R L M k = ⊥ :=
   ⟨fun h => h.nilpotent, fun h => ⟨h⟩⟩
@@ -270,6 +285,18 @@ theorem nilpotentOfNilpotentQuotient {N : LieSubmodule R L M} (h₁ : N ≤ maxT
   exact map_lowerCentralSeries_le k (LieSubmodule.Quotient.mk' N)
 #align lie_module.nilpotent_of_nilpotent_quotient LieModule.nilpotentOfNilpotentQuotient
 
+theorem isNilpotent_quotient_iff :
+    IsNilpotent R L (M ⧸ N) ↔ ∃ k, lowerCentralSeries R L M k ≤ N := by
+  rw [LieModule.isNilpotent_iff]
+  refine exists_congr fun k ↦ ?_
+  rw [← LieSubmodule.Quotient.map_mk'_eq_bot_le, map_lowerCentralSeries_eq k
+    (LieSubmodule.Quotient.surjective_mk' N)]
+
+theorem iInf_lcs_le_of_isNilpotent_quot (h : IsNilpotent R L (M ⧸ N)) :
+    ⨅ k, lowerCentralSeries R L M k ≤ N := by
+  obtain ⟨k, hk⟩ := (isNilpotent_quotient_iff R L M N).mp h
+  exact iInf_le_of_le k hk
+
 /-- Given a nilpotent Lie module `M` with lower central series `M = C₀ ≥ C₁ ≥ ⋯ ≥ Cₖ = ⊥`, this is
 the natural number `k` (the number of inclusions).
 
@@ -521,6 +548,10 @@ theorem LieModule.isNilpotent_of_top_iff :
   Equiv.lieModule_isNilpotent_iff LieSubalgebra.topEquiv (1 : M ≃ₗ[R] M) fun _ _ => rfl
 #align lie_module.is_nilpotent_of_top_iff LieModule.isNilpotent_of_top_iff
 
+@[simp] lemma LieModule.isNilpotent_of_top_iff' :
+    IsNilpotent R L {x // x ∈ (⊤ : LieSubmodule R L M)} ↔ IsNilpotent R L M :=
+  Equiv.lieModule_isNilpotent_iff 1 (LinearEquiv.ofTop ⊤ rfl) fun _ _ ↦ rfl
+
 end Morphisms
 
 end NilpotentModules
chore: refactor Lie algebra weight spaces (#7210)

The key change is the new definition LieModule.weightSpaceOf which shows that the eigenspaces of the action of a single element of a Lie algebra on a representation are Lie submodules. I need to use this fact to develop the theory further.

Diff
@@ -244,20 +244,13 @@ theorem isNilpotent_toEndomorphism_of_isNilpotent₂ [IsNilpotent R L M] (x y :
   rw [LinearMap.pow_apply, LinearMap.zero_apply, ← LieSubmodule.mem_bot (R := R) (L := L), ← hM]
   exact iterate_toEndomorphism_mem_lowerCentralSeries₂ R L M x y m k
 
-/-- For a nilpotent Lie module, the weight space of the 0 weight is the whole module.
-
-This result will be used downstream to show that weight spaces are Lie submodules, at which time
-it will be possible to state it in the language of weight spaces. -/
-theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
-    ⨅ x : L, (toEndomorphism R L M x).maximalGeneralizedEigenspace 0 = ⊤ := by
+@[simp] lemma maxGenEigenSpace_toEndomorphism_eq_top [IsNilpotent R L M] (x : L) :
+    ((toEndomorphism R L M x).maximalGeneralizedEigenspace 0) = ⊤ := by
   ext m
-  simp only [Module.End.mem_maximalGeneralizedEigenspace, Submodule.mem_top, sub_zero, iff_true_iff,
-    zero_smul, Submodule.mem_iInf]
-  intro x
+  simp only [Module.End.mem_maximalGeneralizedEigenspace, zero_smul, sub_zero, Submodule.mem_top,
+    iff_true]
   obtain ⟨k, hk⟩ := exists_forall_pow_toEndomorphism_eq_zero R L M
-  use k; rw [hk]
-  exact LinearMap.zero_apply m
-#align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
+  exact ⟨k, by simp [hk x]⟩
 
 /-- If the quotient of a Lie module `M` by a Lie submodule on which the Lie algebra acts trivially
 is nilpotent then `M` is nilpotent.
@@ -560,12 +553,6 @@ theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
   LieModule.exists_forall_pow_toEndomorphism_eq_zero R L L
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 
-/-- See also `LieAlgebra.zero_rootSpace_eq_top_of_nilpotent`. -/
-theorem LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
-    ⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0 = ⊤ :=
-  LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
-#align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
-
 -- TODO Generalise the below to Lie modules if / when we define morphisms, equivs of Lie modules
 -- covering a Lie algebra morphism of (possibly different) Lie algebras.
 variable {R L L'}
feat: define the trace / killing forms on a Lie algebra (#6308)
Diff
@@ -154,6 +154,16 @@ theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ)
     exact LieSubmodule.lie_mem_lie _ _ (LieSubmodule.mem_top x) ih
 #align lie_module.iterate_to_endomorphism_mem_lower_central_series LieModule.iterate_toEndomorphism_mem_lowerCentralSeries
 
+theorem iterate_toEndomorphism_mem_lowerCentralSeries₂ (x y : L) (m : M) (k : ℕ) :
+    (toEndomorphism R L M x ∘ₗ toEndomorphism R L M y)^[k] m ∈
+      lowerCentralSeries R L M (2 * k) := by
+  induction' k with k ih; simp
+  have hk : 2 * k.succ = (2 * k + 1) + 1 := rfl
+  simp only [lowerCentralSeries_succ, Function.comp_apply, Function.iterate_succ', hk,
+      toEndomorphism_apply_apply, LinearMap.coe_comp, toEndomorphism_apply_apply]
+  refine' LieSubmodule.lie_mem_lie _ _ (LieSubmodule.mem_top x) _
+  exact LieSubmodule.lie_mem_lie _ _ (LieSubmodule.mem_top y) ih
+
 variable {R L M}
 
 theorem map_lowerCentralSeries_le {M₂ : Type w₁} [AddCommGroup M₂] [Module R M₂]
@@ -184,6 +194,10 @@ class IsNilpotent : Prop where
   nilpotent : ∃ k, lowerCentralSeries R L M k = ⊥
 #align lie_module.is_nilpotent LieModule.IsNilpotent
 
+theorem exists_lowerCentralSeries_eq_bot_of_isNilpotent [IsNilpotent R L M] :
+    ∃ k, lowerCentralSeries R L M k = ⊥ :=
+  IsNilpotent.nilpotent
+
 /-- See also `LieModule.isNilpotent_iff_exists_ucs_eq_top`. -/
 theorem isNilpotent_iff : IsNilpotent R L M ↔ ∃ k, lowerCentralSeries R L M k = ⊥ :=
   ⟨fun h => h.nilpotent, fun h => ⟨h⟩⟩
@@ -205,14 +219,30 @@ instance (priority := 100) trivialIsNilpotent [IsTrivial L M] : IsNilpotent R L
   ⟨by use 1; change ⁅⊤, ⊤⁆ = ⊥; simp⟩
 #align lie_module.trivial_is_nilpotent LieModule.trivialIsNilpotent
 
-theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
+theorem exists_forall_pow_toEndomorphism_eq_zero [hM : IsNilpotent R L M] :
     ∃ k : ℕ, ∀ x : L, toEndomorphism R L M x ^ k = 0 := by
   obtain ⟨k, hM⟩ := hM
   use k
   intro x; ext m
   rw [LinearMap.pow_apply, LinearMap.zero_apply, ← @LieSubmodule.mem_bot R L M, ← hM]
   exact iterate_toEndomorphism_mem_lowerCentralSeries R L M x m k
-#align lie_module.nilpotent_endo_of_nilpotent_module LieModule.nilpotent_endo_of_nilpotent_module
+#align lie_module.nilpotent_endo_of_nilpotent_module LieModule.exists_forall_pow_toEndomorphism_eq_zero
+
+theorem isNilpotent_toEndomorphism_of_isNilpotent [IsNilpotent R L M] (x : L) :
+    _root_.IsNilpotent (toEndomorphism R L M x) := by
+  change ∃ k, toEndomorphism R L M x ^ k = 0
+  have := exists_forall_pow_toEndomorphism_eq_zero R L M
+  tauto
+
+theorem isNilpotent_toEndomorphism_of_isNilpotent₂ [IsNilpotent R L M] (x y : L) :
+    _root_.IsNilpotent (toEndomorphism R L M x ∘ₗ toEndomorphism R L M y) := by
+  obtain ⟨k, hM⟩ := exists_lowerCentralSeries_eq_bot_of_isNilpotent R L M
+  replace hM : lowerCentralSeries R L M (2 * k) = ⊥ := by
+    rw [eq_bot_iff, ← hM]; exact antitone_lowerCentralSeries R L M (by linarith)
+  use k
+  ext m
+  rw [LinearMap.pow_apply, LinearMap.zero_apply, ← LieSubmodule.mem_bot (R := R) (L := L), ← hM]
+  exact iterate_toEndomorphism_mem_lowerCentralSeries₂ R L M x y m k
 
 /-- For a nilpotent Lie module, the weight space of the 0 weight is the whole module.
 
@@ -224,7 +254,7 @@ theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
   simp only [Module.End.mem_maximalGeneralizedEigenspace, Submodule.mem_top, sub_zero, iff_true_iff,
     zero_smul, Submodule.mem_iInf]
   intro x
-  obtain ⟨k, hk⟩ := nilpotent_endo_of_nilpotent_module R L M
+  obtain ⟨k, hk⟩ := exists_forall_pow_toEndomorphism_eq_zero R L M
   use k; rw [hk]
   exact LinearMap.zero_apply m
 #align lie_module.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
@@ -527,7 +557,7 @@ open LieAlgebra
 
 theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
     ∃ k : ℕ, ∀ x : L, ad R L x ^ k = 0 :=
-  LieModule.nilpotent_endo_of_nilpotent_module R L L
+  LieModule.exists_forall_pow_toEndomorphism_eq_zero R L L
 #align lie_algebra.nilpotent_ad_of_nilpotent_algebra LieAlgebra.nilpotent_ad_of_nilpotent_algebra
 
 /-- See also `LieAlgebra.zero_rootSpace_eq_top_of_nilpotent`. -/
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -442,7 +442,7 @@ section Morphisms
 
 open LieModule Function
 
-variable {L₂ M₂ : Type _} [LieRing L₂] [LieAlgebra R L₂]
+variable {L₂ M₂ : Type*} [LieRing L₂] [LieAlgebra R L₂]
 
 variable [AddCommGroup M₂] [Module R M₂] [LieRingModule L₂ M₂] [LieModule R L₂ M₂]
 
@@ -665,9 +665,9 @@ namespace LieIdeal
 
 open LieModule
 
-variable {R L : Type _} [CommRing R] [LieRing L] [LieAlgebra R L] (I : LieIdeal R L)
+variable {R L : Type*} [CommRing R] [LieRing L] [LieAlgebra R L] (I : LieIdeal R L)
 
-variable (M : Type _) [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
+variable (M : Type*) [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
 
 variable (k : ℕ)
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2021 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
-
-! This file was ported from Lean 3 source module algebra.lie.nilpotent
-! leanprover-community/mathlib commit 6b0169218d01f2837d79ea2784882009a0da1aa1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Lie.Solvable
 import Mathlib.Algebra.Lie.Quotient
@@ -15,6 +10,8 @@ import Mathlib.LinearAlgebra.Eigenspace.Basic
 import Mathlib.RingTheory.Nilpotent
 import Mathlib.Tactic.Monotonicity
 
+#align_import algebra.lie.nilpotent from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1"
+
 /-!
 # Nilpotent Lie algebras
 
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -140,7 +140,7 @@ theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M := by
 theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries R L M 1 = ⊥ := by
   constructor <;> intro h
   · erw [eq_bot_iff, LieSubmodule.lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn, h.trivial]; simp
-  · rw [LieSubmodule.eq_bot_iff] at h ; apply IsTrivial.mk; intro x m; apply h
+  · rw [LieSubmodule.eq_bot_iff] at h; apply IsTrivial.mk; intro x m; apply h
     apply LieSubmodule.subset_lieSpan
     -- Porting note: was `use x, m; rfl`
     simp only [LieSubmodule.top_coe, Subtype.exists, LieSubmodule.mem_top, exists_prop, true_and,
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -222,7 +222,7 @@ theorem nilpotent_endo_of_nilpotent_module [hM : IsNilpotent R L M] :
 This result will be used downstream to show that weight spaces are Lie submodules, at which time
 it will be possible to state it in the language of weight spaces. -/
 theorem iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L M] :
-    (⨅ x : L, (toEndomorphism R L M x).maximalGeneralizedEigenspace 0) = ⊤ := by
+    ⨅ x : L, (toEndomorphism R L M x).maximalGeneralizedEigenspace 0 = ⊤ := by
   ext m
   simp only [Module.End.mem_maximalGeneralizedEigenspace, Submodule.mem_top, sub_zero, iff_true_iff,
     zero_smul, Submodule.mem_iInf]
@@ -535,7 +535,7 @@ theorem LieAlgebra.nilpotent_ad_of_nilpotent_algebra [IsNilpotent R L] :
 
 /-- See also `LieAlgebra.zero_rootSpace_eq_top_of_nilpotent`. -/
 theorem LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent [IsNilpotent R L] :
-    (⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0) = ⊤ :=
+    ⨅ x : L, (ad R L x).maximalGeneralizedEigenspace 0 = ⊤ :=
   LieModule.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L L
 #align lie_algebra.infi_max_gen_zero_eigenspace_eq_top_of_nilpotent LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent
 
fix precedence of Nat.iterate (#5589)
Diff
@@ -149,7 +149,7 @@ theorem trivial_iff_lower_central_eq_bot : IsTrivial L M ↔ lowerCentralSeries
 #align lie_module.trivial_iff_lower_central_eq_bot LieModule.trivial_iff_lower_central_eq_bot
 
 theorem iterate_toEndomorphism_mem_lowerCentralSeries (x : L) (m : M) (k : ℕ) :
-    (toEndomorphism R L M x^[k]) m ∈ lowerCentralSeries R L M k := by
+    (toEndomorphism R L M x)^[k] m ∈ lowerCentralSeries R L M k := by
   induction' k with k ih
   · simp only [Nat.zero_eq, Function.iterate_zero, lowerCentralSeries_zero, LieSubmodule.mem_top]
   · simp only [lowerCentralSeries_succ, Function.comp_apply, Function.iterate_succ',
@@ -681,7 +681,7 @@ lower central series of `M` as an `I`-module. The advantage of using this defini
 
 See also `LieIdeal.coe_lcs_eq`. -/
 def lcs : LieSubmodule R L M :=
-  ((fun N => ⁅I, N⁆)^[k]) ⊤
+  (fun N => ⁅I, N⁆)^[k] ⊤
 #align lie_ideal.lcs LieIdeal.lcs
 
 @[simp]
chore: cleanup some simp-related porting notes (#4954)

I was looking on https://github.com/leanprover-community/mathlib4/pull/4933 to see what simp related porting notes I could improve after https://github.com/leanprover/lean4/pull/2266 lands in Lean 4. Mostly things I found could be cleaned up in any case, and so I've moved those into this PR.

There is lots more work to do diagnosing all the simp-related porting notes!

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -456,10 +456,7 @@ variable (hf : Surjective f) (hg : Surjective g) (hfg : ∀ x m, ⁅f x, g m⁆
 theorem Function.Surjective.lieModule_lcs_map_eq (k : ℕ) :
     (lowerCentralSeries R L M k : Submodule R M).map g = lowerCentralSeries R L₂ M₂ k := by
   induction' k with k ih
-  · -- Porting note: was `simp [LinearMap.range_eq_top, hg]`
-    simp only [Nat.zero_eq, lowerCentralSeries_zero, LieSubmodule.top_coeSubmodule,
-      Submodule.map_top, LinearMap.range_eq_top]
-    exact hg
+  · simpa [LinearMap.range_eq_top]
   · suffices
       g '' {m | ∃ (x : L) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, n⁆ = m} =
         {m | ∃ (x : L₂) (n : _), n ∈ lowerCentralSeries R L M k ∧ ⁅x, g n⁆ = m} by
feat: port Algebra.Lie.Nilpotent (#4919)

Dependencies 10 + 532

533 files ported (98.2%)
221833 lines ported (98.5%)
Show graph

The unported dependencies are