|
7.5.14.0. isCentral
Procedure from library nctools.lib (see nctools_lib).
- Usage:
- isCentral(p); p poly
- Return:
- int, 1 if p commutes with all variables and 0 otherwise
- Purpose:
- check whether p is central in a basering (that is, commutes with every generator of the ring)
- Note:
- if
printlevel > 0, the procedure displays intermediate information (by default, printlevel =0 )
Example:
| LIB "nctools.lib";
ring r=0,(x,y,z),dp;
matrix D[3][3]=0;
D[1,2]=-z;
D[1,3]=2*x;
D[2,3]=-2*y;
def S = nc_algebra(1,D); setring S;
S; // this is U(sl_2)
==> // coefficients: QQ
==> // number of vars : 3
==> // block 1 : ordering dp
==> // : names x y z
==> // block 2 : ordering C
==> // noncommutative relations:
==> // yx=xy-z
==> // zx=xz+2x
==> // zy=yz-2y
poly c = 4*x*y+z^2-2*z;
printlevel = 0;
isCentral(c);
==> 1
poly h = x*c;
printlevel = 1;
isCentral(h);
==> Non-central at: y
==> Non-central at: z
==> 0
|
|