CoCalc Public Fileswww / cgi-bin / mfd / mfe_ap_data.pyOpen with one click!
Author: William A. Stein
Compute Environment: Ubuntu 18.04 (Deprecated)
1
#!/usr/bin/python
2
3
import cgi, mfd, sys, mfe_source, constants
4
5
form = cgi.FieldStorage()
6
7
print "Content-Type: text/html"
8
print ""
9
10
if form.has_key("code"):
11
code = form["code"].value
12
else:
13
print "Missing code"
14
sys.exit(0)
15
16
17
M = mfd.ModSym(code)
18
field = M.ap_field()
19
embedding = M.ap_embedding()
20
source = M.ap_source()
21
22
bar="////////////////////////////////////////////////////////////\n"
23
print "//<pre>%s// Basis for Hecke eigenvalue field for %s"%(bar,code)
24
if source != constants.not_computed:
25
print "// Source of data: %s"%mfe_source.Link(M.source(source))
26
print bar
27
if field != constants.not_computed:
28
print "// The field is K=Q[x]/(f)\n"
29
print "f := %s; \n"%field
30
if embedding != constants.not_computed:
31
print "// The eigenvalues are vectors on the following basis for K:\n"
32
print "basis := %s; \n"%embedding.replace(",",",\n")
33