"Source: Text/Lat/QuadForm.text";
"Line: 228";
"Date: Fri Jun 23 23:00:02 2017";
"Main: Thu May 25 10:02:38 2023";
// original file: Text/Lat/QuadForm.text, line: 228
// 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));
WittInvariant(M, 2);
assert $1 eq -1;
WittInvariant(M, 11);
assert $1 eq 1;
D := Diagonalization(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);
