Home Online Manual
Top
Back: preimageLoc
Forward: optionIsSet
FastBack:
FastForward:
Up: ring_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.12.15 rootofUnity

Procedure from library ring.lib (see ring_lib).

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

Example:
 
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