Local Invariants

These commands calculate the standard invariants that characterize a quadratic form over the rationals. Definitions of the invariants may be found in Conway-Sloane [JC98], Chapter 15, Section 5.1.

pSignature(f,p) : RngMPolElt, RngIntElt -> RngIntElt
pSignature(M,p) : Mtrx, RngIntElt -> RngIntElt
pSignature(L,p) : Lat, RngIntElt -> RngIntElt
The p-signature of the specified quadratic form over the rationals, where p is a prime number or -1 (designating the real place).

For odd primes p, this is defined by diagonalizing the form, and adding p-parts of these entries to 4 times the number of anti-squares (mod p) amongst these entries. The term "anti-square" modulo p denotes something that has: odd valuation at p; and the prime-to-p part, called u, has Kronecker symbol ((u/p))= - 1.

At p=2 it is the sum of the odd parts of the diagonalized entries plus 4 times the number of anti-squares. In either case, the final answer is really only defined modulo 8 (this is so that p-signatures are invariant under rational equivalence).

At the real place, it is the difference between the number of positive and negative eigenvalues (the terminology here can be murky).

Oddity(f) : RngMPolElt -> RngIntElt
Oddity(L) : Lat -> RngIntElt
Oddity(M) : Mtrx -> RngIntElt
This returns the 2-signature of the given quadratic form over the rationals.
pExcess(f, p) : RngMPolElt, RngIntElt -> RngIntElt
pExcess(M, p) : Mtrx, RngIntElt -> RngIntElt
pExcess(L, p) : Lat, RngIntElt -> RngIntElt
The p-excess of the specified quadratic form over the rationals, where p is a prime number or -1 (designating the real place). The p-excess is the difference between the p-signature and dimension for odd primes (including -1), and is the negation of this for p=2. The sum of p-excesses over all primes should be 0 modulo 8.
WittInvariant(f, p) : RngMPolElt, RngIntElt -> RngIntElt
WittInvariant(M, p) : Mtrx, RngIntElt -> RngIntElt
WittInvariant(L, p) : Lat, RngIntElt -> RngIntElt
HasseMinkowskiInvariant(f, p) : RngMPolElt, RngIntElt -> RngIntElt
HasseMinkowskiInvariant(M, p) : Mtrx, RngIntElt -> RngIntElt
HasseMinkowskiInvariant(L, p) : Lat, RngIntElt -> RngIntElt
Calculates the Witt invariant (sometimes called the Hasse-Minkowski invariant) over Qp of the given quadratic form. Again the form must be defined over either the rationals or the integers. The result is returned as something in the set {-1, + 1}. One definition of this invariant is to diagonalize the form and then take the product (in our multiplicative notation) of the Hilbert symbols of the (n choose 2) pairs of distinct nonzero diagonal entries, as in Para 5.3 of Chapter 15 of Conway-Sloane [JC98], which is what is implemented here. Another method would be to use a comparison of p-excesses with the standard form (also in Conway-Sloane). Starting with a p-adic input could lead to precision problems at the diagonalization step, and so is not allowed. Can also be called via HasseMinkowskiInvariant.
WittInvariants(f) : RngMPolElt -> SeqEnum
WittInvariants(M) : Mtrx -> SeqEnum
WittInvariants(L) : Lat -> SeqEnum
HasseMinkowskiInvariants(f) : RngMPolElt -> SeqEnum
HasseMinkowskiInvariants(M) : Mtrx -> SeqEnum
HasseMinkowskiInvariants(L) : Lat -> SeqEnum
    Minimize: BoolElt                   Default: false
    AA: BoolElt                         Default: false
Compute WittInvariant(f,p) for all bad primes p, and return the result of a sequence of tuples, each entry given by < p, Wp(f) >. The set of bad primes includes the real place, the prime p=2, and all primes that divide either the numerator or the denominator of the determinant or symmetric matrix associated to f. If Minimize is set, the primes greater than 2 must have odd valuation in the determinant to appear. If AA is set, the result is return as an associative array. Can also be called via HasseMinkowskiInvariants.
V2.28, 13 July 2023