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?
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?
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}$$