Question: Why does evala cause an error?

In the following script, I am trying to understand why evala returns an error. It returns

                Error, (in evala/Reduce/nf/indep) invalid arguments to coeffs

in a couple of places. I tried, and I can get around the errors by doing it a complex way, but it seems like I'm just not using evala correctly. Perhaps someone can comment? I'd very much appreciate it.


restart:
with(LinearAlgebra):
alias(beta = RootOf(x^3 + x + 1 = 0)):
F8 := [0, 1, beta, beta + 1, beta^2, beta^2 + 1, beta^2 + beta, beta^2 + beta + 1]:
y := Matrix([[ 0 , 0 , 1 ],
        [ 0 , 1 , 0 ],
        [ 1 , 0 , 0 ]]);
x := Matrix([[ 0 , beta^2 + 1 , beta^2 + beta + 1 ],
        [ beta^2 + 1 , beta , beta^2 + beta + 1 ],
        [ beta^2 + beta + 1 , beta^2 + beta + 1 , beta^2 + beta + 1 ]]);
simplify(x^(-1).y.x) mod 2;
p := x^(-1).y.x mod 2;
q := p[1][1];
expand(q) mod 2;
evala(%) mod 2;
q;
evala(beta^4+beta^3+beta^2+beta+1);
evala(beta*(beta^2+1));
evala(q);

s:=(beta^2+1)*(beta^2+beta+1)/(beta^4+beta^3+beta^2+beta+1);
evala(s);
t:=beta*(beta^2+1)/(beta^4+beta^3+beta^2+beta+1);
evala(t);
evala(t + s);

Please Wait...