forked from ciaran-schembri/Shimura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwritetolatex.m
164 lines (132 loc) · 5.22 KB
/
writetolatex.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
filenames:=ShimDBFilenames();
for filename in filenames do
//All discriminants and levels
s:=ShimDBRead(filename);
if s`ShimAtkinLehner eq [1] then
print "\\hline \\hline";
D:=s`ShimDiscriminant;
N:=s`ShimLevel;
if s`ShimLevel eq 1 then
multi:=5;
else
multi:=16;
end if;
/*print "\\hline";
printf "\\multirow{multi}{*}{%o}", D;
print "\\multirow{multi}{*}{%o}", N;*/
else
D:="";
N:="";
end if;
if s`ShimGenus eq 0 then
if s`ShimRationalPoints eq true then
pointsize := "$\\infty$";
else
pointsize := 0;
end if;
elif s`ShimGenus eq 1 then
if Type(s`ShimRationalPoints) eq SetEnum then
pointsize := #s`ShimRationalPoints;
else
pointsize := "$\\infty$";
end if;
else
pointsize := #s`ShimRationalPoints;
end if;
AL:="$";
for w in Exclude(s`ShimAtkinLehner,1) do
AL:=AL cat Sprintf("\\w_{%o} ,",w);
end for;
AL:=AL cat "$";
printf " %o & %o & %o & %o & %o \\\\ \n",
D, N, AL, s`ShimGenus, pointsize;
if s`ShimAtkinLehner eq [1] then
print "\\hline";
end if;
end for;
for filename in ShimDBFilenames() do
//curves with finitely many points of level 1
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 N eq 1 and [D,W[2]] notin [[35,5],[51,17]] then
print "\\hline \\hline";
cm_points:=RationalCMPoints(D,N,W[2]);
non_cm_points:=RationalNonCMPoints(D,N,W[2]);
assert #cm_points + #non_cm_points eq #Setseq(s`ShimRationalPoints);
multi:=#cm_points + #non_cm_points;
printf "\\multirow{%o}{*}{%o} \n", multi, D;
printf "\\multirow{%o}{*}{$\\w_{%o}$} \n", multi, W[2];
printf "\\multirow{%o}{*}{%o} \n", multi, s`ShimGenus;
for P in non_cm_points do
cm:="no"; disc := "";
reps:= PointRepresentsPQMSurface(D,N,W[2],P);
printf " & $%o$ & %o & %o & %o \\\\ \n",
P, cm, disc, reps;
end for;
for P in cm_points do
cm:="yes"; disc:= P[2]; reps:="";
printf " & $%o$ & %o & $%o$ & %o \\\\ \n",
P[1], cm, disc, reps;
end for;
end if;
end if;
end if;
end for;
for filename in filenames do
attr:=ShimDBRead(filename);
if attr`ShimGenus eq 0 then
printf "& & $w_{%o}$ & %o & %o & %o & %o & %o & %o & $%o$ \\\\ \n",
attr`ShimAtkinLehner, attr`ShimGenus, attr`ShimInfinitelyManyPoints, attr`ShimHasAdelicPoints,
attr`ShimRepresentsSurface, "NA", attr`ShimCMPoints, attr`ShimEquation;
elif attr`ShimGenus eq 1 then
printf "& & $w_{%o}$ & %o & $\\Z^%o + %o$ & %o & %o & %o & %o & $y^2 = %o$ \\\\ \n",
attr`ShimAtkinLehner, attr`ShimGenus, attr`ShimMordellWeil[1], attr`ShimMordellWeil[2], attr`ShimHasAdelicPoints,
attr`ShimRepresentsSurface, "NA", attr`ShimCMPoints, attr`ShimEquation;
else
printf "& & $w_{%o}$ & %o & %o & %o & %o & %o %o & %o & $y^2 = %o$ \\\\ \n",
attr`ShimAtkinLehner, attr`ShimGenus, attr`ShimAnalyticRank, attr`ShimHasAdelicPoints,
attr`ShimRepresentsSurface, attr`ShimChabauty, attr`ShimPointSearch, attr`CMpoints, attr`ShimEquation;
end if;
end for;
command := Sprintf("ls %o", "ShimDB");
ls := Pipe(command, "");
filenames := Split(ls, "\n");
atkinlehners:= [ eval Split(Split(file,"w")[2],">")[1] : file in filenames ];
ParallelSort(~atkinlehners, ~filenames);
for filename in filenames do
file:=Sprintf("ShimDB/%o",filename);
FP:=Read(file);
attr:=eval FP;
if attr`ShimGenus gt 1 and "s`ShimAtkinLehner" in FP then
if attr`ShimHasAdelicPoints eq true then
printf "& & $w_{%o}$ & %o & %o & %o & %o & %o %o & %o & $y^2 = %o$ \\\\ \n",
attr`ShimAtkinLehner, attr`ShimGenus, attr`ShimAnalyticRank, attr`ShimHasAdelicPoints,
attr`ShimRepresentsSurface, attr`ShimChabauty, attr`ShimPointSearch, attr`CMpoints, attr`ShimEquation;
end if;
end if;
end for;
Pipe("ls ShimDB", "");
filenames:= [ "../../Dropbox (Dartmouth College)/Shimura-Chabauty/code/%o"]
Sprintf("ls ../../Dropbox (Dartmouth College)/Shimura-Chabauty/code/%o", "ShimDatabase");
lst:=Pipe("ls ShimDB", "");
load "dir";
load "../../Dropbox (Dartmouth College)/Shimura-Chabauty/code/ShimDatabase/Shim-X(26,1)-<w2>-g1.m";
Open(filename);
if s`ShimGenus eq 0 then
printf "& & $w_{%o}$ & %o & %o & %o & %o & %o & %o & $%o$ \\\\ \n",
s`ShimAtkinLehner, s`ShimGenus, s`ShimInfinitelyManyPoints, s`ShimHasAdelicPoints,
s`ShimRepresentsSurface, "NA", s`ShimCMPoints, s`ShimEquation;
elif s`ShimGenus eq 1 then
printf "& & $w_{%o}$ & %o & $\\Z^%o + %o$ & %o & %o & %o & %o & $y^2 = %o$ \\\\ \n",
s`ShimAtkinLehner, s`ShimGenus, s`MordellWeil[1], s`MordellWeil[2], s`ShimHasAdelicPoints,
s`ShimRepresentsSurface, "NA", s`ShimCMPoints, s`ShimEquation;
else
printf "& & $w_{%o}$ & %o & %o & %o & %o & %o %o & %o & $y^2 = %o$ \\\\ \n",
s`ShimAtkinLehner, s`ShimGenus, s`ShimRankBounds, s`ShimHasAdelicPoints,
s`ShimRepresentsSurface, s`ShimChabauty, s`ShimPointSearch, s`CMpoints, s`ShimEquation;
end if;
Open("../../Dropbox (Dartmouth College)/Shimura-Chabauty/code/ShimDatabase/Shim-X(26,1)-<w2>-g1.m",p);