$a\equiv{b}\pmod{m},a\equiv{b}\pmod{n}\ \Rightarrow\ a\equiv{b}\pmod{lcm(m,n)}$ Show that if $a\equiv{b}\pmod{m},a\equiv{b}\pmod{n}\ \Rightarrow\ a\equiv{b}\pmod{lcm(m,n)}$
I think this must be a basic theorem in number theory but couldn't find it in my books,also it's very useful in solving many problems concerning LCM and GCD.
Please give a proof.I have no idea for it.
$a=b$ mod $m$ is equivalent $a-b= cm$; $a=b$ mod $n$ is equivalent $a-b=dn$. $a-b$ is a multiple of $m$ and $n$  implies that $a-b$  is a multiple of $lcm(m,n)$. This implies that $a-b=0$ mod $lcm(m,n)$ and $a=b$ mod $lcm(m,n)$.
$a\equiv b \pmod n$ and $a \equiv b \pmod m$ is equivalent to $n|(a-b)$ and $m|(a-b)$. 

Let $n=P_1^{\alpha_1}P_2^{\alpha_2}...P_k^{\alpha_k}$ and $m=P_1^{\beta_1}P_2^{\beta_2}...P_k^{\beta_k}$ (with $\alpha_i$ and $\beta_i$ positive integers, possibly zero)

It is easy to show that $lcm(m,n)=P_1^{max(\alpha_1,\beta_1)}P_2^{max(\alpha_2,\beta_2)}...P_k^{max(\alpha_k,\beta_k)}$

We have, by hypothesis, $n|(a-b)$ and $m|(a-b)$.

Therefore, $lcm(m,n)|(a-b)$, i.e. $a\equiv b \pmod {lcm(m,n)}$