Let be $m, n$ integers such that $m \wedge n = 1$. Also, let's take $r \in [0, mn - 1]$.
Can we solve the equation $an + bm \equiv r \pmod{mn}$ where $a, b$ are the variables, using the Chinese Remainder Theorem?
I believe that, because $m \wedge n = 1$, then we would have the following system for some $(r_1, r_2) \in [0, m - 1] \times [0, n - 1]$ :
$\begin{equation*} \left\{ \begin{aligned} & an + bm \equiv r_1 \pmod{m} \\ & an + bm \equiv r_2 \pmod{n} \end{aligned} \right. \end{equation*}$
Then, we could solve $a \equiv r_1 \pmod{m}$ and $b \equiv r_2 \pmod{n}$.
But, I'm not sure that the "reciprocal" Chinese Remainder Theorem could apply because it's not necessarily true?
Can we explicit the form of such a solution?
Notations : $a \wedge b$ is GCD of $a$ and $b$.