Lie algebra morphism, mutable matrices, basis not defined

28 views
Skip to first unread message

Samuel Lelièvre

unread,
Jan 3, 2020, 10:16:24 AM1/3/20
to Sage-support
Dear sage-support,

At Sage Days 106 we are trying to learn some of the
Lie algebra functionality in SageMath and have two
small questions regarding Lie algebra morphisms.

We define the Lie algebra sl_2(QQ) in two ways as follows:

sage: sl2 = lie_algebras.sl(QQ, 2, representation='matrix')
sage: sl2.inject_variables()
Defining e1, f1, h1
sage: sl2bis = LieAlgebra(QQ, {('e', 'h'): {'e': -2}, ('f', 'h'):
{'f': 2}, ('e', 'f'): {'h': 1}}, names='e, f, h')
sage: sl2bis.inject_variables()
Defining e, f, h

Trying to define a Lie algebra morphism between the two
fails with this error:

sage: sl2.morphism({e1: e, f1: f, h1: h})
Traceback (most recent call last)
...
TypeError: mutable matrices are unhashable

and I was wondering why the basis is not made
of immutable matrices.

Trying to define the morphism the other way around,
fails with this error:

sage: sl2bis.morphism({e: e1, f: f1, h: h1})
Traceback (most recent call last)
...
NotImplementedError: the basis is not defined

and I was wondering what is the problem here.

Kind regards,
Samuel Lelièvre

Travis Scrimshaw

unread,
Jan 6, 2020, 1:38:19 PM1/6/20
to sage-support
Hi Samuel,
   Both issues are tied to the matrix Lie algebra implementation:

sage: e1.monomial_coefficients()

NotImplementedError: the basis is not defined

For the immuability issue: probably what should be done is for the matrix Lie algebras, all elements should be made immutable. This is an easy enough fix with the class hierarchy I believe. I will create a ticket for this and cc you.

For the other issue: for Lie algebras that are defined from associative algebras, in general I cannot construct a basis for a generic Lie algebra in finite time (even to check if it is finite-dimensional, which is probably equivalent). So the safe thing to do was to just not do anything that required an explicit basis unless we knew it was the entire associative algebra. Now for the matrix Lie algebras (well, any Lie algebra constructed from a finite-dimensional associative algebra), we definitely can do better because we know it is finite-dimensional.

Now why it needs to get the elements expressed in the basis is because the morphism() does not require you to specify the image on the entire basis. It also might be too specialized right now with assuming the target is also a LieAlgebraWithStructureCoefficients.

Best,
Travis
Reply all
Reply to author
Forward
0 new messages