"Source: Text/Lat/QuadForm.text";
"Line: 319";
"Date: Thu Sep 25 09:03:01 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Lat/QuadForm.text, line: 319
// Example: H34E1 ()
print "Example: H34E1";
ei := GetEchoInput();
SetEchoInput(true);
v :=  [ 6, -2, -7, 5, -2, -10, -3, 5, -7, -3, 10, -8, 5, 5, -8, 0 ];
M := Matrix(4, 4, v); M;
Determinant(M); Factorization(Determinant(M));
HasseMinkowskiInvariant(M, 2);
assert $1 eq -1;
HasseMinkowskiInvariant(M, 11);
assert $1 eq 1;
D := Orthogonalization(M); D; // signature (2,2)
pSignature(M, -1); // should be the difference of 2 and 2
assert $1 eq 0;
n := Degree(Parent(M));
Q := Rationals();
E := [ Q ! D[i][i] : i in [1..n]];
&*[ &*[ HilbertSymbol(E[i], E[j], 2) : i in [j+1..n]] : j in [1..n-1]];
assert $1 eq -1;
&*[ &*[ HilbertSymbol(E[i], E[j], 11) : i in [j+1..n]] : j in [1..n-1]];
assert $1 eq 1;
IsotropicSubspace(M);
pSignature(M, 2) mod 8;
assert $1 eq 0;
pSignature(M, 11) mod 8;
assert $1 eq 4;
pSignature(M, 5) mod 8; // equals Dimension at good primes
assert $1 eq 4;
SetEchoInput(ei);
