See the documentation for 'modulus'.
(%i4) modulus:2;
(%o4) 2
(%i5) factor(1 + x + x^2 + x^3 + x^6);
(%o5) (x^2-x+1)*(-x^4+x^3+1)
I believe it is a bug (though arguably an innocuous one, since -1 ? 1 mod 2)
that some of the coefficients of the factored form are negative -- it should
really be (x^2+x+1)*(x^4+x^3+1).
Keep in mind that 'modulus' is only obeyed within the rational function
package, so if you now write expand(%o5) you will get
-x^6+2*x^5-2*x^4+x^3+x^2-x+1
Instead you should write
rat(%o5), which of course gives back x^6+x^3+x^2+x+1.
-s
On Wed, Apr 29, 2009 at 12:43 PM, Sam Steingold <sds at gnu.org> wrote:
> is it possible to factor a polynomial over a finite field (e.g., Z/2Z)?
> e.g.,
> factor(1 + x + x^2 + x^3 + x^6, Z/2Z)
> => (1+x+x^2)(1+x^3+x^4)
>
> thanks!
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>