What is the following expression simplified to? $$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.
The Chinese Remainder Theorem provides solution to the following
$$\begin{cases}
a_1 &amp; \mod n_1\\
a_2 &amp; \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.