TITLE: Can the identity $ab=\gcd(a,b)\text{lcm}(a,b)$ be recovered from this category?
QUESTION [11 upvotes]: Define the category $\mathcal{C}$ as follows. The objects are defined as $\text{Obj}(\mathcal{C})=\mathbb{Z}^+$, and a lone morphism $a\to b$ exists if and only if $a\mid b$. Otherwise $\text{Hom}(a,b)=\varnothing$. It can be shown that $\gcd(a,b)$ is a product in $\mathcal{C}$ and $\text{lcm}(a,b)$ is a coproduct in $\mathcal{C}$. My question is:

Can we recover the identity
  $$ab=\gcd(a,b)\text{lcm}(a,b)$$
  from the properties of this category?

My initial thought was to denote a morphism $a\to ak$ by simply $k$ (or a triple $(a,k,ak)$ if we are concerned about disjointness), and then of course composition would just be multiplication: $k:a\to b,\ k':b\to c$, then $kk':a\to c$. Then, by the universal properties of products and coproducts, the diagram:
$$
\require{AMScd}
\begin{CD}
\gcd(a,b)=d @>{a/d}>> a\\
@V{b/d}VV @VV{\ell/a}V \\
b @>>{\ell/b}> \ell=\text{lcm}(a,b)
\end{CD}
$$
commutes. But of course composition only yields
$$\frac{a}{d}\frac{\ell}{a}=\frac{b}{d}\frac{\ell}{b}.$$
I'm also curious about other identities this category might "know about". 
Edit: I'm thinking we could just show that 
$$\frac{ab}{\ell}$$
satisfies the universal property for products (or dually, that $ab/d$ is a coproduct) which would imply that $ab/\ell$ is isomorphic to $d$. By definition this implies that $d$ and $ab/\ell$ divide each other, and hence must be equal (hopefully that's correct). Of course, I am open to any other methods involving categorical machinery that I'm not familiar with (limits, pullbacks, etc.) and any other identities that $\mathcal{C}$ may be aware of.

REPLY [3 votes]: In fact, every partially ordered set can be viewed as a category in the way you describe; your example is obtained by applying this construction to the poset $(\mathbb{Z}_{\geq 1},\mid)$. This process always turns meets into products and joins into coproducts. So your observations are essentially the fact that $\mathrm{gcd}$ is the meet in $(\mathbb{Z}_{\geq 1},\mid)$ and $\mathrm{lcm}$ is the join.
As far as I can tell, there's no truly sensible way to recover the multiplicative structure of $\mathbb{Z}_{\geq 1}$ from the poset $(\mathbb{Z}_{\geq 1},\mid)$ alone. The problem is that there are certain distinguished chains in $(\mathbb{Z}_{\geq 1},\mid),$ namely those of the form $\{n^k \mid k \in \mathbb{Z}_{\geq 0}\}.$ Speaking vaguely: if you know these, there's a sensible way to recover the multiplicative structure. But the poset $(\mathbb{Z}_{\geq 1},\mid)$ alone doesn't "know" these.
Note that, if we identify each element of $\mathbb{Z}_{\geq 1}$ with its multiset of prime factors, then the identity you're interested in becomes:
$$A+B = (A \cup B) + (A \cap B)$$
(in multiset notation), which makes it really obvious why its true!