Can I express this sum as product of two theta functions? I have an infinite sum written as
$$
\sum_{mn} e^{-i2\pi(m c_1 +n c_2)} e^{-(m^2+n^2-mn)}
$$
where $m,n$ are integers, $0<c_1, c_2<1$.
I want to express the above expression into a product of two theta functions. If I don't have the cross term $e^{-mn}$, it seems straightforward.
 A: I can get you a sum of two products of theta functions (with a prefactor).  To clear the cross term, make the substitution $m \mapsto u+v$, $n \mapsto u-v$.  Sum that and then, to your original sum, make the substitution $m \mapsto u+v+1$, $n \mapsto u-v$ and sum that.  Then, adding the two together, ...

 $$\sum_{u,v} \mathrm{e}^{-\mathrm{i} 2 \pi \left( c_1(u+v) + c_2 (u-v) \right)} \mathrm{e}^{u^2 + 3v^2}  + \sum_{u,v} \mathrm{e}^{-\mathrm{i} 2 \pi \left( c_1(u+v+1) + c_2 (u-v) \right)} \mathrm{e}^{u^2 + 3v^2+u+3v+1} \\ = \frac{\pi}{\sqrt{3}}  \mathrm{e}^{-\frac{4}{3} \pi^2 \left(c_1^2 + c_1 c_2 + c_2^2\right)} \left( \\ \vartheta_3 \left(\frac{1}{3} \mathrm{i} (c_1 - c_2) \pi^2 ; \mathrm{e}^{-\frac{\pi^2}{3}}\right) \vartheta_3\left(\mathrm{i} (c_1 + c_2) \pi^2 ; \mathrm{e}^{-\pi^2}\right)  \\ + \vartheta_3\left(\frac{1}{6} \pi (2 \mathrm{i} \pi (c_1 - c_2)+3) ; \mathrm{e}^{-\frac{\pi^2}{3}}\right) \vartheta_3\left(\frac{1}{2} \pi (2 \mathrm{i} \pi (c_1 + c_2)+1) ; \mathrm{e}^{-\pi^2}\right)\right)  \text{,}  $$

where $\vartheta_3(u ; q) = 1 + 2 \sum_{n=1}^\infty q^{n^2} \cos(2 n u)$ (which I only write down because nobody can settle on notation for theta functions).
