CoCalc Shared Fileswww / cgi-bin / mfd / heegner.gpOpen in CoCalc with one click!
Author: William A. Stein
1
read("/var/www/cgi-bin/mfd/buhler_gross.gp");
2
3
{isgooddisc(D) =
4
return (D!=-3 && D!=-4 && D%4==1 && gcd(D,N)==1 && issquarefree(D));
5
\\ stronger condition: see page 227 of [Gross-Zagier: Heegner points...]
6
/* return (D!=-3 && D!=-4 && (D%4==1 || D%4 == 0) && gcd(D,N)==1 &&
7
(issquarefree(D) || (D%4==0 && D%8!=0 && issquarefree(D/4))));
8
*/
9
10
}
11
12
{quadratic_twist(E, D) =
13
local(a,b,c,d,e);
14
a=E[1];b=E[2];c=E[3];d=E[4];e=E[5];
15
ED = ellinit([
16
0,
17
0,
18
0,
19
-27*a^4*D^2 - 216*a^2*b*D^2 + 648*a*c*D^2 - 432*b^2*D^2 + 1296*d*D^2,
20
54*a^6*D^3 + 648*a^4*b*D^3 - 1944*a^3*c*D^3 + 2592*a^2*b^2*D^3 - 3888*a^2*d*D^3 - 7776*a*b*c*D^3 + 3456*b^3*D^3 - 15552*b*d*D^3 + 11664*c^2*D^3 + 46656*e*D^3
21
]);
22
return(ED);
23
}
24
25
{minimal_model(E) =
26
return(ellchangecurve(E, ellglobalred(E)[2]))
27
}
28
29
{fundamental_volume(E)=
30
local(o);
31
o = E.omega;
32
return(abs(matdet([real(o[1]),imag(o[1]);real(o[2]),imag(o[2])])));
33
}
34
35
{conductor(E) =
36
return(ellglobalred(E)[1]);
37
}
38
39
{elllderiv2(E,s) =
40
return((elllseries(E,s+10^(-10)) - elllseries(E,s)) / 10.0^(-10));
41
}
42
43
/*******************************************************************
44
The first n discriminants of quadratic imaginary fields with no
45
extra units that satisfy the Heegner hypothesis for N
46
*******************************************************************/
47
{heegner_discriminants(N, n)=
48
local(P, ans, D, hh);
49
P = factor(N)[,1]~; \\ the prime divisors of N
50
ans = [];
51
D = 0;
52
while(length(ans) < n,
53
D = D - 1;
54
if(isgooddisc(D),
55
hh=1; for(i=1,length(P),if(kronecker(D,P[i])==-1,hh=0));
56
if(hh, ans=concat(ans,D));
57
)
58
);
59
return(ans);
60
}
61
62
/*******************************************************************
63
The height of the Heegner points corresponding to the field
64
with discriminant D. Here D is assumed to be a fundamental
65
discriminant with no extra units.
66
*******************************************************************/
67
{heegner_height(E, D) =
68
local(bnd, ED, L, ans);
69
print("computing height for D = ",D);
70
if(!isgooddisc(D),error("heegner_height: bad disc"));
71
bnd = 500; \\ for now
72
ED = quadratic_twist(E, D);
73
E = minimal_model(E);
74
ED = minimal_model(ED);
75
if(ellrootno(E)*ellrootno(ED) != -1,error("heegner_height: bad root not, bug somewhere."));
76
77
if(ellrootno(E)==-1,
78
L = elllseries(ED,1)*elllderiv(E,1,2*sqrt(conductor(E))),
79
\\ else
80
L = elllseries(E,1)*elllderiv(ED,1,2*sqrt(conductor(ED)))
81
);
82
83
/*
84
if(ellrootno(E)==-1,
85
L = elllseries(ED,1)*elllderiv2(E,1),
86
\\ else
87
L = elllseries(E,1)*elllderiv2(ED,1)
88
);
89
*/
90
91
ans = sqrt(abs(D))*L/fundamental_volume(E);
92
if (abs(ans)<10^(-10), ans=0);
93
return (ans);
94
}
95
96
97
/*******************************************************************
98
The heights of the Heegner points corresponding to the first n
99
quadratic fields with no extra units that satisfy the Heegner
100
hypothesis for N.
101
*******************************************************************/
102
{heegner_heights(E, n) =
103
local(N, discs, heights);
104
N = ellglobalred(E)[1];
105
discs = heegner_discriminants(N, n);
106
heights = vector(n, i, heegner_height(E,discs[i]));
107
return ([discs,heights]);
108
}