# Integral quaternary forms and theta functions

The following question arises when I attempt to understand the modular parameterization of the elliptic curve $$E:y^2-y=x^3-x$$

In Mazur-Swinnerton-Dyer and Zagier's construction, a theta function associated with a positive definite quadratic form is induced:

$$\theta(q)=\sum_{x\in\mathbb{Z}^4}q^{\frac{1}{2}x^{T}Ax}$$

where $$A=\left(\begin{matrix}2 & 0 & 1 & 1\\ 0 & 4 & 1 &2\\ 1 & 1 & 10 & 1\\ 1 & 2 & 1 & 20 \end{matrix}\right)$$

$A$ is a positive definite matrix of determinant $37^2$, and we have $37A^{-1}=K^TAK$ where $K$ is an integral matrix of determinant $\pm 1$.

Question: Suppose $A$ is a positive definite $4\times 4$ matrix with integral entries. All diagonal entries are even numbers. The determinant of $A$ is a square number $N^2$. Is it true that for every $N=p$ ($p>2$ is a prime number), there is at least one $A$ that $NA^{-1}=K^TAK$, where $K$ is an integral matrix of determinant $\pm 1$?

-
In your question, do you want to assume $A$ is a $4 \times 4$ matrix? It's a little unclear which parameters depend on which here. – David Loeffler Feb 21 at 18:13
@DavidLoeffler: Yes, $A$ should be a $4\times 4$ matrix. The title of the question is about "quaternary forms", but I think I should emphasis that $A$ is a $4\times 4$ matrix. – zy_ Feb 21 at 19:33
since this question is about explicit modular paramtetrization, let me put a link to a related question I asked: mathoverflow.net/questions/96621/… – Abdelmalek Abdesselam Feb 22 at 22:49

dunno. few_reps found that all the other forms of discriminant $37^2$ fail. Go figure. Here are all the examples from Nipp's extended tables at Nebe's website. To get the matrix, double f11, f22, f33, f44, but keep the others as they are, and make the matrix symmetric.

  lower case g is just a genus ID number. G is the size of the automorphism group.
d    g  f11 f22 f33 f44 f12 f13 f23 f14 f24 f34  H  level = N   G    m1   m2
9   1   1   1   1   1   1   0   0   0   0   1 -1-1         3  288    1  288
25   1   1   1   2   2   1   1   0   1   1   2 -1-1         5   72    1   72
49   1   1   1   2   2   0   1   0   0   1   0 -1-1         7   32    1   32
121   1   1   1   3   3   0   1   0   0   1   0 -1-1        11   32   25  288
121   1   1   1   4   4   1   1   0   1   1   4 -1-1        11   72   25  288
121   1   2   2   2   2   2   1   0   1   1   2 -1-1        11   24   25  288
169   1   1   2   2   4   1   0   1   1   1   2 -1-1        13    8    1    8
289   1   1   1   6   6   1   1   0   1   1   6 -1-1        17   72    2    9
289   1   1   2   3   5   1   0   2   0   1   3 -1-1        17    8    2    9
289   1   2   2   3   3   2   1   0   1   1   3 -1-1        17   12    2    9
361   1   1   1   5   5   0   1   0   0   1   0 -1-1        19   32    9   32
361   1   1   2   3   6   1   1   0   1   2   3 -1-1        19    8    9   32
361   1   2   2   3   3   0   2   1   1   2   1 -1-1        19    8    9   32
529   1   1   1   6   6   0   1   0   0   1   0 -1-1        23   32  121  288
529   1   1   1   8   8   1   1   0   1   1   8 -1-1        23   72  121  288
529   1   1   2   3   6   0   0   1   1   0   0 -1-1        23    8  121  288
529   1   2   2   3   3   0   1   0   0   1   0 -1-1        23    8  121  288
529   1   2   2   4   4   2   1   0   1   1   4 -1-1        23   12  121  288
529   1   3   3   3   3   3   2   0   2   2   3 -1-1        23   24  121  288
841   1   1   1  10  10   1   1   0   1   1  10 -1-1        29   72   49   72
841   1   1   2   4   8   0   1   1   1   2   1 -1-1        29    8   49   72
841   1   1   3   3   8   1   0   2   0   1   3 -1-1        29    8   49   72
841   1   2   2   4   4   1   1   0   0  -1   2 -1-1        29    4   49   72
841   1   2   2   5   5   2   1   0   1   1   5 -1-1        29   12   49   72
841   1   3   3   4   4   3   2  -1   2   3   3 -1-1        29   12   49   72
961   1   1   1   8   8   0   1   0   0   1   0 -1-1        31   32   25   32
961   1   1   2   4   8   0   0   1   1   0   0 -1-1        31    8   25   32
961   1   1   2   5   9   1   0   2   0   1   5 -1-1        31    8   25   32
961   1   2   2   4   4   0   1   0   0   1   0 -1-1        31    8   25   32
961   1   2   3   4   5   2   0   3   1   2   4 -1-1        31    4   25   32
961   1   3   3   3   3   2   1   0   0   1  -2 -1-1        31    8   25   32
1369   1   1   2   5  10   0   1   1   1   2   1 -1-1        37    8    9    8
1369   1   1   4   5   6   1   0   1   0   4   3 -1-1        37    4    9    8
1369   1   2   2   3  10   1   2   0   1   0   3 -1-1        37    4    9    8
1369   1   2   3   4   5   1   0   3   1   1   2 -1-1        37    2    9    8
1681   1   1   1  14  14   1   1   0   1   1  14 -1-1        41   72   25   18
1681   1   1   2   6  12   1   0   1   1   1   6 -1-1        41    8   25   18
1681   1   1   3   4  11   0   1   2   0   3   1 -1-1        41    8   25   18
1681   1   1   3   4  12   1   1   0   1   3   4 -1-1        41    8   25   18
1681   1   2   2   6   6   1   2   0   1   2   3 -1-1        41    4   25   18
1681   1   2   2   7   7   2   1   0   1   1   7 -1-1        41   12   25   18
1681   1   2   3   4   6   0   2   1   1   3   1 -1-1        41    4   25   18
1681   1   3   3   4   4   1   2  -1   1  -2   2 -1-1        41    4   25   18
1681   1   3   3   5   5   3   2   0   2   2   5 -1-1        41   12   25   18
1681   1   4   4   4   4   4   2  -1   3   2   4 -1-1        41   12   25   18
d    g  f11 f22 f33 f44 f12 f13 f23 f14 f24 f34  H  level = N   G    m1   m2

-

It turns out that the OP will be satisfied with just one form for each of these square discriminants that maps to itself. I should already say that this thing reminds me of Watson transformations. However, few_reps has shown that some of the forms of the genus interchange. It seems this mapping permutes the genus, and one might need to search for a very long time to find a case when this permutation is a derangement.

I have two (infinite sets of) examples that suggest a derangement is going to be hard to find. If prime $q \equiv 3 \pmod 4,$ make a quaternary form out of two copies of the binary $x^2 + xy + \left( \frac{q+1}{4} \right) y^2.$ This works, so half the primes are finished.

Next, if $p = 6k-1,$ take matrix $$\left( \begin{array}{cccc} 2 & 1 & 1 & 1 \\ 1 & 2 & 0 & 1 \\ 1 & 0 & 4k & 2k \\ 1 & 1 & 2k & 4k \end{array} \right)$$ with determinant $p^2.$ The inverse times $p$ is

$$\left( \begin{array}{rrrr} 4k & -2k & -1 & 0 \\ -2k & 4k & 1 & -1 \\ -1 & 1 & 2 & -1 \\ 0 & -1 & -1 & 2 \end{array} \right)$$ I will need to check for the explicit change of variables matrix, but it looks good.

Got it, in

$$K = \left( \begin{array}{rrrr} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \\ -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{array} \right)$$

-
Following Zagier, I can cover $p=8k-3$ with $$A = \left( \begin{array}{rrrr} 2 & 0 & 1 & 1 \\ 0 & 4 & 1 & -2 \\ 1 & 1 & 2k & 0 \\ 1 & -2 & 0 & 4k \end{array} \right)$$ – zy_ Feb 22 at 5:16
@zy_ in that case, i would expect that enough effort would produce recipes for $5k + 2,3$ more work $7k+3,5,6.$ This is not the sort of problem where a finite number of such cases are going to finish the job. I did not see that Zagier really cared about all positive quaternaries of a given discriminant, just some compatible with the modular forms material. – Will Jagy Feb 22 at 5:45

Let $X_p$ be the set of isometry classes of 4-dimensional positive definite lattices satisfying the property $L^\sharp/L\simeq (\mathbf Z/p)^2$. The set $X_n$ is stable under the involution $\tau : L\mapsto pL^\sharp$.

The question seems to ask whether or not $X_p^\tau$ contains an even lattice. Will Jagy has given evidences for a positive answer. Nevertheless, one might ask whether the same holds when one restricts the question to a given genus (genera are also stable under $\tau$), even or odd.

Further edit Feb. 22 : Interestingly, the case of odd lattices seems to allow the opposite behaviour:

p= 7  A=
[ 7  0  0  0]
[ 0  3  1 -1]
[ 0  1  2 -1]
[ 0 -1 -1  2]
fix= 0    move= 2   proportion= 0.000

p= 23  A=
[23  0  0  0]
[ 0  5 -1  0]
[ 0 -1  3 -1]
[ 0  0 -1  2]
fix= 0    move= 4   proportion= 0.000

p= 31  A=
[31  0  0  0]
[ 0  6 -1 -1]
[ 0 -1  3  0]
[ 0 -1  0  2]
fix= 0    move= 8   proportion= 0.000

p= 47  A=
[47  0  0  0]
[ 0  6 -2  1]
[ 0 -2  5  0]
[ 0  1  0  2]
fix= 0    move= 12   proportion= 0.000

p= 71  A=
[71  0  0  0]
[ 0  7  1  1]
[ 0  1  6  1]
[ 0  1  1  2]
fix= 0    move= 20   proportion= 0.000

p= 79  A=
[79  0  0  0]
[ 0  6  0  1]
[ 0  0  5 -1]
[ 0  1 -1  3]
fix= 0    move= 26   proportion= 0.000

p= 103  A=
[103   0   0   0]
[  0  18  -1  -1]
[  0  -1   3   0]
[  0  -1   0   2]
fix= 0    move= 50   proportion= 0.000

p= 127  A=
[127   0   0   0]
[  0  10  -2   1]
[  0  -2   5  -1]
[  0   1  -1   3]
fix= 0    move= 62   proportion= 0.000

p= 151  A=
[151   0   0   0]
[  0  11  -1   0]
[  0  -1   5   1]
[  0   0   1   3]
fix= 0    move= 78   proportion= 0.000

p= 167  A=
[167   0   0   0]
[  0  18  -2  -1]
[  0  -2   5   0]
[  0  -1   0   2]
fix= 0    move= 92   proportion= 0.000

p= 191  A=
[191   0   0   0]
[  0  14   0   1]
[  0   0   5  -1]
[  0   1  -1   3]
fix= 0    move= 114   proportion= 0.000

p= 199  A=
[199   0   0   0]
[  0   7   1   1]
[  0   1   6   0]
[  0   1   0   5]
fix= 0    move= 134   proportion= 0.000

p= 223  A=
[223   0   0   0]
[  0  11   3  -3]
[  0   3   6  -2]
[  0  -3  -2   5]
fix= 0    move= 182   proportion= 0.000

p= 239  A=
[239   0   0   0]
[  0  19   2   0]
[  0   2   7  -1]
[  0   0  -1   2]
fix= 0    move= 172   proportion= 0.000


Edit Feb. 21 : Here are some heuristics (in each case, there is a quadratic space $V$ on which some lattices $L$ with $q(L)\subset \mathbf Z$ will furnish Gram matrices $A$ such as required in the OP (recall that in that case, the Gram matrix is associated to the bilinear form $x.y=q(x+y)-q(x)-q(y)$, in particular it has even diagonal entries).

Let $p$ be a prime, congruent to $3$ mod $4$. Then there is such a genus on the $\mathbf Q$-quadratic space $[1,1,p,p]$. Here is the number of fixed (resp exchanged) lattices:

p=  3  fix= 1    move= 0   proportion= 1.00
p=  7  fix= 1    move= 0   proportion= 1.00
p=  11  fix= 3    move= 0   proportion= 1.00
p=  19  fix= 3    move= 0   proportion= 1.00
p=  23  fix= 6    move= 0   proportion= 1.00
p=  31  fix= 6    move= 0   proportion= 1.00
p=  43  fix= 5    move= 2   proportion= 0.714
p=  47  fix= 15    move= 0   proportion= 1.00
p=  59  fix= 21    move= 0   proportion= 1.00
p=  67  fix= 7    move= 6   proportion= 0.538
p=  71  fix= 28    move= 0   proportion= 1.00
p=  79  fix= 20    move= 2   proportion= 0.909
p=  83  fix= 27    move= 2   proportion= 0.931
p=  103  fix= 25    move= 6   proportion= 0.807
p=  107  fix= 33    move= 6   proportion= 0.846
p=  127  fix= 30    move= 12   proportion= 0.714
p=  131  fix= 65    move= 2   proportion= 0.970
p=  139  fix= 39    move= 12   proportion= 0.765
p=  151  fix= 49    move= 12   proportion= 0.804
p=  163  fix= 15    move= 42   proportion= 0.263
p=  167  fix= 88    move= 6   proportion= 0.937
p=  179  fix= 85    move= 12   proportion= 0.876
p=  191  fix= 117    move= 6   proportion= 0.951
p=  199  fix= 81    move= 20   proportion= 0.802
p=  211  fix= 57    move= 42   proportion= 0.576
p=  223  fix= 70    move= 42   proportion= 0.625
p=  227  fix= 105    move= 30   proportion= 0.777
p=  239  fix= 165    move= 12   proportion= 0.933
p=  251  fix= 161    move= 20   proportion= 0.890
p=  263  fix= 156    move= 30   proportion= 0.839
p=  271  fix= 132    move= 42   proportion= 0.759
p=  283  fix= 75    move= 90   proportion= 0.455
p=  307  fix= 81    move= 110   proportion= 0.424
p=  311  fix= 266    move= 20   proportion= 0.930
p=  331  fix= 87    move= 132   proportion= 0.397
p=  347  fix= 155    move= 110   proportion= 0.585
p=  359  fix= 304    move= 42   proportion= 0.879
p=  367  fix= 144    move= 132   proportion= 0.521
p=  379  fix= 99    move= 182   proportion= 0.353
p=  383  fix= 289    move= 72   proportion= 0.801
p=  419  fix= 333    move= 90   proportion= 0.787
p=  431  fix= 399    move= 72   proportion= 0.847
p=  439  fix= 285    move= 132   proportion= 0.684
p=  443  fix= 195    move= 210   proportion= 0.481
p=  463  fix= 140    move= 272   proportion= 0.340
p=  467  fix= 287    move= 182   proportion= 0.612
p=  479  fix= 525    move= 72   proportion= 0.880
p=  487  fix= 147    move= 306   proportion= 0.325
p=  491  fix= 387    move= 156   proportion= 0.713
p=  499  fix= 129    move= 342   proportion= 0.274


Similarly, in the following cases, there exist such a genus on $A_2\perp p.A_2$:

p=  5  fix= 1    move= 0   proportion= 1.00
p=  11  fix= 3    move= 0   proportion= 1.00
p=  17  fix= 3    move= 0   proportion= 1.00
p=  23  fix= 6    move= 0   proportion= 1.00
p=  29  fix= 6    move= 0   proportion= 1.00
p=  41  fix= 10    move= 0   proportion= 1.00
p=  47  fix= 15    move= 0   proportion= 1.00
p=  53  fix= 9    move= 2   proportion= 0.818
p=  59  fix= 21    move= 0   proportion= 1.00
p=  71  fix= 28    move= 0   proportion= 1.00
p=  83  fix= 27    move= 2   proportion= 0.931
p=  89  fix= 27    move= 2   proportion= 0.931
p=  101  fix= 35    move= 2   proportion= 0.946
p=  107  fix= 33    move= 6   proportion= 0.846
p=  113  fix= 22    move= 12   proportion= 0.647
p=  131  fix= 65    move= 2   proportion= 0.970
p=  137  fix= 26    move= 20   proportion= 0.565
p=  149  fix= 49    move= 12   proportion= 0.804
p=  167  fix= 88    move= 6   proportion= 0.937
p=  173  fix= 56    move= 20   proportion= 0.737
p=  179  fix= 85    move= 12   proportion= 0.876
p=  191  fix= 117    move= 6   proportion= 0.951
p=  197  fix= 45    move= 42   proportion= 0.518
p=  227  fix= 105    move= 30   proportion= 0.777
p=  233  fix= 63    move= 56   proportion= 0.529
p=  239  fix= 165    move= 12   proportion= 0.933
p=  251  fix= 161    move= 20   proportion= 0.890
p=  257  fix= 92    move= 56   proportion= 0.622
p=  263  fix= 156    move= 30   proportion= 0.839
p=  269  fix= 132    move= 42   proportion= 0.759
p=  281  fix= 125    move= 56   proportion= 0.690
p=  293  fix= 117    move= 72   proportion= 0.619


Here is a final example : on the $\mathbf Q$-quadratic space $<1,2>\perp p.<1,2>$ (here, the example in the OP, developped in my first answer, appears):

p=  5  fix= 1    move= 0   proportion= 1.00
p=  7  fix= 1    move= 0   proportion= 1.00
p=  13  fix= 1    move= 0   proportion= 1.00
p=  23  fix= 6    move= 0   proportion= 1.00
p=  29  fix= 6    move= 0   proportion= 1.00
p=  31  fix= 6    move= 0   proportion= 1.00
p=  37  fix= 2    move= 2   proportion= 0.500
p=  47  fix= 15    move= 0   proportion= 1.00
p=  53  fix= 9    move= 2   proportion= 0.818
p=  61  fix= 9    move= 2   proportion= 0.818
p=  71  fix= 28    move= 0   proportion= 1.00
p=  79  fix= 20    move= 2   proportion= 0.909
p=  101  fix= 35    move= 2   proportion= 0.946
p=  103  fix= 25    move= 6   proportion= 0.807
p=  109  fix= 15    move= 12   proportion= 0.556
p=  127  fix= 30    move= 12   proportion= 0.714
p=  149  fix= 49    move= 12   proportion= 0.804
p=  151  fix= 49    move= 12   proportion= 0.804
p=  157  fix= 21    move= 30   proportion= 0.412
p=  167  fix= 88    move= 6   proportion= 0.937
p=  173  fix= 56    move= 20   proportion= 0.737
p=  181  fix= 40    move= 30   proportion= 0.571
p=  191  fix= 117    move= 6   proportion= 0.951
p=  197  fix= 45    move= 42   proportion= 0.518
p=  199  fix= 81    move= 20   proportion= 0.802
p=  223  fix= 70    move= 42   proportion= 0.625
p=  229  fix= 50    move= 56   proportion= 0.472
p=  239  fix= 165    move= 12   proportion= 0.933
p=  263  fix= 156    move= 30   proportion= 0.839
p=  269  fix= 132    move= 42   proportion= 0.759
p=  271  fix= 132    move= 42   proportion= 0.759
p=  277  fix= 36    move= 110   proportion= 0.247
p=  293  fix= 117    move= 72   proportion= 0.619
p=  311  fix= 266    move= 20   proportion= 0.930
p=  317  fix= 70    move= 132   proportion= 0.347
p=  349  fix= 105    move= 132   proportion= 0.443
p=  359  fix= 304    move= 42   proportion= 0.879
p=  367  fix= 144    move= 132   proportion= 0.521
p=  373  fix= 80    move= 182   proportion= 0.305
p=  383  fix= 289    move= 72   proportion= 0.801
p=  389  fix= 187    move= 132   proportion= 0.586
p=  397  fix= 51    move= 240   proportion= 0.175
p=  421  fix= 90    move= 240   proportion= 0.273
p=  431  fix= 399    move= 72   proportion= 0.847
p=  439  fix= 285    move= 132   proportion= 0.684
p=  461  fix= 300    move= 156   proportion= 0.658
p=  463  fix= 140    move= 272   proportion= 0.340
p=  479  fix= 525    move= 72   proportion= 0.880
p=  487  fix= 147    move= 306   proportion= 0.325


Studying these repartitions seems to be quite interesting.

Original post :

The answer is no : if you run the following Magma code :

M:=Matrix(Integers(),4,4,[1,0,1,1,0,2,1,2,0,0,5,1,0,0,0,10]);
M:=M+Transpose(M);
L:=LatticeWithGram(M);
H:=GenusRepresentatives(L);
for h in H do
print "h= lattice with Gram", GramMatrix(h);
hd:=DualBasisLattice(h);
MD:=37*LLLGram(GramMatrix(hd));
print "rescaled dual = lattice with Gram", MD;
a,b:=IsIsometric(h,LatticeWithGram(MD));
print "are isometric : ", a;
print " ";
end for;


on the online calculator, you obtain the following result :

h= lattice with Gram
[ 2  0  1  1]
[ 0  4  1  2]
[ 1  1 10  1]
[ 1  2  1 20]
rescaled dual = lattice with Gram
[ 2  0 -1 -1]
[ 0  4 -1 -2]
[-1 -1 10  1]
[-1 -2  1 20]
are isometric : true

h= lattice with Gram
[ 4 -1  2  1]
[-1  4 -1  0]
[ 2 -1  6 -2]
[ 1  0 -2 20]
rescaled dual = lattice with Gram
[ 2  1 -1  0]
[ 1  8 -4  1]
[-1 -4 12  2]
[ 0  1  2 10]
are isometric : false

h= lattice with Gram
[ 4  1  1  1]
[ 1  6  3  1]
[ 1  3  8 -1]
[ 1  1 -1 10]
rescaled dual = lattice with Gram
[ 4  1 -1 -1]
[ 1  6 -3 -1]
[-1 -3  8 -1]
[-1 -1 -1 10]
are isometric : true

h= lattice with Gram
[ 2  1  0 -1]
[ 1  8 -1 -4]
[ 0 -1 10 -2]
[-1 -4 -2 12]
rescaled dual = lattice with Gram
[ 4  1  1  0]
[ 1  4  2  1]
[ 1  2  6 -2]
[ 0  1 -2 20]
are isometric : false

-
Eh..... Why do you think the answer is "no" for determinant $37^2$? At least two matrices in your calculation support my idea. – zy_ Feb 21 at 20:09
hmm sorry, I misunderstood the question ... I'm gonna modify the algorithm to search for a counter-example to your very question ... – few_reps Feb 21 at 20:13
@zy_, you did not word this well. If all you want is one $A$ of the discriminant, whenever $p \equiv 3 \pmod 4$ there will always be one, because there is a quaternary made from the sum of two identical binaries. – Will Jagy Feb 21 at 20:16
@zy_ the identical binaries can be the principal form $x^2 + xy + \left( \frac{p+1}{4} \right) y^2$ – Will Jagy Feb 21 at 20:26
@WillJagy Yes, it is an involution since $(L^\sharp)^\sharp=L$ and $(pL)^\sharp=\frac 1p L^\sharp$. – few_reps Feb 21 at 23:44