I'd like to express the classical Jacobi theta series in Sage:
\begin{align} \Theta_2(z) &= \sum_{n\in{\mathbb{Z} + \frac{1}{2}}} q^{\frac{1}{2}n^2} \newline \Theta_3(z) &= \sum_{n\in{\mathbb{Z}}} q^{\frac{1}{2}n^2} \newline \Theta_4(z) & = \sum_{n\in{\mathbb{Z}}} (-1)^nq^{\frac{1}{2}n^2} \end{align} where $q=e^{2 \pi i z}$. Preferably, these functions would play nicely with other q series such as
E4 = eisenstein_series_qexp(4,5, normalization = 'constant')
type(E4)
<class 'sage.rings.power_series_poly.PowerSeries_poly'>
I'd like to be able to take rational combinations of these theta functions and the Eisenstein series and analyze/compare Fourier coefficients in the q-series. However, it appears that working with non-integer powers of q may be problematic. For instance, if we start with the theta_qexp
function (which is $\Theta_3(2z)$ from above), we see that
theta_qexp(10,'q',ZZ)
1 + 2*q + 2*q^4 + 2*q^9 + O(q^10)
But if we let f = theta_qexp(10,'q',ZZ)
then f*q^(-1/2)
throws an error, presumably because of the non-integer power.