1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "nctools.lib"; |
---|
3 | ///////////////////////////////////////////////////////////////////// |
---|
4 | ring R = 0,(x(1..4)),dp; // commutative |
---|
5 | if(IsSCA()) |
---|
6 | { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } |
---|
7 | else |
---|
8 | { "Not a super-commutative algebra!!!"; } |
---|
9 | kill R; |
---|
10 | ///////////////////////////////////////////////////////////////////// |
---|
11 | ring R = 0,(x(1..4)),dp; |
---|
12 | def S = nc_algebra(1, 0); setring S; S; // still commutative! |
---|
13 | if(IsSCA()) |
---|
14 | { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } |
---|
15 | else |
---|
16 | { "Not a super-commutative algebra!!!"; } |
---|
17 | kill R, S; |
---|
18 | ///////////////////////////////////////////////////////////////////// |
---|
19 | ring R = 0,(x(1..4)),dp; |
---|
20 | list CurrRing = ringlist(R); |
---|
21 | def ER = ring(CurrRing); |
---|
22 | setring ER; // R; |
---|
23 | matrix E = UpOneMatrix(nvars(R)); |
---|
24 | int i, j; int b = 2; int e = 3; |
---|
25 | for ( i = b; i < e; i++ ) |
---|
26 | { |
---|
27 | for ( j = i+1; j <= e; j++ ) |
---|
28 | { |
---|
29 | E[i, j] = -1; |
---|
30 | } |
---|
31 | } |
---|
32 | def S = nc_algebra(E,0); setring S; S; |
---|
33 | if(IsSCA()) |
---|
34 | { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } |
---|
35 | else |
---|
36 | { "Not a super-commutative algebra!!!"; } |
---|
37 | kill R, ER, S; |
---|
38 | ///////////////////////////////////////////////////////////////////// |
---|
39 | ring R = 0,(x(1..4)),dp; |
---|
40 | def ER = superCommutative(2); // (b = 2, e = N) |
---|
41 | setring ER; ER; |
---|
42 | if(IsSCA()) |
---|
43 | { "This is a SCA! Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; } |
---|
44 | else |
---|
45 | { "Not a super-commutative algebra!!!"; } |
---|
46 | kill R, ER; |
---|
47 | tst_status(1);$ |
---|