(* Berechnet Strukturkonstanten und Killingform von reellen kompakten linearen Lie Algebren. ACHTUNG: fuer andere Lie Algebren funktioniert das Programm nicht!! *) (* Gegeben sind eine orthonormierte Basis (b_i)i (B=(b_1, b_2, ..., b_n)T) (bzgl sp(x,y) = tr(xy) ) der Lie Algebra und eine Basistransformations- matrix T, die die orthonormierte Basis auf eine neue Basis (a_i)i (A=(a_1, a_2, ..., a_n)T) abbildet (=> A = TB ). Im folgenden bezeichnet: m: Dimension der Lie Algebra n: Dimension der Darstellung von der Lie Algebra (d.h. Dim des VR auf dem die Matrizen (b_i)i und (a_i)i operieren) Daraus werden folgende Groessen berechnet - die zur Basis (a_i)i gehoerenden Strukturkonstanten f_abc - die zugehoerige Killingform K_ab = tr( f_aij f_bjk ) *) BeginPackage["realLieAlgebrasun`"] com::usage:="com[x,y] berechnet den Kommutator von zwei Matrizen"; sp::usage:="sp[x,y] berechnet das Skalarprodukt fuer Matrizen eine adjungierten Darstellung"; makeMatrix::usage:="makeMatrix[v] constructs a matrix out of a vector; e.g. (a,b,c,d)^T --> ((a,b),(c,d))"; makeVektor::usage:="makeVektor[D] constructs a vector out of a matrix; e.g. ((a,b),(c,d)) --> (a,b,c,d)^T "; structureConst::usage:="structureConst[A] ATTENTION - THIS FUNCTION IS FOR EXPERIMENTAL PURPOSES ONLY. DON'T USE IT."; structureConst2::usage:="structureConst2[B, T] calculates the structure constants. Input parameters are: B=(b1, b2, ..., bn)^T - A matrix containing orthonormal Basis vectors. T - A basis transformation matrix that transforms Basis B to Basis A, i.e. A=TB."; printSconst::usage:="printSconst[F] prints the structure constants. The matrix F=(f1, f2, ... fn) contains the structure constants, fi denote the matrix that corresponds to the ith basis vector of the adjoint representation."; isBasisOrthonormal::usage:="isBasisOrthonormal[B] checks, whether basis B is orthonormal with respect to tr( , )."; kform::usage:="kform[F] computes the Killing form. Input parameter is an array F, containig the structure constants."; createTriangularBasisslN::usage:="createTriangularBasisslN[n] creates a Basis of sl(n) that belongs to the triangular decomposition (Chevally Serre basis)."; createONBasissuN::usage:="createONBasissuN[n] creates an orthonormal Basis (w.r.t tr( , )) of su(n), using the function createTriangularBasisslN."; Begin["`kontext`"] com[x_, y_] := x . y - y.x ; sp[x_, y_] := Tr[x . y] ; (* Die Basisvektoren von z.B. su(2) werden wie folgt definiert B = Table[b[i], {i,1,m}] b[1] = 1/Sqrt[2]{0,1,1,0}; b[2] = 1/Sqrt[2]{0,-I,I,0}; b[3] = 1/Sqrt[2]{1,0,0,-1}; die Transformationsmatrix T muss eine regulaere nxn Matrix sein*) makeMatrix[v_]:= Block[{i,j,n,E,e}, (* e.g. (a,b,c,d)^T --> ((a,b),(c,d)) *) (* ClearAll[E,e]; *) Unset[E]; Unset[e]; n= Sqrt[Length[v]]; (*Print["Error!"] /; (IntegerQ[n]);*) E = Table[e[i][j], {i,1,n},{j,1,n}]; For[i=1, i<= n, i++, For[j=1, j<=n ,j++, e[i][j] = v[[(i-1)n + j]]; ]; ]; E]; makeVektor[D_]:= Block[{i,j,n,v}, (* e.g. ((a,b),(c,d)) --> (a,b,c,d)^T *) Unset[v]; v = {}; n = Length[D]; For[i=1, i<=n, i++, For[j=1, j<=n, j++, v = Append[v, D[[i]][[j]] ]; ];]; v]; structureConst[A_] := Block[{i,r,s,m,tempM,F,D}, (* ACHTUNG: Diese Funktion ist nur fuer Testzwecke *) m = Length[A]; F = Table[f[r][s], {r,1,m}, {s,1,m}]; D = Table[d[i], {i,1,m}]; For[r=1, r<=m, r++, d[r] = Drop[A[[r]], -1]; ]; For[r=1, r<=m, r++, For[s=1, s<=m, s++, tempM = com[makeMatrix[A[[r]]], makeMatrix[A[[s]]]]; f[r][s] = Transpose[Inverse[D]] . MakeVektor[tempM]; ];]; F] structureConst2[B_, T_] := Block[{i,r,s,t,m,tMatrix,tv,F}, (* Zweite bessere Methode, die Strukturkonstanten zu berechnen *) A=T.B; m = Length[B]; tv = Table[0 i, {i,1,m}]; F = Table[f[r][s], {r,1,m}, {s,1,m}]; For[r=1, r <= m, r++, For[s=1, s<=m, s++, (* dump = makeMatrix[A[[s]]]; Remove this, there is a problem*) tMatrix = com[makeMatrix[A[[r]]],makeMatrix[A[[s]]]]; (* Print[tMatrix]; *) For[t=1, t<=m, t++, (* dump = makeMatrix[B[[t]]]; *) tv[[t]]= Tr[tMatrix . makeMatrix[B[[t]]]]; ]; f[r][s] = Simplify[Transpose[Inverse[T]] . tv]; ];]; F]; printSconst[F_] := Block[{i,n}, n = Length[F]; Print["Das sind die Strukturkonstanten. Diese Matrizen entspr. auch der adjungierten Darstellung."]; For[i=1, i<=n, i++, Print["(f",i,")_ij = ", TableForm[F[[i]]]]; ]; ]; isBasisOrthonormal[B_] := Block[{i,j,n,K,k}, n = Length[B]; K = Table[k[i][j], {i,1,n}, {j,1,n}]; For[i=1, i<=n, i++, For[j=1, j<=n, j++, k[i][j] = Tr[makeMatrix[B[[i]]] . makeMatrix[B[[j]]]]; ];]; K]; kform[F_] := Block[{i,j,n,K,k}, (* berechnet aus den Strukturkonst, via adjung. Abb, die Killingform *) n = Length[F]; K = Table[k[i][j], {i,1,n},{j,1,n}]; For[i=1, i<=n, i++, For[j=1, j<=n, j++, k[i][j] = Tr[F[[i]] . F[[j]]]; ];]; K]; createTriangularBasisslN[n_] := Block[{i,j,r,s,t,m,B,b,tempM, ttM ,tm}, (* Erzeugt eine n x n Repraesentation der Bais von sl(n) = A_(n-1), die zur "triangular decomposition" gehoert. Fuer dei Cartan Subalgebra wird eine o.n. Basis gewaehlt. (o.n. bzgl dem SP (x,y) = tr(xy). ) Die klassische Matrix Algebra sl(n) besteht aus allen n x n Matrizen mit Tr() = 0. Die Lieklammer in dieser Repraesentation ist der Matrixkommutator. Die Dimension der Lie-Algebra sl(n) ist m = n^2 - 1. Die Definition der "triangular decomposition" kann z.B. in [Fuchs, Schweigert], p.76, gefunden werdne. Wir benutzen die gleichen Konventionen wie in diesem Buch. *) m = n^2 - 1; (*Dim der Lie Algebra sl(n) *) r = n-1; (* Rang von sl(n) = A_(n-1) *) B = {}; tempM = Table[tm[i][j], {i,1,n}, {j,1,n}]; (* Zuerst erzeugen wir die r Diagonalmatrizen, die zur Cartan Subalgebra gehoeren *) For[i=1, i<=r, i++, For[s=1, s<=n, s++, For[t=1, t<=n, t++, If[(i==t)&&(s==t), tm[s][t]=1, If[(t==i+1) && (s==t), tm[s][t] = -1, tm[s][t]=0];]; ];]; ttM = Table[0 i j, {i,1,n}, {j,1,n}]; For[j=1, j