Here is a very simple question in number theory that I can't prove it. If $a = kb + c$, then I would like to know why the following is true ($a,b,c,k \in \mathbb{Z}$):
$$a \bmod b = c \bmod b$$
And another question, Why if $a+b \equiv 0 \pmod{p}$ then $a \equiv -b \pmod{p}$
When $b\ne0$ (which is needed for doing the “$\!\bmod b$” operation), $x\bmod b$ is the unique integer $r$ such that
It is a well known fact that such an $r$ exists and is unique.
Now, suppose $a=bk+c$ and write $c=bq+r$, with $0\le r<|b|$. Then also $$ a=b(k+q)+r $$ thereby proving that $$ a\bmod b=c\bmod b $$ by the uniqueness of the remainder $r$ stated above.
For the second part, note that $x\equiv y\pmod{n}$ means that $x-y$ is divisible by $n$. Then use the fact that $a+b=a-(-b)$.