"Source: Text/Lat/QuadForm.text";
"Line: 372";
"Date: Thu Sep 25 09:03:01 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Lat/QuadForm.text, line: 372
// Example: H34E2 ()
print "Example: H34E2";
ei := GetEchoInput();
SetEchoInput(true);
SetSeed(12345);
n := 20;
P := PolynomialRing(Integers(),n);
f := &+[&+[Random([-10..10])*P.i*P.j : i in [j..n]] : j in [1..n]];
M := ChangeRing(2*SymmetricMatrix(f), Integers()); M;
D := Integers() ! Determinant(M); D;
[ <u[1], HasseInvariant(f, u[1])> : u in Factorization(D)];
&+[ pExcess(f, u[1]) : u in Factorization(D) cat [<-1, 0>]] mod 8;
time S := IsotropicSubspace(f);
Dimension(S);
pSignature(f, -1); // difference of 12 and 8
B := Basis(S);
InnerProduct(B[1], B[1]*M);
&and [InnerProduct(B[i], B[j]*M) eq 0 : i, j in [1..Dimension(S)]];
SetEchoInput(ei);
