Sharedwww / gross / lattice-aug16-01.mOpen in CoCalc
Author: William A. Stein
1
R<y> := PolynomialRing(RationalField());
2
f := y^5 - 5*y^3 + 4*y -1;
3
print "f has discriminant", Discriminant(f);
4
5
RR := PolynomialRing(RealField());
6
roots := [r[1] : r in Roots(RR!f)];
7
print "roots = ", roots;
8
9
K<a> := NumberField(f); // a is image of y in K.
10
A := MaximalOrder(K);
11
"h_A = ", ClassNumber(A);
12
function EmbeddingSigns(z)
13
h := RR!Eltseq(K!z);
14
return [Sign(Evaluate(h, roots[i])) : i in [1..#roots]];
15
end function;
16
17
d := (a^4 -4*a^2 + 1)/(5*a^4 - 15*a^2 + 4);
18
dprime := d/(a+2);
19
20
print "\nEmbeddingSigns(d) =", EmbeddingSigns(d);
21
print "EmbeddingSigns(dprime) =", EmbeddingSigns(dprime);
22
23
print "\nNorm(d) =",Norm(d);
24
print "Norm(dprime) =",Norm(dprime);
25
print "Norm(1/f'(y)) =", Norm(1/Evaluate(Derivative(f),a));
26
27
B_d := MatrixAlgebra(Integers(),5)!
28
[Trace(d*A.r*A.c) : r in [1..5], c in [1..5]];
29
30
B_dprime := MatrixAlgebra(Integers(),5)!
31
[Trace(dprime*A.r*A.c) : r in [1..5], c in [1..5]];
32
33
print "\nB_d =", B_d;
34
print "B_dprime =", B_dprime;
35
print "\nDeterminant(B_d) =", Determinant(B_d);
36
print "Determinant(B_dprime) =", Determinant(B_dprime);
37
38
L_d := LatticeWithGram(B_d);
39
L_dprime := LatticeWithGram(B_dprime);
40
41
short_d := [v[1] : v in ShortVectors(L_d,1)];
42
short_dprime := [v[1] : v in ShortVectors(L_dprime,1)];
43
44
print "\nThe length 1 vectors for L_d up to sign, are:", short_d;
45
print "\nThe length 1 vectors for L_dprime up to sign, are:", short_dprime;
46
47
print "\nThe inner-product matrix of the short vectors with respect";
48
print "to the first form <m,m'> = Tr(dmm') is:";
49
50
C := MatrixAlgebra(Rationals(),5)!
51
[InnerProduct(short_d[r], L_d!Eltseq(short_dprime[c])) :
52
r in [1..5], c in [1..5]];
53
54
print "Short product matrix:", C;
55
print "which has determinant", Determinant(C);
56
57