forked from ciaran-schembri/Shimura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwriteCMtoDB.m
143 lines (118 loc) · 4.27 KB
/
writeCMtoDB.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
AttachSpec("spec");
SetDebugOnError(true);
for filename in ShimDBFilenames() do
s:=ShimDBRead(filename : version:=2);
W:=s`ShimAtkinLehner;
if #W eq 2 then
if s`ShimGenus ge 1 and Type(s`ShimRationalPoints) eq SetEnum
and s`ShimRationalPoints ne {} then
D:=s`ShimDiscriminant; N:=s`ShimLevel;
//if D ne 6 or [D,N,W[2]] notin [[21,2,42],[26,3,78], [26,3,39],
//[6,17,51],[6,19,38],[6,19,6],[6,29,87],[6,31,62]] then
if N eq 1 and [D,W[2]] notin [[35,5],[51,17]] then //and [D,W[2]] in [[134,67],[159,53],[206,103],[38,19],[51,17],[62,31],[69,23],[86,43],[87,29],[93,93],[94,47]] then
D; N; W;
s`ShimRationalPoints;
cmpr,cmun:=RationalCMPoints(D,N,W[2]);
print "CM proven:"; cmpr;
print "CM unproven:"; cmun;
print "=====================";
end if;
end if;
end if;
end for;
for i in [1..#GYList()] do
item:=GYList()[i];
D:=item[1];
N:=item[2];
for W in AllAtkinLehners(D,N) do
if #W eq 2 then
s:=ShimDBRecord(D,N : version:=2);
if s`ShimGenus ge 1 and Type(s`ShimRationalPoints) eq SetEnum
and s`ShimRationalPoints ne {} then
s`ShimRationalPoints;
end if;
end if;
end for;
end for;
//if W ne [1,6,13,78] then
printf "%o %o %o\n", disc,level,W;
MakeShimDBObject(disc,level,W);
attr:=ShimDBRecord(disc,level,W : version:=1);
//end if;
//C:=ShimuraCurveQuotient(disc,level,W);
//printf "Genus = %o\n", Genus(C);
//DefiningEquations(C);
end for;
end if;
//end if;
end for;
ProfilePrintByTotalTime(:Max:=20);
command := Sprintf("ls %o", "ShimDB-v1");
ls := Pipe(command, "");
filenames := Split(ls, "\n");
for filename in filenames do
file:=Sprintf("ShimDB-v1/%o",filename);
file;
FP:=Read(file);
attr:=eval FP;
if attr`ShimAtkinLehner ne [1] then
//new_attributes:= [ <"ShimRationalPoints","\"{}\"">, <"ShimTest", "\"NA\""> ];
X:=attr`ShimModel;
ShimRationalPoints, ShimPointsProvedCorrect, ShimPointsNotes := RationalPointsAnyGenus(X);
ShimPointsEverywhereLocally:= HasAdelicPointsAnyGenus(X);
if Type(ShimRationalPoints) eq SetEnum then
points:=Set([ Eltseq(P) : P in ShimRationalPoints]);
elif Type(ShimRationalPoints) eq MonStgElt then
points:=Sprintf("\"%o\"",ShimRationalPoints);
else
assert Type(ShimRationalPoints) eq BoolElt;
assert Genus(X) eq 0;
points:=ShimRationalPoints;
end if;
//if Genus(X) ge 2 then
//ShimRationalPoints:= Sprintf("s`ShimModel!%o", ShimRationalPoints);
new_attributes:=
[
<"ShimRationalPoints", Sprint(points)>,
<"ShimPointsProvedCorrect", Sprint(ShimPointsProvedCorrect)>,
<"ShimPointsNotes", Sprintf("\"%o\"",ShimPointsNotes)>,
<"ShimPointsEverywhereLocally", Sprint(ShimPointsEverywhereLocally)>
];
ShimAddAttributes(filename, new_attributes);
end if;
end for;
command := Sprintf("ls %o", "ShimDB-v2");
ls := Pipe(command, "");
filenames := Split(ls, "\n");
points_unproven:=[];
Hasse_violations:=[];
for filename in filenames do
file:=Sprintf("ShimDB-v2/%o",filename);
filename;
FP:=Read(file);
attr:=eval FP;
if attr`ShimGenus ne 0 and Type(attr`ShimRationalPoints) eq SetEnum
and attr`ShimRationalPoints eq {} and attr`ShimPointsEverywhereLocally then
Append(~Hasse_violations, filename);
end if;
if attr`ShimPointsProvedCorrect eq false then
Append(~points_unproven, filename);
end if;
end for;
points_unproven;
Hasse_violations;
for filename in filenames do
file:=Sprintf("ShimDB-v2/%o",filename);
filename;
FP:=Read(file);
s:=eval FP;
proj:=s`ShimProjectionEquations;
quotient_points:=s`ShimRationalPoints;
W:=s`ShimAtkinLehner;
discriminant:=s`ShimDiscriminant;
PointsRepresentatingPQMSurface(proj,quotient_points,W,discriminant);
end for;
/* Hasse_violations:=
[ Shim-X(119,1)-g4-[1,7].m, Shim-X(14,5)-g1-[1,5].m, Shim-X(39,2)-g3-[1,78].m, Shim-X(6,29)-g2-[1,6].m, Shim-X(6,37)-g2-[1,3].m, Shim-X(87,1)-g2-[1,3].m, Shim-X(93,1)-g3-[1,3].m ]
points_unproven:=
[ Shim-X(10,19)-g2-[1,190].m, Shim-X(10,23)-g3-[1,2,23,46].m, Shim-X(119,1)-g5-[1,17].m, Shim-X(134,1)-g3-[1,2].m, Shim-X(134,1)-g3-[1,67].m, Shim-X(159,1)-g5-[1,53].m, Shim-X(206,1)-g5-[1,103].m, Shim-X(87,1)-g3-[1,29].m, Shim-X(93,1)-g2-[1,93].m ]*/