Polynom equality modulo p I found these two equations:

(a) $$X^4 + 1 \equiv (X + 1)^4 \mod \ 2$$ 
(b) $$X^4 + 1 \equiv (X^2 - X - 1)(X^2 + X - 1) \mod \ 3$$

I would like to understand the concept of modulo for Polynoms.

How were they made? And how to verify these equality ?

Thanks in Advanced!
Note that $\;2k=0\pmod 2\;,\;\;\forall\,k\in\Bbb Z\;$ , and thus

$$(x+1)^4=x^4+\overbrace{4x^3+6x^2+4x}^{=0\pmod 2}+1=x^4+1\pmod 2$$

Try now something similar with the other case
For $(a),$

$y^{m+1}-y=y(y^m-1)$ is divisible by $y(y-1)$ which being the product of two consecutive integers is even

$\implies y^{m+1}\equiv y\pmod2$ for $m\ge1$

$\implies y^4\equiv y\pmod2$ set $y=X, X+1$

For $(b),$

$(x^2-1-x)(x^2-1-x)=(x^2-1)^2-x^2=x^4-3x^2+1\equiv x^4+1\pmod3$