Polynomial Ring theorem proof If $p$ is a prime, prove that $(x − a)\mid (x^{p−1} − 1)$ in $Z_p[x]$ for all nonzero $a$ in $Z_p$. Hence prove that
$x^{p-1}−1=(x−1)(x−2)···(x−p+1)$ in $Z_p[x]$.
I originally thought that I could prove these using the Rational Roots Theorem but I couldn't figure out how to do it. Any help would be great, thank you in advance!
 A: The little fermat theorem implies that $a^{p-1}=1$, this implies that $a$ is a root of $x^{p-1}-1$, if you divide $x^{p-1}-1$ by $x-a$ you obtain $(x-a)p_a(x)+b$ this implies $b=0$.
The polynomial $(x-1)...(x-p+1)$ divides $x^{p-1}$ and have degree $p-1$ the euclidean division implies that $(x-1)....(x-p+1)=c(x^{p-1}-1)$ since the coefficient of degree $p-1$ of $x^{p-1}-1$ and $(x-1)...(x-p+1)$ is $1$ you deduce that these polynomials are equal.
A: Hint: Prove that for $f\in\Bbb{F}_p[X]$ you have $\frac{f}{X-a}\in\Bbb{F}_p[X]$ if and only if $f(a)=0$.
A: For the second part of the problem, use the result from part one which implies $x^{p-1}-1$ has the $p-1$ roots $1,2,\dots,p-1$. After this, use the factor theorem coming from the fact that $\mathbb F_p$ is a field, and then, consider the degrees of the decomposition you end up with.
A: Hint $ $ By little Fermat and the Lemma below $\,x^{p-1}-1 = (x\!-\!1)(x\!-\!2)\cdots (x-(p\!-\!1))g(x)\,$ so comparing degree and lead coefficient shows $\,g(x) = 1.\,$ [Beware: it is not generally true that if $\,a\neq b\,$ are roots of $\,f(x)\,$ then $\,(x\!-\!a)(x\!-\!b)\mid f(x),\, $ so it requires proof - see the Remark below].
Lemma $ $ If $\,f(a_i)=0\,$ and $\,a_i-a_j\,$ is cancellable for $\,i\neq j\,$ then $\,(x\!-\!a_1)\cdots(x\!-\!a_n)\mid f(x)$
Proof $ $ Induct on $\,n.\, $ If $\,n=1\,$ then $\,f(a_1)=0\,\Rightarrow\, x\!-\!a_1\mid f(x)\,$ by the Factor Theorem. Else by induction $\, f = (x\!-\!a_1)\cdots(x\!-\!a_{n-1}) g(x)\,$ so $\,0 = f(a_n) = (a_n\!-\!a_1)\cdots(a_n\!-\!a_{n-1}) g(a_n)\, $ thus $\, g(a_n)=0$ by cancelling all $\,a_i-a_j,\,$ so $\,x\!-\!a_n\mid g(x)\,$ by the Factor Theorem, yielding the claim. 
Remark $ $ In a field (or domain) we have $\,c\,$ is cancellable $\iff c\neq 0\,$ so the above hypothesis reduces to $\,a_i\neq a_j\,$ if $\,i\neq j,\,$ i.e. the $\,a_i\,$ are distinct roots. The cancellability hypothesis is necessary, e.g. over $\,\Bbb Z_{\large 8}\!:\  x^2-1\,$ has roots $\,3,1\, $ but is not divisible by $\,(x\!-\!3)(x\!-\!1).\,$ Note $\,3-1 = 2\,$ is not cancellable since $\,2\cdot 4= 2\cdot 0\,$ but $\,4\neq 0,\,$ so the Lemma does not apply.
Alternatively we could use  $\,x-a\,$ and $\,x-a'\,$ are nonassociate primes if $\,a\neq a',\,$ so since $\,x^{p-1}-1\,$ is divisible by those nonassociate primes it it is also divisble by their lcm = product.
