Homomorphisms of Lie Algebras#

AUTHORS:

  • Travis Scrimshaw (07-15-2013): Initial implementation

  • Eero Hakavuori (08-09-2018): Morphisms defined by a generating subset

class sage.algebras.lie_algebras.morphism.LieAlgebraHomomorphism_im_gens(parent, im_gens, base_map=None, check=True)[source]#

Bases: Morphism

A homomorphism of Lie algebras.

Let \(\mathfrak{g}\) and \(\mathfrak{g}^{\prime}\) be Lie algebras. A linear map \(f \colon \mathfrak{g} \to \mathfrak{g}^{\prime}\) is a homomorphism (of Lie algebras) if \(f([x, y]) = [f(x), f(y)]\) for all \(x, y \in \mathfrak{g}\). Thus homomorphisms are completely determined by the image of the generators of \(\mathfrak{g}\).

INPUT:

  • parent – a homset between two Lie algebras

  • im_gens – the image of the generators of the domain

  • base_map – a homomorphism to apply to the coefficients. It should be a map from the base ring of the domain to the base ring of the codomain. Note that if base_map is nontrivial then the result will not be a morphism in the category of Lie algebras over the base ring.

  • check – whether to run checks on the validity of the defining data

EXAMPLES:

sage: L = LieAlgebra(QQ, 'x,y,z')
sage: Lyn = L.Lyndon()
sage: H = L.Hall()
doctest:warning...:
FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known
See https://github.com/sagemath/sage/issues/16823 for details.
sage: phi = Lyn.coerce_map_from(H); phi
Lie algebra morphism:
  From: Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis
  To:   Free Lie algebra generated by (x, y, z) over Rational Field in the Lyndon basis
  Defn: x |--> x
        y |--> y
        z |--> z
>>> from sage.all import *
>>> L = LieAlgebra(QQ, 'x,y,z')
>>> Lyn = L.Lyndon()
>>> H = L.Hall()
doctest:warning...:
FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known
See https://github.com/sagemath/sage/issues/16823 for details.
>>> phi = Lyn.coerce_map_from(H); phi
Lie algebra morphism:
  From: Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis
  To:   Free Lie algebra generated by (x, y, z) over Rational Field in the Lyndon basis
  Defn: x |--> x
        y |--> y
        z |--> z

You can provide a base map, creating a semilinear map that (sometimes) preserves the Lie bracket:

sage: R.<x> = ZZ[]
sage: K.<i> = NumberField(x^2 + 1)
sage: cc = K.hom([-i])
sage: L.<X,Y,Z,W> = LieAlgebra(K, {('X','Y'): {'Z':1}, ('X','Z'): {'W':1}})
sage: M.<A,B,C,D> = LieAlgebra(K, {('A','B'): {'C':1}, ('A','C'): {'D':1}})
sage: phi = L.morphism({X:A, Y:B, Z:C, W:D}, base_map=cc)
sage: phi(X)
A
sage: phi(i*X)
-i*A
sage: all(phi(x.bracket(y)) == phi(x).bracket(phi(y)) for x,y in cartesian_product_iterator([[X,Y,Z,W],[X,Y,Z,W]]))
True
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> K = NumberField(x**Integer(2) + Integer(1), names=('i',)); (i,) = K._first_ngens(1)
>>> cc = K.hom([-i])
>>> L = LieAlgebra(K, {('X','Y'): {'Z':Integer(1)}, ('X','Z'): {'W':Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4)
>>> M = LieAlgebra(K, {('A','B'): {'C':Integer(1)}, ('A','C'): {'D':Integer(1)}}, names=('A', 'B', 'C', 'D',)); (A, B, C, D,) = M._first_ngens(4)
>>> phi = L.morphism({X:A, Y:B, Z:C, W:D}, base_map=cc)
>>> phi(X)
A
>>> phi(i*X)
-i*A
>>> all(phi(x.bracket(y)) == phi(x).bracket(phi(y)) for x,y in cartesian_product_iterator([[X,Y,Z,W],[X,Y,Z,W]]))
True

Note that the Lie bracket should still be preserved, even though the map is no longer linear over the base ring:

sage: L.<X,Y,Z,W> = LieAlgebra(K, {('X','Y'): {'Z':i}, ('X','Z'): {'W':1}})
sage: M.<A,B,C,D> = LieAlgebra(K, {('A','B'): {'C':-i}, ('A','C'): {'D':1}})
sage: phi = L.morphism({X:A, Y:B, Z:C, W:D}, base_map=cc)
sage: phi(X.bracket(Y))
-i*C
sage: phi(X).bracket(phi(Y))
-i*C
>>> from sage.all import *
>>> L = LieAlgebra(K, {('X','Y'): {'Z':i}, ('X','Z'): {'W':Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4)
>>> M = LieAlgebra(K, {('A','B'): {'C':-i}, ('A','C'): {'D':Integer(1)}}, names=('A', 'B', 'C', 'D',)); (A, B, C, D,) = M._first_ngens(4)
>>> phi = L.morphism({X:A, Y:B, Z:C, W:D}, base_map=cc)
>>> phi(X.bracket(Y))
-i*C
>>> phi(X).bracket(phi(Y))
-i*C
base_map()[source]#

Return the map on the base ring that is part of the defining data for this morphism. May return None if a coercion is used.

EXAMPLES:

sage: R.<x> = ZZ[]
sage: K.<i> = NumberField(x^2 + 1)
sage: cc = K.hom([-i])
sage: L.<X,Y,Z,W> = LieAlgebra(K, {('X','Y'): {'Z':1}, ('X','Z'): {'W':1}})
sage: M.<A,B> = LieAlgebra(K, abelian=True)
sage: phi = L.morphism({X: A, Y: B}, base_map=cc)
sage: phi(X)
A
sage: phi(i*X)
-i*A
sage: phi.base_map()
Ring endomorphism of Number Field in i with defining polynomial x^2 + 1
  Defn: i |--> -i
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> K = NumberField(x**Integer(2) + Integer(1), names=('i',)); (i,) = K._first_ngens(1)
>>> cc = K.hom([-i])
>>> L = LieAlgebra(K, {('X','Y'): {'Z':Integer(1)}, ('X','Z'): {'W':Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4)
>>> M = LieAlgebra(K, abelian=True, names=('A', 'B',)); (A, B,) = M._first_ngens(2)
>>> phi = L.morphism({X: A, Y: B}, base_map=cc)
>>> phi(X)
A
>>> phi(i*X)
-i*A
>>> phi.base_map()
Ring endomorphism of Number Field in i with defining polynomial x^2 + 1
  Defn: i |--> -i
im_gens()[source]#

Return the images of the generators of the domain.

OUTPUT:

  • list – a copy of the list of gens (it is safe to change this)

EXAMPLES:

sage: L = LieAlgebra(QQ, 'x,y,z')
sage: Lyn = L.Lyndon()
sage: H = L.Hall()
sage: f = Lyn.coerce_map_from(H)
sage: f.im_gens()
[x, y, z]
>>> from sage.all import *
>>> L = LieAlgebra(QQ, 'x,y,z')
>>> Lyn = L.Lyndon()
>>> H = L.Hall()
>>> f = Lyn.coerce_map_from(H)
>>> f.im_gens()
[x, y, z]
class sage.algebras.lie_algebras.morphism.LieAlgebraHomset(X, Y, category=None, base=None, check=True)[source]#

Bases: Homset

Homset between two Lie algebras.

Todo

This is a very minimal implementation which does not have coercions of the morphisms.

zero()[source]#

Return the zero morphism.

EXAMPLES:

sage: L = LieAlgebra(QQ, 'x,y,z')
sage: Lyn = L.Lyndon()
sage: H = L.Hall()
sage: HS = Hom(Lyn, H)
sage: HS.zero()
Generic morphism:
  From: Free Lie algebra generated by (x, y, z) over Rational Field in the Lyndon basis
  To:   Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis
>>> from sage.all import *
>>> L = LieAlgebra(QQ, 'x,y,z')
>>> Lyn = L.Lyndon()
>>> H = L.Hall()
>>> HS = Hom(Lyn, H)
>>> HS.zero()
Generic morphism:
  From: Free Lie algebra generated by (x, y, z) over Rational Field in the Lyndon basis
  To:   Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis
class sage.algebras.lie_algebras.morphism.LieAlgebraMorphism_from_generators(on_generators, domain=None, codomain=None, check=True, base_map=None, category=None)[source]#

Bases: LieAlgebraHomomorphism_im_gens

A morphism between two Lie algebras defined by images of a generating set as a Lie algebra.

This is the Lie algebra morphism \(\phi \colon L \to K\) defined on the chosen basis of \(L\) to that of \(K\) be using the image of some generating set (as a Lie algebra) of \(L\).

INPUT:

  • on_generators – dictionary {X: Y} of the images \(Y\) in codomain of elements \(X\) of domain

  • codomain – a Lie algebra (optional); this is inferred from the values of on_generators if not given

  • base_map – a homomorphism to apply to the coefficients. It should be a map from the base ring of the domain to the base ring of the codomain. Note that if base_map is nontrivial then the result will not be a morphism in the category of Lie algebras over the base ring.

  • check – (default: True) boolean; if False the values on the Lie brackets implied by on_generators will not be checked for contradictory values

EXAMPLES:

A reflection of one horizontal vector in the Heisenberg algebra:

sage: L.<X,Y,Z> = LieAlgebra(QQ, {('X','Y'): {'Z':1}})
sage: phi = L.morphism({X:-X, Y:Y}); phi
Lie algebra endomorphism of Lie algebra on 3 generators (X, Y, Z) over Rational Field
  Defn: X |--> -X
        Y |--> Y
        Z |--> -Z
>>> from sage.all import *
>>> L = LieAlgebra(QQ, {('X','Y'): {'Z':Integer(1)}}, names=('X', 'Y', 'Z',)); (X, Y, Z,) = L._first_ngens(3)
>>> phi = L.morphism({X:-X, Y:Y}); phi
Lie algebra endomorphism of Lie algebra on 3 generators (X, Y, Z) over Rational Field
  Defn: X |--> -X
        Y |--> Y
        Z |--> -Z

There is no Lie algebra morphism that reflects one horizontal vector, but not the vertical one:

sage: L.morphism({X:-X, Y:Y, Z:Z})
Traceback (most recent call last):
...
ValueError: this does not define a Lie algebra morphism;
 contradictory values for brackets of length 2
>>> from sage.all import *
>>> L.morphism({X:-X, Y:Y, Z:Z})
Traceback (most recent call last):
...
ValueError: this does not define a Lie algebra morphism;
 contradictory values for brackets of length 2

Checking for mistakes can be disabled, which can produce invalid results:

sage: phi = L.morphism({X:-X, Y:Y, Z:Z}, check=False); phi
Lie algebra endomorphism of Lie algebra on 3 generators (X, Y, Z) over Rational Field
  Defn: X |--> -X
        Y |--> Y
        Z |--> Z
sage: L[phi(X), phi(Y)] == phi(L[X,Y])
False
>>> from sage.all import *
>>> phi = L.morphism({X:-X, Y:Y, Z:Z}, check=False); phi
Lie algebra endomorphism of Lie algebra on 3 generators (X, Y, Z) over Rational Field
  Defn: X |--> -X
        Y |--> Y
        Z |--> Z
>>> L[phi(X), phi(Y)] == phi(L[X,Y])
False

The set of keys must generate the Lie algebra:

sage: L.morphism({X: X})
Traceback (most recent call last):
...
ValueError: [X] is not a generating set of Lie algebra on 3 generators
(X, Y, Z) over Rational Field
>>> from sage.all import *
>>> L.morphism({X: X})
Traceback (most recent call last):
...
ValueError: [X] is not a generating set of Lie algebra on 3 generators
(X, Y, Z) over Rational Field

Over non-fields, generating subsets are more restricted:

sage: L.<X,Y,Z> = LieAlgebra(ZZ, {('X','Y'): {'Z':2}})
sage: L.morphism({X: X, Y: Y})
Traceback (most recent call last):
...
ValueError: [X, Y] is not a generating set of Lie algebra on 3
generators (X, Y, Z) over Integer Ring
>>> from sage.all import *
>>> L = LieAlgebra(ZZ, {('X','Y'): {'Z':Integer(2)}}, names=('X', 'Y', 'Z',)); (X, Y, Z,) = L._first_ngens(3)
>>> L.morphism({X: X, Y: Y})
Traceback (most recent call last):
...
ValueError: [X, Y] is not a generating set of Lie algebra on 3
generators (X, Y, Z) over Integer Ring

The generators do not have to correspond to the defined generating set of the domain:

sage: L.<X,Y,Z,W> = LieAlgebra(QQ, {('X','Y'): {'Z':1}, ('X','Z'): {'W':1}})
sage: K.<A,B,C> = LieAlgebra(QQ, {('A','B'): {'C':2}})
sage: phi = L.morphism({X+2*Y: A, X-Y: B}); phi
Lie algebra morphism:
  From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
  To:   Lie algebra on 3 generators (A, B, C) over Rational Field
  Defn: X |--> 1/3*A + 2/3*B
        Y |--> 1/3*A - 1/3*B
        Z |--> -2/3*C
        W |--> 0
sage: phi(X+2*Y)
A
sage: phi(X)
1/3*A + 2/3*B
sage: phi(W)
0
sage: phi(Z)
-2/3*C
sage: all(K[phi(p), phi(q)] == phi(L[p,q])
....:     for p in L.basis() for q in L.basis())
True
>>> from sage.all import *
>>> L = LieAlgebra(QQ, {('X','Y'): {'Z':Integer(1)}, ('X','Z'): {'W':Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4)
>>> K = LieAlgebra(QQ, {('A','B'): {'C':Integer(2)}}, names=('A', 'B', 'C',)); (A, B, C,) = K._first_ngens(3)
>>> phi = L.morphism({X+Integer(2)*Y: A, X-Y: B}); phi
Lie algebra morphism:
  From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
  To:   Lie algebra on 3 generators (A, B, C) over Rational Field
  Defn: X |--> 1/3*A + 2/3*B
        Y |--> 1/3*A - 1/3*B
        Z |--> -2/3*C
        W |--> 0
>>> phi(X+Integer(2)*Y)
A
>>> phi(X)
1/3*A + 2/3*B
>>> phi(W)
0
>>> phi(Z)
-2/3*C
>>> all(K[phi(p), phi(q)] == phi(L[p,q])
...     for p in L.basis() for q in L.basis())
True

A quotient type Lie algebra morphism:

sage: K.<A,B> = LieAlgebra(SR, abelian=True)                                    # needs sage.symbolic
sage: L.morphism({X: A, Y: B})                                                  # needs sage.symbolic
Lie algebra morphism:
  From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
  To:   Abelian Lie algebra on 2 generators (A, B) over Symbolic Ring
  Defn: X |--> A
        Y |--> B
        Z |--> 0
        W |--> 0
>>> from sage.all import *
>>> K = LieAlgebra(SR, abelian=True, names=('A', 'B',)); (A, B,) = K._first_ngens(2)# needs sage.symbolic
>>> L.morphism({X: A, Y: B})                                                  # needs sage.symbolic
Lie algebra morphism:
  From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
  To:   Abelian Lie algebra on 2 generators (A, B) over Symbolic Ring
  Defn: X |--> A
        Y |--> B
        Z |--> 0
        W |--> 0