Let $a, b\in \mathbb{N}$, with $a\perp b$.
Define $S_{ab}=\{m\in\mathbb{N}\ |\ m<ab, m\perp ab\}$, $S_a=\{m\in\mathbb{N}\ |\ m<ab, m\perp a\}$, and $S_b=\{m\in\mathbb{N}\ |\ m<ab, m\perp b\}$. Define a function $f:S_{ab}\to S_a\times S_b$ by $f(x)=(x\mod a, x\mod b)$. Show that this is well-defined and bijective to prove that $\varphi(ab)=\varphi(a)\varphi(b)$.
I got stuck on the existence part of the well defined function proof, and I'm sure uniqueness and surjectivity might cause me more struggles. I guess for existence, it would be sufficient to show that $(x\mod a) \perp a$, but I'm not sure how to proceed.