> < ^ Date: Thu, 25 Nov 1999 09:52:45 +0100 (MET)
> < ^ From: Jan Draisma <Jan.Draisma@unibas.ch >
> < ^ Subject: Re: Semidirectproduct

Dear gap forum,

First of all: thanks for the Semidirect product source!

Yesterday evening I tried to make a Semidirect product function for Lie
algebras myself, which takes as argument L and I, and hom, a
homomorphism from L into Derivations(B), where B is a basis of I
(roughly by taking the code for the direct sum, and adding some extra
structure constants). When I wanted to test this, I noticed that
derivations in GAP are implemented as matrices acting from the
_right_. This seems somewhat unnatural to me, as adjoint matrices,
typical examples of derivations on a Lie algebra, act from the _left_.
So, I had to transpose, add minuses, etc. I see that Willem avoids
this confusion by not using Derivations(B) at all. Probably, there are
other applications, that I'm not aware of, for which the given
representation is better suited. Can anyone explain this to me?

Dear Jan,

You asked about semidirect products of Lie algebras in GAP.
At the moment a function for constructing those does not exist.
However, below is some code for this. If you encounter difficulties
with it, then please ask.

Best wishes,


sem_dir_prod:= function( L, hom, rad )

# here `hom' is a homomorphsim from `L' into `Der( rad )'.
# We assume that `hom( x )' is a matrix
# and that the columns of `hom( x )' contain the coefficients of
# the images of the basis vectors of `rad'.
# The function returns the semidirect product of `L' and `rad',
# where the action of `L' on `rad' is given by `hom'.

local   d,  n,  T,  B,  i,  j,  cf,  c,  k,  td, dlist, S;    

dlist:= List( Basis(L), x -> Image( hom, x ) );
d:= Length( dlist );
n:= Length( dlist ) + Dimension( rad );
F:= LeftActingDomain( L );
T:= EmptySCTable( n, Zero(F), "antisymmetric" );
S:= StructureConstantsTable( Basis( L ) );
B:= Basis( VectorSpace( Rationals, dlist ), dlist );

for i in [1..d] do
    for j in [1..d] do
       T[i][j]:= S[i][j];            

td:= List( dlist, TransposedMat );
for i in [1..d] do
    for j in [1..Dimension( rad ) ] do
        cf:= td[i][j];
        for k in [1..Length(cf)] do
            if cf[k] <> 0 then
                Add( c, cf[k] ); Add( c, k+d );
        SetEntrySCTable( T, i, j+d, c );

B:= Basis( rad );
for i in [1..Dimension(rad)] do
    for j in [i+1..Dimension(rad)] do
        cf:= Coefficients( B, B[i]*B[j] );
        for k in [1..Length(cf)] do
            if cf[k] <> 0 then
                Add( c, cf[k] ); Add( c, k+d );
        SetEntrySCTable( T, i+d, j+d, c );

return LieAlgebraByStructureConstants( F, T );

> < [top]