I am motivated by a problem in 2d CFT to compute “generalized theta functions,” expressions of the form

begin{equation}

vartheta_{L,u}(tau) := sum_{alpha in L} u(alpha) q^{{langlealpha,alpharangle}/2},,

end{equation}

where $u:Lto {pm 1}$ is some function I’ll know explicitly. If it matters, $L$ will always be a sublattice of the $E_8$ lattice.

By “compute,” I really mean present the RHS in terms of “nice” functions like $theta_{1,2,3,4}$, but I’m open to alternatives (say Eisenstein series). One thing of moderate importance is the ability to look at q-expansions in, say, Mathematica. My hope is that lattice pros already have techniques to evaluate these sums and I am not re-inventing various wheels below.

I’m caustiously optimistic that if I can do this for regular theta functions (i.e. with $u(alpha) = 1$), that I can do it with minus signs, as it will just flip some $theta_{2,3}$s to $theta_{1,4}$s.

My trick thus far is to turn the calculation into sums over integers, then abuse integer shift-symmetry and re-write sums to remove “cross-terms.” For example, for the $A_2$ lattice

begin{align}

sum_{alphain A_2} q^{langlealpha,alpharangle/2}

&= sum_{n_1,n_2inmathbb{Z}} q^{n_1^2-n_1n_2+n_2^2}\

&=(sum_{n_2 textrm{ odd}}+sum_{n_2 textrm{ even}})sum_{n_1}q^{n_1^2-n_1n_2+n_2^2}\

&=sum_{k}sum_{n_1}q^{1 + 4 k + 4 k^2 – 2 k n_1 – n_1 + n_1^2}+sum_{k}sum_{n_1}q^{4 k^2 – 2 k n_1 + n_1^2}\

&=sum_{k}sum_{n_1}q^{1 + 3 k + 3 k^2 + n_1 + n_1^2}+sum_{k}sum_{n_1}q^{3 k^2 + n_1^2}\

&=theta_2(6tau)theta_2(2tau)+theta_3(6tau)theta_3(2tau),.

end{align}

In going from the second to third line I’ve just written $n_2=2k+1$ and $n_2=2k$, and for third to fourth I’ve shifted $n_1 mapsto n_1 + k + 1$ and $n_1 mapsto n_1 + k$ for the respective sums.

## Problem 1: $vartheta_{E_6}$ is a lot!

This approach gets involved very quickly. For a rank $N$ lattice, I have at least $N$ sums, and I don’t always get to break each sum into 2. e.g. maybe I need to replace $n_i$ with $n_i = 3k, 3k+1, 3k+2$.

On page 127 of Conway & Sloane’s book, they give $theta_{E_6}$ in terms of $theta_{2,3}$ as

begin{equation}

theta_{E_6}(tau) = frac{1}{4}f(tau)^3+theta_{A_2}(tau)^3

end{equation}

where

begin{equation}

f(tau) = theta_{A_2}left(frac{tau}{3}right)+theta_{A_2}(tau)

end{equation}

**Question 1.A):** Can I obtain this answer without using that $A_2 times E_6$ is a $mathbb{Z}_3$ fixed sublattice of $E_8$?

I imagine a technique where I present the inner product $langle alpha,alpharangle/2$ as coming from an upper triangular matrix. i.e. write $alpha$ as an integer sum over simple roots $alpha = sum_{i} n_i alpha_i$ then

begin{equation}

langle alpha,alpharangle/2 =

begin{pmatrix}n_1\ n_2\ vdots \ n_N end{pmatrix}

begin{pmatrix}

1 & c_{12} & dots & c_{1N} \

& 1 & dots & c_{2N} \

& & ddots & vdots \

& & & 1

end{pmatrix}

begin{pmatrix}n_1\ n_2\ vdots \ n_N end{pmatrix},.

end{equation}

My hope is that shift-symmetry and breaking up sums have natural actions on such upper-triangular matrices. The shift would be an operation on one matrix, and “breaking up” would replace one matrix with a collection of others.

**Question 1.B):** Does such a technique exist already, or is there a quicker way to do these computations?

## Problem 2: Recognizing Theta-Functions

When I extend this procedure and try it on the next-simplest lattice, $A_3$, I don’t obtain an answer which is obviously products of theta functions like I did for $A_2$. In particular, I can make my sums decouple, but I get arbitrary “blocks” of the form

begin{align}

mathbb{B}_{A,B,C}

&:=sum_{k} q^{frac{1}{2}(A k^2 + B k + C)}\

&= q^{frac{C}{2}}varthetaleft(frac{Btau}{2},Atauright)\

&= q^{frac{C}{2}}(q^A;q^A)_inftythetaleft(-q^{(A+B)/2},q^Aright)

end{align}

where $vartheta(z,tau)$ is the regular Jacobi-theta function $theta(w,q)$ is the q-theta function with $w=e^{ipi z}$. For special ${A,B,C}$ the relationships to $theta_{1,2,3,4}$ are clear. And maybe that’s the best I can do unless I can find some identities relating an arbitrary $mathbb{B}_{A,B,C}$ to $theta_{1,2,3,4}$, or other similarly “nice” functions.

**Question 2:** Are there better expressions for my “blocks”?