<s>[INST] Solve $x\equiv 1\pmod2$, $x\equiv 2\pmod3$, $x\equiv 3\pmod4$, $x\equiv 4\pmod5$, $x\equiv 5\pmod6$ and $x\equiv 0\pmod7$ $$\begin{align*}
x&\equiv 1\pmod2\\
x&\equiv 2\pmod3\\
x&\equiv 3\pmod4\\
x& \equiv 4\pmod5\\
x&\equiv 5\pmod6\\
x&\equiv 0\pmod7\\
\end{align*}$$
So the solution says we can eliminate $x\equiv 5(\bmod6)$ because the first two cases cover it, but I don't really know how it does. How do we solve it in cases like this where the moduli are not mutually relatively prime.
 [/INST] Because of the special case
$$x\equiv -1\pmod {2,3,4,5,6}$$
we have a shortcut for handling these.
$$x+1\equiv 0\pmod {2,3,4,5,6}$$
It is way easier to work with $x+1$ here.
This gives us
$$x+1 \equiv 0 \pmod {LCM(2,3,4,5,6)=60}$$
Now we need to incorporate
$$x+1 \equiv 1 \pmod 7 $$
Which is easy, as $7$ is prime. List out the first 6 multiples of $60$.
$$\begin{align}
1 \cdot 60 \equiv 4 \pmod 7 \\\\
2 \cdot 60 \equiv \color{red}1 \pmod 7 \\\\
3 \cdot 60 \equiv 5 \pmod 7 \\\\
4 \cdot 60 \equiv 2 \pmod 7 \\\\
5 \cdot 60 \equiv 6 \pmod 7 \\\\
6 \cdot 60 \equiv 3 \pmod 7 \\\\
\end{align}$$
So our answer is
$$ x +1 \equiv 2 \cdot 60 \pmod{ 7 \cdot 60}$$
or
$$ x \equiv 2 \cdot 60 -1 \pmod {7 \cdot 60}$$
</s>