Ejemplo n.º 1
0
def render_hmf_webpage(**args):
    C = getDBConnection()
    data = None
    if 'label' in args:
        label = str(args['label'])
        data = C.hmfs.forms.find_one({'label': label})
    if data is None:
        return "No such field"    
    info = {}
    try:
        info['count'] = args['count']
    except KeyError:
        info['count'] = 10

    hmf_field  = C.hmfs.fields.find_one({'label': data['field_label']})
    field_info = C.numberfields.fields.find_one({'label': data['field_label']})
    field_info['galois_group'] = str(field_info['galois_group'][3])
    info['field_info'] = field_info
    info['field_poly'] = pol_to_html(str(coeff_to_poly(field_info['coefficients'])))

    data['field_label'] = field_pretty(data['field_label'])
    info.update(data)
    info['downloads_visible'] = True
    info['downloads'] = [('worksheet (not yet)', '/')]
    info['friends'] = [('L-function (not yet)', '/')]
#    info['learnmore'] = [('Number Field labels', url_for("render_labels_page")), ('Galois group labels',url_for("render_groups_page")), ('Discriminant ranges',url_for("render_discriminants_page"))]
    bread = [('Hilbert Modular Forms', url_for("hilbert_modular_form_render_webpage")),('%s'%data['label'],' ')]

    t = "Hilbert Cusp Form %s" % info['label']
    credit = 'L. Dembele, S. Donnelly and J. Voight'

    eigs = eval(data['hecke_eigenvalues'])
    primes = hmf_field['primes']
    w = polygen(QQ,'w')
    n = min(len(eigs),len(primes))
    info['eigs'] = [{'eigenvalue': eigs[i],
                     'prime_ideal': primes[i], 
                     'prime_norm': primes[i][0]} for i in range(n)]
        
    properties = []
    properties = ['<br>']
    properties.extend('<table>')
    properties.extend('<tr><td align=left>Field:<td align=left>%s</td>'%data["field_label"])
    properties.extend('<tr><td align=left>Degree:<td align=left> %s</td>'%field_info['degree'])
    properties.extend('<tr><td align=left>Discriminant:<td align=left>%s</td>'%field_info['discriminant'])
    properties.extend('<tr><td align=left>Polynomial:<td align=left>%s</td>'%field_info['discriminant'])
    properties.extend('<tr><td align=left>Class number:<td align=left>%s</td>'%field_info['class_number'])
    properties.extend('<tr><td align=left>Galois group:<td align=left>%s</td>'%field_info['galois_group'])
    properties.extend('</table>')
    properties.extend('<hr>')
    properties.extend('<table>')
    properties.extend('<tr><td align=left>Weight:<td align=left>%s</td>'%data["weight"])
    properties.extend('<tr><td align=left>Level:<td align=left> %s</td>'%data['level_ideal'])
    properties.extend('<tr><td align=left>Level Norm:<td align=left>%s</td>'%data['level_norm'])
    properties.extend('<tr><td align=left>Label:<td align=left>%s</td>'%data['label_suffix'])
    properties.extend('</table>')

    return render_template("hilbert_modular_form/hilbert_modular_form.html", info = info, properties=properties, credit=credit, title = t, bread=bread)
Ejemplo n.º 2
0
def format_coeffs(coeffs):
    return pol_to_html(str(coeff_to_poly(coeffs)))
Ejemplo n.º 3
0
 def polredabshtml(self):
     return pol_to_html(self.polredabs())
Ejemplo n.º 4
0
 def polredabshtml(self):
     return pol_to_html(self.polredabs())
Ejemplo n.º 5
0
def format_coeffs(coeffs):
    return pol_to_html(str(coeff_to_poly(coeffs)))