# Prove a = b

1. Apr 21, 2010

### ninjagod123

Show that if a $$\equiv$$ b mod p for all primes p, then a = b.

2. Apr 21, 2010

### JSuarez

Well, a - b must be divisible by all primes p. What is the only way for this to happen?

3. Apr 21, 2010

### ninjagod123

Oh hmmm....

The only way is if (a - b) is zero. How would I formally write this up? I guess a - b can't be the product of all primes???

4. Apr 21, 2010

### JSuarez

Every nonzero integer can only be divisible by a finite number of primes.

5. Apr 21, 2010

### CRGreathouse

In a sense, that's what 0 is. It's the "infinity" of the divisibility relation.

6. Apr 22, 2010

### HallsofIvy

If $a> b$ then a- b is a positive number. Since there are an infinite number of primes, there exist a prime, p> a- b. Then p cannot divide a- b so $a\ne b (mod p)$.

If $b> a$ just use b- a instead of a- b.