It's been a while since I've taken Discrete Math... How do you do i mod n Z?
I believe this is how you do it:
n = iq + r, where q is the quotient and r is the remainder.
i mod n Z = r
Let a = i mod nZ, then a - i = nZ. This shows that Z divides a - i by n.
We can also look at the formula as a = nZ + i which tells us that a is a product of Z and the remainder of it.