You need to define the minimal polynomial over the ground field
of the third root of unity.
Supposed you want to compute in characteristic zero, then
Code:
> ring rQ = 0,x,dp; // Q[x]
> factorize(x3-1);
[1]:
_[1]=1
_[2]=x-1
_[3]=x2+x+1
[2]:
1,1,1
> ring rQzeta = (0,z),x,dp; // Q[z]/(z^2+z+1)[x]
> minpoly = z2+z+1; // The parameter z is now a 3rd root of unity
> z^3;
1
> z2*x4-2zx+2z+1;
(-z-1)*x4+(-2z)*x+(2z+1)