# Methods to decide whether two positive definite ternary quadratic forms are in the same spinor genus?

Are there any effective methods to decide whether or not two positive definite ternary quadratic forms are in the same spinor genus?

For example, the following three forms are in the same genus

 x^2 + y^2 + 32z^2
x^2 + 4y^2 + 9z^2 + 4yz
2x^2 + 2y^2 + 9z^2 +2yz +2zx

• Where did you find the genus? – Will Jagy Apr 16 '17 at 21:36

The other answer mentions magma. I can, at least, provide a program that shows the genus and spinor genera given one form in the genus. The web page to paste the program is

I should add that the full length program, for use with magma itself, not an online calculator website, had significant preprocessing in C++ as well as postprocessing. Maybe the most important thing missing is the reduction of forms according to the reduction scheme of Alexander Schiemann. As a result, you should have some method for deciding whether two (positive) forms are equivalent. This is a finite check, not difficult, but needs to be done. For example, the output (far below) gives $\langle 1,4,9,-4,0,0 \rangle$ insted of $\langle 1,4,9,4,0,0 \rangle.$ Also, magma prints some peculiar things when the power of $2$ dividing the discriminant is large. When you ask for the genus of the regular form $\langle 1,8,64,0,0,0 \rangle,$ it correctly says there are two spinor genera but types the same form in both, an obvious error. This error first came to light when Manjul Bhargava asked Kaplansky about genera of a single class. Jones and Pall (1939) gave the correct second form, in my notation $\langle 4,8,17,0,4,0 \rangle,$ but gave the wrong spinor exceptions, corrected by Schulze-Pillot. So, things should be checked with, for example, the mass formula. One simple check is that spinor genera of the same genus must have the same mass.

Here is my program:

    Q:=RationalField();
Z:=Integers();
M3:=MatrixRing(IntegerRing(),3);

tolettuce:=function(sixlist)
temp := LatticeWithGram(M3![2 * sixlist[1],sixlist[6],sixlist[5],
sixlist[6], 2 * sixlist[2],sixlist[4],
sixlist[5],sixlist[4],2 * sixlist[3]]);
return temp ;
end function;

tohex := function(lettuce)
tripe := Basis(lettuce);
return [ Norm( tripe[1] ) div  2 ,
Norm( tripe[2] ) div 2 ,
Norm( tripe[3] ) div  2 ,
InnerProduct( tripe[2],tripe[3] )  ,
InnerProduct( tripe[3],tripe[1] )  ,
InnerProduct( tripe[1],tripe[2] )  ] ;
end function;

temp2 := tolettuce([1, 1,  32   , 0,0,0]);  //  CHANGE !!!!!!!!!!

tempgenus := GenusRepresentatives(temp2);

tempSG := SpinorGenera(Genus(temp2));

print "=====Discriminant  " ,  "  ==Genus Size==   ", #tempgenus , "\n";

// print "This  genus  has  " , #tempSG  , "   spinor genera ------\n";

reps := [ Representatives(S) : S in tempSG];

for i in [1..#reps] do

tempspin := reps[i];

// print  "-------------**----------------------  ",  " s. g. size---   ",  #tempspin , "\n";

for j in [1..#tempspin] do
tohex(tempspin[j]);
end for;
print "\n---**----- end of  spinor genus ", i, "   --------\n";
//      print "--------------------------------------------------";
end for;


Here it is in use

==================================================

The expectation of effective elementary methods is a bit optimistic. First, I put many relevant papers at TERNARY.

Next, a genus with more than one spinor genus need not have any spinor exceptional integers. This example, two regular forms, does have splitting integers, meaning numbers for which the Siegel weighted average of representations for one spinor genus differs from that for the other spinor genus (when exactly two spinor genera).

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

===Discriminant   27 ==Genus Size==  2
27 = 3^3

Smallest Splitting Integer   1 =  1    No Spinor Exceptions
1            8                   1 =  1
4          -16                   4 = 2^2
16           32                  16 = 2^4
25          -40                  25 = 5^2
49           56                  49 = 7^2
Spinor genus misses     no exceptions
27:    1     1          9      0    0    1          auto 24   Level 36  regular candidate
--------------------------size 1
Spinor genus misses     no exceptions
27:    1     3          3      3    0    0          auto 24   Level 36  regular candidate
--------------------------size 1
Disc    27    spinor genus count  2
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


It is also possible for a genus to have no spinor exceptional integers and no splitting integers. The smallest discriminant for this (in the discriminant I use) is 1375.

==================================
THESE GENERA HAVE NO SPLITTING INTEGERS !!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

===Discriminant   1375 ==Genus Size==  8
1375 = 5^3 * 11
Spinor genus misses     no exceptions
1375:    1     5         70      5    0    0    auto 8   Level 1100
1375:    1    14         25      0    0    1    auto 8   Level 1100
1375:    4     5         19      5    3    0    auto 4   Level 1100
1375:    5     9          9      7    0    0    auto 8   Level 1100
--------------------------size 4
Spinor genus misses     no exceptions
1375:    1     5         69      0    1    0    auto 8   Level 1100
1375:    1    20         20     15    0    0    auto 8   Level 1100
1375:    4     4         25      0    0    3    auto 8   Level 1100
1375:    5     9          9      2    0    5    auto 4   Level 1100
--------------------------size 4
Disc    1375    spinor genus count  2
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Thought I recognized this. It appears in Benham, Earnest, Hsia, and Hung (1990), Theorem 1, item (3.4). Page 6.

=====Discriminant     ==Genus Size==    3

[ 1, 1, 32, 0, 0, 0 ]
[ 2, 2, 9, 2, -2, 0 ]

---**----- end of  spinor genus  1    --------

[ 1, 4, 9, -4, 0, 0 ]

---**----- end of  spinor genus  2    --------


The loner is one of the very few spinor regular forms that are not regular. The following constitutes a proof that $\langle 1,4,9,4,0,0 \rangle$ does not lie in the same spinor genus as $\langle 1,1,32,0,0,0 \rangle:$ we have $$x^2 + 4 y^2 + 9 z^2 + 4yz \neq 2 m^2,$$ where all prime factors $p$ of $m$ satisfy $p \equiv 1 \pmod 4.$ There are often elementary proofs of spinor exceptional integers, once they have been noticed. In this case, $$x^2 + (2y+z)^2 \neq 2 (m-2z)(m+2z),$$ where a crucial detail is that $z$ is odd.

This is a proof because of the Corollary to Theorem 3 of Duke and Schulze-Pillot as it is not hard to prove that the first form primitively represents all such $2m^2.$

Magma can determine the spinor genera in a given genus (of course, within the range of forms that it can handle).

• Note that magma still makes errors when the power of 2 dividing the discriminant is too high, for example displaying the other form in the genus of $x^2 + 8 y^2 + 64 z^2.$ It appeared that they had fixed that long ago, but evidently some faults have returned. – Will Jagy Apr 16 '17 at 2:16
• In that case, check out the paper Spinor equivalence of quadratic forms" by J.W. Benham and J.S. Hsia in JNT, 1983. – WKC Apr 16 '17 at 3:00
• Got it, posted zakuski.math.utsa.edu/~kap/Benham_Hsia_1983.pdf Thanks. – Will Jagy Apr 16 '17 at 3:51