forked from ciaran-schembri/Shimura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwritetodatabase.m
124 lines (101 loc) · 3.64 KB
/
writetodatabase.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
AttachSpec("spec");
SetDebugOnError(true);
SetProfile(true);
for i in [1..#GYList()] do
item:=GYList()[i];
disc:=item[1];
level:=item[2];
//if disc eq 39 and level eq 2 then
if ShimuraCurveQuotientData(disc,level,[1])`ShimGenus ge 2 then
for W in AllAtkinLehners(disc,level) do
//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 eq [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);
else*/
new_attributes:=
[
<"ShimRationalPoints", Sprint({})>,
<"ShimPointsProvedCorrect", Sprint(true)>,
<"ShimPointsNotes", Sprintf("\"%o\"","NA")>,
<"ShimPointsEverywhereLocally", Sprintf("\"%o\"","NA")>
];
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 ]*/