An integer $a$ leaves the same remainder when divided by $3$ and $12$, it also leaves a remainder of $2$ when divided by $4$, what is the remainder when $a$ is divided by 6?
Here's my attempt, would be glad if someone can confirm whether if I'm right in my arguments.
We are told that $a \equiv r \mod 3$ and $a \equiv r \mod 12$.
We know that $a \equiv r \mod 12 \iff a \equiv r \mod 3$ and $a \equiv r \mod 4$. Since we are told that $a$ leaves a remainder of $2$ when divided by $4$, then $a \equiv 2 \mod 4$. So by the iff statement, we have $a \equiv 2 \mod 12$. But, we also know that $a \equiv r \mod 12 \iff a \equiv r \mod 2$ and $a \equiv r \mod 6$, so $a \equiv 2 \mod 6$.
EDIT: I also want to confirm, is the statement $a \equiv b \mod (mn) \iff a \equiv b \mod m$ and $a \equiv b \mod n$ only true for different $m$ and $n$? For example, obviously $a \equiv 2 \mod (2*2) \iff a \equiv 2 \mod 2$ is false.
EDIT 2: After the discussion in the comments that $a \equiv b \mod (mn) \iff a \equiv b \mod m$ and $a \equiv b \mod n$ only when $gcd(m,n)=1$, I realize the last step of my proof isn't correct, since I said "$a \equiv r \mod 12 \iff a \equiv r \mod 2$ and $a \equiv r \mod 6$", but clearly $gcd(2,6)=2 \neq 1$, how do I complete the proof then?