How to prove that if m | a or m | b then m | ab? [duplicate]

I need help proving that if $$m|a \lor m|b \Rightarrow m|ab$$.

I was thinking that $$m|a$$ and $$m|b$$ is equivalent to $$a = km$$ and $$b = lm$$. Thus $$ab = (kl)m^2$$. Since this is a multiple of $$m$$ then $$m|(kl)m^2$$ and $$m|ab$$. But I'm not sure if that proves it - also with the $$\lor$$ in the premise.

Any advice or hints would be greatly appreciated.

• What you proved is that $m|a$ and $m|b$ implies $m|ab$. This does not prove what you want, you want to show $m|a$ OR $m|b$ implies $m|ab$. Try writing as two cases. i.e, "If $m|a$, ... Then $m|ab$", "If $m|b$, ..., then $m|ab$, thus if $m|a$ or $m|b$ then $m|ab$". – Robin Carlier Oct 30 '19 at 16:11

You almost have it. You just forgot that, as it is or in the assertion, you can only use one translation as an equality. Explicitly, suppose you're in the case $$m\mid a$$, i.e. $$a=km$$ for some $$k$$. Then $$ab=(km)b=(kb)m\quad\text{by associativity and commutativity}.$$ If we're in the case $$m\mid b$$, just exchange the roles of $$a$$ and $$b$$.
In your argument, you seem to be assuming that $$m$$ divides both $$a$$ and $$b$$. Let $$a,b, m \in \mathbb{Z}$$. Supose, with no loss of generality, that $$m|a$$. Then there exists an integer $$k$$ such that $$a = km$$. Thus, $$ab=kbm$$ and, once $$k$$ and $$b$$ are both integers, $$kb$$ is an integer. This proves $$m|ab$$ (you only need to take $$bk$$ instead of $$k$$.
Why on earth do they insist on making symbolic logic so isolated and abstract? $$\lor$$ means "OR".
So if either $$m|a$$ or $$m|b$$. If $$m|a$$ then there is a $$k$$ so that $$a = mk$$ and $$ab = m(kb)$$. And if $$m|b$$ then there is an $$l$$ so that $$b = ml$$ and $$ab = (al)m$$. Either way, $$m|ab$$.