source: git/Tst/Manual/nc_algebra.tst @ 951db29

spielwiese
Last change on this file since 951db29 was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 1.2 KB
Line 
1LIB "tst.lib"; tst_init();
2LIB "nctools.lib";
3// ------- first example: C, D are matrices --------
4ring r1 = (0,Q),(x,y,z),Dp;
5minpoly = rootofUnity(6);
6matrix C[3][3];
7matrix D[3][3];
8C[1,2]=Q2;   C[1,3]=1/Q2;  C[2,3]=Q2;
9D[1,2]=-Q*z; D[1,3]=1/Q*y; D[2,3]=-Q*x;
10def S=nc_algebra(C,D);
11// this algebra is a quantum deformation U'_q(so_3),
12// where Q is a 6th root of unity
13setring S;S;
14kill r1,S;
15// ----- second example: number n=1, D is a matrix
16ring r2=0,(Xa,Xb,Xc,Ya,Yb,Yc,Ha,Hb),dp;
17matrix d[8][8];
18d[1,2]=-Xc; d[1,4]=-Ha; d[1,6]=Yb;  d[1,7]=2*Xa;
19d[1,8]=-Xa; d[2,5]=-Hb; d[2,6]=-Ya; d[2,7]=-Xb;
20d[2,8]=2*Xb; d[3,4]=Xb; d[3,5]=-Xa; d[3,6]=-Ha-Hb;
21d[3,7]=Xc;   d[3,8]=Xc; d[4,5]=Yc; d[4,7]=-2*Ya;
22d[4,8]=Ya;  d[5,7]=Yb; d[5,8]=-2*Yb;
23d[6,7]=-Yc; d[6,8]=-Yc;
24def S=nc_algebra(1,d);  // this algebra is U(sl_3)
25setring S;S;
26kill r2,S;
27// ---- third example: C is a matrix, p=0 is a poly
28ring r3=0,(a,b,c,d),lp;
29matrix c[4][4];
30c[1,2]=1; c[1,3]=3; c[1,4]=-2;
31c[2,3]=-1; c[2,4]=-3; c[3,4]=1;
32def S=nc_algebra(c,0); // it is a quasi--commutative algebra
33setring S;S;
34kill r3,S;
35// -- fourth example : number n = -1, poly p = 3w
36ring r4=0,(u,v,w),dp;
37def S=nc_algebra(-1,3w);
38setring S;S;
39kill r4,S;
40tst_status(1);$
Note: See TracBrowser for help on using the repository browser.