$i \equiv k \mod p \implies i = k$ if $p$ is prime?

36 Views Asked by At

In a particular proof of Fermat's Little Theorem $\big(a^{p} \equiv a \mod p \big)$ in Engel, the following fact is used $i \equiv k \mod p \implies i = k \:$ where $p$ is a prime. I'm not really sure why this true because we can always have $i = qp + k$ with $i > p > k$

UPDATE:

The previous part of the proof assumes $(a , p) = 1$ and then considers the sequence $a, 2a, 3a, ... (p-1)a$ so $i,k \in 1,2,...p-1$ $$ia \equiv ka \mod p \implies i \equiv k \mod p $$ so if $i = qp+k \implies i >p$. And this is a contradiction. Perhaps this is why the fact is true in this case?