0

I wish I could add my thoughts here, but I've really couldn't figure out anything interesting myself.

$(a \mod C + b \mod C)\mod C = (a+b) \mod C$

user4205580
  • 2,083
  • 1
    When you cannot figure out anything you can at least recall the definitions. This helps you and potential readers and answerers. – quid Jan 29 '15 at 11:20

3 Answers3

1

Yes. Let $$a=kc+r, b=tc+s.$$ Then $$(a (mod C)+b (mod C))(Mod C)=r+s (Mod C).$$ On the other hand $$(a+ b)(Mod C)=((k+t)c+r+s)(Mod C)=r+s (Mod C).$$

1

Yes, this is true. Recall $a \mod C$ denotes the unique integer $r$ in $\{0, \dots, C-1\}$ such that $a = q C + r$ with some integer $q$. (Or in $\{0, \dots, |C|-1\}$ if ever $C$ should be negative, or there are also different conventions but the above is the most common one; if ever you should have a different convention it does not change much.)

Put differently this is the remainder when doing Euclidean division of $a$ by $C$.

So

  • $a \mod C$ is $r$ in $\{0, \dots, C-1\}$ such that $a = q C + r$ with some integer $q$.

  • $b \mod C$ is $t$ in $\{0, \dots, C-1\}$ such that $a = q' C + t$ with some integer $q'$.

Now, $a+b= (q +q')C + r +t$.

  • If $r+t \in \{0, \dots, C-1\}$ then $a+b \mod C$ is $r+t$, which is of course equal to $a \mod C + b a \mod C$ and the extra $\mod C$ does not change anything in this cae.

  • If $r+t > C$ then we can write $(a+b) = (q + q' + 1)C + (r+t-C)$ and thus $a+b \mod C = r+t -C$; note $r+t \le 2C-1 $ so this is always $\le C-1$. Furthermore $r + t \mod C= r+t -C$ and we have again equality.

quid
  • 42,135
0

Yes, the easy way to prove things like this is to derive them from more flexible congruences.
Write $\ \bar a = (a\ {\rm mod}\ c)\ $ and $\ \bar b = (b\ {\rm mod}\ c).\ $ Then, applying the Congruence Sum Rule

$\qquad\qquad\quad{\rm mod}\ c\!:\ \ \begin{array}{} \bar a \equiv a\\ \bar b\equiv b\end{array}\,\Rightarrow\,\ \underbrace{\bar a + \bar b}_{\Large \color{#c00}x} \equiv\, \underbrace{a+b}_{\Large\color{#0a0}y}$

It is straightforward to prove that $\, \color{#c00}x\equiv\color{#0a0}y\pmod c\,\Rightarrow\, (x\ {\rm mod}\ c) = (y\ {\rm mod}\ c).\ $

Applying that to the prior congruence immediately yields the sought result.

Bill Dubuque
  • 272,048