In the book Introduction to Analytic Number Theory written by Tom M. Apostol, there is a step in the proof of Theorem 5.26 (Chinese remainder theorem) that I am unable to understand. In the proof, we assume $ m_1, \dots, m_r $ to be positive integers relatively prime in pairs and $ M = m_1 \cdots m_r $. There is a step that proves the uniqueness of solution that I cannot understand. Here it is:
But it is easy to show that the system has only one solution mod M. In fact, if $x$ and $y$ are two solutions of the system we have $x \equiv y \pmod{m_k}$ for each $k$ and, since the $m_k$ are relatively prime in pairs, we also have $x \equiv y \pmod{M}$.
The author does not explain why must $x \equiv y \pmod{m_k}$ for each $k$ imply that $x \equiv y \pmod{M}$?
I know we can show this ourselves. When $gcd(a,b) = 1$, $a|n$ and $b|n$ implies $ab|n$. There are numerous proofs of this available online. This is equivalent to stating that $ n \equiv 0 \pmod{a}$ and $n \equiv 0 \pmod{b}$ implies $n \equiv 0 \pmod{ab}$ when $gcd(a,b)=1$. But is this so obvious that it does not require a proof of its own in the book?
So what I am asking here is how do we justify this step from the preceding material in the book:
we have $x \equiv y \pmod{m_k}$ for each $k$ and, since the $m_k$ are relatively prime in pairs, we also have $x \equiv y \pmod M$
Does the book explain why this should be true somewhere earlier? I could not find anything. If you have read this book and you found the necessary groundwork for this in the preceding material, please share it here. If the book does not explain it somewhere earlier, does this step not require a proof of its own?