$$x \mod 1000 \mod 5$$
I would have thought that it was $x \mod 5000$ except that it doesn't hold true for $x = 5005$ since you'll get zero, but $5005 \mod 5000 = 5$.
$$x \mod 1000 \mod 5$$
I would have thought that it was $x \mod 5000$ except that it doesn't hold true for $x = 5005$ since you'll get zero, but $5005 \mod 5000 = 5$.
Since 5 is a divisor of 1000, I believe the expression would simplify to "x mod 5" as adding multiples of 1000 wouldn't change the remainder when divided by 5.
Note that $x \pmod {1000}$ is same as $1000k+x$, where $k \in \mathbb{Z}$. Hence, $x \pmod {1000} \pmod{5}$ is same as $5m+x\pmod{1000} = 5m+1000k+x = 5(m+200k)+x$ is same as $x \pmod5$.
The Chinese Remainder Theorem provides solution to the following $$\begin{cases} a_1 & \mod n_1\\ a_2 & \mod n_2\\ \dots \end{cases}$$ if $n_1, n_2, \dots$ are relative primes. If not, you can simply factorize $n_x = p_1 p_2 \dots$ and express $a_x$ with $\mod p_1, p_2, \dots$ and in your question, $1000 = 5 \times 200$, so $x \mod 5$ is just tautology.