I have to prove the following:
$a \equiv b \mod m \wedge a \equiv b \mod n \Rightarrow a \equiv b \mod lcm(m,n)$
I already tried but I'm stuck.
This is what I've got so far:
$m\mid (a-b) \wedge n\mid (a-b) \Rightarrow lcm(m,n)\mid (a-b)$
When trying it with numbers it makes sense. The $lcm$ is never greater than $(a-b)$ and it always is a divisor.
Furthermore I wrote it like this:
$q_{1}\cdot m = a-b \\ q_{2}\cdot n = a-b \\ \Rightarrow q_{3}\cdot lcm(m,n) = a-b$
From the first two lines I get:
$q_{1}\cdot m = q_{2}\cdot n$
But now I am stuck. If this last line was somehow a definition of the $lcm$ that would solve everything, but I didn't find a notation of the $lcm$ like this on the internet.
Was my approach right and can someone point me in the right direction from here or is there a completely other way to prove this?
Using the fundamental theorem of arithmetic one can write
$m=\prod_p p^{M_p}$
$n=\prod_p p^{N_p}$
$lcm(m,n)=\prod_p p^{\max(N_p,M_p)}$
where $p$ are prime numbers and $N_p,M_p$ non-negative integers (one can have $N_p=0$ or $M_p=0$). Now, if $m|a-b$ and $n|a-b$ that means that $p^{M_p}|a-b$ and $p^{N_p}|a-b$ and therefore $p^{\max(N_p,M_p)}|a-b$ for any prime number $p$. Now if
$a-b=\prod_p p^{C_p}$
and therefore $C_p\ge\max(N_p,M_p)$. This implies that $lcm(m,n)|a-b$.