0

Fermat's theorem: if a is not divisible by p, then $a^{p-1} \equiv 1 \pmod p$

Since $\varphi(p)=p-1$, this is a special case of Euler's theorem. If $(a,m)=1$, then $a^{\varphi(m)}\equiv 1 \pmod m$.

Proof: Let $c_1,.....,c_{\varphi(m)}$ be a reduced residue system $(mod\text{ } m)$ and let a be prime to m. Then $ac_1,.....,ac_{\varphi(m)}$ is also a reduced residue system $(mod\text{ } m)$, and therefore

$$\prod_{i=1}^{\varphi(m)}ac_i \equiv \prod_{i=1}^{\varphi(m)}c_i \pmod m$$

Why is the latter true?

$\varphi(p)$ counts the number of elements ina reduced residue system mod p

Bill Dubuque
  • 272,048
TheMathNoob
  • 2,011
  • m is a prime number – TheMathNoob Jul 10 '16 at 04:26
  • 1
    There is only one reduce residue system mod $m$. We have ${c_1,\ldots,c_{\varphi(m)}}={ac_1,\ldots,ac_{\phi(m)}}$, i.e. $c_1,\ldots,c_{\varphi(m)}$ is a permutation of $ac_1,\ldots,ac_{\phi(m)}$. Therefore, we have $c_1\cdots c_{\varphi(m)}\equiv ac_1\cdots ac_{\phi(m)}\pmod{m}$. By the way, e.g. we also have $c_1+\cdots+c_{\varphi(m)}\equiv ac_1+\cdots+ac_{\varphi(m)}\pmod{m}$, which is irrelevant here. – user236182 Jul 10 '16 at 04:27
  • Sorry, but your Question was unclear. Apparently you are asking why a proof of Euler's theorem works? – hardmath Jul 10 '16 at 04:27
  • Or maybe you're asking why $ac_1,\ldots,ac_{\phi(m)}$ is also a reduced residue system mod $m$? – user236182 Jul 10 '16 at 04:28
  • I am just typing what the book says, but my question is why the latter works. Why can you say such statement? – TheMathNoob Jul 10 '16 at 04:29
  • @TheMathNoob Which statement exactly? – user236182 Jul 10 '16 at 04:29
  • $\prod_{i=1}^{\varphi(m)}ac_i \equiv \prod_{i=1}^{\varphi(m)}c_i \text{ }(mod \text{ }m)$ – TheMathNoob Jul 10 '16 at 04:29
  • @TheMathNoob I explained it in my other comment. – user236182 Jul 10 '16 at 04:30
  • Yes, thank you so much – TheMathNoob Jul 10 '16 at 04:30
  • Right, so there is a bijection between the two residue systems and each element is the same, so their product is the same which implies that $\prod_{i=1}^{\varphi(m)}ac_i -\prod_{i=1}^{\varphi(m)}c_i =0$ Right? – TheMathNoob Jul 10 '16 at 04:33
  • @TheMathNoob There exists exactly one reduced residue system mod $m$, so if you prove that $c_1,\ldots,c_{\varphi(m)}$ and $ac_1,\ldots,ac_{\varphi(m)}$ are both reduced residue systems mod $m$, then you know that for each $i\in{1,\ldots,\varphi(m)}$ there exists exactly one $j\in{1,\ldots,\varphi(m)}$ such that $c_i=ac_j$ (and vice versa, i.e. for each $j$ exists exactly one $i$). I.e., ${c_1,\ldots,c_{\varphi(m)}}={ac_1,\ldots,ac_{\varphi(m)}}$, or i.e. $c_1,\ldots,c_{\varphi(m)}$ is a permutation of $ac_1,\ldots,ac_{\varphi(m)}$. – user236182 Jul 10 '16 at 04:43
  • @TheMathNoob $c_1,\ldots,c_{\varphi(m)}$ and $ac_1,\ldots,ac_{\varphi(m)}$ are both the same reduced residue system, just perhaps ordered differently. – user236182 Jul 10 '16 at 04:45
  • Each $c_i $ is congruent to some other $ac_j $. So any $xc_i=xac_j mod p $ for any x. So the product of all of the residues are congruent to the other equivalent residue system. – fleablood Jul 10 '16 at 04:45
  • Yes I got, but the difference has to be zero hence it's the same set – TheMathNoob Jul 10 '16 at 05:15

3 Answers3

1

The sets $$ \{c_1,c_2,\ldots,c_{\varphi(m)}\},\qquad \{ac_1,ac_2,\ldots,ac_{\varphi(m)}\} $$ are the same set $\!\!\pmod{m}$, hence the product of the elements has to be the same: $$ a^{\varphi(m)}\prod_{k=1}^{\varphi(m)}c_k \equiv \prod_{k=1}^{\varphi(m)}c_k\pmod{m} $$ leads to $a^{\varphi(m)}\equiv 1\pmod{m}$ as wanted.

Jack D'Aurizio
  • 353,855
0

An important part here is that for $(a,m)=1$ you have $$ab\equiv ac \pmod m \Rightarrow b\equiv c \pmod m.$$ This implies that $\{ac_1,\dots,ac_{\varphi(m)}\}$ belong to $\varphi(m)$ different residue classes.

Moreover, if $(a,m)=1$ and $(c,m)=1$, then also $(ac,m)=1$. (See here, here or here.) So all of them are reduced residue classes.

Therefore $\{ac_1,\dots,ac_{\varphi(m)}\}$ is a reduced residue system. (It has $\varphi(m)$ elements, each number is in a different residue class, each number is coprime to $m$.)

0

Recall the Congruence Product Rule $ $ [below all congruences are $ $ mod $\,m$]

$$\begin{eqnarray} &&\quad b_1\!\!&\equiv&\, c_1\\ &&\quad b_2\!\!&\equiv&\, c_2\\ \Rightarrow\ &&b_1 b_2\!\! &\equiv&\, c_1 c_2 \end{eqnarray}$$

By induction the rule extends to $\ b_i\equiv c_i\,\Rightarrow\, \prod b_i \equiv \prod c_i$

In other words, if two equal length lists $\,B,C\,$ of integers are element-wise congruent $\,b_i \equiv c_i\,$ then their products are also congruent. Yours is the special case where $\, B = \{b_i\},\ C = \{c_i\}\,$ are reduced residue systems.

Alternatively it is a special case of the multivariate extension of the Congruence Polynomial Rule, for the $\,k$-ary product polynomial $\,P(x_1,x_2,\ldots, x_k) = x_1 x_2\cdots x_k,\ $ i.e.

$$ b_i\equiv c_i\,\Rightarrow\, P(b_1,b_2,\ldots, b_k) \equiv P(c_1, c_2,\ldots, c_k)$$

Bill Dubuque
  • 272,048