-2

Problem

This is a simple exercise but I am missing a key insight which prevents me from solving it.

Given $$a\equiv r \mod b$$ $$a \equiv s \mod b$$ for integers, $a, b, r, s$ and $b>0$, show uniqueness $$r=s$$

My attempt

The relevant constraint I think is that, by definition, $$0 \le r < b$$ $$0 \le s < b$$

This gives me $$b\cdot m \le a < b\cdot(m+1)$$ $$b\cdot n \le a < b\cdot(n+1)$$ for some integers $m,n$.

However I can't seem to proceed, so I guess I'm missing another key insight.


I'm unsure about the next step:

$$ m \le \frac{a}{b} < (m+1)$$ $$n \le \frac{a}{b} < (n+1)$$

Is this sufficient to say $m=n$, and continue from there?

Penelope
  • 3,635
  • 1
    I think the equations should be $a\equiv r(\mod b)$, and $a\equiv s(\mod b)$ – Starlight Feb 10 '25 at 15:45
  • 3
    I assume you mean $0\le r <b$ and $0\le s <b$. Otherwise it is clearly false. – GReyes Feb 10 '25 at 15:46
  • See the first linked dupe for this standard proof, and see the 2nd linked dupe for the correct notation for the mod (remainder) operation (vs, congruence). This is a FAQ. Please search for answers before posting questions. If your serach failed then please let us know what keywords we need to add in order to improve search results. – Bill Dubuque Feb 11 '25 at 00:31

3 Answers3

0

Once you believe that $r \equiv s \bmod b$ (which is just transitivity) then you are almost there. Assume without loss of generality that $r \geq s$. By assuming that $0 \leq r < b$ and likewise for $s$, consider the fact that $b$ must divide $r-s$. Now $r-s$ is plainly positive or $0$, but also less than $b$ (since both $r$ and $s$ were). Hence the only way $b$ can divide it is for $r-s=0$, so $r=s$.

Randall
  • 20,548
  • 2
  • 32
  • 57
-1

Firstly, note the equations should have a congruence sign and not an equality sign: $$a \equiv r(\text{mod } b), a\equiv s(\text{mod } b)$$

Subtract the second equation from the first: $$0 \equiv r-s(\text{mod } b)$$

Rearrange: $$r \equiv s(\text{mod } b)$$

Starlight
  • 2,684
  • I can see intuitively this is correct, but I can't find an argument to say that $r$ must be $s$ using the constraint that both are $0 \le$ and $< b$. – Penelope Feb 10 '25 at 16:04
  • 1
    The relevance is that you must show (or know) that if $0 \le x,y < b$ and $x \equiv y \pmod{b}$, then $x = y$. (This is a semi-non-trivial fact, i.e., should be part of the proof depending on your definitions etc..) Apply this to $x = 0$ and $y = r-s$, where you assume without loss of generality that $r \ge s$. You may need to be a bit more clear about what your definitions are in order to get the precise answer you seek. – Kyle Feb 10 '25 at 16:42
  • Please strive not to post more (dupe) answers to dupes of FAQs. This is enforced site policy, see here. – Bill Dubuque Feb 10 '25 at 23:59
-1

I think the "key insight" you are missing is the definition of congruence. It is (usually) $$ x \equiv y \pmod{n} \iff n \text{ divides } y - x . $$

With that definition, you can conclude in your question that $b$ divides both $r-a$ and $s-a$. Then it divides their difference $r-s$ so $$ r \equiv s \pmod{b}. $$ You cannot prove $r=s$ since it need not be true.

I think what you are trying to say begins with the claim that for any $a$ and $b$ there is some $r \ge 0$ and less than $b$ such that $a \equiv r \pmod{b}$. That is true - it's classic "division with remainder".

Then you are trying to prove that $r$ is unique. To prove that, suppose they are different, $r > s$ and let $t= r-s$. Can you show both that $t < b$ and that it is divisible by $b$? That's your contradiction.

Ethan Bolker
  • 103,433