What is (a mod n) mod n?

I have an equation such as

(a + b) mod n which is nothing but (a mod n + b mod n) mod n according to this.

Now, I know that b mod n is 0 which results in (a mod n) mod n.

Is this equivalent to a mod n itself? If so, is there any way to prove it?

• So you want to prove $(a+0)\pmod n=a\pmod n?$ – awllower Jun 28 '16 at 10:01
• You can see that $(a \bmod{n})\bmod{n}$ must be equivalent to $a\bmod{n}$. This is obvious because $a \bmod{n} \in [0,n-1]$ and so the second $\operatorname{mod}$ cannot have an effect. I hope this helps? – Thomas Russell Jun 28 '16 at 10:02
• No. b is not equal to 0. b mod n is equal to zero. – therobotgeek Jun 28 '16 at 10:02
• @Shaktal Okay, so is it a given statement that the second mod has no effect? Can I take that as an axiom? – therobotgeek Jun 28 '16 at 10:05
• @SrinidhiS No, it's not an axiom. It follows from the axioms (at least, it does if your axioms are somewhat reasonable), and is therefore a theorem. – Arthur Jun 28 '16 at 10:06

You can see that $(a \bmod{n})\bmod{n}$ must be equivalent to $a\bmod{n}$. This is obvious because $a \bmod{n} \in [0,n-1]$ and so the second $\operatorname{mod}$ cannot have an effect.
Moreover, if we consider what the $\operatorname{mod}$ operation does, then it makes sense that if $b\mod{n} = 0$ then we would expect $$a+b\equiv a\pmod{n}$$