For the full range of operations for elements of a number field or order
see Section Element Operations.
Because of the nature of cyclotomic fields and orders, some properties of
elements are easier to determine than in the general case.
Elements of cyclotomic fields and orders can additionally have their
complex conjugate computed. Conjugates are returned as cyclotomic elements
(and not reals) and which conjugate is wanted can be indicated by
providing a primitive root of unity.
The following lines of code generate a set W of minimal polynomials
for the so-called Gaussian periods
η
d=∑
i=0(l - 1)/d - 1ζ
l^(g^((d)i))
where ζ
l is a primitive l-th root of unity (l is prime),
and where g is a primitive root modulo l. These
have the property that they generate a degree d cyclic subfield of
Q(ζ
l). We (arbitrarily) choose l=13 in this example.
> R<x> := PolynomialRing(RationalField());
> W := { R | };
> l := 13;
> L<z> := CyclotomicField(l);
> M := Divisors(l-1);
> g := PrimitiveRoot(l);
> for m in M do
> d := (l-1) div m;
> g_d := g^d;
> w := &+[z^g_d^i : i in [0..m-1] ];
> Include(~W, MinimalPolynomial(w));
> end for;
Here is the same loop in just one line, using sequence reduction:
> W := { R | MinimalPolynomial(&+[z^(g^((l-1) div m))^i : i in [0..m-1] ]) :
> m in M };
> W;
{
x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 +
x + 1,
x^6 + x^5 - 5*x^4 - 4*x^3 + 6*x^2 + 3*x - 1,
x^3 + x^2 - 4*x + 1,
x + 1
x^4 + x^3 + 2*x^2 - 4*x + 3,
x^2 + x - 3,
}
[Next][Prev] [_____]
[Left] [Up] [Index] [Root]