If $(a,k)=(b,m)=1$, prove that $(ab,km)=(a,m)(b,k)$.

I'm reading the proof of the multiplicative property of $$s_k(n)=\sum_{d|(n,k)}f(d)g\bigg( \frac kd\bigg)$$ The book wrote that in order to understand the proof, we need to know if $a,b,k,m$ are integers such that $(a,k)=(b,m)=1$, then $$(ab,km)=(a,m)(b,k).$$

I have written proof, but I don't know is it consistent, and this seems used more tools than it necessarily has to.

My proof: Let $$S_1=\{d: d|(a,m), d>0\}\\S_2=\{d: d|(b,k), d>0\}\\S=\{d:d|(ab,km), d>0\}.$$ I will prove the statement by showing that the function $\phi:S_1\times S_2\to S$ defined as $$\phi(d_1,d_2)=d_1d_2$$ is bijective, and complete the proof by connecting the maximal elements from these partial ordering sets.

Obviously, for $d_1\in S_1, d_2\in S_2$, this tells us $d_1 $ is both divisor of $a$ and $m$, and $d_2$ is both divisor of $b$ and $k$, hence $d_1d_2$ is both divisor of $ab$ and $km$, so we can tell $\phi(S_1\times S_2)\subseteq S$.

To show one-to-one, if we have $c_1,d_1\in S_1$ and $c_2,d_2\in S_2$ such that $$\phi(c_1,c_2)=\phi(d_1,d_2)$$ then $$c_1c_2=d_1d_2$$

In particular, $c_1|d_1d_2$, we need to show $c_1|d_1$. Indeed, if $(c_1,d_2)>1$, this implies $a,k$ have common factor larger than $1$, contradicts the assumption. Therefore $c_1|d_1$. A similar argument implies $d_1|c_1$, therefore $c_1=d_1$. Again a similar argument implies $c_2=d_2$, which shows one-to-one.

To show onto, let $d\in S$, since $d|ab$, we can split $d$ into $d_1d_2$ such that $d_1|a$ and $d_2|b$. Since $(a,k)=1$, we see $(d_1,k)=1$, by property of $S$ we see also $d_1|m$, therefore $d_1\in S_1$, a similar argument implies $d_2\in S_2$. So every number in $S$ has a preimage in $S_1\times S_2$

This completes the proof. Is there any mistake in the proof?


Edit: A proof about the statement: If $d|ab$ then there are $d_1,d_2$ such that $d=d_1d_2$ and $d_1|a, d_2|b$. Let $ab=p_1^{e_1}\cdots p_r^{e_r}$ for distinct prime factors $p_1,\cdots,p_r$, then we can write $$a=p_1^{x_1}\cdots p_r^{x_r}\\b=p_1^{y_1}\cdots p_r^{y_r}$$ where some of $x_i, y_i$ can be zero, and $x_i+y_i=e_i$ for all $i=1,\cdots,r$. Since $d|ab$, we can write $$d=p_1^{f_1}\cdots p_r^{f_r}$$ with $f_i\leq e_i$ for all $i=1,\cdots,r$. Then since $$f_i\leq x_i+y_i$$ Split into two cases:

Case 1: $f_i> x_i$, then we can choose $g_i=x_i$ and $h_i=f_i-x_i$.

Case 2: $f_i\leq x_i$, then we can choose $g_i=f_i$ and $h_i=0$.

Then the choice $$d_1=\prod_{i=1}^r p_i^{g_i}, \quad d_2=\prod_{i=1}^r p_i^{h_i}$$ will prove the statement.


Solution 1:

Dividing both sides by $(a,m)(b,k)$ using the gcd distributive law it reduces to

$\qquad\ \ \ (AB,KM)\,:=\,\Big( \underbrace{\dfrac{a}{(a,m)}}_{\large A} \underbrace{\dfrac{b}{(b,k)}}_{\large B} , \underbrace{\dfrac{k}{(b,k)}}_{\large K} \underbrace{\dfrac{m}{(a,m)}}_{\large M}\Big) = 1$

Here $\,(A,K) = 1\, $ by $\,A\mid a,\, K\mid k\,$ and $\,(a,k) = 1.\, $ Similarly $\,(B,M) = 1\,$ by $\,(b,m)\! =\! 1$

Also $\ (A,M) = (a/(a,m),m/(a,m)) = (a,m)/(a,m)\! =\! 1.\, $ Similarly $\,(B,K) = 1,\,$ so

Lemma $\ (AB,KM)=1\ $ if $\ 1=(A,K)=(A,M)=(B,K)=(B,M)$

Proof $\,\ (A,KM) = 1 \, $ by $\,(A,K) = 1 = (A,M)\, $ and Euclid's Lemma.

and $\ \ \ \ \ \,(B,KM) = 1\, $ by $\,(B,K) = 1 = (B,M)\, $ and Euclid's Lemma

thus $\ (AB,KM) = 1\,$ by Euclid's Lemma.

See here for a generalization.

Remark $\ $ Here's another proof of $\ c\mid AB\,\Rightarrow\, c = ab,\ a\mid A,\ b\mid B$

Cancel $\,d = (c,B)\ $ to get $\,c/d\mid A(B/d)\,$ so $\,c/d\mid A\,$ by Euclid & $\,(c/d,B/d) = (c,B)/d = 1$

Therefore $\, c = (c/d)d,\ c/d\mid A,\ d\mid B$

This is known by various names: Shreier, Riesz, Euler's Four Number Theorem, etc. see here.