liendmc1.red 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. module liendmc1; % N-dimensional Lie algebras with 1-dimensional derived
  2. % algebra.
  3. % Author: Carsten Schoebel.
  4. % e-mail: cschoeb@aix550.informatik.uni-leipzig.de .
  5. % Copyright (c) 1993 The Leipzig University, Computer Science Dept.
  6. % All Rights Reserved.
  7. algebraic;
  8. operator heisenberg,commutative,lie_algebra;
  9. algebraic procedure liendimcom1(n);
  10. begin
  11. if (not(symbolic fixp(n)) or n<2) then
  12. symbolic rederr "dimension out of range";
  13. symbolic (if gettype 'lienstrucin neq 'ARRAY then
  14. rederr "lienstrucin not ARRAY");
  15. if length lienstrucin neq {n+1,n+1,n+1} then
  16. symbolic rederr "dimension of lienstrucin out of range";
  17. matrix lientrans(n,n);
  18. array lie_cc(n,n,n);
  19. lieninstruc(n);
  20. lienjactest(n);if lie_jtest neq 0 then
  21. <<clear lie_cc,lie_jtest;symbolic rederr "not a Lie algebra">>;
  22. <<liendimcom(n);
  23. if lie_dim=0 then
  24. <<if symbolic !*tr_lie then
  25. write "The given Lie algebra is commutative";
  26. lientrans:=lientrans**0;lie_list:={commutative(n)}>> else
  27. if lie_dim=1 then <<if lie_help=0 then
  28. liencentincom(n,lie_tt,lie_p,lie_q)
  29. else liencentoutcom(n,lie_tt,lie_s);
  30. if symbolic !*tr_lie then
  31. lienoutform(lientrans,n,lie_help,2*lie_kk!*+1);
  32. if lie_help=1 then lie_list:={lie_algebra(2),commutative(n-2)} else
  33. lie_list:={heisenberg(2*lie_kk!*+1),commutative(n-2*lie_kk!*-1)}
  34. >>else
  35. <<clear lie_dim,lie_help,lie_p,lie_q,lie_tt,lie_s,lie_kk!*,
  36. lie_jtest,lie_cc;
  37. symbolic rederr "dimension of derived algebra out of range">>;
  38. clear lie_dim,lie_help,lie_p,lie_q,lie_tt,lie_s,lie_kk!*,lie_control>>;
  39. clear lie_jtest,lie_cc;return lie_list
  40. end;
  41. algebraic procedure lieninstruc(n);
  42. begin
  43. for i:=1:n-1 do for j:=i+1:n do for k:=1:n do
  44. <<lie_cc(i,j,k):=lienstrucin(i,j,k);
  45. lie_cc(j,i,k):=-lienstrucin(i,j,k)>>
  46. end;
  47. algebraic procedure lienjactest(n);
  48. begin
  49. lie_jtest:=0;
  50. for i:=1:n-2 do
  51. for j:=i+1:n-1 do
  52. for k:=j+1:n do
  53. for l:=1:n do
  54. if (for r:=1:n sum
  55. lie_cc(j,k,r)*lie_cc(i,r,l)+lie_cc(i,j,r)*lie_cc(k,r,l)+
  56. lie_cc(k,i,r)*lie_cc(j,r,l)) neq 0 then <<lie_jtest:=1;
  57. i:=n-1;j:=n;k:=n+1;l:=n+1>>
  58. end;
  59. algebraic procedure liendimcom(n);
  60. begin integer r;
  61. scalar he;
  62. lie_dim:=0;
  63. for i:=1:n-1 do
  64. for j:=i:n do
  65. for k:=1:n do
  66. if lie_cc(i,j,k) neq 0 then
  67. <<lie_dim:=1;lie_p:=i;lie_q:=j;r:=k;i:=n;j:=k:=n+1>>;
  68. if lie_dim neq 0 then
  69. <<for i:=1:n-1 do
  70. for j:=1:n do
  71. <<he:=lie_cc(i,j,r)/lie_cc(lie_p,lie_q,r);
  72. for k:=1:n do
  73. if lie_cc(i,j,k) neq (he*lie_cc(lie_p,lie_q,k)) then
  74. <<lie_dim:=2;i:=n;j:=n+1;k:=n+1>>>>;
  75. if lie_dim=1 then
  76. <<lie_help:=0;
  77. for i:=1:n do
  78. for j:=1:n do
  79. if (for k:=1:n sum (lie_cc(lie_p,lie_q,k)*lie_cc(k,i,j))) neq 0
  80. then
  81. <<lie_help:=1;lie_s:=i;r:=j;i:=j:=n+1>>;
  82. for i:=1:n do lientrans(1,i):=lie_cc(lie_p,lie_q,i);
  83. if lie_help=0 then
  84. <<lientrans(2,lie_p):=lientrans(3,lie_q):=1;lie_kk!*:=1;
  85. for i:=1:n do <<if
  86. (lie_cc(lie_p,lie_q,i) neq 0 and i neq lie_p and i neq lie_q)
  87. then
  88. <<lie_tt:=i;i:=n+1>>>>>> else
  89. <<lientrans(2,lie_s):=
  90. lie_cc(lie_p,lie_q,r)/(for k:=1:n sum
  91. (lie_cc(lie_p,lie_q,k)*lie_cc(k,lie_s,r)));
  92. for i:=1:n do <<if (lie_cc(lie_p,lie_q,i) neq 0 and i neq lie_s)
  93. then
  94. <<lie_tt:=i;i:=n+1>>>>>>>>>>;
  95. end;
  96. algebraic procedure liencentincom(n,tt,p,q);
  97. begin integer con1,con2;
  98. matrix lie_lamb(n,n);
  99. lie_control:=0;
  100. con1:=con2:=0;
  101. for i:=4:n do
  102. if (i neq tt and i neq p and i neq q) then
  103. lientrans(i,i):=1 else
  104. if (tt neq 1 and p neq 1 and q neq 1 and con1 neq 1) then
  105. <<lientrans(i,1):=1;con1:=1>> else
  106. if (tt neq 2 and p neq 2 and q neq 2 and con2 neq 1) then
  107. <<lientrans(i,2):=1;con2:=1>> else lientrans(i,3):=1;
  108. if n>3 then <<liennewstruc(n,2,tt);
  109. if n>4 then
  110. for i:=4 step 2 until n do if (i+1)=n then <<lienfindpair(n,i);
  111. if lie_control=1 then lie_kk!*:=lie_kk!*+1>> else
  112. if i+1<n then <<lienfindpair(n,i);if lie_control=1 then
  113. <<liennewstruc(n,i,tt),lie_kk!*:=lie_kk!*+1>>else
  114. i:=n+1>>>>
  115. end;
  116. algebraic procedure lienfindpair(n,m);
  117. begin scalar he;
  118. matrix lie_a(n,n);
  119. lie_control:=0;
  120. for i:=m:n-1 do
  121. for j:=i+1:n do
  122. <<if lie_lamb(i,j) neq 0 then
  123. <<lie_control:=1;
  124. lie_a(i,m):=lie_a(m+1,j):=lie_a(j,m+1):=1;
  125. lie_a(m,i):=1/lie_lamb(i,j);
  126. for k:=1:n do
  127. if (k neq i and k neq j and k neq m and k neq (m+1)) then
  128. lie_a(k,k):=1;
  129. lientrans:=lie_a*lientrans;i:=n;j:=n+1>>>>;clear lie_a
  130. end;
  131. algebraic procedure liennewstruc(n,m,tt);
  132. begin matrix lie_a(n,n);
  133. lie_a:=lie_a**0;
  134. for i:=m:n-1 do
  135. for j:=i+1:n do
  136. lie_lamb(i,j):=(for k:=1:n sum for l:=1:n sum
  137. lientrans(i,k)*lientrans(j,l)*lie_cc(k,l,tt))/lientrans(1,tt);
  138. for i:=m+2:n do
  139. <<lie_a(i,m+1):=-lie_lamb(m,i);lie_a(i,m):=lie_lamb(m+1,i)>>;
  140. lientrans:=lie_a*lientrans;
  141. for i:=m+2:n-1 do
  142. for j:=i+1:n do
  143. lie_lamb(i,j):=(for k:=1:n sum for l:=1:n sum
  144. lientrans(i,k)*lientrans(j,l)*lie_cc(k,l,tt))/lientrans(1,tt);
  145. clear lie_a
  146. end;
  147. algebraic procedure liencentoutcom(n,tt,s);
  148. begin integer pp,qq;
  149. matrix lie_lamb(2,n),lie_a(n,n);
  150. for i:=3:n do
  151. <<lientrans(i,i):=1;lie_lamb(1,i):=(for j:=1:n sum
  152. lientrans(1,j)*lie_cc(j,i,tt))/lientrans(1,tt);
  153. lie_lamb(2,i):=lie_cc(s,i,tt)*lientrans(2,s)/lientrans(1,tt)>>;
  154. if (tt>2 and s>2) then
  155. <<lientrans(tt,tt):=lientrans(s,s):=0;
  156. lientrans(tt,1):=lientrans(s,2):=1;
  157. lie_lamb(1,tt):=(for j:=1:n sum
  158. lientrans(1,j)*lie_cc(j,1,tt)/lientrans(1,tt));
  159. lie_lamb(1,s):=(for j:=1:n sum
  160. lientrans(1,j)*lie_cc(j,2,tt)/lientrans(1,tt));
  161. lie_lamb(2,tt):=lie_cc(s,1,tt)*lientrans(2,s)/lientrans(1,tt);
  162. lie_lamb(2,s):=lie_cc(s,2,tt)*lientrans(2,s)/lientrans(1,tt)
  163. >> else if (tt>2 or s>2) then
  164. <<if tt>2 then <<pp:=3-s;qq:=tt>> else <<pp:=3-tt;qq:=s>>;
  165. lientrans(qq,qq):=0;lientrans(qq,pp):=1;
  166. lie_lamb(1,qq):=(for j:=1:n sum
  167. lientrans(1,j)*lie_cc(j,pp,tt))/lientrans(1,tt);
  168. lie_lamb(2,qq):=lie_cc(s,pp,tt)*lientrans(2,s)/lientrans(1,tt)>>;
  169. lie_a:=lie_a**0;
  170. for i:=3:n do
  171. <<lie_a(i,2):=-lie_lamb(1,i);lie_a(i,1):=lie_lamb(2,i)>>;
  172. lientrans:=lie_a*lientrans;clear lie_lamb,lie_a
  173. end;
  174. algebraic procedure lienoutform(at,n,lhelp,kk);
  175. begin operator y;
  176. lie_a:=at;
  177. if lhelp=1 then
  178. <<write
  179. "Your Lie algebra is the direct sum of the Lie algebra L(2) and";
  180. write "the ",n-2,"-dimensional commutative Lie algebra, where L(2) is";
  181. write
  182. "2-dimensional and there exists a basis {X(1),X(2)} in L(2) with";
  183. write "[X(1),X(2)]=X(1).">>else
  184. <<write
  185. "Your Lie algebra is the direct sum of the Lie algebra H(",kk,")";
  186. write "and the ",n-kk,"-dimensional commutative Lie algebra, where";
  187. write "H(",kk,") is ",kk,"-dimensional and there exists a basis";
  188. write "{X(1),...,X(",kk,")} in H(",kk,") with:";
  189. write "[X(2),X(3)]=[X(2*i),X(2*i+1)]=...=[X(",kk-1,"),X(",kk,")]=X(1)"
  190. >>;
  191. write "The transformation into this form is:";
  192. for i:=1:n do write "X(",i,"):=",for j:=1:n sum
  193. lie_a(i,j)*y(j);clear y,lie_a
  194. end;
  195. endmodule;
  196. end;