Answer
- **\((m+n) \mod d = a+b\)?**
**Not necessarily.** It holds when \(a+b < d\), but if \(a+b \ge d\), then \((m+n) \mod d\) is the remainder when \(a+b\) is divided by \(d\), which is not equal to \(a+b\) itself.
- **\((m+n) \mod d = (a+b) \mod d\)?**
**Yes.** We have proved that
\[
(m+n) \mod d = (a+b) \mod d,
\]
regardless of the size of \(a+b\).
Work Step by Step
Let \(m, n, a, b,\) and \(d\) be integers with \(d > 0\) and assume
\[
m \mod d = a \quad \text{and} \quad n \mod d = b.
\]
This means we can write
\[
m = qd + a \quad \text{and} \quad n = rd + b,
\]
for some integers \(q\) and \(r\), with
\[
0 \le a < d \quad \text{and} \quad 0 \le b < d.
\]
Now consider the sum:
\[
m + n = (qd + a) + (rd + b) = (q + r)d + (a + b).
\]
When we take \((m+n) \mod d\), we are finding the remainder upon division of \(m+n\) by \(d\). Notice that \((q+r)d\) is divisible by \(d\), so the remainder is determined solely by \(a+b\). That is,
\[
(m+n) \mod d = (a+b) \mod d.
\]
---
### 1. Is \((m+n) \mod d = a+b\)?
In general, **\((m+n) \mod d\) is not necessarily equal to \(a+b\)** because the remainder must be a number between 0 and \(d-1\). In our expression,
\[
(m+n) \mod d = (a+b) \mod d,
\]
if \(a+b < d\), then indeed \((a+b) \mod d = a+b\). However, if \(a+b \ge d\), then \((a+b) \mod d\) is the unique integer in \(\{0,1,\dots,d-1\}\) congruent to \(a+b\), which is \(a+b-d\) (or further reduced if \(a+b\) exceeds \(2d\), etc.).
**Example:**
Let \(d = 10\), \(a = 7\), and \(b = 6\). Then
\[
a+b = 13,
\]
but
\[
13 \mod 10 = 3,
\]
so \((m+n) \mod 10 = 3 \ne 13\).
Thus, in general, we cannot assert that \((m+n) \mod d = a+b\).
---
### 2. Is \((m+n) \mod d = (a+b) \mod d\)?
Yes. From our derivation, we have
\[
m+n = (q+r)d + (a+b).
\]
When taking the remainder upon division by \(d\), the term \((q+r)d\) drops out, and we obtain
\[
(m+n) \mod d = (a+b) \mod d.
\]
This is true regardless of whether \(a+b\) is less than \(d\) or not.