As part of a proof of the CRT, I've encountered the following:
We want to find a solution for the system
$$x \equiv a_1 \pmod{n_1} \\ x \equiv a_2 \pmod{n_2}$$
Then the author look for a solution of the form $x= a_1 +dy$ and claims that the system is equivalent to:
$$dy \equiv 0 \pmod{n_1} \\ dy \equiv a_2 - a_1 \pmod{n_2}$$
In the second equation it seems like he was able to "move" the $a_1$ term to the other side of the equivalence - Why is it valid?
Note that $a \equiv b \pmod n \iff (a-c) \equiv (b-c) \pmod n$. This relation is true as:
$$a \equiv b \pmod n \iff n \mid a-b \iff n \mid (a-c) - (b-c) \iff (a-c) \equiv (b-c) \pmod n$$