source: git/Tst/Manual/IsSCA.tst @ 7161aca

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