Engel’s Theorem in Mathlib

We discuss the theory of Lie algebras in Lean’s Mathlib library. Using nilpotency as the theme, we outline a computer formalisation of Engel’s theorem and an application to root space theory. We emphasise that all arguments work with coefficients in any commutative ring.


Introduction
In previous work [6], we reported on the formalisation of Lie algebras in Lean's Mathlib library [8].Whereas the aim of [6] was to give a high-level overview of the state of Mathlib's Lie theory, our goal here is to use a particular aspect of Lie theory (nilpotency) as a means for illustrating two of Mathlib's most important virtues: generality and unity.For example we shall see that Mathlib's version of Engel's theorem unifies the various versions of this result appearing in the informal literature, while demanding weaker hypotheses and providing a stronger result.
This article also presents an opportunity to highlight certain additions to Mathlib's Lie algebra theory that have been made since [6].To be precise, Mathlib's Lie theory has grown from c.6,000 lines to c.7,500 lines since [6].The most important additions are the proof of Engel's theorem and its corollary (4) characterising Cartan subalgebras.
We briefly summarise some key context and refer the reader to the references for further discussion.Lean is an open-source, dependently-typed functional programming language and proof assistant.The principal developer is Leonardo de Moura at Microsoft Research.It uses a type theory similar to that of Coq for its logical foundation, see e.g., [2].
Mathlib [8] is an open-source, massively-collaborative library of formal mathematics written using Lean.As of June 2022, it contains c.900,000 lines of code, is steadily growing, and contains large quantities of contemporary undergraduate-and graduate-level mathematics.
Lie algebras are an important class of algebras which arise throughout mathematics and physics.Well-known to geometers as an abstraction of infinitesimal symmetry, Lie algebras show up throughout mathematics, occupying prominent roles across the subject, from number theory to differential geometry.They are also essential for understanding much of 20 th Century physics, especially the Standard Model in particle physics.In addition, the beautiful classification of semisimple Lie algebras and their representations has made them an object of study in their own right.
As outlined in [6], Mathlib contains a substantial body of Lie algebra theory.The starting point is a pair of typeclasses which permit one to make the statement that a type L carries the structure of a Lie algebra over1 a commutative ring R. For the benefit of non-specialists we emphasise that Lie rings are not required to be associative2 and so are not rings in the sense in which the term is most often used.The formal definitions in Mathlib are as follows [src]: class lie_ring (L : Type v) extends add_comm_group L, has_bracket L L := (add_lie : ∀ (x y z : L), x + y,z = x,z + y,z ) (lie_add : ∀ (x y z : L), x,y + z = x,y + x,z ) (lie_self : We emphasise that no assumptions are made about the coefficients R except that they form a commutative ring.Practictioners of formal mathematics will be familiar with the value of making definitions as general as reasonably possible.Of course, if one also seeks to make theorems correspondingly general, then new arguments are often required.One of the points of this article is that this extra effort may yield unexpected benefits.
Our case study is Engel's theorem which turns out to be true for any commutative ring R and to apply to a generalisation of nilpotency to Lie modules.As we shall see, the generalisation of nilpotency, from algebras to modules, is especially convenient as it unifies the various versions of Engel's theorem that appear in the literature.In addition we obtain a slightly more powerful result; this is useful when it comes to applications and we give an example of this for root spaces in section 5.

Lie modules
Observe that we denote the action of an element x of a Lie algebra L on an element m of a Lie module M by [x, m].This permits a uniform notation when regarding a Lie algebra as a module over itself.
The action of L on M induces a natural map: defined by: In Mathlib this is [src]: Any Lie algebra acts on itself4 and in this special case, when M = L, the map φ is known as the adjoint action, and is denoted [src]:

Nilpotency
Nilpotency is an important concept in algebra, with applications beyond what one might naïvely expect from the definitions.In the case of Lie algebras, the representation theory of nilpotent Lie algebras is both especially simple and especially important since semisimple Lie algebras are best understood as representations of certain nilpotent subalgebras, namely, Cartan subalgebras 5 .

Ideal operations and nilpotent Lie modules
Given a Lie module M of a Lie algebra L, recall ([6] section 3) that for any ideal I ⊆ L and Lie submodule N ⊆ M we can form a new Lie submodule [src]: It is the smallest Lie submodule of M containing all elements of the form [x, m] for all x ∈ I and m ∈ N .
Informally, the lower central series of a Lie module M is the sequence of Lie submodules of M defined recursively as: The corresponding definitions in Mathlib are [src]: See also the final paragraph of section 3 in [6].
The lower central series is important because it provides a convenient way to define nilpotency [src]: Unwinding the definitions, informally a Lie module M is nilpotent if and only if there exists a natural number k such that for any x 1 , x 2 , . . ., x k in L and any m in M : We shall need the following property of a nilpotent Lie module: if M is non-trivial then it contains a non-zero element m 0 such that: [x, m 0 ] = 0 for all x in L. ( Indeed one chooses a minimal k satisfying (1) and takes any non-zero element of the form: 5 Most of the theory of semisimple Lie algebras has yet to be formalised.Adding this material to Mathlib following, say [7], would be a worthy endeavour.

Acting nilpotently
An element a of an associative6 ring A is said to be nilpotent if there exists a natural number k such that: Given a Lie module M of a Lie algebra L, this concept of nilpotency for elements of the ring A = End(M ) plays a central role in Engel's theorem: Definition.We say a Lie algebra L acts nilpotently on a Lie module M if the image of the natural map: contains only nilpotent elements.
A trivial but important observation is that if M is a nilpotent Lie module then L acts nilpotently.Indeed, given any x in L, taking the constant sequence: x (m) = 0 for any m, and thus: In Mathlib this statement is written [src]: lemma nilpotent_endo_of_nilpotent_module [is_nilpotent R L M] : ∃ (k : N), ∀ (x : L), (to_endomorphism R L M x)^k = 0 := A corollary7 of Engel's theorem states that when L is Noetherian as an R-module, the converse statement holds.More precisely: ∀x, ∃k, φ k x = 0 ⇐⇒ ∃k, ∀x, φ k x = 0.

Engel's theorem
Our goal is to outline a proof of: Theorem (Engel's theorem).Let M be a Lie module over a Lie algebra L with coefficients in a commutative ring R. Suppose that L is Noetherian as an R-module.Then M is nilpotent if and only if L acts nilpotently on M .
(a).Let L be a finite-dimensional Lie algebra with coefficients in a field.Then L is nilpotent if and only if it acts nilpotently on itself.(b).Let M be a non-trivial finite-dimensional vector space and suppose that L ⊆ End(M ) is a Lie subalgebra consisting of nilpotent elements.Then there exists a non-zero element m 0 in M such that: [x, m 0 ] = 0 for all x in L.
Taking M = L in our version recovers part (a) in the traditional statement.As explained in the discussion of equation ( 2), part (b) is also a trivial corollary of our version.We have thus unified parts (a) and (b) in the traditional version into a single result.Demanding the stronger property that M is nilpotent also turns out to simplify the proof as we get a stronger inductive hypothesis at the key step in the proof.

Engelian Lie algebras
It is convenient to introduce some terminology.Definition.We say a Lie algebra L is Engelian if any Lie module M on which L acts nilpotently is nilpotent.
The definition in Mathlib is 8 [src]: In fact, this exposes a rough edge of Lean 3: quantification over typeclasses requires use of the 'by exactI ∀ pattern' as well as the explicit mention of typeclasses that could be inferred (like add comm group, module etc).One would prefer to write simply ∀ (M : Type u 4 ), [[lie module R L M]] rather than the three lines appearing above.This situation is likely to improve after Mathlib is migrated to Lean 4. Using this new language, the non-trivial part of Engel's theorem is the statement that Noetherian Lie algebras are Engelian: [src] lemma is_engelian_of_is_noetherian [is_noetherian R L] : lie_algebra.is_engelianR L :=

Passing to the image in End(M)
We now fix a Noetherian Lie algebra L together with a Lie module M on which it acts nilpotently.The first step in the proof is to note that we may replace L with its image: under the natural map: The relevant formal statement is [src]: The proof is essentially tautological but the observation is important and the lemma is a good example of Lean's typeclass mechanism working well.Without the user doing anything, Lean recognises that (to endomorphism R L M).range, i.e.L ′ , is a Lie algebra and that M is naturally a Lie module over L ′ .All of this is achieved by typeclass instances registered far away, with no direct connection to Engel's theorem.
The passage from L to L ′ is useful because of the following lemma [src]: (Note that an associative algebra A is naturally also a Lie algebra [src] which is why we may write lie subalgebra R A. See also [6] section 5.) The proof follows from the binomial theorem.Taking A = End(M ) the lemma states that L ′ acts nilpotently on itself.

The main argument
We introduce the set: written in Mathlib as [src]: Our goal is to show that s contains L ′ , regarded as a Lie subalgebra of itself.This is the top element ⊺ in the complete lattice of Lie subalgebras.Since s is non-empty (it contains the trivial Lie subalgebra) and L ′ is Noetherian, s contains a maximal element.We thus need only show that an element of s cannot be maximal when it is a proper subalgebra.In other words we must justify the following claim appearing in the Mathlib proof [src]: Thus let K be a proper Engelian Lie subalgebra and consider the Lie module L ′ K over K.Because L ′ acts nilpotently on itself, K ⊆ L ′ acts nilpotently on L ′ and thus also on L ′ K. Since K is Engelian, L ′ K is nilpotent and thus by (2) there exists x ∈ L ′ − K such that: Finally let: Using (3) and recalling that [x, x] = 0 we see that: To finish the argument we need only show that K ′ is Engelian.We thus fix a Lie module M ′ over K ′ on which K ′ acts nilpotently.We must show that M ′ is nilpotent.To do so, we apply the following lemma (whose proof is a simple induction) [src]: We see that if the lower central series of M ′ as a Lie module over K reaches zero, then its lower central central series over K ′ must also reach zero.Thus nilpotency over K (which follows since K is Engelian) ensures nilpotency over K ′ , as required.

The zero root space
As noted in [6] section 11, Mathlib contains definitions of and basic results about weight spaces and root spaces.Engel's theorem was added to Mathlib for the purpose of advancing this theory.It may be instructive to outline this application.
Given a nilpotent Lie subgalgebra H ⊆ L, a distinguished role is played by the zero root space.In Mathlib this is root space H (0 : H → R) [src]; informally it is: Any root space is a H-submodule of L but more is true for the zero root space; it is a Lie subalgebra [src]: def zero_root_subalgebra : lie_subalgebra R L := { lie_mem ′ := . .., .. (root_space H 0 : submodule R L) } One always has H ⊆ L 0 and it is easy to see that if H = L 0 then H is a Cartan subalgebra.When L is Noetherian, Engel's theorem shows that the converse holds: The literature appears only to contain proofs of this result when the coefficients are a field.Moreover the arguments in the literature cannot be used since they argue inductively using dimension -a concept that does not exist over general coefficients.
Fortunately with our version of Engel's theorem, the proof is almost trivial.
Here is the statement of (4) in Mathlib [src]: The point is that if L is Noetherian, then H acts nilpotently on L 0 and so by Engel's theorem, L 0 is nilpotent as a Lie module over H. Mathlib actually contains the following slightly more general result which holds for any Noetherian Lie module M [src]: Once we know that L 0 is nilpotent over H, the self-normalizing property of a Cartan subalgebra ensures that H cannot be a strict submodule and the result is immediate.

Conclusion
Having extolled the virtues of generality and unity, we should emphasise that in some sense they are two sides of the same coin.For example, the theory of root spaces discussed here depends on Mathlib's theory of eigenspaces.This same theory of eigenspaces is also used in Mathlib's library of functional analysis [3].This is only possible because the theory of eigenspaces was developed quite generally (before either application existed).We thus enjoy a synergy: any lemma added by one consumer of the eigenspace theory is automatically available to the other.Although we have stated the required finiteness condition for Engel's theorem as the requirement that L be Noetherian as an R module, the argument actually needs only the weaker condition that the lattice of Lie subalgebras of L possesses a maximality property 9 .
Our version of Engel's theorem seems not to exist in the literature.One notable close pass is an old paper of Zorn [10] where the result is proved for Lie rings (but not for their Lie modules).Another interesting paper is Jacobson [5].In place of our: A ⊆ U.
On the one hand Jacobson's result is more general since the class of Φ-subrings includes Lie subrings of associative rings as a special case.On the other hand it is less general since he obtains his result subject to the much more restrictive assumption that the lattice of ideals of the enclosing ring U possesses a minimality condition whereas we require only that the lattice of subalgebras of L ′ possesses a maximality condition.
Finally we should mention that there is an important setting where Engel-type results for Lie rings play a central role.See for example Zel'manov's breakthrough [9].
he proves Engel's theorem for what he calls a Φ-subring: