Number theory!Polynomial modules From Fermats theorem we know that for every $a \in \mathbb{Z}$, $$a^p\equiv a \mod{p}$$. But the polynomial $x^p$ it is not equal to the polynomial $x$( as a Congruence ). Why?Also when you want to solve a polynomial equation with modules you use that fermats theorem to simplify the polynomial.Doesnt that contradicts that  $x^p$ is not equal to $x$. SInce for every $a \in \mathbb{Z}$ $$a^p\equiv a \mod{p}$$
You have to make a distinction between (more concrete) functions from $\Bbb Z / p \Bbb Z$ to $\Bbb Z/p \Bbb Z$ and (more abstract) polynomials with coefficients in $\Bbb Z/ p \Bbb Z$. 

For each polynomial, there is an associated polynomial function. And as you have just discovered, it is NOT true that if the polynomial function is zero, then the polynomial is also zero.

On any finite ring $R$, you can make the polynomial $\prod_{x \in R} (X - x)$, whose polynomial function is obviously zero. But this polynomial is not zero !
Do you know the difference between Congruence Equation and Algebraic equation which obeys Fundamental theorem of algebra unlike the previous one?

For example $$x^2\equiv2\pmod3$$ is not solvable unlike $$x^2=2$$ 

Again, $$a^p\equiv a\pmod p$$ is basically Identity Congruence Equation i.e., any integer satisfies this equation   just like $$\prod_{r=0}^{p-1}(x-r)\equiv0\pmod p$$