  
  [1X3 [33X[0;0YQuaGroup[133X[101X
  
  [33X[0;0YIn this chapter we describe the functionality provided by [5XQuaGroup[105X.[133X
  
  
  [1X3.1 [33X[0;0YGlobal constants[133X[101X
  
  [1X3.1-1 QuantumField[101X
  
  [29X[2XQuantumField[102X[32X global variable
  
  [33X[0;0YThis is the field [22XQ(q)[122X of rational functions in [22Xq[122X, over [22XQ[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XQuantumField;[127X[104X
    [4X[28XQuantumField[128X[104X
  [4X[32X[104X
  
  [1X3.1-2 _q[101X
  
  [29X[2X_q[102X[32X global variable
  
  [33X[0;0YThis is an indeterminate; [3XQuantumField[103X is the field of rational functions in
  this  indeterminate. The identifier [3X_q[103X is fixed once the package [5XQuaGroup[105X is
  loaded.  The  symbol [3X_q[103X is chosen (instead of [3Xq[103X) in order to avoid potential
  name clashes. We note that [3X_q[103X is printed as [3Xq[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27X_q;[127X[104X
    [4X[28Xq[128X[104X
    [4X[25Xgap>[125X [27X_q in QuantumField;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X3.2 [33X[0;0YGaussian integers[133X[101X
  
  [1X3.2-1 GaussNumber[101X
  
  [29X[2XGaussNumber[102X( [3Xn[103X, [3Xpar[103X ) [32X operation
  
  [33X[0;0YThis function computes for the integer [3Xn[103X the Gaussian integer [22X[n]_v=[3Xpar[103X[122X (cf.
  Section [14X2.1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XGaussNumber( 4, _q );[127X[104X
    [4X[28Xq^-3+q^-1+q+q^3[128X[104X
  [4X[32X[104X
  
  [1X3.2-2 GaussianFactorial[101X
  
  [29X[2XGaussianFactorial[102X( [3Xn[103X, [3Xpar[103X ) [32X operation
  
  [33X[0;0YThis function computes for the integer [3Xn[103X the Gaussian factorial [22X[n]!_v=[3Xpar[103X[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XGaussianFactorial( 3, _q );[127X[104X
    [4X[28Xq^-3+2*q^-1+2*q+q^3[128X[104X
    [4X[25Xgap>[125X [27XGaussianFactorial( 3, _q^2 );[127X[104X
    [4X[28Xq^-6+2*q^-2+2*q^2+q^6[128X[104X
  [4X[32X[104X
  
  [1X3.2-3 GaussianBinomial[101X
  
  [29X[2XGaussianBinomial[102X( [3Xn[103X, [3Xk[103X, [3Xpar[103X ) [32X operation
  
  [33X[0;0YThis  function  computes  for  two  integers [3Xn[103X and [3Xk[103X the Gaussian binomial [3Xn[103X
  choose [3Xk[103X, where the parameter [22Xv[122X is replaced by [3Xpar[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XGaussianBinomial( 5, 2, _q^2 );[127X[104X
    [4X[28Xq^-12+q^-8+2*q^-4+2+2*q^4+q^8+q^12[128X[104X
  [4X[32X[104X
  
  
  [1X3.3 [33X[0;0YRoots and root systems[133X[101X
  
  [33X[0;0YIn  this  section  we describe some functions for dealing with root systems.
  These functions supplement the ones already present in the [5XGAP[105X library.[133X
  
  [1X3.3-1 RootSystem[101X
  
  [29X[2XRootSystem[102X( [3Xtype[103X, [3Xrank[103X ) [32X operation
  [29X[2XRootSystem[102X( [3Xlist[103X ) [32X operation
  
  [33X[0;0YHere  [3Xtype[103X  is  a capital letter between [3X"A"[103X and [3X"G"[103X, and [3Xrank[103X is a positive
  integer  ([22X≥  1[122X  if [3Xtype="A"[103X, [22X≥ 2[122X if [3Xtype="B"[103X, [3X"C"[103X, [22X≥ 4[122X if [3Xtype="D"[103X, [22X6,7,8[122X if
  [3Xtype="E"[103X,  [22X4[122X if [3Xtype="F"[103X, and [22X2[122X if [3Xtype="G"[103X). This function returns the root
  system  of  type  [3Xtype[103X  and  rank [3Xrank[103X. In the second form [3Xlist[103X is a list of
  types and ranks, e.g., [3X[ "B", 2, "F", 4, "D", 7 ][103X.[133X
  
  [33X[0;0YThe  root  system  constructed  by  this  function  comes with he attributes
  [3XPositiveRoots[103X,  [3XNegativeRoots[103X,  [3XSimpleSystem[103X, [3XCartanMatrix[103X, [3XBilinearFormMat[103X.
  Here  the  attribute [3XSimpleSystem[103X contains a set of simple roots, written as
  unit  vectors.  [3XPositiveRoots[103X  is  a  list of the positive roots, written as
  linear  combinations  of  the  simple roots, and likewise for [3XNegativeRoots[103X.
  [3XCartanMatrix( R )[103X is the Cartan matrix of the root system [3XR[103X, where the entry
  on  position [22X( i, j )[122X is given by [22X⟨ α_i, α_j^∨⟩[122X where [22Xα_i[122X is the [22Xi[122X-th simple
  root.  [3XBilinearFormMat(  R  )[103X  is the matrix of the bilinear form, where the
  entry on position [22X( i, j )[122X is given by [22X( α_i, α_j )[122X (see Section [14X2.2[114X).[133X
  
  [33X[0;0Y[3XWeylGroup(  R )[103X returns the Weyl group of the root system [3XR[103X. We refer to the
  [5XGAP[105X reference manual for an overview of the functions for Weyl groups in the
  [5XGAP[105X  library.  We  mention  the  functions  [3XConjugateDominantWeight( W, wt )[103X
  (returns  the  dominant  weight  in  the  [3XW[103X-orbit  of  the  weight  [3Xwt[103X), and
  [3XWeylOrbitIterator(  W,  wt )[103X (returns an iterator for the [3XW[103X-orbit containing
  the  weight  [3Xwt[103X).  We  write  weights  as  integral  linear  combinations of
  fundamental  weights, so in [5XGAP[105X weights are represented by lists of integers
  (of length equal to the rank of the root system).[133X
  
  [33X[0;0YAlso  we  mention  the function [3XPositiveRootsAsWeights( R )[103X that returns the
  positive  roots of [3XR[103X written as weights, i.e., as linear combinations of the
  fundamental weights.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:=RootSystem( [ "B", 2, "F", 4, "E", 6 ] );[127X[104X
    [4X[28X<root system of type B2 F4 E6>[128X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 2 );[127X[104X
    [4X[28X<root system of type A2>[128X[104X
    [4X[25Xgap>[125X [27XPositiveRoots( R );[127X[104X
    [4X[28X[ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XBilinearFormMat( R );[127X[104X
    [4X[28X[ [ 2, -1 ], [ -1, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XW:= WeylGroup( R );[127X[104X
    [4X[28XGroup([ [ [ -1, 1 ], [ 0, 1 ] ], [ [ 1, 0 ], [ 1, -1 ] ] ])[128X[104X
    [4X[25Xgap>[125X [27XConjugateDominantWeight( W, [-3,2] );[127X[104X
    [4X[28X[ 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xo:= WeylOrbitIterator( W, [-3,2] );[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[28X# Using the iterator we can loop over the orbit:[128X[104X
    [4X[25Xgap>[125X [27XNextIterator( o );[127X[104X
    [4X[28X[ 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27XNextIterator( o );[127X[104X
    [4X[28X[ -1, -2 ][128X[104X
    [4X[25Xgap>[125X [27XPositiveRootsAsWeights( R );[127X[104X
    [4X[28X[ [ 2, -1 ], [ -1, 2 ], [ 1, 1 ] ][128X[104X
  [4X[32X[104X
  
  [1X3.3-2 BilinearFormMatNF[101X
  
  [29X[2XBilinearFormMatNF[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YThis  is  the  matrix  of  the [21Xnormalized[121X bilinear form. This means that all
  diagonal  entries  are  even,  and  2  is the minimum value occurring on the
  diagonal. If [3XR[103X is a root system constructed by [2XRootSystem[102X ([14X3.3-1[114X), then this
  is equal to [3XBilinearFormMat( R )[103X.[133X
  
  [1X3.3-3 PositiveRootsNF[101X
  
  [29X[2XPositiveRootsNF[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YThis  is  the list of positive roots of the root system [3XR[103X, written as linear
  combinations  of the simple roots. This means that the simple roots are unit
  vectors.  If [3XR[103X is a root system constructed by [2XRootSystem[102X ([14X3.3-1[114X), then this
  is equal to [3XPositiveRoots( R )[103X.[133X
  
  [33X[0;0YOne  of  the  reasons  for  writing  the  positive  roots  like  this is the
  following.  Let  [3Xa,  b[103X be two elements of [3XPositiveRootsNF( R )[103X, and let [3XB[103X be
  the  matrix  of  the bilinear form. Then [3Xa*( B*b )[103X is the result of applying
  the bilinear form to [3Xa, b[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( SimpleLieAlgebra( "B", 2, Rationals ) );;[127X[104X
    [4X[25Xgap>[125X [27XPositiveRootsNF( R );[127X[104X
    [4X[28X[ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ], [ 1, 2 ] ][128X[104X
    [4X[28X# We note that in this case PositiveRoots( R ) will give the positive roots in[128X[104X
    [4X[28X# a different format.[128X[104X
  [4X[32X[104X
  
  [1X3.3-4 SimpleSystemNF[101X
  
  [29X[2XSimpleSystemNF[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YThis  is  the list of simple roots of [3XR[103X, written as unit vectors (this means
  that  they  are  elements  of  [3XPositiveRootsNF(  R )[103X). If [3XR[103X is a root system
  constructed by [2XRootSystem[102X ([14X3.3-1[114X), then this is equal to [3XSimpleSystem( R )[103X.[133X
  
  [1X3.3-5 PositiveRootsInConvexOrder[101X
  
  [29X[2XPositiveRootsInConvexOrder[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YThis function returns the positive roots of the root system [3XR[103X, in the [21Xconvex[121X
  order.  Let  [22Xw_0=s_1⋯  s_t[122X be a reduced expression of the longest element in
  the  Weyl group. Then the [22Xk[122X-th element of the list returned by this function
  is  [22Xs_1⋯  s_k-1(α_k)[122X. (Where the reduced expression used is the one returned
  by  [3XLongestWeylWord(  R  )[103X.)  If  [22Xα[122X,  [22Xβ[122X and [22Xα+β[122X are positive roots, then [22Xα+β[122X
  occurs between [22Xα[122X and [22Xβ[122X (whence the name convex order).[133X
  
  [33X[0;0YIn  the  output  all  roots are written in [21Xnormal form[121X, i.e., as elements of
  [3XPositiveRootsNF( R )[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XPositiveRootsInConvexOrder( R );[127X[104X
    [4X[28X[ [ 1, 0 ], [ 3, 1 ], [ 2, 1 ], [ 3, 2 ], [ 1, 1 ], [ 0, 1 ] ][128X[104X
  [4X[32X[104X
  
  [1X3.3-6 SimpleRootsAsWeights[101X
  
  [29X[2XSimpleRootsAsWeights[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YReturns   the  simple  roots  of  the  root  system  [3XR[103X,  written  as  linear
  combinations of the fundamental weights.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XSimpleRootsAsWeights( R );[127X[104X
    [4X[28X[ [ 2, -1 ], [ -1, 2 ] ][128X[104X
  [4X[32X[104X
  
  
  [1X3.4 [33X[0;0YWeyl groups and their elements[133X[101X
  
  [33X[0;0YNow  we  describe  a  few functions that deal with reduced words in the Weyl
  group of the root system [3XR[103X. These words are represented as lists of positive
  integers  [22Xi[122X,  denoting  the [22Xi[122X-th simple reflection (which corresponds to the
  [22Xi[122X-th element of [3XSimpleSystem( R )[103X). For example [3X[ 3, 2, 1, 3, 1 ][103X represents
  the expression [22Xs_3 s_2 s_1 s_3 s_1[122X.[133X
  
  [1X3.4-1 ApplyWeylElement[101X
  
  [29X[2XApplyWeylElement[102X( [3XW[103X, [3Xwt[103X, [3Xwd[103X ) [32X operation
  
  [33X[0;0YHere [3Xwd[103X is a (not necessarily reduced) word in the Weyl group [3XW[103X, and [3Xwt[103X is a
  weight  (written as integral linear combination of the simple weights). This
  function  returns the result of applying [3Xwd[103X to [3Xwt[103X. For example, if [3Xwt=[103X[22Xμ[122X, and
  [3Xwd  = [ 1, 2 ][103X then this function returns [22Xs_1s_2(μ)[122X (where [22Xs_i[122X is the simple
  reflection corresponding to the [22Xi[122X-th simple root).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XW:= WeylGroup( RootSystem( "G", 2 ) ) ;;[127X[104X
    [4X[25Xgap>[125X [27XApplyWeylElement( W, [ -3, 7 ], [ 1, 1, 2, 1, 2 ] );[127X[104X
    [4X[28X[ 15, -11 ][128X[104X
  [4X[32X[104X
  
  [1X3.4-2 LengthOfWeylWord[101X
  
  [29X[2XLengthOfWeylWord[102X( [3XW[103X, [3Xwd[103X ) [32X operation
  
  [33X[0;0YHere  [3Xwd[103X  is a word in the Weyl group [3XW[103X. This function returns the length of
  that word.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XW:= WeylGroup( RootSystem( "F", 4 ) ) ;[127X[104X
    [4X[28X<matrix group with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XLengthOfWeylWord( W, [ 1, 3, 2, 4, 2 ] );[127X[104X
    [4X[28X3[128X[104X
  [4X[32X[104X
  
  [1X3.4-3 LongestWeylWord[101X
  
  [29X[2XLongestWeylWord[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YHere  [3XR[103X  is  a root system. [3XLongestWeylWord( R )[103X returns the longest word in
  the Weyl group of [3XR[103X.[133X
  
  [33X[0;0YIf this function is called for a root system [3XR[103X, a reduced expression for the
  longest  element  in  the  Weyl  group  is  calculated (the one which is the
  smallest  in  the  lexicographical  ordering). However, if you would like to
  work  with  a different reduced expression, then it is possible to set it by
  [3XSetLongestWeylWord( R, wd )[103X, where [3Xwd[103X is a reduced expression of the longest
  element in the Weyl group. Note that you will have to do this before calling
  [3XLongestWeylWord[103X,  or  any  function  that may call [3XLongestWeylWord[103X (once the
  attribute  is set, it will not be possible to change it). Note also that you
  must  be sure that the word you give is in fact a reduced expression for the
  longest  element  in  the  Weyl group, as this is not checked (you can check
  this with [2XLengthOfWeylWord[102X ([14X3.4-2[114X)).[133X
  
  [33X[0;0YWe  note  that  virtually  all  algorithms for quantized enveloping algebras
  depend  on  the  choice of reduced expression for the longest element in the
  Weyl group (as the PBW-type basis depends on this).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XLongestWeylWord( R );[127X[104X
    [4X[28X[ 1, 2, 1, 2, 1, 2 ][128X[104X
  [4X[32X[104X
  
  [1X3.4-4 ReducedWordIterator[101X
  
  [29X[2XReducedWordIterator[102X( [3XW[103X, [3Xwd[103X ) [32X operation
  
  [33X[0;0YHere  [3XW[103X  is  a  Weyl  group, and [3Xwd[103X a reduced word. This function returns an
  iterator for the set of reduced words that represent the same element as [3Xwd[103X.
  The elements are output in ascending lexicographical order.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "F", 4 );;[127X[104X
    [4X[25Xgap>[125X [27Xit:= ReducedWordIterator( WeylGroup(R), LongestWeylWord(R) );[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator( it );[127X[104X
    [4X[28X[ 1, 2, 1, 3, 2, 1, 3, 2, 3, 4, 3, 2, 1, 3, 2, 3, 4, 3, 2, 1, 3, 2, 3, 4 ][128X[104X
    [4X[25Xgap>[125X [27Xk:= 1;;[127X[104X
    [4X[25Xgap>[125X [27Xwhile not IsDoneIterator( it ) do[127X[104X
    [4X[25X>[125X [27Xk:= k+1; w:= NextIterator( it );[127X[104X
    [4X[25X>[125X [27Xod;[127X[104X
    [4X[25Xgap>[125X [27Xk;[127X[104X
    [4X[28X2144892[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSo there are 2144892 reduced expressions for the longest element in the Weyl
  group of type [22XF_4[122X.[133X
  
  [1X3.4-5 ExchangeElement[101X
  
  [29X[2XExchangeElement[102X( [3XW[103X, [3Xwd[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere  [3XW[103X  is a Weyl group, and [3Xwd[103X is a [13Xreduced[113X word in [3XW[103X, and [3Xind[103X is an index
  between  1  and  the rank of the root system. Let [3Xv[103X denote the word obtained
  from [3Xwd[103X by adding [3Xind[103X at the end. This function [13Xassumes[113X that the length of [3Xv[103X
  is  one  less  than the length of [3Xwd[103X, and returns a reduced expression for [3Xv[103X
  that is obtained from [3Xwd[103X by deleting one entry. Nothing is guaranteed of the
  output if the length of [3Xv[103X is bigger than the length of [3Xwd[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xwd:= LongestWeylWord( R );;[127X[104X
    [4X[25Xgap>[125X [27XExchangeElement( WeylGroup(R), wd, 1 );[127X[104X
    [4X[28X[ 2, 1, 2, 1, 2 ][128X[104X
  [4X[32X[104X
  
  [1X3.4-6 GetBraidRelations[101X
  
  [29X[2XGetBraidRelations[102X( [3XW[103X, [3Xwd1[103X, [3Xwd2[103X ) [32X operation
  
  [33X[0;0YHere  [3XW[103X is a Weyl group, and [3Xwd1[103X, [3Xwd2[103X are two reduced words representing the
  same  element in [3XW[103X. This function returns a list of braid relations that can
  be  applied  to [3Xwd1[103X to obtain [3Xwd2[103X. Here a braid relation is represented as a
  list, with at the odd positions integers that represent positions in a word,
  and  at  the  even  positions  the indices that are on those positions after
  applying  the relation. For example, let [3Xwd[103X be the word [3X[ 1, 2, 1, 3, 2, 1 ][103X
  and  let  [3Xr = [ 3, 3, 4, 1 ][103X be a relation. Then the result of applying [3Xr[103X to
  [3Xwd[103X  is  [3X[  1, 2, 3, 1, 2, 1][103X (i.e., on the third position we put a 3, and on
  the fourth position a 1).[133X
  
  [33X[0;0YWe note that the function does not check first whether [3Xwd1[103X and [3Xwd2[103X represent
  the  same  element  in  [3XW[103X. If this is not the case, then an error will occur
  during the execution of the function, or it will produce wrong output.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27Xwd1:= LongestWeylWord( R );[127X[104X
    [4X[28X[ 1, 2, 1, 3, 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xwd2:= [ 1, 3, 2, 1, 3, 2 ];;[127X[104X
    [4X[25Xgap>[125X [27XGetBraidRelations( WeylGroup(R), wd1, wd2 );[127X[104X
    [4X[28X[ [ 3, 3, 4, 1 ], [ 4, 2, 5, 1, 6, 2 ], [ 2, 3, 3, 2, 4, 3 ],[128X[104X
    [4X[28X  [ 4, 1, 5, 3 ] ][128X[104X
  [4X[32X[104X
  
  [1X3.4-7 LongWords[101X
  
  [29X[2XLongWords[102X( [3XR[103X ) [32X attribute
  
  [33X[0;0YFor  a  root system [3XR[103X this returns a list of triples (of length equal to the
  rank  of  [3XR[103X).  Let  [3Xt[103X  be  the [3Xk[103X-th triple occurring in this list. The first
  element  of  [3Xt[103X  is  an expression for the longest element of the Weyl group,
  starting  with  [3Xk[103X.  The  second element is a list of braid relations, moving
  this expression to the value of [3XLongestWeylWord( R )[103X. The third element is a
  list of braid relations performing the reverse transformation.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XLongWords( R )[3];[127X[104X
    [4X[28X[ [ 3, 1, 2, 1, 3, 2 ],[128X[104X
    [4X[28X  [ [ 3, 3, 4, 1 ], [ 4, 2, 5, 1, 6, 2 ], [ 2, 3, 3, 2, 4, 3 ],[128X[104X
    [4X[28X      [ 4, 1, 5, 3 ], [ 1, 3, 2, 1 ] ],[128X[104X
    [4X[28X  [ [ 4, 3, 5, 1 ], [ 1, 1, 2, 3 ], [ 2, 2, 3, 3, 4, 2 ],[128X[104X
    [4X[28X      [ 4, 1, 5, 2, 6, 1 ], [ 3, 1, 4, 3 ] ] ][128X[104X
  [4X[32X[104X
  
  
  [1X3.5 [33X[0;0YQuantized enveloping algebras[133X[101X
  
  [33X[0;0YIn  [5XQuaGroup[105X  we  deal with two types of quantized enveloping algebra. First
  there   are  the  quantized  enveloping  algebras  defined  over  the  field
  [2XQuantumField[102X  ([14X3.1-1[114X).  We  say  that  these  algebras are [21Xgeneric[121X quantized
  enveloping  algebras,  in  [5XQuaGroup[105X  they  have  the category [3XIsGenericQUEA[103X.
  Secondly,  we  deal  with the quantized enveloping algebras that are defined
  over a different field.[133X
  
  [1X3.5-1 QuantizedUEA[101X
  
  [29X[2XQuantizedUEA[102X( [3XR[103X ) [32X attribute
  [29X[2XQuantizedUEA[102X( [3XR[103X, [3XF[103X, [3Xv[103X ) [32X operation
  [29X[2XQuantizedUEA[102X( [3XL[103X ) [32X attribute
  [29X[2XQuantizedUEA[102X( [3XL[103X, [3XF[103X, [3Xv[103X ) [32X operation
  
  [33X[0;0YIn  the  first  two  forms  [3XR[103X  is  a  root system. With only [3XR[103X as input, the
  corresponding  generic  quantized  enveloping  algebra is constructed. It is
  stored as an attribute of [3XR[103X (so that constructing it twice for the same root
  system  yields  the  same  object).  Also  the  root system is stored in the
  quantized enveloping algebra as the attribute [3XRootSystem[103X.[133X
  
  [33X[0;0YThe  attribute  [3XGeneratorsOfAlgebra[103X  contains  the  generators of a PBW-type
  basis  (see  Section  [14X2.4[114X),  that  are  constructed  relative to the reduced
  expression  for  the  longest element in the Weyl group that is contained in
  [3XLongestWeylWord(  R  )[103X. We refer to [2XObjByExtRep[102X ([14X3.5-2[114X) for a description of
  the construction of elements of a quantized enveloping algebra.[133X
  
  [33X[0;0YThe  call [3XQuantizedUEA( R, F, v )[103X returns the quantized universal enveloping
  algebra  with  quantum  parameter  [3Xv[103X, which must lie in the field [3XF[103X. In this
  case the elements of [3XGeneratorsOfAlgebra[103X are the images of the generators of
  the corresponding generic quantized enveloping algebra. This means that if [3Xv[103X
  is a root of unity, then the generators will not generate the whole algebra,
  but  rather  a  finite dimensional subalgebra (as for instance [22XE_i^k=0[122X for [22Xk[122X
  large  enough). It is possible to construct elements that do not lie in this
  finite dimensional subalgebra using [2XObjByExtRep[102X ([14X3.5-2[114X).[133X
  
  [33X[0;0YIn  the last two cases [3XL[103X must be a semisimple Lie algebra. The two calls are
  short for [3XQuantizedUEA( RootSystem( L ) )[103X and [3XQuantizedUEA( RootSystem( L ),
  F, v )[103X respectively.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X# We construct the generic quantized enveloping algebra corresponding[128X[104X
    [4X[28X# to the root system of type A2+G2:[128X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( [ "A", 2, "G", 2 ] );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R );[127X[104X
    [4X[28XQuantumUEA( <root system of type A2 G2>, Qpar = q )[128X[104X
    [4X[25Xgap>[125X [27XRootSystem( U );[127X[104X
    [4X[28X<root system of type A2 G2>[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U );[127X[104X
    [4X[28X[ F1, F2, F3, F4, F5, F6, F7, F8, F9, K1, K1+(q^-1-q)*[ K1 ; 1 ], K2,[128X[104X
    [4X[28X  K2+(q^-1-q)*[ K2 ; 1 ], K3, K3+(q^-1-q)*[ K3 ; 1 ], K4,[128X[104X
    [4X[28X  K4+(q^-3-q^3)*[ K4 ; 1 ], E1, E2, E3, E4, E5, E6, E7, E8, E9 ][128X[104X
    [4X[28X# These elements generate a PBW-type basis of U; the nine elements Fi,[128X[104X
    [4X[28X# and the nine elements Ei correspond to the roots listed in convex order:[128X[104X
    [4X[25Xgap>[125X [27XPositiveRootsInConvexOrder( R );[127X[104X
    [4X[28X[ [ 1, 0, 0, 0 ], [ 1, 1, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ],[128X[104X
    [4X[28X  [ 0, 0, 3, 1 ], [ 0, 0, 2, 1 ], [ 0, 0, 3, 2 ], [ 0, 0, 1, 1 ],[128X[104X
    [4X[28X  [ 0, 0, 0, 1 ] ][128X[104X
    [4X[28X# So, for example, F5 is an element of weight -[ 0, 0, 3, 1 ].[128X[104X
    [4X[28X# We can also multiply elements; the result is written on the PBW-basis:[128X[104X
    [4X[25Xgap>[125X [27Xg[17]*g[4];[127X[104X
    [4X[28X(q^-6-1)*F4*[ K4 ; 1 ]+(q^-3)*F4*K4[128X[104X
    [4X[28X# Now we construct a non-generic quantized enveloping algebra:[128X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R, CF(3), E(3) );;[127X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U );[127X[104X
    [4X[28X[ F1, F2, F3, K1, K1+(-E(3)+E(3)^2)*[ K1 ; 1 ], K2,[128X[104X
    [4X[28X  K2+(-E(3)+E(3)^2)*[ K2 ; 1 ], E1, E2, E3 ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YAs  can  be  seen  in the example, every element of [22XU[122X is written as a linear
  combination  of  monomials in the PBW-generators; the generators of [22XU^-[122X come
  first, then the generators of [22XU^0[122X, and finally the generators of [22XU^+[122X.[133X
  
  [1X3.5-2 ObjByExtRep[101X
  
  [29X[2XObjByExtRep[102X( [3Xfam[103X, [3Xlist[103X ) [32X operation
  
  [33X[0;0YHere  [3Xfam[103X  is  the  elements  family  of  a  quantized enveloping algebra [3XU[103X.
  Secondly,  [3Xlist[103X  is  a  list describing an element of [3XU[103X. We explain how this
  description  works.  First we describe an indexing system for the generators
  of  [3XU[103X. Let [3XR[103X be the root system of [3XU[103X. Let [3Xt[103X be the number of positive roots,
  and  [3Xrank[103X  the  rank of the root system. Then the generators of [3XU[103X are [3XFk[103X, [3XKi[103X
  (and  its  inverse),  [3XEk[103X,  for [3Xk=1...t[103X, [3Xi=1..rank[103X. (See Section [14X2.4[114X; for the
  construction  of the [3XFk[103X, [3XEk[103X, the value of [3XLongestWeylWord( R )[103X is used.) Now
  the index of [3XFk[103X is [3Xk[103X, and the index of [3XEk[103X is [3Xt+rank+k[103X. Furthermore, elements
  of  the  algebra generated by the [3XKi[103X, and its inverse, are written as linear
  combinations of products of [21Xbinomials[121X, as in Section [14X2.5[114X. The element[133X
  
  
        [33X[1;6Y[24X[33X[0;0YK_i^{d}\begin{bmatrix} K_{i} \\ s \end{bmatrix}[133X [124X[133X
  
  
  [33X[0;0Y(where  [22Xd=0,1[122X), is indexed as [3X[ t+i, d ][103X (what happens to the [3Xs[103X is described
  later). So an index is either an integer, or a list of two integers.[133X
  
  [33X[0;0YA  monomial  is  a list of indices, each followed by an exponent. First come
  the  indices  of the [3XFk[103X, ([3X1..t[103X), then come the lists of the form [3X[ t+i, d ][103X,
  and finally the indices of the [3XEk[103X. Each index is followed by an exponent. An
  index of the form [3X[ t+i, d ][103X is followed by the [3Xs[103X in the above formula.[133X
  
  [33X[0;0YThe  second  argument  of  [3XObjByExtRep[103X  is  a  list of monomials followed by
  coefficients. This function returns the element of [3XU[103X described by this list.[133X
  
  [33X[0;0YFinally we remark that the element[133X
  
  
        [33X[1;6Y[24X[33X[0;0YK_i^{d}\begin{bmatrix} K_{i} \\ s \end{bmatrix}[133X [124X[133X
  
  
  [33X[0;0Yis printed as [3XKi[ Ki ; s ][103X if [3Xd=1[103X, and as [3X[ Ki ; s ][103X if [3Xd=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27Xfam:= ElementsFamily( FamilyObj( U ) );;[127X[104X
    [4X[25Xgap>[125X [27Xlist:= [ [ 2, 3, [ 4, 0 ], 8, 6, 11 ], _q^2,    # monomial and coefficient[127X[104X
    [4X[25X>[125X [27X[ 1, 7, 3, 5, [ 5, 1 ], 3, 8, 9 ], _q^-1 + _q^2 ]; # monomial and coefficient[127X[104X
    [4X[28X[ [ 2, 3, [ 4, 0 ], 8, 6, 11 ], q^2, [ 1, 7, 3, 5, [ 5, 1 ], 3, 8, 9 ],[128X[104X
    [4X[28X  q^-1+q^2 ][128X[104X
    [4X[25Xgap>[125X [27XObjByExtRep( fam, list );[127X[104X
    [4X[28X(q^2)*F2^(3)*[ K1 ; 8 ]*E1^(11)+(q^-1+q^2)*F1^(7)*F3^(5)*K2[ K2 ; 3 ]*E3^(9)[128X[104X
  [4X[32X[104X
  
  [1X3.5-3 ExtRepOfObj[101X
  
  [29X[2XExtRepOfObj[102X( [3Xelm[103X ) [32X operation
  
  [33X[0;0YFor the element [3Xelm[103X of a quantized enveloping algebra, this function returns
  the list that defines [3Xelm[103X (see [2XObjByExtRep[102X ([14X3.5-2[114X)).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra(U);[127X[104X
    [4X[28X[ F1, F2, F3, K1, K1+(q^-1-q)*[ K1 ; 1 ], K2, K2+(q^-1-q)*[ K2 ; 1 ], E1,[128X[104X
    [4X[28X  E2, E3 ][128X[104X
    [4X[25Xgap>[125X [27XExtRepOfObj( g[5] );[127X[104X
    [4X[28X[ [ [ 4, 1 ], 0 ], 1, [ [ 4, 0 ], 1 ], q^-1-q ][128X[104X
  [4X[32X[104X
  
  [1X3.5-4 QuantumParameter[101X
  
  [29X[2XQuantumParameter[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YReturns the quantum parameter used in the definition of [3XU[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("A",2);;[127X[104X
    [4X[25Xgap>[125X [27XU0:= QuantizedUEA( R, CF(3), E(3) );;[127X[104X
    [4X[25Xgap>[125X [27XQuantumParameter( U0 );[127X[104X
    [4X[28XE(3)[128X[104X
  [4X[32X[104X
  
  [1X3.5-5 CanonicalMapping[101X
  
  [29X[2XCanonicalMapping[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YHere  [3XU[103X  is  a quantized enveloping algebra. Let [3XU0[103X denote the corresponding
  [21Xgeneric[121X  quantized  enveloping algebra. This function returns the mapping [3XU0
  -->  U[103X  obtained  by mapping [3Xq[103X (which is the quantum parameter of [3XU0[103X) to the
  quantum parameter of [3XU[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R, CF(5), E(5) );;[127X[104X
    [4X[25Xgap>[125X [27Xf:= CanonicalMapping( U );[127X[104X
    [4X[28XMappingByFunction( QuantumUEA( <root system of type A[128X[104X
    [4X[28X3>, Qpar = q ), QuantumUEA( <root system of type A3>, Qpar =[128X[104X
    [4X[28XE(5) ), function( u ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XU0:= Source( f );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = q )[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U0 );;[127X[104X
    [4X[25Xgap>[125X [27Xu:= g[18]*g[9]*g[6];[127X[104X
    [4X[28X(q^2)*F6*K2*E6+(q)*K2*[ K3 ; 1 ][128X[104X
    [4X[25Xgap>[125X [27XImage( f, u );[127X[104X
    [4X[28X(E(5)^2)*F6*K2*E6+(E(5))*K2*[ K3 ; 1 ][128X[104X
  [4X[32X[104X
  
  [1X3.5-6 WriteQEAToFile[101X
  
  [29X[2XWriteQEAToFile[102X( [3XU[103X, [3Xfile[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a quantized enveloping algebra, and file is a string containing
  the  name  of  a  file.  This function writes some data to [3Xfile[103X, that allows
  [2XReadQEAFromFile[102X ([14X3.5-7[114X) to recover it.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",3) );;[127X[104X
    [4X[25Xgap>[125X [27XWriteQEAToFile( U, "/home/wdg/A3" );[127X[104X
  [4X[32X[104X
  
  [1X3.5-7 ReadQEAFromFile[101X
  
  [29X[2XReadQEAFromFile[102X( [3Xfile[103X ) [32X operation
  
  [33X[0;0YHere  [3Xfile[103X  is  a string containing the name of a file, to which a quantized
  enveloping algebra has been written by [2XWriteQEAToFile[102X ([14X3.5-6[114X). This function
  recovers the quantized enveloping algebra.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",3) );;[127X[104X
    [4X[25Xgap>[125X [27XWriteQEAToFile( U, "/home/wdg/A3" );[127X[104X
    [4X[25Xgap>[125X [27XU0:= ReadQEAFromFile( "/home/wdg/A3" );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = q )[128X[104X
  [4X[32X[104X
  
  
  [1X3.6 [33X[0;0YHomomorphisms and automorphisms[133X[101X
  
  [33X[0;0YHere    we    describe    functions    for    creating   homomorphisms   and
  (anti)-automorphisms of a quantized enveloping algebra.[133X
  
  [1X3.6-1 QEAHomomorphism[101X
  
  [29X[2XQEAHomomorphism[102X( [3XU[103X, [3XA[103X, [3Xlist[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a  generic  quantized  enveloping  algebra  (i.e., with quantum
  parameter  [3X_q[103X),  [3XA[103X  is  an algebra with one over [3XQuantumField[103X, and [3Xlist[103X is a
  list  of  [3X4*rank[103X elements of [3XA[103X (where [3Xrank[103X is the rank of the root system of
  [3XU[103X). On the first rank positions there are the images of the [22XF_α[122X (where the [22Xα[122X
  are simple roots, listed in the order in which they occur in [3XSimpleSystem( R
  )[103X).  On  the  positions  [3Xrank+1...2*rank[103X  are  the images of the [22XK_α[122X. On the
  positions [3X2*rank+1...3*rank[103X are the images of the [22XK_α^-1[122X, and finally on the
  positions [3X3*rank+1...4*rank[103X occur the images of the [22XE_α[122X.[133X
  
  [33X[0;0YThis  function returns the homomorphism [3XU -> A[103X, defined by this data. In the
  example  below  we  construct  a  homomorphism from one quantized enveloping
  algebra into another. Both are constructed relative to the same root system,
  but  with  different reduced expressions for the longest element of the Weyl
  group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XSetLongestWeylWord( R, [1,2,1,2,1,2] );[127X[104X
    [4X[25Xgap>[125X [27XUR:= QuantizedUEA( R );;[127X[104X
    [4X[25Xgap>[125X [27XS:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XSetLongestWeylWord( S, [2,1,2,1,2,1] );[127X[104X
    [4X[25Xgap>[125X [27XUS:= QuantizedUEA( S );;[127X[104X
    [4X[25Xgap>[125X [27XgS:= GeneratorsOfAlgebra( US );[127X[104X
    [4X[28X[ F1, F2, F3, F4, F5, F6, K1, K1+(q^-1-q)*[ K1 ; 1 ], K2,[128X[104X
    [4X[28X  K2+(q^-3-q^3)*[ K2 ; 1 ], E1, E2, E3, E4, E5, E6 ][128X[104X
    [4X[25Xgap>[125X [27XSimpleSystem( R );[127X[104X
    [4X[28X[ [ 1, 0 ], [ 0, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XPositiveRootsInConvexOrder( S );[127X[104X
    [4X[28X[ [ 0, 1 ], [ 1, 1 ], [ 3, 2 ], [ 2, 1 ], [ 3, 1 ], [ 1, 0 ] ][128X[104X
    [4X[28X# We see that the simple roots of R occur on positions 6 and 1[128X[104X
    [4X[28X# in the list PositiveRootsInConvexOrder( S ); This means that we[128X[104X
    [4X[28X# get the following list of images of the homomorphism:[128X[104X
    [4X[25Xgap>[125X [27Ximgs:= [ gS[6], gS[1],      # the images of the F_{\alpha}[127X[104X
    [4X[25X>[125X [27XgS[7], gS[9],                  # the images of the K_{\alpha}[127X[104X
    [4X[25X>[125X [27XgS[8], gS[10],                 # the images of the K_{\alpha}^{-1}[127X[104X
    [4X[25X>[125X [27XgS[16], gS[11] ];              # the images of the E_{\alpha}[127X[104X
    [4X[28X[ F6, F1, K1, K2, K1+(q^-1-q)*[ K1 ; 1 ], K2+(q^-3-q^3)*[ K2 ; 1 ], E6, E1[128X[104X
    [4X[28X ][128X[104X
    [4X[25Xgap>[125X [27Xh:= QEAHomomorphism( UR, US, imgs );[127X[104X
    [4X[28X<homomorphism: QuantumUEA( <root system of type G[128X[104X
    [4X[28X2>, Qpar = q ) -> QuantumUEA( <root system of type G2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XImage( h, GeneratorsOfAlgebra( UR )[3] );[127X[104X
    [4X[28X(1-q^4-q^6+q^10)*F1*F6^(2)+(-q^2+q^6)*F2*F6+(q^4)*F4[128X[104X
  [4X[32X[104X
  
  [1X3.6-2 QEAAutomorphism[101X
  
  [29X[2XQEAAutomorphism[102X( [3XU[103X, [3Xlist[103X ) [32X operation
  [29X[2XQEAAutomorphism[102X( [3XU[103X, [3Xf[103X ) [32X operation
  
  [33X[0;0YIn  the  first  form [3XU[103X is a generic quantized enveloping algebra (i.e., with
  quantum  parameter  [3X_q[103X),  and  [3Xlist[103X is a list of [3X4*rank[103X elements of [3XU[103X (where
  [3Xrank[103X  is  the  rank  of  the  corresponding  root system). On the first [3Xrank[103X
  positions  there  are  the  images of the [22XF_α[122X (where the [22Xα[122X are simple roots,
  listed  in  the  order  in  which  they  occur in [3XSimpleSystem( R )[103X). On the
  positions  [3Xrank+1...2*rank[103X  are  the  images  of  the  [22XK_α[122X. On the positions
  [3X2*rank+1...3*rank[103X are the images of the [22XK_α^-1[122X, and finally on the positions
  [3X3*rank+1...4*rank[103X occur the images of the [22XE_α[122X.[133X
  
  [33X[0;0YIn the second form [3XU[103X is a non-generic quantized enveloping algebra, and [3Xf[103X is
  an  automorphism  of the corresponding generic quantized enveloping algebra.
  The  corresponding automorphism of [3XU[103X is constructed. In this case [3Xf[103X must not
  be  the  bar-automorphism  of the corresponding generic quantized enveloping
  algebra  (cf. [2XBarAutomorphism[102X ([14X3.6-6[114X)), as this automorphism doesn't work in
  the non-generic case.[133X
  
  [33X[0;0YThe image of an element [3Xx[103X under an automorphism [3Xf[103X is computed by [3XImage( f, x
  )[103X.  Note  that  there  is no function for calculating pre-images (in general
  this  seems  to  be  a  very  hard  task).  If  you  want  the inverse of an
  automorphism, you have to construct it explicitly (e.g., by [3XQEAAutomorphism(
  U, list )[103X, where [3Xlist[103X is a list of pre-images).[133X
  
  [33X[0;0YBelow  we  construct  the  automorphism [22Xω[122X (cf. Section [14X2.2[114X) of the quantized
  enveloping  of  type  [22XA_3[122X,  when  the  quantum parameter is [3X_q[103X, and when the
  quantum parameter is a fifth root of unity.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X# First we construct the quantized enveloping algebra:[128X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XU0:= QuantizedUEA( R );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = q )[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U0 );[127X[104X
    [4X[28X[ F1, F2, F3, F4, F5, F6, K1, K1+(q^-1-q)*[ K1 ; 1 ], K2,[128X[104X
    [4X[28X  K2+(q^-1-q)*[ K2 ; 1 ], K3, K3+(q^-1-q)*[ K3 ; 1 ], E1, E2, E3, E4, E5, E6 ][128X[104X
    [4X[28X# Now, for instance, we map F_{\alpha} to E_{\alpha}, where \alpha[128X[104X
    [4X[28X# is a simple root. In order to find where those F_{\alpha}, E_{\alpha}[128X[104X
    [4X[28X# are in the list of generators, we look at the list of positive roots[128X[104X
    [4X[28X# in convex order:[128X[104X
    [4X[25Xgap>[125X [27XPositiveRootsInConvexOrder( R );[127X[104X
    [4X[28X[ [ 1, 0, 0 ], [ 1, 1, 0 ], [ 0, 1, 0 ], [ 1, 1, 1 ], [ 0, 1, 1 ],[128X[104X
    [4X[28X  [ 0, 0, 1 ] ][128X[104X
    [4X[28X# So the simple roots occur on positions 1, 3, 6. This means that we[128X[104X
    [4X[28X# have the following list of images:[128X[104X
    [4X[25Xgap>[125X [27Ximgs:= [ g[13], g[15], g[18], g[8], g[10], g[12], g[7], g[9], g[11],[127X[104X
    [4X[25X>[125X [27Xg[1], g[3], g[6] ];[127X[104X
    [4X[28X[ E1, E3, E6, K1+(q^-1-q)*[ K1 ; 1 ], K2+(q^-1-q)*[ K2 ; 1 ],[128X[104X
    [4X[28X  K3+(q^-1-q)*[ K3 ; 1 ], K1, K2, K3, F1, F3, F6 ][128X[104X
    [4X[25Xgap>[125X [27Xf:= QEAAutomorphism( U0, imgs );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type A3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XImage( f, g[2] );[127X[104X
    [4X[28X(-q)*E2[128X[104X
    [4X[28X# f induces an automorphism of any non-generic quantized enveloping[128X[104X
    [4X[28X# algebra with the same root system R:[128X[104X
    [4X[25Xgap>[125X [27XU1:= QuantizedUEA( R, CF(5), E(5) );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = E(5) )[128X[104X
    [4X[25Xgap>[125X [27Xh:= QEAAutomorphism( U1, f );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type A3>, Qpar = E(5) )>[128X[104X
    [4X[25Xgap>[125X [27XImage( h, GeneratorsOfAlgebra(U1)[7] );[127X[104X
    [4X[28X(-E(5)+E(5)^4)*[ K1 ; 1 ]+K1[128X[104X
  [4X[32X[104X
  
  [1X3.6-3 QEAAntiAutomorphism[101X
  
  [29X[2XQEAAntiAutomorphism[102X( [3XU[103X, [3Xlist[103X ) [32X operation
  [29X[2XQEAAntiAutomorphism[102X( [3XU[103X, [3Xf[103X ) [32X operation
  
  [33X[0;0YThese   are  functions  for  constructing  anti-automorphisms  of  quantized
  enveloping algebras. The same comments apply as for [2XQEAAutomorphism[102X ([14X3.6-2[114X).[133X
  
  [1X3.6-4 AutomorphismOmega[101X
  
  [29X[2XAutomorphismOmega[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YThis is the automorphism [22Xω[122X (cf. Section [14X2.2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R, CF(5), E(5) );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = E(5) )[128X[104X
    [4X[25Xgap>[125X [27Xf:= AutomorphismOmega( U );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type A3>, Qpar = E(5) )>[128X[104X
  [4X[32X[104X
  
  [1X3.6-5 AntiAutomorphismTau[101X
  
  [29X[2XAntiAutomorphismTau[102X(  ) [32X attribute
  
  [33X[0;0YThis is the anti-automorphism [22Xτ[122X (cf. Section [14X2.2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R, CF(5), E(5) );[127X[104X
    [4X[28XQuantumUEA( <root system of type A3>, Qpar = E(5) )[128X[104X
    [4X[25Xgap>[125X [27Xt:= AntiAutomorphismTau( U );[127X[104X
    [4X[28X<anti-automorphism of QuantumUEA( <root system of type A3>, Qpar = E(5) )>[128X[104X
  [4X[32X[104X
  
  [1X3.6-6 BarAutomorphism[101X
  
  [29X[2XBarAutomorphism[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YThis  is  the  automorphism  [22Xbar~[122X  defined  in  Section [14X2.2[114X Here [3XU[103X must be a
  generic quantized enveloping algebra.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem(["A",2,"B",2]) );;[127X[104X
    [4X[25Xgap>[125X [27Xbar:= BarAutomorphism( U );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type A2 B2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XImage( bar, GeneratorsOfAlgebra( U )[5] );[127X[104X
    [4X[28X(-q^-2+q^2)*F4*F7+F5[128X[104X
  [4X[32X[104X
  
  [1X3.6-7 AutomorphismTalpha[101X
  
  [29X[2XAutomorphismTalpha[102X( [3XU[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YThis is the automorphism [22XT_α[122X (cf. Section [14X2.4[114X), where [22Xα[122X is the [3Xind[103X-th simple
  root.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 3 ) );;[127X[104X
    [4X[25Xgap>[125X [27Xf:=AutomorphismTalpha( U, 1 );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type B3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xa:= GeneratorsOfAlgebra( U )[3];[127X[104X
    [4X[28XF3[128X[104X
    [4X[25Xgap>[125X [27X Image( f, a );[127X[104X
    [4X[28XF2[128X[104X
  [4X[32X[104X
  
  [1X3.6-8 DiagramAutomorphism[101X
  
  [29X[2XDiagramAutomorphism[102X( [3XU[103X, [3Xperm[103X ) [32X operation
  
  [33X[0;0YThis  is  the  automorphism  of  [3XU[103X  induced by a diagram automorphism of the
  underlying  root  system.  The  diagram  automorphism  is represented by the
  permutation  [3Xperm[103X, which is the permutation of the simple roots performed by
  the diagram automorphism.[133X
  
  [33X[0;0YIn  the  example  below  we  construct  the diagram automorphism of the root
  system of type [22XA_3[122X, which is represented by the permutation [3X(1,3)[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 3 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R );;[127X[104X
    [4X[25Xgap>[125X [27Xf:= DiagramAutomorphism( U, (1,3) );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type A3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U );[127X[104X
    [4X[28X[ F1, F2, F3, F4, F5, F6, K1, K1+(q^-1-q)*[ K1 ; 1 ], K2,[128X[104X
    [4X[28X  K2+(q^-1-q)*[ K2 ; 1 ], K3, K3+(q^-1-q)*[ K3 ; 1 ], E1, E2, E3, E4, E5, E6[128X[104X
    [4X[28X ][128X[104X
    [4X[25Xgap>[125X [27XImage( f, g[1] );[127X[104X
    [4X[28XF6[128X[104X
  [4X[32X[104X
  
  [1X3.6-9 \*[101X
  
  [29X[2X\*[102X( [3Xf[103X, [3Xh[103X ) [32X operation
  
  [33X[0;0YWe  can  compose  automorphisms  and  anti-automorphisms  using  the infix [3X*[103X
  operator.  The result of composing two automorphisms is an automorphism. The
  result   of  composing  an  automorphism  and  an  anti-automorphism  is  an
  anti-automorphism.  The  result  of  composing  two anti-automorphisms is an
  automorphism.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 3 ) );;[127X[104X
    [4X[25Xgap>[125X [27Xf:=AutomorphismTalpha( U, 1 );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type B3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xh:= AutomorphismOmega( U );[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type B3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xf*h;[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type B3>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xt:= AntiAutomorphismTau( U );;[127X[104X
    [4X[25Xgap>[125X [27XT:= AutomorphismTalpha( U, 2 );;[127X[104X
    [4X[25Xgap>[125X [27XTinv:= t*T*t;[127X[104X
    [4X[28X<automorphism of QuantumUEA( <root system of type B3>, Qpar = q )>[128X[104X
    [4X[28X# (The last call may take a little while.)[128X[104X
    [4X[25Xgap>[125X [27Xx:= Image( T, GeneratorsOfAlgebra( U )[1] );[127X[104X
    [4X[28X(1-q^4)*F1*F3+(-q^2)*F2[128X[104X
    [4X[25Xgap>[125X [27XImage( Tinv, x );[127X[104X
    [4X[28XF1[128X[104X
  [4X[32X[104X
  
  [33X[0;0YAccording to [Jan96], 8.14(10), [22Xτ ∘ T_α ∘ τ[122X is the inverse of [22XT_α[122X.[133X
  
  
  [1X3.7 [33X[0;0YHopf algebra structure[133X[101X
  
  [33X[0;0YHere  we describe functions for dealing with the Hopf algebra structure of a
  quantized  enveloping algebra. This structure enables us to construct tensor
  products,  and  dual modules of modules over a quantized enveloping algebra.
  We  refer  to the next section (Section [14X3.8[114X) for some functions for creating
  modules.[133X
  
  [1X3.7-1 TensorPower[101X
  
  [29X[2XTensorPower[102X( [3XU[103X, [3Xd[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a  quantized universal enveloping algebra, and [3Xd[103X a non-negative
  integer.  This  function  returns  the  associative  algebra with underlying
  vector  space  the  [3Xd[103X-fold  tensor  product of [3XU[103X with itself. The product is
  defined component wise.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( [ "B", 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XT:= TensorPower( U, 3 );[127X[104X
    [4X[28X<algebra over QuantumField, with 36 generators>[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( T );;[127X[104X
    [4X[25Xgap>[125X [27Xx:= g[1];[127X[104X
    [4X[28X1*(1<x>1<x>F1)[128X[104X
    [4X[25Xgap>[125X [27Xy:= g[30];[127X[104X
    [4X[28X1*(E2<x>1<x>1)[128X[104X
    [4X[25Xgap>[125X [27Xx*y;[127X[104X
    [4X[28X1*(E2<x>1<x>F1)[128X[104X
  [4X[32X[104X
  
  [1X3.7-2 UseTwistedHopfStructure[101X
  
  [29X[2XUseTwistedHopfStructure[102X( [3XU[103X, [3Xf[103X, [3Xfinv[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a  quantized  enveloping  algebra,  and  [3Xf[103X,  [3Xfinv[103X  two  (anti-)
  automorphisms  of  [3XU[103X,  where  [3Xfinv[103X  is  the inverse of [3Xf[103X. After calling this
  function  the  Hopf  structure on [3XU[103X is used that is obtained from the [21Xnormal[121X
  Hopf structure (see Section [14X2.3[114X) by twisting it with [3Xf[103X.[133X
  
  [33X[0;0YA  call to this function sets the attribute [3XHopfStructureTwist[103X, which is the
  list [3X[ f, finv ][103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2), CF(5), E(5) );;[127X[104X
    [4X[25Xgap>[125X [27Xt:= AntiAutomorphismTau( U );;[127X[104X
    [4X[25Xgap>[125X [27XUseTwistedHopfStructure( U, t, t );[127X[104X
  [4X[32X[104X
  
  [1X3.7-3 ComultiplicationMap[101X
  
  [29X[2XComultiplicationMap[102X( [3XU[103X, [3Xd[103X ) [32X operation
  
  [33X[0;0YThis is a homomorphism from the quantized enveloping algebra [3XU[103X to the [3Xd[103X-fold
  tensor  power  of [3XU[103X with itself. It is obtained by a repeated application of
  the comultiplication of [3XU[103X. So for [3Xd=2[103X we get the comultiplication of [3XU[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2), CF(5), E(5) );;[127X[104X
    [4X[25Xgap>[125X [27XD:= ComultiplicationMap( U, 3 );[127X[104X
    [4X[28X<Comultiplication of QuantumUEA( <root system of type A2>, Qpar =[128X[104X
    [4X[28XE(5) ), degree 3>[128X[104X
    [4X[25Xgap>[125X [27XImage( D, GeneratorsOfAlgebra(U)[4] );[127X[104X
    [4X[28X1*(K1<x>K1<x>K1)[128X[104X
  [4X[32X[104X
  
  [1X3.7-4 AntipodeMap[101X
  
  [29X[2XAntipodeMap[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YThis  is  the  antipode  map of the quantized enveloping algebra [3XU[103X, which is
  constructed as an anti-automorphism of [3XU[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2), CF(5), E(5) );;[127X[104X
    [4X[25Xgap>[125X [27Xa:= AntipodeMap( U );[127X[104X
    [4X[28X<anti-automorphism of QuantumUEA( <root system of type A2>, Qpar = E(5) )>[128X[104X
  [4X[32X[104X
  
  [1X3.7-5 CounitMap[101X
  
  [29X[2XCounitMap[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YThis  is  the  counit  map  of  the quantized enveloping algebra [3XU[103X, which is
  constructed as a function from [3XU[103X to the ground field.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2), CF(5), E(5) );;[127X[104X
    [4X[25Xgap>[125X [27Xco:= CounitMap( U );[127X[104X
    [4X[28Xfunction( u ) ... end[128X[104X
    [4X[25Xgap>[125X [27Xx:= GeneratorsOfAlgebra( U )[4];[127X[104X
    [4X[28XK1[128X[104X
    [4X[25Xgap>[125X [27Xco( x );[127X[104X
    [4X[28X1[128X[104X
  [4X[32X[104X
  
  
  [1X3.8 [33X[0;0YModules[133X[101X
  
  [33X[0;0YHere we describe some functions for constructing left modules over quantized
  enveloping algebras. We refer to the [5XGAP[105X reference manual for an overview of
  basic  functions  for  algebra  modules,  which  are  also applicable to the
  modules  constructed  by the functions described in this section. We mention
  [3XMatrixOfAction[103X,  [3XDirectSumOfAlgebraModules[103X.  The action of an element of the
  algebra on an element of the module is calculated by the infix operator [3X^[103X.[133X
  
  [1X3.8-1 HighestWeightModule[101X
  
  [29X[2XHighestWeightModule[102X( [3XU[103X, [3Xwt[103X ) [32X operation
  
  [33X[0;0YHere [3XU[103X is a quantized universal enveloping algebra, and [3Xwt[103X a dominant weight
  (i.e.,  a list of length equal to the rank of the root system, consisting of
  non-negative   integers).   This   function   returns  a  finite-dimensional
  highest-weight module of highest weight [3Xwt[103X over [3XU[103X. If [3XU[103X is generic then this
  is  the unique irreducible highest-weight module over [3XU[103X. Otherwise it is the
  Weyl  module,  cf.  Section  [14X2.5[114X.  In  this  last  case  the  module  is not
  necessarily irreducible.[133X
  
  [33X[0;0YLet  [3XV[103X  denote the module returned by this function. The first basis element
  of  the  attribute  [3XBasis(  V )[103X is a highest-weight vector; it is written as
  [3X1*v0[103X.  Other  basis  elements  are  written as, for example, [3XF2*F9*v0[103X, which
  means  that  this vector is the result of letting the PBW-monomial [3XF2*F9[103X act
  on the highest-weight vector.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( [ "A", 2, "G", 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [ 0, 1, 0, 2 ] );[127X[104X
    [4X[28X<231-dimensional left-module over QuantumUEA( <root system of type A2 G[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XBasis( V )[1];[127X[104X
    [4X[28X1*v0[128X[104X
    [4X[25Xgap>[125X [27XBasis(V)[23]+(_q^2+_q^-2)*Basis(V)[137];[127X[104X
    [4X[28XF3*F5*v0+(q^-2+q^2)*F8^(6)*v0[128X[104X
    [4X[28X# We compute the action of an element on a vector:[128X[104X
    [4X[25Xgap>[125X [27Xgg:= GeneratorsOfAlgebra( U );;[127X[104X
    [4X[25Xgap>[125X [27Xx:= gg[21]*gg[5];[127X[104X
    [4X[28XF5*E4+(-q^-1)*F6*K3[128X[104X
    [4X[25Xgap>[125X [27Xx^Basis(V)[1];[127X[104X
    [4X[28X(-q^-1)*F6*v0[128X[104X
  [4X[32X[104X
  
  [1X3.8-2 IrreducibleQuotient[101X
  
  [29X[2XIrreducibleQuotient[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YHere  [3XV[103X  is  a highest-weight module over a non-generic quantized enveloping
  algebra.  This  function  returns the quotient of [3XV[103X by the maximal submodule
  not containing the highest weight vector. This is not necessarily equal to [3XV[103X
  if the quantum parameter is a root of 1.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R, CF(3), E(3) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );[127X[104X
    [4X[28X<8-dimensional left-module over QuantumUEA( <root system of type A2>, Qpar =[128X[104X
    [4X[28XE(3) )>[128X[104X
    [4X[25Xgap>[125X [27XIrreducibleQuotient( V );[127X[104X
    [4X[28X<7-dimensional left-module over QuantumUEA( <root system of type A2>, Qpar =[128X[104X
    [4X[28XE(3) )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-3 HWModuleByTensorProduct[101X
  
  [29X[2XHWModuleByTensorProduct[102X( [3XU[103X, [3Xwt[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  must  be  a [13Xgeneric[113X quantized enveloping algebra, and [3Xwt[103X a dominant
  weight.  This  function  returns  the irreducible highest-weight module with
  highest  weight [3Xwt[103X. The algorithm uses tensor products (whence the name). On
  some   inputs   this   algorithm   is   faster   than   the   one   use  for
  [2XHighestWeightModule[102X  ([14X3.8-1[114X), on some inputs it is slower. I do not know any
  good heuristics.[133X
  
  [33X[0;0YThe basis supplied with the module returned is the canonical basis.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("G",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HWModuleByTensorProduct( U, [2,1] );[127X[104X
    [4X[28X<189-dimensional left-module over QuantumUEA( <root system of type G[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[28X# (This is a case where this algorithm is a lot faster.)[128X[104X
  [4X[32X[104X
  
  [1X3.8-4 DIYModule[101X
  
  [29X[2XDIYModule[102X( [3XU[103X, [3XV[103X, [3Xacts[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a generic quantized enveloping algebra, and [3XV[103X is a vector space
  over  the field [3XQuantumField[103X. [3XU[103X acts on [3XV[103X and the action is described by the
  data  in  the  list [3Xacts[103X. [3Xacts[103X is a list of lists, of length [3X4*l[103X, where [3Xl[103X is
  the  rank  of  the root system. [3Xacts[103X describes the actions of the generators
  [22X[F_1,...,F_l,K_1,...,K_l,K_1^-1,...,K_l^-1,  E_1,...,E_l ][122X. (Here [22XF_k[122X is the
  generator  [22XF_α_k[122X,  where [22Xα_k[122X is the [22Xk[122X-th simple root, and likewise for [22XE_k[122X.)
  The  action of each generator is described by a list of length [3Xdim V[103X, giving
  the  images  of  the basis elements of [3XV[103X. If an image is zero then it may be
  omitted: in that case there is a [21Xhole[121X in the list. This function returns the
  [3XU[103X-module defined by the input.[133X
  
  [33X[0;0YLet  [3XR[103X  be  a  root  system  of  type [22XA_1[122X, and [3XU[103X the corresponding quantized
  enveloping  algebra  (generated  by  [22XF, K, K^-1, E[122X). In the example below we
  construct  the  2-dimensional  [22XU[122X-module  with  basis  vectors  [22Xv_1,v_2[122X,  and
  [3XU[103X-action  given  by  [22XFv_1  = v_2[122X, [22XFv_2=0[122X, [22XKv_1 = qv_1[122X, [22XKv_2=q^-1v_2[122X, [22XEv_1=0[122X,
  [22XEv_2=v_1[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",1) );[127X[104X
    [4X[28XQuantumUEA( <root system of type A1>, Qpar = q )[128X[104X
    [4X[25Xgap>[125X [27XV:= QuantumField^2;[127X[104X
    [4X[28X( QuantumField^2 )[128X[104X
    [4X[25Xgap>[125X [27Xv:= BasisVectors( Basis(V) );[127X[104X
    [4X[28X[ [ 1, 0 ], [ 0, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27Xacts:= [ [ v[2], 0*v[1] ], [ _q*v[1], _q^-1*v[2] ],[127X[104X
    [4X[25X>[125X [27X[ _q^-1*v[1], _q*v[2] ], [ 0*v[1], v[1] ] ];;[127X[104X
    [4X[25Xgap>[125X [27XM:= DIYModule( U, V, acts );[127X[104X
    [4X[28X<2-dimensional left-module over QuantumUEA( <root system of type A[128X[104X
    [4X[28X1>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-5 TensorProductOfAlgebraModules[101X
  
  [29X[2XTensorProductOfAlgebraModules[102X( [3XV[103X, [3XW[103X ) [32X operation
  [29X[2XTensorProductOfAlgebraModules[102X( [3XV[103X, [3XW[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X  and [3XW[103X are two modules over the same quantized enveloping algebra [3XU[103X.
  This  function constructs the tensor product of [3XV[103X and [3XW[103X (as a [3XU[103X-module). For
  this  the  comultiplication  map  of  [3XU[103X  is  used  (see  [2XComultiplicationMap[102X
  ([14X3.7-3[114X)).[133X
  
  [33X[0;0YIn  the  second  form list is a list of [3XU[103X-modules. In that case the iterated
  tensor product is constructed.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( [ "A", 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XV1:= HighestWeightModule( U, [ 1, 0 ] );;[127X[104X
    [4X[25Xgap>[125X [27XV2:= HighestWeightModule( U, [ 0, 1 ] );;[127X[104X
    [4X[25Xgap>[125X [27XTensorProductOfAlgebraModules( V1, V2 );[127X[104X
    [4X[28X<9-dimensional left-module over QuantumUEA( <root system of type A2>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-6 HWModuleByGenerator[101X
  
  [29X[2XHWModuleByGenerator[102X( [3XV[103X, [3Xv[103X, [3Xhw[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X  is  a  module over a generic quantized enveloping algebra [3XU[103X, [3Xv[103X is a
  highest-weight  vector  (i.e.,  all  [22XE_α[122X[3Xv=0[103X),  of  weight  [3Xhw[103X, which must be
  dominant. This function returns a highest-weight module over [3XU[103X isomorphic to
  the submodule of [3XV[103X generated by [3Xv[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("B",2) );;[127X[104X
    [4X[25Xgap>[125X [27XW1:= HighestWeightModule( U, [1,0] );;[127X[104X
    [4X[25Xgap>[125X [27XW2:= HighestWeightModule( U, [0,1] );;[127X[104X
    [4X[25Xgap>[125X [27XT:= TensorProductOfAlgebraModules( W1, W2 );[127X[104X
    [4X[28X<20-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XHWModuleByGenerator( T, Basis(T)[1], [1,1] );[127X[104X
    [4X[28X<16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-7 InducedQEAModule[101X
  
  [29X[2XInducedQEAModule[102X( [3XU[103X, [3XV[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  is  a non-generic quantized enveloping algebra, and [3XV[103X a module over
  the  corresponding  generic  quantized  enveloping  algebra.  This  function
  returns  the  [3XU[103X-module  obtained  from  [3XV[103X by setting [3X_q[103X equal to the quantum
  parameter of [3XU[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("B",2);;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R );;[127X[104X
    [4X[25Xgap>[125X [27XU0:= QuantizedUEA( R, CF(3), E(3) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XW:= InducedQEAModule( U0, V );[127X[104X
    [4X[28X<16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = E(3) )>[128X[104X
    [4X[28X# This module is isomorphic to the one obtained by[128X[104X
    [4X[28X# HighestWeightModule( U0, [1,1] );[128X[104X
  [4X[32X[104X
  
  [1X3.8-8 GenericModule[101X
  
  [29X[2XGenericModule[102X( [3XW[103X ) [32X attribute
  
  [33X[0;0YFor  an  induced module (see [2XInducedQEAModule[102X ([14X3.8-7[114X)) this function returns
  the corresponding module over the generic quantized enveloping algebra.[133X
  
  [1X3.8-9 CanonicalMapping[101X
  
  [29X[2XCanonicalMapping[102X( [3XW[103X ) [32X attribute
  
  [33X[0;0YHere  [3XW[103X  is  an  induced  module.  Let [3XV[103X be the corresponding generic module
  ([2XGenericModule[102X ([14X3.8-8[114X)). This function returns the map [3XV --> W[103X, that sets [3X_q[103X
  equal to the quantum parameter of the acting algebra of [3XW[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("B",2);;[127X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( R );;[127X[104X
    [4X[25Xgap>[125X [27XU0:= QuantizedUEA( R, CF(3), E(3) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XW:= InducedQEAModule( U0, V );;[127X[104X
    [4X[25Xgap>[125X [27Xf:= CanonicalMapping( W );[127X[104X
    [4X[28XMappingByFunction( <[128X[104X
    [4X[28X16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = q )>, <[128X[104X
    [4X[28X16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = E(3) )>, function( v ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XImage( f, _q^2*Basis(V)[3] );[127X[104X
    [4X[28X(E(3)^2)*e.3[128X[104X
  [4X[32X[104X
  
  [1X3.8-10 U2Module[101X
  
  [29X[2XU2Module[102X( [3XU[103X, [3Xhw[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  must  be  a quantized enveloping algebra of type [22XA_2[122X. This function
  returns the highest-weight module over [3XU[103X of highest-weight [3Xhw[103X (which must be
  dominant).  This function is generally a lot faster than [2XHighestWeightModule[102X
  ([14X3.8-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27XA2Module( U, [4,7] );[127X[104X
    [4X[28X<260-dimensional left-module over QuantumUEA( <root system of type A[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-11 MinusculeModule[101X
  
  [29X[2XMinusculeModule[102X( [3XU[103X, [3Xhw[103X ) [32X operation
  
  [33X[0;0YHere  [3XU[103X  must  be a generic quantized enveloping algebra, and [3Xhw[103X a minuscule
  dominant  weight.  This function returns the highest-weight module over [3XU[103X of
  highest-weight   [3Xhw[103X.   This  function  is  generally  somewhat  faster  than
  [2XHighestWeightModule[102X ([14X3.8-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",5) );;[127X[104X
    [4X[25Xgap>[125X [27XMinusculeModule( U, [0,0,1,0,0] );[127X[104X
    [4X[28X<20-dimensional left-module over QuantumUEA( <root system of type A[128X[104X
    [4X[28X5>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-12 DualAlgebraModule[101X
  
  [29X[2XDualAlgebraModule[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YHere  [3XV[103X  is  a  finite-dimensional  left  module over a quantized enveloping
  algebra  [3XU[103X.  This function returns the dual space of [3XV[103X as an algebra module.
  For this the antipode map of [3XU[103X is used (see [2XAntipodeMap[102X ([14X3.7-4[114X)).[133X
  
  [33X[0;0YLet  [3XM[103X  denote the module returned by this function. Then [3XM[103X has as basis the
  dual  basis  with respect to [3XBasis( V )[103X. An element of this basis is printed
  as  [3XF@v[103X,  where  [3Xv[103X  is  an element of [3XBasis( V )[103X. This is the function which
  takes  the value [3X1[103X on [3Xv[103X and [3X0[103X on all other basis elements. A general element
  of [3XM[103X is a linear combination of these basis elements.[133X
  
  [33X[0;0YThe  elements of [3XM[103X can be viewed as functions which take arguments. However,
  internally  the  elements  of [3XM[103X are represented as wrapped up functions. The
  function  corresponding to an element [3Xm[103X of [3XM[103X is obtained by [3XExtRepOfObj( m )[103X
  (the  result  of  which is printed in the same way as [3Xm[103X, but is not equal to
  it).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XM:= DualAlgebraModule( V );[127X[104X
    [4X[28X<8-dimensional left-module over QuantumUEA( <root system of type A[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27Xu:= GeneratorsOfAlgebra( U )[2];[127X[104X
    [4X[28XF2[128X[104X
    [4X[25Xgap>[125X [27Xvv:= BasisVectors( Basis( M ) );[127X[104X
    [4X[28X[ (1)*F@1*v0, (1)*F@F1*v0, (1)*F@F3*v0, (1)*F@F1*F3*v0, (1)*F@F2*v0,[128X[104X
    [4X[28X  (1)*F@F1*F2*v0, (1)*F@F2*F3*v0, (1)*F@F2^(2)*v0 ][128X[104X
    [4X[25Xgap>[125X [27Xu^vv[3];[127X[104X
    [4X[28X<zero function>[128X[104X
    [4X[28X# (The zero of the dual space is printed as <zero function>).[128X[104X
    [4X[25Xgap>[125X [27Xu^vv[4];[127X[104X
    [4X[28X(q^3-q^5)*F@1*v0[128X[104X
    [4X[28X# We get the function corresponding to a vector in M by using ExtRepOfObj:[128X[104X
    [4X[25Xgap>[125X [27Xf:= ExtRepOfObj( vv[1] );[127X[104X
    [4X[28X(1)*F@1*v0[128X[104X
    [4X[28X# We can calculate images of this function:[128X[104X
    [4X[25Xgap>[125X [27XList( Basis(V), v -> Image( f, v ) );[127X[104X
    [4X[28X[ 1, 0, 0, 0, 0, 0, 0, 0 ][128X[104X
  [4X[32X[104X
  
  [1X3.8-13 TrivialAlgebraModule[101X
  
  [29X[2XTrivialAlgebraModule[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YReturns the trivial module over the quantized enveloping algebra [3XU[103X. For this
  the counit map of [3XU[103X is used.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= TrivialAlgebraModule( U );[127X[104X
    [4X[28X<left-module over QuantumUEA( <root system of type A2>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  [1X3.8-14 WeightsAndVectors[101X
  
  [29X[2XWeightsAndVectors[102X( [3XV[103X ) [32X operation
  
  [33X[0;0YHere   [3XV[103X   is   a   left   module   over  a  quantized  enveloping  algebra.
  [3XWeightsAndVectors(  V )[103X is a list of two lists; the first of these is a list
  of  the  weights  of  [3XV[103X,  the second a list of corresponding weight vectors.
  These are again grouped in lists: if the multiplicity of a weight is [3Xm[103X, then
  there  are  [3Xm[103X  weight  vectors,  forming a basis of the corresponding weight
  space.[133X
  
  [33X[0;0YModules  constructed by [2XHighestWeightModule[102X ([14X3.8-1[114X) come with this attribute
  set.  There  is a method installed for computing [3XWeightsAndVectors( V )[103X, for
  modules  [3XV[103X  over a generic quantized enveloping algebra, such that all basis
  vectors (i.e., all elements of [3XBasis( V )[103X) are weight vectors.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "A", 2 ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [ 1, 1 ] );;[127X[104X
    [4X[25Xgap>[125X [27XWeightsAndVectors( V );[127X[104X
    [4X[28X[ [ [ 1, 1 ], [ -1, 2 ], [ 2, -1 ], [ 0, 0 ], [ -2, 1 ], [ 1, -2 ],[128X[104X
    [4X[28X      [ -1, -1 ] ],[128X[104X
    [4X[28X  [ [ 1*v0 ], [ F1*v0 ], [ F3*v0 ], [ F1*F3*v0, F2*v0 ], [ F1*F2*v0 ],[128X[104X
    [4X[28X      [ F2*F3*v0 ], [ F2^(2)*v0 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X3.8-15 HighestWeightsAndVectors[101X
  
  [29X[2XHighestWeightsAndVectors[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YIs analogous to [2XWeightsAndVectors[102X ([14X3.8-14[114X); now only the highest weights are
  listed along with the corresponding highest-weight vectors.[133X
  
  [33X[0;0YThere is a method installed for this using [2XWeightsAndVectors[102X ([14X3.8-14[114X); which
  means that it works if and only if [3XWeightsAndVectors( V )[103X works.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( [ "A", 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [ 1, 1 ] );;[127X[104X
    [4X[25Xgap>[125X [27XHighestWeightsAndVectors( V );[127X[104X
    [4X[28X[ [ [ 1, 1 ] ], [ [ 1*v0 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X3.8-16 RMatrix[101X
  
  [29X[2XRMatrix[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YHere  [3XV[103X is a module over the a quantized enveloping algebra [3XU[103X. This function
  returns  the  matrix  of a linear map [22Xθ : V⊗ V -> V⊗ V[122X that is a solution to
  the  quantum  Yang-Baxter  equation.  We have that [22Xθ∘ P[122X is an isomorphism of
  [3XU[103X-modules,  where  [22XP  :V⊗ V-> V⊗ V[122X is the linear map such that [22XP(v⊗ w)=w⊗ v[122X.
  For more details we refer to [Jan96], Chapter 7.[133X
  
  [33X[0;0YThis function works for modules for which [2XWeightsAndVectors[102X ([14X3.8-14[114X) works.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",1) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1] );;[127X[104X
    [4X[25Xgap>[125X [27XRMatrix( V );[127X[104X
    [4X[28X[ [ 1, 0, 0, 0 ], [ 0, q, 1-q^2, 0 ], [ 0, 0, q, 0 ], [ 0, 0, 0, 1 ] ][128X[104X
  [4X[32X[104X
  
  [1X3.8-17 IsomorphismOfTensorModules[101X
  
  [29X[2XIsomorphismOfTensorModules[102X( [3XV[103X, [3XW[103X ) [32X operation
  
  [33X[0;0YHere [3XV[103X, [3XW[103X are two modules over the same quantized enveloping algebra [3XU[103X. This
  function  returns  a  linear  map  [22Xθ : V⊗ W-> W⊗ V[122X that is an isomorphism of
  U-modules.[133X
  
  [33X[0;0YThis  function  is  only  guaranteed  to  work correctly if the Hopf algebra
  structure is non-twisted (see [2XUseTwistedHopfStructure[102X ([14X3.7-2[114X)).[133X
  
  [33X[0;0YThis function works for modules for which [2XWeightsAndVectors[102X ([14X3.8-14[114X) works.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("B",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,0] );;[127X[104X
    [4X[25Xgap>[125X [27XW:= HighestWeightModule( U, [0,1] );;[127X[104X
    [4X[25Xgap>[125X [27Xh:= IsomorphismOfTensorModules( V, W );;[127X[104X
    [4X[25Xgap>[125X [27XVW:= Source( h );[127X[104X
    [4X[28X<20-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XImage( h, Basis(VW)[13] );[127X[104X
    [4X[28Xq*(1*v0<x>F3*v0)+1-q^2*(F4*v0<x>F2*v0)+q^-1-q^3*(F3*v0<x>1*v0)[128X[104X
  [4X[32X[104X
  
  [1X3.8-18 WriteModuleToFile[101X
  
  [29X[2XWriteModuleToFile[102X( [3XV[103X, [3Xfile[103X ) [32X operation
  
  [33X[0;0YHere [3XV[103X is a module over a quantized enveloping algebra, and [3Xfile[103X is a string
  containing  the name of a file. This function writes some data to [3Xfile[103X, that
  allows [2XReadModuleFromFile[102X ([14X3.8-19[114X) to recover it.[133X
  
  [33X[0;0YWe  remark  that  this  function  currently  is only implemented for generic
  quantized enveloping algebras.[133X
  
  [1X3.8-19 ReadModuleFromFile[101X
  
  [29X[2XReadModuleFromFile[102X( [3Xfile[103X ) [32X operation
  
  [33X[0;0YHere  [3Xfile[103X is a string containing the name of a file, to which a module over
  a  quantized  enveloping  algebra  has  been  written  by  [2XWriteModuleToFile[102X
  ([14X3.8-18[114X). This function recovers the module. More precisely: a new module is
  constructed  that  is  isomorphic to the old one. In the process the algebra
  acting  on  the  module is constructed anew (from data written to the file).
  This algebra can be accessed by [3XLeftActingAlgebra( V )[103X.[133X
  
  [33X[0;0YWe  remark  that  this  function  currently  is only implemented for generic
  quantized enveloping algebras.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",3) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XWriteModuleToFile( V, "/home/wdg/A3mod" );[127X[104X
    [4X[25Xgap>[125X [27XW:= ReadModuleFromFile( "/home/wdg/A3mod" );[127X[104X
    [4X[28X<64-dimensional left-module over QuantumUEA( <root system of type A[128X[104X
    [4X[28X3>, Qpar = q )>[128X[104X
  [4X[32X[104X
  
  
  [1X3.9 [33X[0;0YThe path model[133X[101X
  
  [33X[0;0YIn  this  section  we describe functions for dealing with the path model. We
  work only with LS-paths, which are represented by two lists, one of weights,
  and one of rationals (see Section [14X2.7[114X).[133X
  
  [1X3.9-1 DominantLSPath[101X
  
  [29X[2XDominantLSPath[102X( [3XR[103X, [3Xwt[103X ) [32X operation
  
  [33X[0;0YHere  [3XR[103X  is a root system, and [3Xwt[103X a dominant weight in the weight lattice of
  [3XR[103X. This function returns the LS-path that is the line from the origin to [3Xwt[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XDominantLSPath( R, [1,3] );[127X[104X
    [4X[28X<LS path of shape [ 1, 3 ] ending in [ 1, 3 ] >[128X[104X
  [4X[32X[104X
  
  [1X3.9-2 Falpha[101X
  
  [29X[2XFalpha[102X( [3Xpath[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YIs  the  result  of  applying the path operator [22Xf_α_[3Xind[103X}[122X to the LS-path [3Xpath[103X
  (where [22Xα_[3Xind[103X[122X is the [3Xind[103X-th simple root).[133X
  
  [33X[0;0YThe result is [3Xfail[103X if [22Xf_α_[3Xind[103X}[122X[3X(path)=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xp:=DominantLSPath( R, [1,3] );;[127X[104X
    [4X[25Xgap>[125X [27Xp1:=Falpha( p, 1 );[127X[104X
    [4X[28X<LS path of shape [ 1, 3 ] ending in [ -1, 4 ] >[128X[104X
    [4X[25Xgap>[125X [27XFalpha( p1, 1 );[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [1X3.9-3 Ealpha[101X
  
  [29X[2XEalpha[102X( [3Xpath[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YIs  the  result  of  applying the path operator [22Xe_α_[3Xind[103X}[122X to the LS-path [3Xpath[103X
  (where [22Xα_[3Xind[103X[122X is the [3Xind[103X-th simple root).[133X
  
  [33X[0;0YThe result is [3Xfail[103X if [22Xe_α_[3Xind[103X}[122X[3X(path)=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xp:=DominantLSPath( R, [1,3] );;[127X[104X
    [4X[25Xgap>[125X [27XEalpha( p, 2 );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27Xp1:=Falpha( p, 1 );;[127X[104X
    [4X[25Xgap>[125X [27XEalpha( p1, 1 );[127X[104X
    [4X[28X<LS path of shape [ 1, 3 ] ending in [ 1, 3 ] >[128X[104X
  [4X[32X[104X
  
  [1X3.9-4 LSSequence[101X
  
  [29X[2XLSSequence[102X( [3Xpath[103X ) [32X attribute
  
  [33X[0;0Yreturns  the two sequences (of weights and rational numbers) that define the
  LS-path path.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xp:=DominantLSPath( R, [1,3] );;[127X[104X
    [4X[25Xgap>[125X [27Xp1:= Falpha( Falpha( p, 1 ), 2 );;[127X[104X
    [4X[25Xgap>[125X [27XLSSequence( p1 );[127X[104X
    [4X[28X[ [ [ 11, -4 ], [ -1, 4 ] ], [ 0, 1/4, 1 ] ][128X[104X
  [4X[32X[104X
  
  [1X3.9-5 WeylWord[101X
  
  [29X[2XWeylWord[102X( [3Xpath[103X ) [32X attribute
  
  [33X[0;0YHere  [3Xpath[103X  is  an  LS-path  in  the  orbit  (under the root operators) of a
  dominant  LS-path ending in the dominant weight [22Xλ[122X. This means that the first
  direction  of  path  is  of the form [22Xw(λ)[122X for some [22Xw[122X in the Weyl group. This
  function returns a list [22X[i_1,..., i_m ][122X such that [22Xw=s_i_1⋯ s_i_m[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xp:=DominantLSPath( R, [1,3] );;[127X[104X
    [4X[25Xgap>[125X [27Xp1:= Falpha( Falpha( Falpha( p, 1 ), 2 ), 1 );;[127X[104X
    [4X[25Xgap>[125X [27XWeylWord( p1 );[127X[104X
    [4X[28X[ 1, 2, 1 ][128X[104X
  [4X[32X[104X
  
  [1X3.9-6 EndWeight[101X
  
  [29X[2XEndWeight[102X( [3Xpath[103X ) [32X attribute
  
  [33X[0;0YHere  [3Xpath[103X  is  an  LS-path;  this  function  returns the weight that is the
  endpoint of path[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "G", 2 );;[127X[104X
    [4X[25Xgap>[125X [27Xp:=DominantLSPath( R, [1,3] );;[127X[104X
    [4X[25Xgap>[125X [27Xp1:= Falpha( Falpha( Falpha( p, 1 ), 2 ), 1 );;[127X[104X
    [4X[25Xgap>[125X [27XEndWeight( p1 );[127X[104X
    [4X[28X[ 0, 3 ][128X[104X
  [4X[32X[104X
  
  [1X3.9-7 CrystalGraph[101X
  
  [29X[2XCrystalGraph[102X( [3XR[103X, [3Xwt[103X ) [32X function
  
  [33X[0;0YThis  function  returns  a  record  describing  the  crystal  graph  of  the
  highest-weight  module with highest weight [3Xwt[103X, over the quantized enveloping
  algebra  corresponding  to [3XR[103X. It is computed using the path model. Therefore
  the points in the graph are LS-paths.[133X
  
  [33X[0;0YDenote  the  output  by [3Xr[103X; then [3Xr.points[103X is the list of points of the graph.
  Furthermore,  [3Xr.edges[103X  is  a  list  of edges of the graph; this is a list of
  elements of the form [3X[ [ i, j ], u ][103X. This means that there is an arrow from
  point  [3Xi[103X  (i.e., the point on position [3Xi[103X in [3Xr.points[103X) to point [3Xj[103X, with label
  [3Xu[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( "A", 2 );;[127X[104X
    [4X[25Xgap>[125X [27XCrystalGraph( R, [1,1] );[127X[104X
    [4X[28Xrec([128X[104X
    [4X[28X  points := [ <LS path of shape [ 1, 1 ] ending in [ 1, 1 ] >, <LS path of sha\[128X[104X
    [4X[28Xpe [ 1, 1 ] ending in [ -1, 2 ] >, <LS path of shape [ 1, 1 ] ending in[128X[104X
    [4X[28X        [ 2, -1 ] >, <LS path of shape [ 1, 1 ] ending in [ 0, 0 ] >,[128X[104X
    [4X[28X      <LS path of shape [ 1, 1 ] ending in [ 0, 0 ] >,[128X[104X
    [4X[28X      <LS path of shape [ 1, 1 ] ending in [ 1, -2 ] >,[128X[104X
    [4X[28X      <LS path of shape [ 1, 1 ] ending in [ -2, 1 ] >,[128X[104X
    [4X[28X      <LS path of shape [ 1, 1 ] ending in [ -1, -1 ] > ],[128X[104X
    [4X[28X  edges := [ [ [ 1, 2 ], 1 ], [ [ 1, 3 ], 2 ], [ [ 2, 4 ], 2 ],[128X[104X
    [4X[28X      [ [ 3, 5 ], 1 ], [ [ 4, 6 ], 2 ], [ [ 5, 7 ], 1 ], [ [ 6, 8 ], 1 ],[128X[104X
    [4X[28X      [ [ 7, 8 ], 2 ] ] )[128X[104X
  [4X[32X[104X
  
  
  [1X3.10 [33X[0;0YCanonical bases[133X[101X
  
  [33X[0;0YHere we describe functions for computing the canonical basis of the negative
  part of a quantized enveloping algebra, and of a module.[133X
  
  [1X3.10-1 Falpha[101X
  
  [29X[2XFalpha[102X( [3Xx[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere  [3Xx[103X  is a PBW-monomial in [22XU^-[122X (i.e., a monomial in the [22XF_α[122X, where [22Xα[122X runs
  over  the  positive roots). This function returns the result of applying the
  [3Xind[103X-th Kashiwara operator [22XwidetildeF_α_[3Xind[103X}[122X to [22Xx[122X (cf. Section [14X2.6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27Xx:= One( U );[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XFalpha( Falpha( x, 3 ), 2 );[127X[104X
    [4X[28XF3*F9[128X[104X
  [4X[32X[104X
  
  [1X3.10-2 Ealpha[101X
  
  [29X[2XEalpha[102X( [3Xx[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere  [3Xx[103X  is a PBW-monomial in [22XU^-[122X (i.e., a monomial in the [22XF_α[122X, where [22Xα[122X runs
  over  the  positive roots). This function returns the result of applying the
  [3Xind[103X-th  Kashiwara  operator  [22XwidetildeE_α_[3Xind[103X}[122X  to  [22Xx[122X (cf. Section [14X2.6[114X). The
  result is [3Xfail[103X if [22XwidetildeE_α_[3Xind[103X}[122X[3X(x)=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27XEalpha( One( U ), 2 );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( U );;[127X[104X
    [4X[25Xgap>[125X [27Xx:= g[1]*g[4]*g[7]*g[17];[127X[104X
    [4X[28XF1*F4*F7*F17[128X[104X
    [4X[25Xgap>[125X [27XEalpha( x, 3 );[127X[104X
    [4X[28XF1*F2*F7*F17[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.10-3 CanonicalBasis[101X
  
  [29X[2XCanonicalBasis[102X( [3XU[103X ) [32X attribute
  
  [33X[0;0YIs the canonical basis of the quantized universal enveloping algebra [3XU[103X. When
  this  is  constructed  nothing  is  computed. By using [2XPBWElements[102X ([14X3.10-4[114X),
  [2XMonomialElements[102X  ([14X3.10-5[114X),  [2XStrings[102X  ([14X3.10-6[114X) information about elements of
  the canonical basis can be obtained.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );[127X[104X
    [4X[28X<canonical basis of QuantumUEA( <root system of type F4>, Qpar = q ) >[128X[104X
  [4X[32X[104X
  
  [1X3.10-4 PBWElements[101X
  
  [29X[2XPBWElements[102X( [3XB[103X, [3Xrt[103X ) [32X operation
  
  [33X[0;0YHere  [3XB[103X  is  the  canonical  basis  of  a  quantized  uea,  and [3Xrt[103X a list of
  non-negative  integers representing an element of the root lattice (e.g., if
  the simple roots are [22Xα[122X, [22Xβ[122X and [3Xrt = [ 3, 2 ][103X, then [3Xrt[103X represents [22X3α+2β[122X).[133X
  
  [33X[0;0YIt  is  possible  to  add  the option [3Xlowrank[103X, as follows [3XPBWElements( B, rt
  :lowrank  )[103X.  In that case a somewhat different method will be used, that is
  significantly faster if the underlying root system has rank 2,3. It is about
  equally fast for ranks 4,5; and slower for ranks greater than 5.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27XPBWElements( B, [1,2,1,0] );[127X[104X
    [4X[28X[ F1*F3^(2)*F9, F1*F3*F7+(q^4)*F1*F3^(2)*F9, (q^4)*F1*F3^(2)*F9+F2*F3*F9,[128X[104X
    [4X[28X  (q^2)*F1*F3*F7+(q^2+q^6)*F1*F3^(2)*F9+(q^2)*F2*F3*F9+F2*F7,[128X[104X
    [4X[28X  (q^4)*F1*F3*F7+(q^8)*F1*F3^(2)*F9+(q^4)*F2*F3*F9+(q^2)*F2*F7+F3*F4 ][128X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("G",2) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27XPBWElements( B, [2,3] : lowrank );[127X[104X
    [4X[28X[ F1^(2)*F6^(3), F1*F5*F6^(2)+(q^8+q^10)*F1^(2)*F6^(3),[128X[104X
    [4X[28X  (q^2)*F1*F5*F6^(2)+(q^6+q^12)*F1^(2)*F6^(3)+F3*F6^(2),[128X[104X
    [4X[28X  (q^8)*F1*F5*F6^(2)+(q^18)*F1^(2)*F6^(3)+(q^6)*F3*F6^(2)+F5^(2)*F6 ][128X[104X
  [4X[32X[104X
  
  [1X3.10-5 MonomialElements[101X
  
  [29X[2XMonomialElements[102X( [3XB[103X, [3Xrt[103X ) [32X operation
  
  [33X[0;0YThis  does  the  same  as [2XPBWElements[102X ([14X3.10-4[114X), except that the elements are
  written  as  linear combinations of monomials in the generators [22XF_α[122X, where [22Xα[122X
  runs through the simple roots.[133X
  
  [33X[0;0YWe  remark  that  this  information  is also computed [21Xbehind the scenes[121X when
  calling  [3XPBWElements(  B,  rt  )[103X.  However, it is not computed if the option
  [3Xlowrank[103X is present in the call to [3XPBWElements[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27XMonomialElements( B, [1,2,1,0] );[127X[104X
    [4X[28X[ F1*F3^(2)*F9, F1*F3*F9*F3+(-1)*F1*F3^(2)*F9, F3^(2)*F1*F9, F3*F1*F9*F3,[128X[104X
    [4X[28X  F3*F9*F3*F1+(-1)*F3^(2)*F1*F9 ][128X[104X
  [4X[32X[104X
  
  [1X3.10-6 Strings[101X
  
  [29X[2XStrings[102X( [3XB[103X, [3Xrt[103X ) [32X operation
  
  [33X[0;0YHere [3XB[103X, [3Xrt[103X are the same as in [2XPBWElements[102X ([14X3.10-4[114X). This returns the list of
  strings  corresponding  to the elements of [3XB[103X of weight [3Xrt[103X (cf. Section [14X2.6[114X).
  For  example,  if on the [22Xk[122X-th position of the list returned by this function
  we  have  [3X[ 1, 2, 2, 3 ][103X, then the principal monomial of the [22Xk[122X-th element of
  [3XPBWElements(  B, rt )[103X is [22XwidetildeF_1^2widetildeF_2^3(1)[122X (where [22XwidetildeF_i[122X
  is the [22Xi[122X-th Kashiwara operator).[133X
  
  [33X[0;0YWe  remark  that  this  information  is also computed [21Xbehind the scenes[121X when
  calling  [3XPBWElements(  B,  rt  )[103X.  However, it is not computed if the option
  [3Xlowrank[103X is present in the call to [3XPBWElements[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "F", 4 ) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27XStrings( B, [1,2,1,0] );[127X[104X
    [4X[28X[ [ 1, 1, 2, 2, 3, 1 ], [ 1, 1, 2, 1, 3, 1, 2, 1 ], [ 2, 2, 1, 1, 3, 1 ],[128X[104X
    [4X[28X  [ 2, 1, 1, 1, 3, 1, 2, 1 ], [ 2, 1, 3, 1, 2, 1, 1, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XFalpha( Falpha( Falpha( Falpha( One(U), 3 ), 1 ), 2 ), 2 );[127X[104X
    [4X[28XF2*F3*F9[128X[104X
    [4X[25Xgap>[125X [27XPBWElements( B, [1,2,1,0] )[3];[127X[104X
    [4X[28X(q^4)*F1*F3^(2)*F9+F2*F3*F9[128X[104X
  [4X[32X[104X
  
  [1X3.10-7 PrincipalMonomial[101X
  
  [29X[2XPrincipalMonomial[102X( [3Xu[103X ) [32X operation
  
  [33X[0;0YHere  [3Xu[103X  is  an element of the output of [2XPBWElements[102X ([14X3.10-4[114X). This function
  returns the unique monomial of [3Xu[103X that has coefficient 1.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("G",2) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27Xp:= PBWElements( B, [4,4] : lowrank )[4];[127X[104X
    [4X[28X(q^9)*F1^(2)*F3*F6^(3)+F1^(2)*F5^(2)*F6^(2)+(q^9+q^11+q^13)*F1^(3)*F5*F6^([128X[104X
    [4X[28X3)+(q^20+q^22+2*q^24+q^26+q^28)*F1^(4)*F6^(4)[128X[104X
    [4X[25Xgap>[125X [27XPrincipalMonomial( p );[127X[104X
    [4X[28XF1^(2)*F5^(2)*F6^(2)[128X[104X
  [4X[32X[104X
  
  [1X3.10-8 StringMonomial[101X
  
  [29X[2XStringMonomial[102X( [3Xu[103X ) [32X operation
  
  [33X[0;0YHere [3Xu[103X is a monomial in the negative part of a quantized enveloping algebra,
  e.g.,  as  output  by [2XPrincipalMonomial[102X ([14X3.10-7[114X). This function computes the
  corresponding  [21Xstring[121X  (see Section [14X2.6[114X). The strings are output in the same
  way as in [14X3.10-6[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("G",2) );;[127X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27Xp:= PBWElements( B, [1,2] : lowrank )[2];;[127X[104X
    [4X[25Xgap>[125X [27Xm:=PrincipalMonomial( p );[127X[104X
    [4X[28XF5*F6[128X[104X
    [4X[25Xgap>[125X [27XStringMonomial( m );[127X[104X
    [4X[28X[ 2, 2, 1, 1 ][128X[104X
    [4X[25Xgap>[125X [27XFalpha( Falpha( Falpha( One(U), 1 ), 2 ), 2 );[127X[104X
    [4X[28XF5*F6[128X[104X
  [4X[32X[104X
  
  [1X3.10-9 Falpha[101X
  
  [29X[2XFalpha[102X( [3XV[103X, [3Xv[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X is a module over a quantized enveloping algebra, [3Xv[103X an element of it,
  and  [3Xind[103X  an  index  between 1 and the rank of the root system. The function
  returns  the result of applying the [3Xind[103X-th Kashiwara operator [22XwidetildeF_[3Xind[103X[122X
  to  [3Xv[103X. Here the Kashiwara operators are different from the ones described in
  Section  [14X2.6[114X.  We  refer to [Jan96], 9.2 for the definition of the operators
  used here.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("B",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XFalpha( V, Basis(V)[1], 1 );[127X[104X
    [4X[28XF1*v0[128X[104X
  [4X[32X[104X
  
  [1X3.10-10 Ealpha[101X
  
  [29X[2XEalpha[102X( [3XV[103X, [3Xv[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X is a module over a quantized enveloping algebra, [3Xv[103X an element of it,
  and  [3Xind[103X  an  index  between 1 and the rank of the root system. The function
  returns  the result of applying the [3Xind[103X-th Kashiwara operator [22XwidetildeE_[3Xind[103X[122X
  to  [3Xv[103X. Here the Kashiwara operators are different from the ones described in
  Section  [14X2.6[114X.  We  refer to [Jan96], 9.2 for the definition of the operators
  used here.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("B",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27Xv:= Falpha( V, Basis(V)[2], 2 );[127X[104X
    [4X[28X(q^2)*F1*F4*v0+F2*v0[128X[104X
    [4X[25Xgap>[125X [27XEalpha( V, v, 2 );[127X[104X
    [4X[28XF1*v0[128X[104X
  [4X[32X[104X
  
  [1X3.10-11 CrystalBasis[101X
  
  [29X[2XCrystalBasis[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YHere  [3XV[103X  is  a  finite-dimensional  left  module over a quantized enveloping
  algebra.  This  function  returns  the canonical, or crystal basis of V (see
  Section [14X2.6[114X).[133X
  
  [33X[0;0YThis  function  only  works for modules for which [2XWeightsAndVectors[102X ([14X3.8-14[114X)
  works.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 2 ) );;[127X[104X
    [4X[28X gap> V:= HighestWeightModule( U, [1,1] );[128X[104X
    [4X[28X <16-dimensional left-module over QuantumUEA( <root system of type B2>, Qpar[128X[104X
    [4X[28X= q )>[128X[104X
    [4X[28X gap>  CrystalBasis( V );[128X[104X
    [4X[28X Basis( <16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X 2>, Qpar = q )>, [ 1*v0, F1*v0, F4*v0, F1*F4*v0, (q^2)*F1*F4*v0+F2*v0, F2*F4*v0,[128X[104X
    [4X[28X(q)*F2*F4*v0+F3*v0, (-q^-4)*F1*F2*v0, (-q^-1)*F1*F3*v0+(-q^-3)*F2^(2)*v0,[128X[104X
    [4X[28X(-q^-2)*F2^(2)*v0, F3*F4*v0, (-q^-4)*F2*F3*v0+(-q^-2)*F2^(2)*F4*v0,[128X[104X
    [4X[28X(-q^-2)*F2*F3*v0, (q^-4)*F2^(3)*v0, (-q^-1)*F3^(2)*v0, (q^-5)*F2^(2)*F3*v0 ] )[128X[104X
  [4X[32X[104X
  
  [1X3.10-12 CrystalVectors[101X
  
  [29X[2XCrystalVectors[102X( [3XV[103X ) [32X attribute
  
  [33X[0;0YHere  [3XV[103X  is  a  finite-dimensional  left  module over a quantized enveloping
  algebra.  Let  [3XC[103X  be  the  crystal  basis of [3XV[103X (i.e., output by [2XCrystalBasis[102X
  ([14X3.10-11[114X)).  This function returns a list of cosets of the basis elements of
  [3XC[103X modulo [22XqL[122X, where [22XL[122X is the [22XZ[q][122X-lattice spanned by [3XC[103X.[133X
  
  [33X[0;0YThe coset of a vector [3Xv[103X is printed as [3X<v>[103X.[133X
  
  [33X[0;0YThe crystal vectors are used to construct the point set of the crystal graph
  of [3XV[103X ([2XCrystalGraph[102X ([14X3.10-15[114X)).[133X
  
  [33X[0;0YThis  function  only  works for modules for which [2XWeightsAndVectors[102X ([14X3.8-14[114X)
  works.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 2 ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );[127X[104X
    [4X[28X<16-dimensional left-module over QuantumUEA( <root system of type B[128X[104X
    [4X[28X2>, Qpar = q )>[128X[104X
    [4X[25Xgap>[125X [27XCrystalVectors( V );[127X[104X
    [4X[28X[ <1*v0>, <F1*v0>, <F4*v0>, <F2*v0>, <F1*F4*v0>, <F3*v0>,[128X[104X
    [4X[28X  <(-q^-4)*F1*F2*v0>, <F2*F4*v0>, <F1*F3*v0>, <F3*F4*v0>,[128X[104X
    [4X[28X  <(-q^-1)*F1*F3*v0+(-q^-3)*F2^(2)*v0>, <(-q^-4)*F2*F3*v0+(-q^-2)*F2^(2)*F[128X[104X
    [4X[28X    4*v0>, <F2^(2)*F4*v0>, <(q^-4)*F2^(3)*v0>, <(-q^-1)*F3^(2)*v0>,[128X[104X
    [4X[28X  <(q^-5)*F2^(2)*F3*v0> ][128X[104X
  [4X[32X[104X
  
  [1X3.10-13 Falpha[101X
  
  [29X[2XFalpha[102X( [3Xv[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere [3Xv[103X is a crystal vector, i.e., an element of [3XCrystalVectors( V )[103X, where [3XV[103X
  is  a left module over a quantized enveloping algebra. This function returns
  the result of applying the [3Xind[103X-th Kashiwara operator [22XwidetildeF_α_[3Xind[103X}[122X to v.
  The result is [3Xfail[103X if [22XwidetildeF_α_[3Xind[103X}[122X[3X(v)=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 2 ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27Xc:=CrystalVectors( V );;[127X[104X
    [4X[25Xgap>[125X [27XFalpha( c[2], 2 );[127X[104X
    [4X[28X<F2*v0>[128X[104X
    [4X[25Xgap>[125X [27XFalpha( c[3], 2 );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XFalpha( Falpha( Falpha( c[1], 1 ), 2 ), 1 );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27Xp:= DominantLSPath( RootSystem( "B", 2 ), [1,1] );[127X[104X
    [4X[28X<LS path of shape [ 1, 1 ] ending in [ 1, 1 ] >[128X[104X
    [4X[25Xgap>[125X [27XFalpha( Falpha( Falpha( p, 1 ), 2 ), 1 );[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  last  part  of  this  example  is  an illustration of the fact that the
  crystal  graph of a highest-weight module can be obtained by the path method
  (see Section [14X2.7[114X).[133X
  
  [1X3.10-14 Ealpha[101X
  
  [29X[2XEalpha[102X( [3Xv[103X, [3Xind[103X ) [32X operation
  
  [33X[0;0YHere [3Xv[103X is a crystal vector, i.e., an element of [3XCrystalVectors( V )[103X, where [3XV[103X
  is  a left module over a quantized enveloping algebra. This function returns
  the result of applying the [3Xind[103X-th Kashiwara operator [22XwidetildeE_α_[3Xind[103X}[122X to v.
  The result is [3Xfail[103X if [22XwidetildeE_α_[3Xind[103X}[122X[3X(v)=0[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem( "B", 2 ) );;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( U, [1,1] );;[127X[104X
    [4X[25Xgap>[125X [27Xc:=CrystalVectors( V );;[127X[104X
    [4X[25Xgap>[125X [27XEalpha( c[3], 1 );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XEalpha( c[3], 2 );[127X[104X
    [4X[28X<1*v0>[128X[104X
  [4X[32X[104X
  
  [1X3.10-15 CrystalGraph[101X
  
  [29X[2XCrystalGraph[102X( [3XV[103X ) [32X function
  
  [33X[0;0YReturns  the crystal graph of the module [3XV[103X. The points of this graph are the
  cosets output by [2XCrystalVectors[102X ([14X3.10-12[114X). The edges work in the same way as
  in [2XCrystalGraph[102X ([14X3.9-7[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XU:= QuantizedUEA( RootSystem("A",2) );;[127X[104X
    [4X[25Xgap>[125X [27XV1:= HighestWeightModule( U, [1,0] );;[127X[104X
    [4X[25Xgap>[125X [27XV2:= HighestWeightModule( U, [0,1] );;[127X[104X
    [4X[25Xgap>[125X [27XW:= TensorProductOfAlgebraModules( V1, V2 );;[127X[104X
    [4X[25Xgap>[125X [27XCrystalGraph( W );[127X[104X
    [4X[28Xrec([128X[104X
    [4X[28X  points := [ <1*(1*v0<x>1*v0)>, <1*(F1*v0<x>1*v0)>, <1*(1*v0<x>F3*v0)>,[128X[104X
    [4X[28X      <1*(1*v0<x>F2*v0)+q^-1*(F2*v0<x>1*v0)>,[128X[104X
    [4X[28X      <-q^-1*(1*v0<x>F2*v0)+q^-1*(F1*v0<x>F3*v0)>, <1*(F2*v0<x>F3*v0)>,[128X[104X
    [4X[28X      <-q^-1*(F1*v0<x>F2*v0)>, <-q^-1*(F2*v0<x>F2*v0)>,[128X[104X
    [4X[28X      <-q^-3*(1*v0<x>F2*v0)+-q^-1*(F1*v0<x>F3*v0)+1*(F2*v0<x>1*v0)> ],[128X[104X
    [4X[28X  edges := [ [ [ 1, 2 ], 1 ], [ [ 1, 3 ], 2 ], [ [ 2, 4 ], 2 ],[128X[104X
    [4X[28X      [ [ 3, 5 ], 1 ], [ [ 4, 6 ], 2 ], [ [ 5, 7 ], 1 ], [ [ 6, 8 ], 1 ],[128X[104X
    [4X[28X      [ [ 7, 8 ], 2 ] ] )[128X[104X
  [4X[32X[104X
  
  
  [1X3.11 [33X[0;0YUniversal enveloping algebras[133X[101X
  
  [33X[0;0YHere  we describe functions for connecting a quantized enveloping algebra to
  the corresponding universal enveloping algebra.[133X
  
  [1X3.11-1 UEA[101X
  
  [29X[2XUEA[102X( [3XL[103X ) [32X attribute
  
  [33X[0;0YThis  function  returns the universal enveloping algebra [3Xu[103X of the semisimple
  Lie  algebra  [3XL[103X. The generators of [3Xu[103X are the generators of a Kostant lattice
  in the universal enveloping algebra (these generators are obtained from [3XL[103X by
  [3XLatticeGeneratorsInUEA( L )[103X, see the [5XGAP[105X reference manual).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra( "B", 2, Rationals );[127X[104X
    [4X[28X<Lie algebra of dimension 10 over Rationals>[128X[104X
    [4X[25Xgap>[125X [27Xu:= UEA( L );[127X[104X
    [4X[28X<algebra over Rationals, with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27Xg:= GeneratorsOfAlgebra( u );[127X[104X
    [4X[28X[ y1, y2, y3, y4, x1, x2, x3, x4, ( h9/1 ), ( h10/1 ) ][128X[104X
  [4X[32X[104X
  
  [1X3.11-2 UnderlyingLieAlgebra[101X
  
  [29X[2XUnderlyingLieAlgebra[102X( [3Xu[103X ) [32X attribute
  
  [33X[0;0YFor  a  universal  enveloping  algebra  [3Xu[103X  constructed by [2XUEA[102X ([14X3.11-1[114X), this
  returns the corresponding semisimple Lie algebra[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra( "B", 2, Rationals );;[127X[104X
    [4X[25Xgap>[125X [27Xu:= UEA( L );;[127X[104X
    [4X[25Xgap>[125X [27XUnderlyingLieAlgebra( u );[127X[104X
    [4X[28X<Lie algebra of dimension 10 over Rationals>[128X[104X
  [4X[32X[104X
  
  [1X3.11-3 HighestWeightModule[101X
  
  [29X[2XHighestWeightModule[102X( [3Xu[103X, [3Xhw[103X ) [32X operation
  
  [33X[0;0YFor  a  universal  enveloping  algebra  [3Xu[103X  constructed by [2XUEA[102X ([14X3.11-1[114X), this
  returns the irreducible highest weight module over [3Xu[103X with highest weight [3Xhw[103X,
  which must be dominant. This module is the same as the corresponding highest
  weight  module  over  the  semisimple  Lie  algebra,  but  in  this case the
  enveloping algebra [3Xu[103X acts.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra( "B", 2, Rationals );;[127X[104X
    [4X[25Xgap>[125X [27Xu:= UEA( L );;[127X[104X
    [4X[25Xgap>[125X [27XHighestWeightModule( u, [2,3] );[127X[104X
    [4X[28X<140-dimensional left-module over <algebra over Rationals, with[128X[104X
    [4X[28X10 generators>>[128X[104X
  [4X[32X[104X
  
  [1X3.11-4 QUEAToUEAMap[101X
  
  [29X[2XQUEAToUEAMap[102X( [3XL[103X ) [32X attribute
  
  [33X[0;0YHere  [3XL[103X  is  a  semisimple  Lie  algebra.  Set  [3Xu  :=  UEA(  L  )[103X,  and [3XU :=
  QuantizedUEA( L )[103X (so [3Xu, U[103X are the universal enveloping algebra, and [21Xgeneric[121X
  quantized  enveloping  algebra  of  [3XL[103X  respectively). Then [3XQUEAToUEAMap( L )[103X
  returns  the  algebra homomorphism from [3XU[103X to [3Xu[103X obtained by mapping [3Xq[103X to [3X1[103X, a
  generator   [3XFi[103X,   corresponding  to  a  simple  root  to  the  generator  [3Xyi[103X
  (corresponding  to  the  same simple root), and likewise for [3XEi[103X and [3Xxi[103X. This
  means that [3XKi[103X is mapped to one, and [3X[ Ki : s ][103X to [3Xhi[103X choose [3Xs[103X.[133X
  
  [33X[0;0YThe canonical basis of [3XU[103X is mapped to the canonical basis of [3Xu[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra( "B", 2, Rationals );;[127X[104X
    [4X[25Xgap>[125X [27Xf:= QUEAToUEAMap( L );[127X[104X
    [4X[28X<mapping: QuantumUEA( <root system of rank[128X[104X
    [4X[28X2>, Qpar = q ) -> Algebra( Rationals, [ y1, y2, y3, y4, x1, x2, x3, x4,[128X[104X
    [4X[28X  ( h9/1 ), ( h10/1 ) ] ) >[128X[104X
    [4X[25Xgap>[125X [27XU:= Source( f );[127X[104X
    [4X[28XQuantumUEA( <root system of rank 2>, Qpar = q )[128X[104X
    [4X[25Xgap>[125X [27Xu:= Range( f );[127X[104X
    [4X[28X<algebra over Rationals, with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XB:= CanonicalBasis( U );;[127X[104X
    [4X[25Xgap>[125X [27Xp:= PBWElements( B, [1,2] );[127X[104X
    [4X[28X[ F1*F4^(2), (q+q^3)*F1*F4^(2)+F2*F4, (q^4)*F1*F4^(2)+(q)*F2*F4+F3 ][128X[104X
    [4X[25Xgap>[125X [27Xpu:= List( p, x -> Image( f, x ) );[127X[104X
    [4X[28X[ y1*y2^(2), 2*y1*y2^(2)+y2*y3-2*y4, y1*y2^(2)+y2*y3-1*y4 ][128X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( u, [2,1] );[127X[104X
    [4X[28X<40-dimensional left-module over <algebra over Rationals, with[128X[104X
    [4X[28X10 generators>>[128X[104X
    [4X[25Xgap>[125X [27XList( pu, x -> x^Basis(V)[1] );[127X[104X
    [4X[28X[ 0*v0, y2*y3*v0+-2*y4*v0, y2*y3*v0+-1*y4*v0 ][128X[104X
    [4X[28X# Which gives us a piece of the canonical basis of V.[128X[104X
  [4X[32X[104X
  
