"Source: Text/Lat/LatNF.text";
"Line: 1801";
"Date: Fri Sep 26 12:10:10 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Lat/LatNF.text, line: 1801
// Example: H32E4 ()
print "Example: H32E4";
ei := GetEchoInput();
SetEchoInput(true);
K<s37> := QuadraticField(37);
L := NumberFieldLattice(K,3);
r := (1+s37)/2;
vecs:=[L.2+r*L.3, L.2-r*L.3, L.1+r*L.2];
SUB := sub<L|vecs>;
S2 := NumberFieldLattice([Vector(v) : v in vecs]);
assert SUB eq S2; // both methods give the same
S := sub<SUB|[vecs[1]]>; // 1-dimensional sublattice
O := OrthogonalComplement(SUB, vecs[1]);
InnerProduct(SUB!O.1, SUB!vecs[1]);
assert $1 eq 0;
InnerProduct(SUB!O.2, SUB!vecs[1]);
assert $1 eq 0;
assert IsSublattice(S+O, SUB);
Norm(Determinant(S+O)/Determinant(SUB));
assert $1 eq 101^2;
assert 101*SUB.2 in (S+O); // the index has norm 101^2
assert 101*SUB.3 in (S+O);
SetEchoInput(ei);
