CoCalc Shared Fileswww / cgi-bin / mfd / notesOpen in CoCalc with one click!
Author: William A. Stein
1
2
print """<html>
3
<title>Modular forms database: Level %d</title>
4
<LINK REL=STYLESHEET TYPE=\"text/css\"
5
HREF=\"http://%s/mfd/mfd.css\" TITLE=\"was\">
6
<body class=top>
7
<h1>The modular curve X<sub>0</sub>(%d)</h1>
8
<h4><a href=\"http://%s/mfd/single.html\">[Up]</a></h4>
9
<form action=\"/cgi-bin/mfd/x0n.py\" method=\"POST\">
10
New level: <input type=\"text\" name=\"level\">
11
<input type=\"submit\" value=\"Submit\">
12
<input type=\"hidden\" name=\"iso_class\" value=\"0\">
13
</form>""" % (N, hostname, N, hostname)
14
print "<form action=\"/cgi-bin/mfd/x0n.py\" method=\"POST\">" + \
15
"<input type=\"hidden\" name=\"level\" value=\"" + str(N-1) + "\">" + \
16
"<input type=\"submit\" value=\"Previous level\">" + \
17
"<input type=\"hidden\" name=\"iso_class\" value=\"0\"></form>"
18
print "<form action=\"/cgi-bin/mfd/x0n.py\" method=\"POST\">" + \
19
"<input type=\"hidden\" name=\"level\" value=\"" + str(N+1) + "\">" + \
20
"<input type=\"submit\" value=\"Next level \">" + \
21
"<input type=\"hidden\" name=\"iso_class\" value=\"0\"></form>"
22
23
24
print "<hr>"
25
26
M = mfd.ModSym(N,2)
27
28
print "<table border=1 cellpadding=10>"
29
print "<tr><td width=400>Genus</td><td align=center>%s</td></tr> " \
30
% M.dimension()
31
print "<tr><td>Discriminant of Hecke algebra</td><td align=center>%s</td></tr> " \
32
% M.discriminant()
33
print "<tr><td>Cuspidal subgroup</td><td align=center>%s</td></tr> " \
34
% misc.print_array(M.cuspidal_subgroup())
35
print ("<tr><td><b>Known</b> new isogeny factors of J<sub>0</sub>(%s)" + \
36
"</td> <td align=center>") % N
37
print html_iso_class_table(N)
38
print "</td></tr>"
39
print "<tr><td>Equation for X<sub>0</sub>(%s)</td><td align=center>%s</td></tr>" % (N,M.equation())
40
print "<tr><td>Characteristic polynomial of T<sub>2</sub></td><td align=center>%s</td></tr>" % M.charpoly(2)
41
print "<tr><td>Notes</td><td align=center>%s</td></tr>" % M.notes()
42
print "</table></body></html>"
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
print "<tr><td align=center><b>%s%s</b></td><td></td><td align=center>%s</td></tr>" % \
60
(N,misc.ToIsogenyCode(i+1),iso[i]["dimension"])
61
62
63
print "<table><tr><td>Isogeny class</td><td width=50></td><td>Dimension</td>"
64
for i in range(0,len(iso)):
65
print "<tr><td align=center><b>%s%s</b></td><td></td><td align=center>%s</td></tr>" % \
66
(N,misc.ToIsogenyCode(i+1),iso[i]["dimension"])
67
print "</table>"
68
69
70
71
72
73
74
75
cmd = "echo \"fprintf Open(\\\"/home/mfd/dim\\\",\\\"w\\\"),"\
76
"\\\"%o\\\",DimensionCuspFormsGamma0(" + str(N) + ",2);\" |"\
77
+ MAGMA + " > /dev/null"
78
os.system(cmd)
79
file=open('/home/mfd/dim', 'r')
80
s=file.read()
81
file.close()
82
return s
83
84
85
def date():
86
os.system('/bin/date > /home/mfd/a')
87
file=open('/home/mfd/a', 'r')
88
s=file.read()
89
file.close()
90
return s
91
92
def gpcall():
93
cmd = "echo \"2+2\" | /usr/local/bin/gp > /home/mfd/gp"
94
os.system(cmd)
95
file=open('/home/mfd/gp', 'r')
96
s=file.read()
97
file.close()
98
return s
99
100
101
102
103
query = "select dimension from mod, dimension where "\
104
"id=mod_id and dirchar='1' and base_field='Q' and level = "\
105
+ str(N) + " and weight=2 and iso_class=0"
106
x = db.query(query).dictresult()
107
if len(x) != 1:
108
g = magma.genusX0(N)
109
insert('dimension', [g], N)
110
return g
111
112
return x[0]['dimension'];
113
114
115
116
def discriminant(N,iso_class):
117
query = "select discriminant from mod, discriminant where "\
118
"id=mod_id and dirchar='1' and base_field='Q' and level = "\
119
+ str(N) + " and weight=2 and iso_class=" + str(iso_class)
120
x = db.query(query).dictresult()
121
if len(x) != 1:
122
return constants.not_computed
123
return x[0]['discriminant'];
124
125
126
127
128
----------
129
query = "select invariants from mod, cuspidal_subgroup where "\
130
"id=mod_id and dirchar='1' and base_field='Q' and level = "\
131
+ str(N) + " and weight=2 and iso_class=" + str(iso_class)
132
x = db.query(query).dictresult()
133
if len(x) != 1:
134
return constants.not_computed
135
s = x[0]['invariants']
136
return misc.parse_sqlarray(s)
137
138
139
140
141
q = db.query("SELECT charpoly[%s] FROM charpoly WHERE mod_id=%s"%(n,self.id)).dictresult()
142
if len(q) == 0 or q[0]['charpoly'] == '':
143
return constants.not_computed
144
return q[0]['charpoly']
145
146
def set_charpoly(self,n,f):
147
148
149
150
q = db.query("SELECT charpoly FROM charpoly WHERE mod_id=%s"%self.id).dictresult()
151
if len(q) == 0:
152
db.query("INSERT INTO charpoly(mod_id, charpoly) VALUES(%s,"\
153
"'{,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, "\
154
" ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, }')"%self.id)
155
db.query("UPDATE charpoly SET charpoly[%s] = '%s' WHERE mod_id = %s"%(n,f,self.id))
156