Let $a,b\in\mathbb{Z}^+$. Consider a map $\tau:\mathbb{Z}_a\times\mathbb{Z}_b\to\mathbb{Z}_{ab}$, defined as $\tau(s,t)=(as+bt)\mod{ab}$.
Then, show that $\tau$ is bijection iff $gcd(a,b)=1$.
Here is my attempt for injection:-
Let $(s_1,t_1)\in\mathbb{Z}_a\times\mathbb{Z}_b$ and $(s_2,t_2)\in\mathbb{Z}_a\times\mathbb{Z}_b$, such that
$(as_1+bt_1)\mod{ab}=(as_2+bt_2)\mod{ab}$
$\implies a(s_1-s_2)\mod{ab} + b(t_1-t_2)\mod{ab}=0$
$\implies a(s_1-s_2)\mod{ab}=0$ and $b(t_1-t_2)\mod{ab}=0\space$ ($\because$ sum of two positive numbers)
$\implies s_1=s_2$ and $t_1=t_2$. Hence, $\tau$ is injective.
I think, I have correctly proved injection, however it does not use the GCD assumption.
I am struggling to prove surjection. I have thought like this:
Let $g=gcd(a,b)$. Then, for $a,b\in\mathbb{Z}^+, \forall s,t\in\mathbb{Z}, (as+bt)\in g\mathbb{Z}=a\mathbb{Z}+b\mathbb{Z}$.
$\{(as+bt)\mod{ab}:s,t\in\mathbb{Z}\}=\{mg:m\in\mathbb{Z},0\le mg<ab\}$.
Now, $\forall mg\in\mathbb{Z}_{ab},\exists s,t\in\mathbb{Z}$ such that $mg\mod{ab}=(as+bt)\mod{ab}$.
i.e., $mg\mod{ab}=\tau(s,t)$.
I don't know where and how to use the assumption $g=1$.
Help me!
Using Bézout's identity, the fact that $\gcd(a,b)=1$ implies that there exist $s_1,t_1\in \mathbb{Z}$ such that $1=s_1a+t_1b$.
Given an element $(c\mod ab)\in \mathbb{Z}_{ab}$, you know that $c=c(s_1a+t_1b)=cs_1a+ct_1b$. Then, choose $(s,t)=(ct_1,cs_1)$.