CoCalc Shared Fileswww / cgi-bin / mfd / mfe_newfactor.pyOpen in CoCalc with one click!
Author: William A. Stein
1
#!/usr/bin/python
2
3
# mfe_newfactor.py
4
# (c) William Stein, 2000
5
6
import cgi # cgi-bin
7
import Documents, HTML
8
9
import misc
10
import constants
11
import mfd # modular forms database
12
import pari
13
14
import os, string
15
16
import mfe_glossary, mfe_source, mfe_data_table, mfe_full
17
18
glossary = mfe_glossary.Glossary()
19
G = glossary.Link
20
21
print "Content-Type: text/html" # HTML is following
22
print # blank line, end of headers
23
24
form = cgi.FieldStorage()
25
26
def Generate_ModSym_Data_Table(code, M):
27
inner_twists = M.inner_twists()
28
if inner_twists[0] != constants.not_computed:
29
inner_twists_row = ["inner_twists", "Inner twists data", inner_twists, "", ""]
30
else:
31
inner_twists_row = [0,0,0,0,0,0]
32
33
table = [\
34
["a_invariants", "Invariants of a minimal Weierstrass equation", str(M.a_invariants()),"", ""]\
35
,["dimension", "Dimension", str(M.dimension()), "(degree of field generated by Fourier coefficients)", ""]\
36
,["discriminant", "Discriminant", str(M.discriminant()), "(of ring generated by Fourier coefficients)", ""]\
37
,["discriminant_factored", "Discriminant (factored)", str(M.discriminant_factored()), "", ""]\
38
,["weierstrass_discriminant", "Discriminant of Weierstrass equation", str(M.weierstrass_discriminant()), "", ""]\
39
,["cuspidal_subgroup", "Cuspidal subgroup", str(M.cuspidal_subgroup()),"", ""]\
40
,["equation", "Equation for A", str(M.equation()),"", ""]\
41
,["mwrank", "Rank of Mordell-Weil group", str(M.mwrank()), "", ""]\
42
,["mw_generators", "Mordell-Weil group generators", str(M.mw_generators()),"",""]\
43
,["regulator", "Regulator of Mordell-Weil group", str(M.regulator()),"", ""]\
44
,["leading_coefficient", "Leading coefficient", str(M.leading_coefficient()), "... of expansion of L-series about s=1.",""]\
45
,["real_volume", "Real volume", str(M.real_volume()), "Omega in the BSD conjecture, up to a Manin constant", ""]\
46
,["torsion_subgroup", "Torsion subgroup", str(M.torsion_subgroup()), "", ""]\
47
,["torsion_size", "Torsion subgroup size", str(M.torsion_size()), "", "torsion_subgroup"]\
48
,["torsion_upper_bound", "Torsion subgroup size (upper bound)", str(M.torsion_upper_bound()), "", "torsion_subgroup"]\
49
,["torsion_odd_upper_bound", "Torsion subgroup size (odd part of upper bound)", str(M.torsion_odd_upper_bound()), "", ""]\
50
,["torsion_lower_bound", "Torsion subgroup size (lower bound)", str(M.torsion_lower_bound()), "", "torsion_subgroup"]\
51
,["j_invariant", "j-invariant", str(M.j_invariant()), "of corresponding elliptic curve", ""]\
52
,["atkin_lehner", "Atkin-Lehner involutions (sign sequence)", str(M.atkin_lehner()), "", ""]\
53
,["tamagawa_numbers", "Tamagawa numbers", str(M.tamagawa_numbers()), "the c<sub>p</sub> in BSD conjecture", ""]\
54
,["tamagawa_numbers_odd", "Tamagawa numbers (odd parts)", str(M.tamagawa_numbers_odd()), "(0 means not yet computed)", ""]\
55
,["hecke_field_discriminant", "Discriminant of Hecke eigenvalue field", str(M.hecke_field_discriminant()),"", "hecke_field", ""]\
56
,["traces", "Traces to Q of Hecke eigenvalues a<sub>p</sub>", str(M.traces()), "",""]\
57
,["modular_degree", "Modular degree", str(M.modular_degree()), "", ""]\
58
,["modular_degree_primes", "Modular degree prime divisors", str(M.modular_degree_primes()), "", "modular_degree"]\
59
,["modular_degree_odd", "Modular degree (odd part)", str(M.modular_degree_odd()), "", ""]\
60
,["modular_degree_odd_primes", "Modular degree odd prime divisors", str(M.modular_degree_odd_primes()), "", "modular_degree_odd"]\
61
,["congruence_modulus", "Congruence modulus", str(M.congruence_modulus()), "", ""]\
62
,["congruence_modulus_primes", "Congruence modulus prime divisors", str(M.congruence_modulus_primes()), "", "congruence_modulus"]\
63
,["lratio", "L-ratios L(A,i)/Omega_i for i=1,...,k-1", mfe_full.lratio_links(M), "", "", M.weight > 2]\
64
,["lratio_k2", "L-ratio L(A,1)/Omega", str(M.lratio_k2()), "", "lratio", M.weight == 2]\
65
,["lratio_odd", "L-ratios L(A,i)/Omega_i for i=1,...,k-1 (odd parts)", mfe_full.lratio_odd_links(M), "", "", M.weight > 2]\
66
,["lratio_odd_k2", "L-ratio L(A,1)/Omega (odd parts)", str(M.lratio_odd_k2()), "", "lratio_odd", M.weight == 2]\
67
,["sha_an", "Shafarevich-Tate group (analytic order)", str(M.sha_an()), "", ""]\
68
,["sha_an_odd", "Shafarevich-Tate group (odd part of analytic order)", str(M.sha_an_odd()), "", ""]\
69
,["sha_an_odd_upper_bound", "Shafarevich-Tate group (upper bound on odd part of analytic order)", str(M.sha_an_odd_upper_bound()), "", "sha_an_odd"]\
70
,["sha_an_odd_lower_bound", "Shafarevich-Tate group (lower bound on odd part of analytic order)", str(M.sha_an_odd_lower_bound()), "", "sha_an_odd"]\
71
,["visibility", "Visibility Data", str(M.visibility()), "", ""]\
72
,inner_twists_row\
73
,["notes","Notes",str(M.notes()),"", ""]\
74
]
75
76
end = [["Heegner point indexes (odd parts of)", "heegner_indexes_odd", str(M.heegner_indexes_odd()), "", ""]\
77
,["Heights of Heegner points", "heegner_heights", str(M.heegner_heights()), "", ""]\
78
]
79
80
# since I originally entered them in the wrong order
81
for i in range(len(table)):
82
tmp = table[i][1]
83
table[i][1]=table[i][0]
84
table[i][0]=tmp
85
86
table = table + end
87
88
for i in range(len(table)):
89
table[i] = [M] + table[i]
90
91
misc = mfe_full.miscellaneous_rows(M)
92
table = table + misc
93
94
return mfe_data_table.Generate_Data_Table(table)
95
96
if not form.has_key("code"):
97
print "<h1>Error</h1>"
98
print "Please fill in the code field."
99
100
else:
101
code = form["code"].value
102
M = mfd.ModSym_From_Code(code)
103
back = '<a href="%s/mfe_full_html.py?level=%s&weight=%s">[Back to level %s and weight %s]</a>'%\
104
(constants.CGIROOT, M.level, M.weight,M.level, M.weight)
105
106
title = 'Modular Forms Explorer: Data About %s'%code
107
link = '<link rel=stylesheet type="text/css" href="/mfd/mfd.css", title="was">'
108
body = '<body class=top>'
109
print '<html><head><title>%s</title>%s</head>'%(title,link)
110
print body
111
print '<center>'
112
print '<h1><a href="/mfd/mfe/">Modular Forms Explorer</a></h1>'
113
print '<h1>Data About <b>%s</b></h1>'%code
114
if M.is_elliptic_curve():
115
es= '<h3>'
116
if M.number > 1:
117
es=es+"Non-"
118
es=es+'X<sub>0</sub>(N)-optimal Elliptic Curve: %s</h3>'%str(M.a_invariants())
119
print es
120
print '<h3>%s</h3>'%back
121
table = Generate_ModSym_Data_Table(code, M)
122
table = mfe_glossary.Glossarize(table)
123
print table
124
print "<hr>Database ID = ", M.id
125
print '</center>'
126
print '</body></html>'
127
128
129
130