# SiegelTheta gives misleading message when the dimensions don't match

Bug introduced in 6.0 and persisting through 11.0.1 or later

SiegelTheta is new in 6.0

In order to test the SiegelTheta function, I wanted to evaluate it for $\mathbf s=\mathbf 0$ when $\mathbf \Omega=(i/\pi)\mathbf I_n$ for some nonnegative integer $n$. (This ought to factorize to the $n$th power of the $n=1$ case, which is itself a Jacobi theta function.)

Strangely, this works for $n=3$...

SiegelTheta[IdentityMatrix[3]*I/π], {0, 0, 0}] // N // Chop

5.57006


but not for other nonnegative integers:

SiegelTheta[IdentityMatrix[2]*I/π, {0, 0, 0}]


SiegelTheta::invmat: {{I/π, 0}, {0, I/π}} must be a symmetric matrix with a positive definite imaginary part.

SiegelTheta[{{I/π, 0}, {0, I/π}}, {0, 0, 0}]

SiegelTheta[IdentityMatrix[4]*I/π, {0, 0, 0}]


SiegelTheta::invmat: {{I/π, 0, 0, 0}, {0, I/π, 0, 0}, {0, 0, I/π, 0}, {0, 0, 0, I/π}} must be a symmetric matrix with a positive definite imaginary part.

SiegelTheta[{{I/π, 0, 0, 0}, {0, I/π, 0, 0}, {0, 0, I/π, 0}, {0, 0, 0, I/π}}, {0, 0, 0}]


Given that $\Im \mathbf \Omega=(1/\pi)\mathbf I_n$ evaluates to True under the SymmetricMatrixQ[] and PositiveDefiniteMatrixQ[] commands, I can't see why the error message is popping up. Is there an obvious problem or fix?

• You may want to change the size of the zero vector: for the 2 case, SiegelTheta[IdentityMatrix[2]*I/\[Pi], {0, 0}] // N // Chop seems to work. – bill s Mar 19 '16 at 15:27
• @bills That seems to do it, though that makes the error message seem entirely irrelevant. – Semiclassical Mar 19 '16 at 15:45
• Yeah, I'd call it a bug. – J. M. will be back soon Mar 20 '16 at 5:42
• @J.M. Thanks for the edit! – Semiclassical Mar 20 '16 at 14:29
• To clarify, one of the requirements of SiegelTheta[] is "If Ω is a p*p matrix, the vectors s and v or v_i must have length p." When you changed to IdentityMatrix[2], your value of s should also switch to {0, 0}. The point remains though that Mathematica is printing the wrong error message. – miles Apr 10 '16 at 8:34