ON THE ANALYTIC THEORY OF ISOTROPIC TERNARY QUADRATIC FORMS

. A new local-global result about the primitive representations of zero by integral ternary quadratic forms is proven. By an extension of a result of Kneser (given in the Appendix), it yields a quantitative supplement to the Hasse principle on the number of automorphic orbits of primitive zeros of a genus of forms. One ingredient in its proof is an asymptotic formula for a count of the zeros of a given form in such an orbit.


Introduction
Let S be a symmetric 3 × 3 matrix with integral entries and with det S = D > 0. Associated to S is the nonsingular ternary quadratic form where x = (x 1 , x 2 , x 3 ). All ternary quadratic forms we consider here are assumed to arise this way. We will sometimes refer to them simply as forms. Two forms S, S are said to be in the same class if there is an A ∈ GL 3 (Z) such that They are in the same genus if, for any prime p or p = ∞, there is an A ∈ GL 3 (Z p ) such that (1.2) holds. Here Z ∞ = R. The genus G of S consists of finitely many, say h, classes. Forms in the same genus have the same determinant. The form S is isotropic if and only if S(x) = 0 has primitive solutions x ∈ Z 3 . Hasse's principle applied to S says that S is isotropic if and only S(x) = 0 is nontrivially solvable over Z p for all primes p and p = ∞. This result is equivalent to Legendre's theorem, which states that for abc square-free the equation (1.3) ax 2 1 + bx 2 2 + cx 2 3 = 0 has primitive solutions if and only if a, b, c are not all of the same sign and −bc, −ac, −ab are quadratic residues modulo |a|, |b|, |c|, respectively. 1 The Hasse principle implies that isotropy is a property of the genus of S.
A primitive representation of zero by an isotropic form S is a pair (x, S), with x ∈ Z 3 primitive such that S(x) = 0. Two such (x, S) and (x , S ) are equivalent over Z if there exists A ∈ GL 3 (Z) so that (1.4) S [A] = S and xA t = x .
They are equivalent over Z p for a prime p (including p = ∞) if (1.4) holds with A ∈ GL 3 (Z p ). The first goal of this paper is to prove the following supplement to the Hasse principle for isotropic ternary forms.
Theorem 1. Two primitive representations of zero by ternary quadratic forms are equivalent over Z if and only if they are equivalent over Z p for all p, including ∞.
Theorem 1, together with Corollary 2 of the Appendix, yields a result about the orbits of primitive zeros of a genus of ternary forms. Say primitive x, x ∈ Z 3 with S(x) = S(x ) = 0 are in the same Z-orbit if (x, S) and (x , S) are equivalent over Z. Clearly this happens precisely when there is an integral automorph A of S (see (2.1) below) such that xA t = x . There are at most finitely many, say c(S), such orbits. For a prime p or p = ∞ say that these x, x are in the same Z p -orbit if (x, S) and (x , S) are equivalent over Z p . Let c p (S) denote the number of Z p -orbits. Here c p (S) = 1 for at most finitely many p. where G is the genus containing S.
Theorem 2 is a quantitative version of the Hasse principle for ternary quadratic forms. However, our proof assumes that the form is isotropic; we are using the original Hasse principle and not giving an independent proof of that. Although it has a similar form, Theorem 2 differs from Siegel's main theorem applied to the representation of a nonzero integer by an indefinite ternary quadratic form. In (1.5) orbits are counted without the measures of representations or p-adic densities that occur in Siegel's identity. Siegel's main theorem, in either form given in [25] or [26], does not apply to the representation of zero by a ternary isotropic form (see also [17]).
Unlike in the definite case, an indefinite ternary quadratic form often has one class in its genus, that is h = 1. In this case it follows from Theorem 1 that two primitive zeros of S are in the same Z-orbit if and only if they are in the same Z p -orbit for all p. Theorem 2 now implies that In general, we have that h = 2 ν for some ν (see [16,Satz 4]). In the following examples, where h = 1, it is not difficult to compute c p (S) directly.
Examples. i) When S is an isotropic Legendre equation (1.3) with abc odd and squarefree we have that c p (S) = 1 for each p and hence h = 1 and c(S) = 1. In particular, there is only one orbit of Pythagorean triples, which is known [1] (see also [4]).
ii) The Legendre equation has the nontrivial solution (1, 0, q). If q is a product of distinct primes each ≡ 3 (mod 4) then for each such p we have c p (S) = p−1 2 , with c p (S) = 1 otherwise. Also, it is shown in [22] that h = 1 so Outline of the Proofs. The result needed to deduce Theorem 2 from Theorem 1 is Corollary 2 in the Appendix. This corollary translates to the language of matrices and forms (an extension of) a theorem of Kneser, which is formulated in terms of lattices and quadratic spaces.
Our proof of Theorem 1 uses an analytic method that compares two asymptotic formulas. These formulas count primitive zeros of an individual form in terms of the size of the zero. The first asymptotic, which follows from one that is well-known, counts all zeros. It is stated in the form we need in §3, as Theorem 4. The second, which is new and of independent interest, restricts the count to an orbit of zeros. It is stated in §3 as Theorem 5. The constants in the leading terms in both are determined in terms of certain local densities. Summing over orbits and the genus leads to an identity between constants, which is given in Theorem 6. In the derivation of Theorem 6 from Theorems 4 and 5, essential use is also made of the Siegel mass formula, which is recalled in the required form in §2 and applied to an associated Fuchsian group.
That Theorem 6 implies Theorem 1 is shown in §4. Here we also need to invoke Theorem 7 of the appendix.
The proofs of Theorems 4 and 5 occupy the remainder of the paper. In §5 the problem of counting within an orbit is attacked using the theory of Eisenstein series for the associated Fuchsian group. The main result here is Proposition 1. Using some of the machinery set up in §5, in §6 we prove Theorem 4. Then in §7, which contains the most delicate arguments, we compute the local densities needed to complete the proof of Theorem 5. It is noteworthy that, although we must compute the 2-adic density of a certain isotropy subgroup of the orthogonal group of S, we do not need to compute explicitly the 2-adic density of the full orthogonal group of S itself, which is notoriously troublesome. This is due to our use of the orbit-stabilizer theorem in the proof of Theorem 6.
Remarks. The proof we give of Theorem 1 is similar in spirit to the novel approach to Siegel's main theorem given by Eskin, Rudnick and Sarnak in [8], which compares counts in an orbit, obtained more generally in [7], to the full count (see also [2] and [3]). The constant for the full count is a product of local densities, usually obtained by the Hardy-Littlewood circle method, except that in the ternary quadratic case serious convergence problems occur. The circle method is made to work in the homogeneous ternary case (with weights) in [13]. Related methods were introduced in [14] and [6]. The refined circle method can be used to give an alternative proof of Theorem 4.
Acknowledgements. I want to thank Peter Sarnak for sharing valuable insights on the general subject of this paper and also for some excellent specific observations. In addition, I am very grateful to the referee for carefully reading the paper and for suggesting numerous improvements.

The associated Fuchsian group and Siegel's mass formula
Suppose that S is indefinite and nonsingular. Let O be the group of integral automorphs of S given by Let O + (S) be the subgroup of O consisting of those A ∈ SL 3 (Z) ∩ O(S) that are contained in the connected component of the identity SO + (S, R) of the special orthogonal group of S. Then O + (S) is isomorphic to Γ(S) ⊂ PSL 2 (R), a Fuchsian group of the first kind acting on the upper half-plane H. Also, Γ has cusps if and only if S is isotropic. This well-known isomorphism arises by a construction of Fricke-Klein [10]. Another useful reference for this construction is [21]. To summarize, let We have that det A g = (det g) 3 and tr A g = (tr g) 2 − det g. Also, for g, h ∈ PSL 2 (R) Choose B so that S 0 [B] = S and for we have that det C g = (det g) 3 and tr C g = (tr g) 2 − det g as well as for g, h ∈ PSL 2 (R). The map g → C g gives a Lie group isomorphism from PSL 2 (R) to SO + (S, R). Define where D = det S. Siegel's mass formula identifies the sum of co-volumes over the genus with the product of these local densities.
where the product is over all primes p and the sum is over a complete set of representatives of the genus G.
Using well-known calculations of the local densities from [24] we can express the RHS of (2.7) as a finite product Remark. As noted in [25, p.413 G.A.], a version of the mass formula in the indefinite ternary case was found by Humbert [15].

Asymptotic formulas
Turning now to the statements of the asymptotic results, let C(S) be the set of all primitive x ∈ Z 3 with S(x) = 0. Let S * = DS −1 where D = det S be the adjugate of S. Choose y ∈ R 3 such that S * (y) = 4D. Since the plane determined by xy t = T for T > 0 intersects the cone given by {x ∈ R 3 ; S(x) = 0} in an ellipse, there are at most finitely many x ∈ C(S) with 0 < xy t ≤ T.
For an illustration see Figure 1.
A similar definition for the density at infinity σ ∞ yields the value, derived below in §6, The following asymptotic formula is a consequence of well-known results of [9] and [23]. Details are given in §6.
Theorem 4. Suppose that S is isotropic. Fix y ∈ R 3 with S * (y) = 4D. Then, as T → ∞, Using again [24] and (3.2), the constant in the RHS of (3.3) can be written as Theorem 4 counts rational points of bounded height on the conic S(x) = 0. A natural refinement of Theorem 4, whose nature is intrinsically integral rather than rational, counts asymptotically the elements in an orbit under automorphs. For x ∈ C(S), its orbit is defined by Define the p-adic density We have the following asymptotic formula.
Theorem 5. Suppose that S is isotropic with det S = D. Fix y ∈ R 3 with S * (y) = 4D and x ∈ C(S). Then as T → ∞, we have By Theorems 4, 5 and (3.4) we get a local identity for the volume by summing over orbits, but not over the genus, of S.
where x runs over a complete set of representatives of the orbits of C(S).
The Z p -orbit of x ∈ C p (S) is given by Define the p-adic density of the orbit of x by By the orbit-stabilizer theorem for all p|2D we have .
Let S = S 1 , . . . , S h be a complete set of representatives of the genus G and suppose that x i,j for i = 1, . . . , c(S j ) runs over a complete set of representatives of orbits of C(S j ), for each j. By Corollary 1, (2.8) from Siegel's mass formula in Theorem 3 and (3.9), we will have the following result once Theorems 4 and 5 are proven.

Classes and genera of primitive representations of zero
This section reduces the proof of Theorem 1 to that of Theorem 6, hence to Theorems 4 and 5. Application is made of Theorem 7, which is given in the Appendix. I will change slightly the notation there by using x in place of X, to conform with ours. This should not cause confusion. Also, to use the terminology there, say two primitive representations of zero (x, S) and (x , S ) are in the same class if they are equivalent over Z and in the same genus if they are equivalent over Z p for all primes p (including p = ∞). Thus to prove Theorem 1 it is equivalent to show that a genus of primitive representations of zero by ternary forms contains exactly one class.
For the purpose of counting, it is convenient to express p-adic products in terms of congruences. For q ∈ Z + say that x ∈ (Z/qZ) 3 is primitive if gcd(x, q) = 1. Let O q (S) be the set of primitive x ∈ (Z/qZ) 3 with S(x) ≡ 0 (mod q). Then O q (S) splits into orbits under the group of automorphs modulo q: For q divisible by a sufficiently high power of each prime dividing 2D, we have that Here σ p (S, x) and σ p were defined in (3.8) and (3.1), respectively. Let S = S 1 , . . . , S h be a complete set of representatives of the genus G. The classes of primitive representations of zero by forms in G are uniquely represented by x i,j , S j where, as before, x i,j ∈ Z 3 for i = 1, . . . , c(S j ) runs over a complete set of representatives of orbits of C(S j ).
is well-defined and induces a bijection from the genera of primitive representations of zero by forms in G to the orbits in O q (S). The orbit O q S, x i,j has the same cardinality as O q (S j , x i,j ).
Proof. Clearly x i,j ∈ O q (S) and the orbit O q S, x i,j ⊂ O q (S) is independent of the choice of A j . Also, two primitive representations of zero map to the same orbit if and only if they are in the same genus of representations. That the map is surjective follows from the bijection given in c) of Theorem 7 of the Appendix, translated into equivalent matrix terminology using Lemma 6. The final statement follows by conjugation.
By Theorem 6, (4.1) and the last statement of Lemma 1, we have Theorem 1 follows from (4.2) and the bijection of Lemma 1 since having two classes in a genus of representations would imply that the LHS of (4.2) is greater than the RHS. Therefore we are left with proving Theorems 4 and 5.

Eisenstein series
so that M 1 M 2 still has x t as its first column and This shows that we may find an equivalent S 1 of the form (5.2) whose associated orbit of primitive zeros contains (1, 0, 0). We have that a, b > 0 are uniquely determined and c is determined modulo gcd(a, b) by the orbit of the solution. Let Γ(S 1 ) ⊂ PSL 2 (R) be the Fuchsian group from §2 that is isomorphic to the subgroup O + (S 1 ) of proper automorphs of S 1 . Clearly Γ(S 1 ) is conjugate to Γ(S) in PSL 2 (R). In effect, it is the conjugation that moves the cusp associated to x to infinity. For S 1 we take, as above (2.
which may now be explicitly computed. In particular, for κ > 0. Let f be the smallest positive integer so that f with f given in (5.5) is the minimal positive value so that the entries of the matrix C in (5.4) are integers. Hence, according to (2.4), for this κ the translation ± ( 1 κ 0 1 ) generates the parabolic subgroup of Γ(S 1 ) with cusp at i∞. This f is welldefined for the orbit of solutions but can vary over different orbits. It is easily checked that f = 2 δ gcd(a, b, c) for some δ ∈ {0, 1, 2}.
Next we will use the Eisenstein series for Γ(S 1 ) with cusp at i∞ to count solutions within the orbit. For any In particular, Observe that the condition xy t > 0 restricts x to a connected component of the cone given by S 1 (x) = 0. This component is left stable by O + (S 1 ). For S 1 from (5.2) and x 0 = (1, 0, 0), any x ∈ C(S 1 , x 0 ) that satisfies xy t > 0 will be contained in the O + (S 1 ) orbit of x 0 .
Proposition 1. For y from (5.7) with z ∈ H and f given in (5.5) Proof. The Eisenstein series for the cusp i∞ is defined by is generated by ± ( 1 κ 0 1 ) and the scaling matrix is Lemma 2. Let N (x; z) be given in (5.6) and f above (5.5). For z ∈ H and Re(s) > 1 we have Proof. Corresponding to g = ± α β γ δ ∈ Γ (κ) ∞ \Γ, we have . Note that, using y from (5.7), we have the identity f . The formula (5.11) is now derived using (5.9), (5.6) and (5.12). Now E(z, s) has a continuation in s to a meromorphic function which is holomorphic for Re(s) ≥ 1 except for a simple pole at s = 1 and . For a proof see the book of Iwaniec [12]. In view of (5.8), Proposition 1 follows from Lemma 2 by a standard application of the Ikehara theorem.

Counting all zeros of bounded norm
This section contains the proof of Theorem 4. We may assume that S = S 1 from (5.2). Note that the asymptotic constants for the counts of S and of S 1 are equal since when we transform the y chosen for S, which satisfies S * (y) = 4D, to y for S 1 with S * 1 (y ) = 4D, the counts are unchanged and the constants are independent of y and y .
Lemma 3. The Hardy-Littlewood singular integral for S 1 and · is given by Proof. By solving for x 1 in xy t = r in (6.1) and substituting in S 1 (x) = the area of the resulting ellipse is Area(r) = π(r 2 −4 ) 8 √ D , after taking into account the Jacobian of the transformation. By integrating Area(r) over −1 ≤ r ≤ 1, the volume between the hyperboloid given by S 1 (x) = and the planes xy t = ±1 is found to be The result follows since the volume between the planes and |S 1 (x)| = is 2π √ D . See Figure 2 for an illustration when S 1 (x) = 2x 1 x 3 − x 2 2 and = .03.

Figure 2
Theorem 4 is therefore a consequence of the next well-known result (see also [27]): [23]). For σ p defined in (3.1), as T → ∞, we have

The size of isotropy groups (mod p m )
Now we complete the proof of Theorem 5. We may assume that C(S, x) = C(S 1 , x 0 ) where S = S 1 is from (5.2) and x 0 = (1, 0, 0). We must evaluate f from Lemma 1 in terms of δ p (S 1 , x 0 ) as defined in (3.5).  Proof. There are two essentially different cases: c = 0 and c = 0. Suppose that c = 0. For we will count integers x 1 , r 2 , s 1 , s 2 , t 1 , t 2 (mod p m ) with det A ≡ 1 and Suppose that p d 1 d 2 . We can take m as large as we please. By a comparison with (5.5), we need to prove that since from (5.5) we see that f = min(i, j).
After expanding S 1 [A]−S 1 we see that it is necessary and sufficient that t 1 = t 3 p m−i and t 2 = 1 + t 4 p m−i for any t 3 , t 4 taken modulo p i . Given that, a calculation of the determinant of A, which we are assuming is ≡ 1 (mod p m ), shows that with s 3 taken modulo p j . Here we ignore terms with a factor of p 2m−constant , which do not matter when m is large enough. These lead to the congruences giving p i choices of r 1 and p i choices of r 2 , for each choice of s 4 . If i < j let s 2 be free. This leads to p i choices of r 1 and r 2 . In each case we have (7.2) since the solutions obtained are distinct.
Note that the terms d 3 p m−i t 3 and 2d 3 p m−i t 4 could have been ignored since they involve only the variables t 3 , t 4 , which may be considered to be already chosen, and for m sufficiently large each is divisible by any fixed power of p. In the arguments that follow we will indicate such terms by using dots.
Suppose that c = 0 and consider where p d 4 . We now need to show that (7.5) α(p m ) = p m+3i+j+min(i,j,k) .
Again t 1 = t 3 p m−i and t 2 = 1 + t 4 p m−i for any t 3 , t 4 taken modulo p i . We are led to solve the quadratic congruence There will be a d 5 with d 4 ≡ d 2 d 5 and p d 5 so that To have det A ≡ 1 we must have the plus sign. Then we must solve d 1 r 1 p i − d 2 s 2 p j + · · · ≡ 0 (mod p m ) (7.7) 2d 1 r 2 p i − d 2 s 2 2 p j + 2d 4 s 2 p k + · · · ≡ 0 (mod p m ). As was already mentioned, the dots signify terms that may be ignored as above, only now they might involve s 3 as well as t 3 , t 4 .
If i ≥ j take s 2 = s 4 p i−k for s 4 modulo p m−i+k leading to p i choices of r 1 and r 2 , giving (7.8). If i < j take let r 2 be free giving p k choices of s 2 and p i choices of r 1 , also leading to (7.8). Here we apply an easily proven lemma that gives the number of solutions of a degenerate quadratic congruence.
The case when p = 2 is, as is to be expected, more intricate, but the arguments are similar. Differences arise from the two's that occur in the congruences and the fact that a quadratic congruence modulo 2 m can have four solutions. However, we may still assume that the matrices A ∈ O 2 (S 1 , x 0 ) are in SL 3 (Z/2 m Z) since a calculation shows that a general A must have det A ≡ ±1.
Again we must have the plus signs to get det A ≡ 1. The first pair gives (7.3) with p = 2 while the second gives d 1 r 1 2 i − d 2 s 2 2 j − d 2 s 2 2 m−1 + · · · ≡ 0 (mod 2 m ) d 1 r 2 2 i+1 − d 2 s 2 2 2 j + · · · ≡ 0, where the dots convention is as before. For either pair if i > j we set s 2 = s 4 p i−j for s 4 modulo 2 m−i+j , giving 2 i choices of r 1 and 2 i+1 choices of r 2 , for each choice of s 4 , hence giving (7.10). If i < j let s 2 be free. This leads to p i choices of r 1 and r 2 , again giving (7.10). If i = j set s 2 = 2s 4 for s 4 (mod 2 m−1 ) leading to 2 i choices of r 1 and 2 i+1 choices of r 2 . Therefore in this case (7.9) holds.
Once again, t 1 = t 3 2 m−i and t 2 = 1 + t 4 2 m−i for any t 3 , t 4 taken modulo 2 i . We are now led to solve the quadratic congruence We get 2 · 2 j solutions in terms of s 3 (mod 2 j ) that give det A ≡ 1. They are We now record the needed congruences for each of these. For the first we have For the second we have proceed as when c = 0 to get (7.9) and (7.10). If i = j ≥ 1 and k = i − 1 let s 2 be free to get 2 i values of r 1 . If s 2 is even we get 2 i+1 values of r 2 . If s 2 is odd, −d 2 s 2 + d 4 (1 + t 4 2 m−i ) is even so again we get 2 i+1 values of r 2 , hence (7.11) holds, after treating both (7.13) and (7.14).
Suppose that k < min(i, j) and either i = j or i = j and k < i − 1. If i > j take s 2 = s 4 2 i−k for s 4 modulo p m−i+k , leading to 2 i choices for r 1 and 2 i+1 choices for r 2 , giving (7.12). If i < j let r 2 be free giving 2 k+1 choices of s 2 (since j > k + 1) and 2 i choices of r 1 , also leading to (7.12). Finally, if i = j and k < i − 1, again let r 2 be free giving 2 k+1 choices of s 2 and 2 i choices of r 1 , once more giving (7.12). Again we must treat both (7.13) and (7.14). As before, in the last two cases where r 2 is free we are counting solutions of a degenerate quadratic congruence. This finishes the proof of Lemma 5 and hence of Proposition 3.
Theorem 5 now follows from Propositions 1 and 3. This also completes the proof of Theorems 1 and 2.

Appendix by Rainer Schulze-Pillot
In this appendix we want to relate the statements of Theorems 1 and 2 to the notions of genus and class of representations of lattices with quadratic form used in [18,19]; for that we have to recall some terminology.
Let (V, Q) be a finite dimensional rational quadratic space, i.e., a vector space over Q equipped with a quadratic form Q : V → Q and associated symmetric bilinear form B(x, y) = Q(x + y) − Q(x) − Q(y) and L = Zv 1 + · · · + Zv n a Z-lattice on V , where {v 1 , . . . , v n } is a basis of V . We will assume that (V, Q) is non-degenerate, i.e., the Gram matrix (B(v i , v j )) ∈ Mat n (Q) of B with respect to the basis is non-singular. The determinant of this matrix is called the determinant det(L) of L = Zv 1 + · · · + Zv n . If K is another such lattice on a (not necessarily non-degenerate) rational quadratic space (U, Q) we call an injective linear map φ : U → V with φ(K) ⊆ L a representation of K by L if φ is an isometry, i.e., if Q(φ(u)) = Q(u) for all u ∈ U . The representation is primitive if holds, equivalently if φ(K) is a direct summand in L. A representation φ of K by L and another representation ψ of K by a lattice L in a quadratic space (V , Q ) are in the same class if there exists an isometric linear isomorphism (an isometry) ρ : V → V with ρ • φ = ψ. The number of classes of primitive representations of K by lattices L of fixed determinant and dimension is finite, see Satz 30.2 and the last sentence of Bemerkung 30.3 of [19].
In the same way, Z p -classes of representations of the p-adic completions K p ⊆ U p , L p ⊆ V p are defined, and with essentially the same proof one sees that the number of Z p -classes of primitive representations of K p by lattices L p of fixed determinant and dimension is finite. Representations φ of K by L and ψ of K by L are in the same genus if their p-adic completions φ p , ψ p are in the same p-adic class for all primes p, including p = ∞ with K ∞ = U ∞ etc. Obviously, in that case L and L have to be in the same genus, i.e., all p-adic completions are isometric, and by the Minkowski-Hasse local-global principle the spaces (V, Q), (V , Q ) (but in general not the lattices L, L ) are isometric; we may hence assume (V, Q) = (V , Q ).
a) One has T = X t SX = (X ) t S X . b) φ is primitive if and only if X can be completed to a matrix in GL n (Z). c) φ, ψ are in the same class if and only if there exists A ∈ GL n (Z) with S = A t SA, X = AX . d) φ, ψ are in the same genus if and only if there exist for all primes p (including p = ∞) matrices A p ∈ GL n (Z p ) with S = A t p SA p , X = A p X . e) There exists q ∈ Z such that the matrices A p above exist for all p if and only if there exists A q ∈ GL n (Z/qZ) with S ≡ A t q SA q mod q, X ≡ A q X mod q. Proof. This is well known and easily checked. Definition 1. For symmetric matrices S ∈ Mat n (Z), T ∈ Mat r (Z) with r ≤ n and X ∈ Mat n,r (Z) of rank r with T = X t SX we say that (X, S) is a representation of T . The representation is called primitive if X can be completed to a matrix in GL n (Z).
i) Two representations (X, S), (X , S ) (primitive or not) are in the same class if there exists A ∈ GL n (Z) with S = A t SA, X = AX . ii) Two representations (X, S), (X , S ) (primitive or not) are in the same genus if there exist for all primes p (including p = ∞) matrices A p ∈ GL n (Z p ) with S = A t p SA p , X = A p X .
Remarks. i) Since primitivity is a local property, two representations (X, S), (X , S ) in the same genus are either both primitive or both imprimitive. ii) For S = S the representations (X, S), (X , S) are in the same class if and only if X, X are in the same orbit under the action of the group of automorphisms of S. iii) The notion of a genus of representations has apparently not been treated in matrix terminology so far. The definition given above is the natural translation into matrix terminology of the same notion from the lattice terminology.
Theorem 7 (Kneser). Let K, L be Z-lattices on quadratic spaces U, V as before, assume that V is non-degenerate and that U is represented by V . a) For almost all primes all primitive representations of K p by L p are in the same Z p -class. b) Let φ : K → L be a representation of K by a lattice L in the genus of L.
Then for all primes p, there is a representation ψ p : K p → L p in the same Z p -class as φ p : K p → L p . c) The map associating to the genus of the primitive representation φ : K → L of K by a lattice L in the genus of L the family (ψ p ) p of the Z p -classes ψ p of the ψ p from b), defines a bijection from i) the set of genera of primitive representations of K by a lattice L in the genus of L to ii) the product over all primes of the sets of Z p -classes of primitive representations of K p by L p . d) Let c p (K p , L p ) denote the number of Z p -classes of primitive representations of K p by L p . Then the number of genera of primitive representations of K by a lattice L in the genus of L equals p c p (K p , L p ).
Proof. Without the primitivity condition and with the additional requirement that QK = U is non-degenerate this is proven in [19,Hilfssatz 30.7,Satz 30.9]. We check that the proof goes through with only small modifications in our situation. For almost all primes L p is regular in the sense of [19]. For such a prime p let φ p , ψ p be primitive representations of K p in L p . By the argument in the paragraph after Definition 2.17 of [19], the primitive submodules φ p (K p ), ψ p (K p ) of L p are "scharf primitiv" in the sense of that definition. Folgerung 4.4 of [19], a strong version of Witt's extension theorem, then shows that ψ p • φ −1 p : φ p (K p ) → ψ p (K p ) can be extended to an automorphism of L p , hence φ p and ψ p are in the same Z p -class of representations, which shows a).
Let now φ : K → L be a representation; replacing K by φ(K) we may assume K ⊆ L. If ψ : K → L is a representation of K by a lattice L in the genus of L the space QL is isometric to V = QL by the Hasse-Minkowski theorem and we may assume QL = V . Since (V, Q) is non-degenerate, hence regular, and any subspace, being a direct summand, is primitive we obtain as above using Folgerung 4.4 of [19] an extension of ψ : U → ψ(U ) ⊆ V to an isometry ψ : V → V . Setting L := ψ −1 (L ) we see that the inclusion K → L is in the class of the representation ψ. For each class of representations of K by a lattice in the genus of L we can therefore choose a lattice L on V such that the inclusion i L : K → L is a representative of that class. For such an L we choose isometries τ p : L p → L p for all primes p and have that ρ p := τ −1 p • i L : K p → L p is a representation of K p by L p in the Z p -class of i L , which proves b).
By Satz 21.5 of [19] one has L p = L p for almost all primes p, we can thus choose τ p = id Vp for almost all p. The family (ρ p ) p of the Z p -classes of the representations ρ p depends only on the genus of the representation i L , and the map sending i L to that family is injective by the definition of a genus of representations. Conversely, let any family (ρ p ) p of classes of representations ρ p of K p by L p be given. By a) we may assume that almost all ρ p are the inclusion K p → L p , let Σ be the set of the remaining primes. For p ∈ Σ we use again Folgerung 4.4 of [19] to extend ρ p to an automorphism ρ p of V p . By Satz 21.5 of [19] there is a lattice L on V with L p = ρ p −1 (L p ) for the p ∈ Σ, L p = L p for the primes not in Σ. The mapping constructed above then maps the genus of i L to the family (ρ p ) p , and we see that the mapping is surjective, which proves c).
Assertion d) is an obvious consequence of c).
Corollary 2. Let S ∈ Mat n (Z) be a non-singular symmetric matrix, T ∈ Mat m (Z) symmetric.
a) The number of genera of primitive representations of T by a matrix S in the genus of S is equal to the product over all primes of the numbers of Z p -classes of primitive representations of T by S. b) The following two statements are equivalent.
i) The sum over all integral equivalence classes of S in the genus of S, of the numbers of classes of primitive representations of T by S , equals the product over all primes of the numbers of Z p -classes of primitive representations of T by S.
ii) Each genus of primitive representations of T by a matrix S in the genus of S contains only one class of representations.
Proof. Part a) is the translation into matrix terminology of part d) of the theorem, and b) is an obvious consequence of a).