Skip to main content
added 4 characters in body
Source Link
Bill Dubuque
  • 285.7k
  • 42
  • 343
  • 1.1k

It is instructive to view this from a slightly more general perspective. The equivalence of the two common forms of the Little Fermat theorem is special case $\, f(x) = x^{p-1}-1\,$ below.

Theorem $\ $ If $\,p\,$ is prime and $f(x)$ is polynomial with integer coefficients then $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$$$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{with } p\nmid x \end{align}\qquad\quad\ \ \ $$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$$\,p\nmid x\Rightarrow\,p\mid f(x)\,$ by Euclid's LemmaEuclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then$(1)\ \ p\mid x,$ so $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED$\small\bf QED$

Remark $\, $$ $ If you know modular arithmetic or finite fields are familiar then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$following form over $R=\Bbb Z_p$$\color{#c00}{\Bbb Z_p}$ (true for a polynomials overor any field or domain)integral ${\rm\color{#c00}{domain}}\, \color{#c00}R\:\!)$

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ \color{#c00}{\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,\color{#c00}R\,\ {\rm a}\ \color{#c00}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

It is instructive to view this from a slightly more general perspective. The equivalence of the two common forms of the Little Fermat theorem is special case $\, f(x) = x^{p-1}-1\,$ below.

Theorem $\ $ If $\,p\,$ is prime and $f(x)$ is polynomial with integer coefficients then $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (true for a polynomials over any field or domain)

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

It is instructive to view this from a slightly more general perspective. The equivalence of the two common forms of the Little Fermat theorem is special case $\, f(x) = x^{p-1}-1\,$ below.

Theorem $\ $ If $\,p\,$ is prime and $f(x)$ is polynomial with integer coefficients then $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{with } p\nmid x \end{align}\qquad\quad\ \ \ $$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,p\nmid x\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x,$ so $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ $\small\bf QED$

Remark $ $ If modular arithmetic or finite fields are familiar then it can be viewed more arithmetically in the following form over $\color{#c00}{\Bbb Z_p}$ (or any integral ${\rm\color{#c00}{domain}}\, \color{#c00}R\:\!)$

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ \color{#c00}{\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,\color{#c00}R\,\ {\rm a}\ \color{#c00}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

added 92 characters in body
Source Link
Bill Dubuque
  • 285.7k
  • 42
  • 343
  • 1.1k

It is easyinstructive to prove equivalentview this from a slightly more general perspective. The equivalence of the two common forms of the Little Fermat'sFermat theorem. e.g. it is special special case $\, f(x) = x^{p-1}-1$ of the theorem$\, f(x) = x^{p-1}-1\,$ below.

Theorem $\ $ If $\,p\,$ is prime and $f(x)$ is polynomial with integer coefficients then
  $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (true for a polynomials over any field or domain)

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

It is easy to prove equivalent the two common forms of Little Fermat's theorem. e.g. it is special case $\, f(x) = x^{p-1}-1$ of the theorem below.

Theorem $\ $ If $\,p\,$ is prime then
  $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (true for a polynomials over any field or domain)

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

It is instructive to view this from a slightly more general perspective. The equivalence of the two common forms of the Little Fermat theorem is special case $\, f(x) = x^{p-1}-1\,$ below.

Theorem $\ $ If $\,p\,$ is prime and $f(x)$ is polynomial with integer coefficients then $$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (true for a polynomials over any field or domain)

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

added 148 characters in body
Source Link
Bill Dubuque
  • 285.7k
  • 42
  • 343
  • 1.1k

It is easy to prove equivalent the two common forms of Little Fermat's theorem. e.g. it is special case $\, f(x) = x^{p-1}-1$ of the theorem below.

Theorem $\ $ If $\,p\,$ is prime then
$$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $ $$\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\Bbb Z_p$$\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (it is truetrue for a polynomial $f(x)$polynomials over any (finite) field or domain)

$$\begin{align} xf(x)&\equiv 0\ \text{ for all }\,x\\[.2em] \iff f(x)&\equiv 0\ \text{ for all }\,x\not\equiv 0\end{align}\qquad\qquad\quad$$

You may find it instructive to rewrite the proof of the theorem using modular arithmetic to make it clear that it is a special case of the above.$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

It is easy to prove equivalent the two common forms of Little Fermat's theorem. e.g. it is special case $\, f(x) = x^{p-1}-1$ of the theorem below.

Theorem $\ $ If $\,p\,$ is prime then
$$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $ $ If you know modular arithmetic then it can be viewed more arithmetically as the following in $\Bbb Z_p$ (it is true for a polynomial $f(x)$ over any (finite) field or domain)

$$\begin{align} xf(x)&\equiv 0\ \text{ for all }\,x\\[.2em] \iff f(x)&\equiv 0\ \text{ for all }\,x\not\equiv 0\end{align}\qquad\qquad\quad$$

You may find it instructive to rewrite the proof of the theorem using modular arithmetic to make it clear that it is a special case of the above.

It is easy to prove equivalent the two common forms of Little Fermat's theorem. e.g. it is special case $\, f(x) = x^{p-1}-1$ of the theorem below.

Theorem $\ $ If $\,p\,$ is prime then
$$\begin{align} &p\mid x f(x)\ \text{ for all integers } x\\[.2em] \iff\ &p\mid f(x) \ \ \ \:\! \text{ for all integers } x\ \text{coprime to } p \end{align}$$

Proof $\ (\Rightarrow)\ $ By hypothesis $\,p\mid xf(x),\,$ so $\,x\,$ coprime to $\,p\Rightarrow\,p\mid f(x)\,$ by Euclid's Lemma.

$(\Leftarrow)\ $ We split into two cases depending on whether or not $\,p\mid x$.

Case $(1)\ \ p\mid x.\ $ Then $\,p\mid xf(x).$

Case $(2)\ \ p\nmid x,\,$ so $\,x\,$ is coprime to $\,p,\,$ so by hypothesis $\,p\mid f(x)\,$ so $\,p\mid xf(x).\ $ QED

Remark $\, $ If you know modular arithmetic then it can be viewed more arithmetically as the following in the $\color{#0a0}{\rm domain}$ $R=\Bbb Z_p$ (true for a polynomials over any field or domain)

$$\begin{align} \forall x\!:&\ \ \ \ \ \ \ xf(x)= 0\\[.2em] \iff\ \forall x\ &\ [\:\!x\not= 0\Rightarrow f(x)= 0\:\!]\\[.6em] {\rm generally}\quad \forall x\!:&\ \ \ \ \ \ g(x)\:\!f(x)= 0\\[.2em] \iff \ \forall x\ &\ [\:\!g(x)= 0\ \ {\rm or}\ \ f(x)= 0\:\!]\ \ \text{by $\,R\,\ {\rm a}\ \color{#0a0}{\rm domain}$}\\[.2em] \iff\ \forall x\ &\ [\:\!g(x)\not= 0\,\Rightarrow\:\! f(x)= 0\:\!]\end{align}$$

Source Link
Bill Dubuque
  • 285.7k
  • 42
  • 343
  • 1.1k
Loading