0

I want to prove that if $p$ is a prime, then we have $$\begin{align*} x^{p-1}-1 \equiv (x-1)\cdots (x-(p-1)) \pmod{p} \end{align*}$$ for all $x$


My attempt: $$\begin{align*} f(x)&= a_nx^n+\cdots +a_0 \\ &&(1) \\ f(x) & \equiv 0 \pmod{p} \end{align*}$$ I use a lemma that if $p$ is a prime and $p \nmid a_n$ , and suppose $x \equiv \alpha_i \pmod{p}, \ i=1,\cdots ,k\le n$ are different solutions to $(1)$
Then we have $$\begin{align*} f(x) \equiv (x-\alpha_1)\cdots (x-\alpha_k) f_k(x) \pmod{p} \end{align*}$$ where $f_k(s)$ is a polynomial with $\deg f_k=n-k$ and $a_n$ is the coefficient of first term in $f_k(x)$ .

Then consider the polynomial $f(x)=x^{p-1}-1$ . By Fermat's little theorem, if $(x,p)=1$ , then we have $f(x) \equiv 0 \pmod{p}$ . Thus, under modulo $p$ , solutions are $x\equiv 1,2,\cdots ,p-1 \pmod{p}$ , and hence by lemma :$$\begin{align*} f(x) \equiv (x-1)\cdots (x-(p-1)) \cdot1 \pmod{p} \end{align*}$$ Now my $x$ doesn't have any restriction. I just change the "form" of $x^{p-1}-1$ under modulo $p$ , since all I did was to find the solutions to $$\begin{align*} f(x) \equiv 0 \pmod{p} \end{align*}$$ . They are $1,2,\ldots ,p-1$ and use the lemma to write my $f(x)$ into another form under modulo $p$


On the other hand, I found that I can also consider the polynomial $f(x)=x^p-x$. By Fermat's little theorem, now all integers are solutions to $f(x) \equiv 0 \pmod{p}$, so under modulo, $p$, $x \equiv 0,1,\ldots,p-1$ are different solutions to it. By lemma, I have $$\begin{align*} x^p-x \equiv x(x-1)\cdots (x-(p-1)) \pmod{p} \end{align*}$$ Then, if $(x,p)=1$ , I can further get $$\begin{align*} x^{p-1}-1 \equiv (x-1)\cdots (x-(p-1)) \pmod{p} \end{align*}$$ But now, in the equation above, I assume that $x$ can only by coprime to $p$, not like the first trial in that I proved that the equation $x^{p-1}-1 \equiv (x-1)\cdots (x-(p-1)) \pmod{p}$ is right for all $x$.

I'm confused here. What's going wrong? Thank you very much!

(By the way: I'sorry that I don't know anything about the group, ring, field theory, abstract algebra, and things like these)

Bill Dubuque
  • 272,048
M_k
  • 1,855
  • Would be better to say that they are the same polynomial in $x$ with coefficients in $\mathbb{Z}/p$. The polynomial on LHS has $p-1$ distinct roots in $\mathbb{Z}/p$ : $1$, $2$, $\ldots$, $p-1$ ( little Fermat). Now use a general fact from algebra. – orangeskid Jan 30 '23 at 05:46

1 Answers1

2

The first result (directly) implies the second, but not the other way. There's nothing wrong, both methods are correct! It's like $x = 1$ implies $x^2 - x = 0$, but not the other way. Of course, if you treat the case $(x, p) \neq 1$ separately, which is trivial since $x$ will be $0$ modulo $p$, then you can prove the first result from the second.

Gareth Ma
  • 3,725
  • I denote the congruence equation $x^p-x=...$ by $A$ , and the one $x^{p-1}-1=...$ by $B$ . After reading your answer, now the following is my understanding. When $A$ is true, $(x,p)=1 \implies B$ . But if $(x,p)\ne 1$, this won't affect $B$ being true. And this is the case here. That is for the "Other other hands" part, I misunderstand the $\implies$ as $\iff$, right? – M_k Jan 30 '23 at 04:34
  • 1
    @M_k Yea. Denote $C$ to be the statement $(x, p) = 1$, then $A \land C \implies B$ and $B \implies A$. If you prove $A \land (\lnot C) \implies B$, which is trivial since $\lnot C \implies B$ is trivial, then the two statements combined gives $A \implies B$. – Gareth Ma Jan 30 '23 at 06:08
  • Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Jan 30 '23 at 07:36