On my textbook, after the proof of the Chinese Remainder Theorem when the moduli is pairwise relatively prime, one modification is left as exercise.
Prove that the system of linear congruences $x\equiv a_i\pmod{m_i}$ is solvable if and only if $gcd(m_i,m_j) \vert (a_i - a_j)$ for all $i\neq j$, and $i,j \in \{ 1,2,\dots r \} .$ (or $a_i\equiv a_j\mod{gcd(m_i,m_j)}$ which is the same). If a solution exists, it is unique $\mod{lcm(m_1,m_2,...,m_r)}$
I managed to find a proof for the case $r=2$, and from there tried to do induction, but I am stuck when I have to use the inductive hypothesis.
$[ \longrightarrow ]$
Suppose that $a_i\equiv a_j\mod{(m_i,m_j)}$ for all $i\neq j$, and $i,j \in \{ 1,2,\dots,r, r+1 \}$.
Then, the system
$$ x\equiv a_1 \mod{m_1} \\ x\equiv a_2 \mod{m_2}\\ .\\.\\.\\ x\equiv a_r \mod{m_r}\\ $$
has a solutions, lets say $b$ (by inductive hypohesis).
I will next like to consider the system
$$ x\equiv b \mod{lcm(m_1,m_2,...,m_3)}\\ x\equiv a_{r+1} \mod{m_{r+1}} $$
and find that it has a solution using the case $r=2$, but I don't know how to use my hyphotesis here because I need $b \equiv m_{r+1}\mod{gcd(lcm(m_1,m_2,...,m_r),m_{r+1}))}$
$[\longleftarrow]$: As for the converse I don't know how to begin.