|  |  D.2.11.15 rootofUnity Procedure from libraryring.lib(see  ring_lib).
 
Example:Usage:
rootofUnity(n); n an integer
Return:
number
Purpose:
compute the minimal polynomial for the n-th primitive root of unity
Note:
works only in field extensions by one element
 |  | LIB "ring.lib";
ring r = (0,q),(x,y,z),dp;
rootofUnity(6);
==> (q2-q+1)
rootofUnity(7);
==> (q6+q5+q4+q3+q2+q+1)
minpoly = rootofUnity(8);
r;
==> // coefficients: QQ[q]/(q4+1)
==> // number of vars : 3
==> //        block   1 : ordering dp
==> //                  : names    x y z
==> //        block   2 : ordering C
 | 
 
 |