How to use Mathematica to solve equations in a polynomial ring?

951 Views Asked by At

I am sorry. But I wonder whether it is fine to ask this question here.

I need some help to solve some equations in a polynomial ring:

Give the ring $\mathbb{F}_p [x ]/(x^2+x+1)$, where $p$ is a prime (for example $p=5$). I need to solve some equations like:

$(1-x)f_i(x)+x f_j(x)-f_k(x)=0$

I have no idea how to solve this in Mathematica. (Of course, we can solve them via pencil and paper. But it is a headache if it involves 20 or more equations.) Any help is appreciated.

My own approach was to set $f_i(x) = a+b x$ with $a,b \in \mathbb{F}_5$. Then try to solve the (linear) equations $mod\ 5$. But it failed because we may need $x^2+x+1=0$.

1

There are 1 best solutions below

1
On BEST ANSWER

Use of substitutions could help here, x^2->-x-1. For arbitrary polynomial y with integer coefficients:

qFp[y_,p_]:=((y//Expand) //.{x^n_ /;n>1->x^(n-2)(-x-1)//Expand}//Expand) /. a_Integer -> Mod[a, p]

Will be an equal to $q(x)$ polynomial in $\mathbb F_p[x]$ of degree 1. For example,

qFp[x^5+7x+4,5]

gives

x+3