Coercion of roots of unities in MAGMA

250 Views Asked by At

In MAGMA, I want to do computations in $\bar{\mathbb{Q}}[x,y]$. Say I want to form elements such as $\zeta x$, where $\zeta$ is some root of unity. MAGMA doesn't automatically regard $\zeta$ as an element of $\bar{\mathbb{Q}}$, and so I will need to tell it to do it. I tried

P := PolynomialRing(AlgebraicClosure(), 2, "grevlex");

P!RootOfUnity(3);

RootOfUnity(3)*x

but I get

Runtime error in '!': Illegal coercion

Runtime error in '*': Bad argument types

Argument types given: FldCycElt[FldRat], RngMPolElt

What would be the best way to make this work?

1

There are 1 best solutions below

0
On BEST ANSWER
    Q:= Rationals();
    F := AlgebraicClosure(Q);
    P<x,y> := PolynomialRing(F,2);
    zeta:=RootOfUnity(3,F);
    zeta*x+y^2

(RootOfUnity(n,F) is implemented for the fields containing one, not for the polynomial rings)