MATLAB: Does ALIAS and EVALA not work as in MAPLE or in previous versions of Symbolic Math Toolbox 5.1 (R2008b)

Symbolic Math Toolbox

When executing the following command in Maple 9:
alias(a=RootOf(x^8+x^7+x^6+x+1)):evala(Factor(x^4+x^3*a^217+x^2*a^213+x*a^222+a^10,a) mod 2);
I receive:
(x + a^4) (x + a^3) (x + a^2) (x + a)
When using Maple kernel which is used in Symbolic Math Toolbox R2007b:
r = maple('alias(a=RootOf(x^8+x^7+x^6+x+1)):evala(Factor(x^4+x^3*a^217+x^2*a^ 213+x*a^222+a^10,a) mod 2);')
I receive:
r = (x+a^4)*(x+a^3)*(x+a^2)*(x+a)
With the new MuPAD engine of Symbolic Math Toolbox 5.1 (R2008b) I use:
evalin(symengine,'alias(a=RootOf(x^8+x^7+x^6+x+1)):evala(Factor(x^4+x^3*a^217+x^2*a^213+x*a^222+a^10,a) mod 2);')
And receive other results:
evala(Factor(x*RootOf(x^8 + x^7 + x^6 + x + 1, x)^222 + RootOf(x^8 + x^7 + x^6 + x + 1, x)^10 + x^2*RootOf(x^8 + x^7 + x^6 + x + 1, x)^213 + x^3*RootOf(x^8 + x^7 + x^6 + x + 1, x)^217 + x^4, RootOf(x^8 + x^7 + x^6+ x + 1, x)) mod 2)

Best Answer

EVALA is not a valid command in the Symbolic Math Toolbox 5.1 (R2008b). In addition MuPAD's way of dealing with finite fields (the "mod 2" part in the Maple commands) and algebraic extensions (the EVALA part) is quite different from Maple.
Hence, the commands mentioned would look as follows in MuPAD:
alias(F = Dom::AlgebraicExtension(Dom::IntegerMod(2), a^8+a^7+a^6+a+1)):
factor(poly(x^4+x^3*a^217+x^2*a^213+x*a^222+a^10, [x], F))
The same commands can be sent using the evalin command from the Symbolic Toolbox 5.1 (R2008b). You can resolve the polynomial in the expression using a call to EXPR as shown below:
evalin(symengine, 'alias(F = Dom::AlgebraicExtension(Dom::IntegerMod(2), a^8+a^7+a^6+a+1))')
evalin(symengine, 'expr(factor(poly(x^4+x^3*a^217+x^2*a^213+x*a^222+a^10, [x], F)))')
ans =
(a + x)*(a^2 + x)*(a^3 + x)*(a^4 + x)
You will need to unalias F after having used it:
unalias(F)
Related Question