Friday, 2 January 2026

Exercise (4.1).22

Let $p$ be a prime. Prove that

$a^p \equiv b^p \pmod {p} \implies a \equiv b \pmod {p}$


If $p$ is prime, then by Corollary 4.2 we have

$$ a^p \equiv a \pmod p $$

$$ b^p \equiv b \pmod p $$


We start by assuming the antecedent of the implication is true

$$ a^p \equiv b^p \pmod p $$

Using $ a^p \equiv a \pmod p $ we can substitute for $a^p$

$$ a \equiv b^p \pmod p $$

Using $ b^p \equiv b \pmod p $ we can substitute for $b^p$

$$ a \equiv b \pmod p $$


This conclusion tells us

$$ a^p \equiv b^p \pmod {p} \implies a \equiv b \pmod {p} $$



Note: the official solution says that for the algebra of real numbers $a^p = b^p$ does not imply $a=b$ in general. The textbook suggests the implication is only true for $a=b=1$ and $a=b=0$. This is not right, as we can see with an example $a=b=2, p=2$. Another example is $a=-2, b=-2, p=2$.