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

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAEcArF2%2Bh4FtFXGNXo7-aRPeiwzzRAGE%2BzSOsocvU545TFfpag%40mail.gmail.com.

Reply via email to