<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  alglie.xml                  GAP documentation             Willem de Graaf -->
<!-- %% -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Lie Algebras">
<Heading>Lie Algebras</Heading>

<#Include Label="[1]{alglie}">

<!-- %%  The algorithms for Lie algebras are due to Willem de Graaf. -->


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Lie Objects">
<Heading>Lie Objects</Heading>

<#Include Label="[1]{liefam}">
<#Include Label="LieObject">
<#Include Label="IsLieObject">
<#Include Label="LieFamily">
<#Include Label="UnderlyingFamily">
<#Include Label="UnderlyingRingElement">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Lie algebras">
<Heading>Constructing Lie algebras</Heading>

In this section we describe functions that create Lie algebras. Creating
and working with subalgebras goes exactly in the same way as for general
algebras; so for that we refer to Chapter <Ref Chap="Algebras"/>.

<#Include Label="LieAlgebraByStructureConstants">
<#Include Label="RestrictedLieAlgebraByStructureConstants">
<#Include Label="LieAlgebra">
<#Include Label="FreeLieAlgebra">
<#Include Label="FullMatrixLieAlgebra">
<#Include Label="RightDerivations">
<#Include Label="SimpleLieAlgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Distinguished Subalgebras">
<Heading>Distinguished Subalgebras</Heading>

Here we describe functions that calculate well-known subalgebras
and ideals of a Lie algebra (such as the centre, the centralizer of a
subalgebra, etc.).

<#Include Label="LieCentre">
<#Include Label="LieCentralizer">
<#Include Label="LieNormalizer">
<#Include Label="LieDerivedSubalgebra">
<#Include Label="LieNilRadical">
<#Include Label="LieSolvableRadical">
<#Include Label="CartanSubalgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Series of Ideals">
<Heading>Series of Ideals</Heading>

<#Include Label="LieDerivedSeries"> 
<#Include Label="LieLowerCentralSeries">
<#Include Label="LieUpperCentralSeries">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Properties of a Lie Algebra">
<Heading>Properties of a Lie Algebra</Heading>

<#Include Label="IsLieAbelian">
<#Include Label="IsLieNilpotent">
<#Include Label="IsLieSolvable">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Semisimple Lie Algebras and Root Systems">
<Heading>Semisimple Lie Algebras and Root Systems</Heading>

This section contains some functions for dealing with
semisimple Lie algebras and their root systems.

<#Include Label="SemiSimpleType">
<#Include Label="ChevalleyBasis">
<#Include Label="IsRootSystem">
<#Include Label="IsRootSystemFromLieAlgebra">
<#Include Label="RootSystem">
<#Include Label="UnderlyingLieAlgebra">
<#Include Label="PositiveRoots">
<#Include Label="NegativeRoots">
<#Include Label="PositiveRootVectors">
<#Include Label="NegativeRootVectors">
<#Include Label="SimpleSystem">
<#Include Label="CartanMatrix">
<#Include Label="BilinearFormMat">
<#Include Label="CanonicalGenerators">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Semisimple Lie Algebras and Weyl Groups of Root Systems">
<Heading>Semisimple Lie Algebras and Weyl Groups of Root Systems</Heading>

This section deals with the Weyl group of a root system. 
A Weyl group is represented by its action on the weight lattice. 
A <E>weight</E> is by definition a linear function
<M>\lambda: H \rightarrow F</M> (where <M>F</M> is the ground field), such 
that the values <M>\lambda(h_i)</M> are all integers (where the <M>h_i</M> 
are the Cartan elements of the <Ref Attr="CanonicalGenerators"/>). 
On the other hand each weight is determined by these values. 
Therefore we represent a weight by a vector of integers;
the <M>i</M>-th entry of this vector is the value <M>\lambda(h_i)</M>.
Now the elements of the Weyl group are represented by matrices, and
if <C>g</C> is an element of a Weyl group and <C>w</C> a weight, then 
<C>w*g</C> gives the result of applying <C>g</C> to <C>w</C>.  
Another way of applying the <M>i</M>-th simple reflection to a weight is 
by using the function <Ref Oper="ApplySimpleReflection"/>.
<P/>
A Weyl group is generated by the simple reflections. 
So <Ref Attr="GeneratorsOfGroup"/> for a Weyl group <C>W</C>  gives a list 
of matrices and the <M>i</M>-th entry of this list is the simple reflection 
corresponding to the <M>i</M>-th simple root of the corresponding root system.

<#Include Label="IsWeylGroup">
<#Include Label="SparseCartanMatrix">
<#Include Label="WeylGroup">
<#Include Label="ApplySimpleReflection">
<#Include Label="LongestWeylWordPerm">
<#Include Label="ConjugateDominantWeight">
<#Include Label="WeylOrbitIterator">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Restricted Lie algebras">
<Heading>Restricted Lie algebras</Heading>

A Lie algebra <M>L</M> over a field of characteristic <M>p>0</M> is called
restricted if there is a map <M>x \mapsto x^p</M> from <M>L</M> into <M>L</M> 
(called a <M>p</M>-map) such that
ad <M>x^p = (</M>ad<M> x)^p</M>,
<M>(\alpha x)^p = \alpha^p x^p</M> and
<M>(x+y)^p = x^p + y^p + \sum_{{i=1}}^{{p-1}} s_i(x,y)</M>,
where <M>s_i: L \times L \rightarrow L</M> 
are certain Lie polynomials in two variables.
Using these relations we can calculate <M>y^p</M> for all <M>y \in L</M>,
once we know <M>x^p</M> for <M>x</M> in a basis of <M>L</M>.
Therefore a <M>p</M>-map is represented in &GAP;&nbsp; by a list 
containing the images of the basis vectors of a basis <M>B</M> of <M>L</M>.
For this reason this list is an attribute of the basis <M>B</M>. 
<P/>
<#Include Label="IsRestrictedLieAlgebra">
<#Include Label="PthPowerImages">
<#Include Label="PthPowerImage">
<#Include Label="JenningsLieAlgebra">
<#Include Label="PCentralLieAlgebra">
<#Include Label="NaturalHomomorphismOfLieAlgebraFromNilpotentGroup">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="The Adjoint Representation">
<Heading>The Adjoint Representation</Heading>

In this section we show functions for calculating with the adjoint
representation of a Lie algebra (and the corresponding trace form,
called the Killing form) (see also <Ref Attr="AdjointBasis"/> and 
<Ref Attr="IndicesOfAdjointBasis"/>).
<P/>
<#Include Label="AdjointMatrix">
<#Include Label="AdjointAssociativeAlgebra">
<#Include Label="KillingMatrix">
<#Include Label="KappaPerp">
<#Include Label="IsNilpotentElement">
<#Include Label="NonNilpotentElement">
<#Include Label="FindSl2">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Universal Enveloping Algebras">
<Heading>Universal Enveloping Algebras</Heading>

<#Include Label="UniversalEnvelopingAlgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Finitely Presented Lie Algebras">
<Heading>Finitely Presented Lie Algebras</Heading>

Finitely presented Lie algebras can be constructed from free Lie algebras by 
using the <C>/</C> constructor, i.e., <C>FL/[r1, ..., rk]</C> is the quotient 
of the free Lie algebra <C>FL</C> by the ideal generated by the elements
<C>r1, ..., rk</C> of <C>FL</C>. If the finitely presented Lie algebra 
<C>K</C> happens to be finite dimensional then an isomorphic structure 
constants Lie algebra can be constructed by <C>NiceAlgebraMonomorphism(K)</C>
(see&nbsp;<Ref Attr="NiceAlgebraMonomorphism"/>), which returns a surjective
homomorphism. The structure constants Lie algebra can then be accessed by 
calling <Ref Attr="Range" Label="of a general mapping"/> for this map. 
Also limited computations with elements of the finitely presented Lie 
algebra are possible.
<P/>
<Example><![CDATA[
gap> L:= FreeLieAlgebra( Rationals, "s", "t" );
<Lie algebra over Rationals, with 2 generators>
gap> gL:= GeneratorsOfAlgebra( L );; s:= gL[1];; t:= gL[2];;
gap> K:= L/[ s*(s*t), t*(t*(s*t)), s*(t*(s*t))-t*(s*t) ];
<Lie algebra over Rationals, with 2 generators>
gap> h:= NiceAlgebraMonomorphism( K );
[ [(1)*s], [(1)*t] ] -> [ v.1, v.2 ]
gap> U:= Range( h );
<Lie algebra of dimension 3 over Rationals>
gap> IsLieNilpotent( U );
true
gap> gK:= GeneratorsOfAlgebra( K );
[ [(1)*s], [(1)*t] ]
gap> gK[1]*(gK[2]*gK[1]) = Zero( K );
true
]]></Example>
<P/>
<#Include Label="FpLieAlgebraByCartanMatrix">
<#Include Label="NilpotentQuotientOfFpLieAlgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Modules over Lie Algebras and Their Cohomology">
<Heading>Modules over Lie Algebras and Their Cohomology</Heading>

Representations of Lie algebras are dealt with in the same way as 
representations of ordinary algebras
(see <Ref Sect="Representations of Algebras"/>).
In this section we mainly deal with modules over general Lie algebras
and their cohomology. The next section is devoted to modules over
semisimple Lie algebras.

<#Include Label="[1]{lierep}">
<#Include Label="IsCochain">
<#Include Label="Cochain">
<#Include Label="CochainSpace">
<#Include Label="ValueCochain">
<#Include Label="LieCoboundaryOperator">
<#Include Label="Cocycles">
<#Include Label="Coboundaries">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Modules over Semisimple Lie Algebras">
<Heading>Modules over Semisimple Lie Algebras</Heading>

This section contains functions for calculating information on
representations of semisimple Lie algebras. First we have some functions
for calculating some combinatorial data (set of dominant weights, 
the dominant character, the decomposition of a tensor product, the dimension
of a highest-weight module). Then 
there is a function for creating an admissible lattice in the universal
enveloping algebra of a semisimple Lie algebra. Finally we have a function
for constructing a highest-weight module over a semisimple Lie algebra.
<P/>
<#Include Label="DominantWeights">
<#Include Label="DominantCharacter">
<#Include Label="DecomposeTensorProduct">
<#Include Label="DimensionOfHighestWeightModule">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Admissible Lattices in UEA">
<Heading>Admissible Lattices in UEA</Heading>

<#Include Label="[2]{lierep}">
<#Include Label="IsUEALatticeElement">
<#Include Label="LatticeGeneratorsInUEA">

<ManSection>
<Meth Name="ObjByExtRep" Arg="F, descr"
 Label="for creating a UEALattice element"/>

<Description>
An UEALattice element is represented by a list of the form
<C>[ m1, c1, m2, c2, ... ]</C>, where the <C>c1</C>, <C>c2</C> etc. are 
coefficients, and the <C>m1</C>, <C>m2</C> etc. are monomials. A monomial 
is a list of the form <C>[ ind1, e1, ind2, e2, ... ]</C> where <C>ind1</C>, 
<C>ind2</C> are indices, and <C>e1</C>, <C>e2</C> etc. are exponents. Let
<M>N</M> be the number of positive roots of the underlying Lie algebra 
<C>L</C>. The indices lie between 1 and <M>dim(L)</M>. If an index lies 
between 1 and <C>N</C>, then it represents a negative root vector 
(corresponding to the root <C>NegativeRoots( R )[ind]</C>, where <C>R</C> 
is the root system of <C>L</C>; see&nbsp;<Ref Attr="NegativeRoots"/>). This 
leads to a factor <C>yind1^(e1)</C> in the printed form of the monomial 
(which equals <C>z^e1/e1!</C>, where <C>z</C> is a basis element of <C>L</C>). 
If an index lies between <M>N+1</M> and <M>2N</M>, then it represents a 
positive root vector. Finally, if ind lies between <M>2N+1</M> and 
<M>2N+rank</M>, then it represents an element of the Cartan subalgebra.
This is printed as <M>( h_1/ e_1 )</M>, meaning <M>{h_1 \choose e_1}</M>,
where <M>h_1, \ldots, h_{rank}</M> are the canonical Cartan generators.
<P/>
The zero element is represented by the empty list, the identity
element by the list <C>[ [], 1 ]</C>.
<P/>
<Example><![CDATA[
gap> L:= SimpleLieAlgebra( "G", 2, Rationals );;
gap> g:=LatticeGeneratorsInUEA( L );
[ y1, y2, y3, y4, y5, y6, x1, x2, x3, x4, x5, x6, ( h13/1 ), 
  ( h14/1 ) ]
gap> IsUEALatticeElement( g[1] );
true
gap> g[1]^3;
6*y1^(3)
gap> q:= g[7]*g[1]^2;
-2*y1+2*y1*( h13/1 )+2*y1^(2)*x1
gap> ExtRepOfObj( q );
[ [ 1, 1 ], -2, [ 1, 1, 13, 1 ], 2, [ 1, 2, 7, 1 ], 2 ]
]]></Example>
</Description>
</ManSection>

<#Include Label="IsWeightRepElement">
<#Include Label="HighestWeightModule">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Tensor Products and Exterior and Symmetric Powers">
<Heading>Tensor Products and Exterior and Symmetric Powers</Heading>

<#Include Label="TensorProductOfAlgebraModules">
<#Include Label="ExteriorPowerOfAlgebraModule">
<#Include Label="SymmetricPowerOfAlgebraModule">

</Section>
</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->

