I'm trying to solve the following question:
Show that If $x^2 \equiv x\:mod\:p^k$, then $x \equiv (0\:or\:1)\:mod\:p^k$ where $p$ is prime and $k$ is a positive integer.
I've managed to get as far as to show that since $p^k|x(x-1)$ then $p|x(x-1)$ and so either $p|x$ or $p|(x-1)$ since $p$ is prime.
This means that there are two cases: either $x \equiv 0\:mod\:p$ or $x \equiv 1\:mod\:p$. However I'm not sure how to show that since it's true for $p$, then it is true for $p^k$.
I had one idea, which is to use the theorem mentioned in the title in reverse, but I'm not sure whether the theorem works both ways. For example in the case that $x \equiv 0\:mod\:p$:
$x = pm$ for some integer $m$, so $x^k = p^km^k$. This means that $x^k = 0\:mod\:p^k$ and if the theorem works in reverse, I could finalise the proof of the first case by saying therefore that $x = 0\:mod\:p^k$.
Can I do this?