Proof involving modular and primes

71 Views Asked by At

My Question Reads:

If $a, b$ are integers such that $a \equiv b \pmod p$ for every positive prime $p$, prove that $a = b$.

I started by stating $a, b \in \mathbb Z$.

From there I have said without loss of generality, $a \geq b$.

Suppose $1 \leq a - b \in \mathbb Z$.

From here I expressed $a - b$ as a prime factorization.

$a - b = p_1 \times p_2 \times \ldots \times p_n$

From here I said to consider a prime $p$ such that $p$ does not equal $p_k$ for all $1$ less than or equal to $k$ less than or equal to $n$. From here I am a bit lost as to how to continue.

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose $a \neq b$. Then $b-a \neq 0$, WLOG $b > a$, so there is some prime $p > b-a > 0$ (primes are infinite), but then $a \not \equiv b \mod p$, obviously. This is a contradiction, hence we are done i.e. $a=b$.