def render_modlmf_webpage(**args): C = getDBConnection() data = None if 'label' in args: lab = args.get('label') data = C.mod_l_eigenvalues.modlmf.find_one({'label': lab }) if data is None: t = "mod ℓ modular form search error" bread = [('mod ℓ Modular Forms', url_for(".modlmf_render_webpage"))] flash(Markup("Error: <span style='color:black'>%s</span> is not a valid label for a mod ℓ modular form in the database." % (lab)),"error") return render_template("modlmf-error.html", title=t, properties=[], bread=bread, learnmore=learnmore_list()) info = {} info.update(data) info['friends'] = [] bread=[('Modular Forms', "/ModularForm"),('GL(2)',""),('mod ℓ', url_for(".modlmf_render_webpage")), ('%s' % data['label'], ' ')] credit = modlmf_credit f = C.mod_l_eigenvalues.modlmf.find_one({'characteristic':data['characteristic'], 'deg' : data['deg'], 'level' : data['level'],'conductor' : data['conductor'],'min_weight': data['min_weight'], 'dirchar' : data['dirchar'], 'atkinlehner': data['atkinlehner'],'n_coeffs': data['n_coeffs'],'coeffs': data['coeffs']}) for m in ['characteristic','deg','level','conductor','min_weight', 'n_coeffs']: info[m]=int(f[m]) for m in ['coeffs', 'atkinlehner']: info[m]=f[m] info['dirchar']=str(f['dirchar']) if f['deg'] == int(1): info['field']=str('𝔽<sub>%s</sub>' %f['characteristic']) else: try: pol=str(conway_polynomial(f['characteristic'], f['deg'])) info['field']=str('𝔽<sub>%s<sup>%s</sup></sub>𝔽<sub>%s</sub>[x]/(%s)' %(str(f['characteristic']), str(f['deg']), str(f['characteristic']), pol)) except: info['field']="" ncoeff=int(round(50/f['deg'])) if f['coeffs'] != "": coeff=[f['coeffs'][i] for i in range(ncoeff+1)] info['q_exp']=my_latex(print_q_expansion(coeff)) info['q_exp_display'] = url_for(".q_exp_display", label=f['label'], number="") p_range=prime_range(100) info['table_list']=[[p_range[i], f['coeffs'][p_range[i]]] for i in range(len(p_range))] info['download_q_exp'] = [ (i, url_for(".render_modlmf_webpage_download", label=info['label'], lang=i)) for i in ['gp', 'magma','sage']] t = "mod ℓ Modular Form "+info['label'] info['properties'] = [ ('Field characteristic', '%s' %info['characteristic']), ('Field degree', '%s' %info['deg']), ('Level', '%s' %info['level']), ('Conductor', '%s' %info['conductor']), ('Minimal weight', '%s' %info['min_weight']), ('Label', '%s' %info['label'])] return render_template("modlmf-single.html", info=info, credit=credit, title=t, bread=bread, properties2=info['properties'], learnmore=learnmore_list())
def render_modlmf_webpage(**args): C = getDBConnection() data = None if 'label' in args: lab = args.get('label') data = C.mod_l_eigenvalues.modlmf.find_one({'label': lab }) if data is None: t = "Mod ℓ modular form search error" bread = [('mod ℓ Modular Forms', url_for(".modlmf_render_webpage"))] flash(Markup("Error: <span style='color:black'>%s</span> is not a valid label for a mod ℓ modular form in the database." % (lab)),"error") return render_template("modlmf-error.html", title=t, properties=[], bread=bread, learnmore=learnmore_list()) info = {} info.update(data) info['friends'] = [] bread=[('Modular Forms', "/ModularForm"),('mod ℓ', url_for(".modlmf_render_webpage")), ('%s' % data['label'], ' ')] credit = modlmf_credit f = C.mod_l_eigenvalues.modlmf.find_one({'characteristic':data['characteristic'], 'deg' : data['deg'], 'level' : data['level'],'weight_grading': data['weight_grading'], 'reducible' : data['reducible'], 'cuspidal_lift': data['cuspidal_lift'], 'dirchar' : data['dirchar'], 'atkinlehner': data['atkinlehner'],'n_coeffs': data['n_coeffs'],'coeffs': data['coeffs'], 'ordinary': data['ordinary'],'min_theta_weight': data['min_theta_weight'], 'theta_cycle' : data['theta_cycle']}) for m in ['characteristic','deg','level','weight_grading', 'n_coeffs', 'min_theta_weight', 'ordinary']: info[m]=int(f[m]) info['atkinlehner']=f['atkinlehner'] info['dirchar']=str(f['dirchar']) info['label']=str(f['label']) if f['reducible']: info['reducible']=f['reducible'] info['cuspidal_lift']=f['cuspidal_lift'] info['cuspidal_lift_weight']=int(f['cuspidal_lift'][0]) info['cuspidal_lift_orbit']=str(f['cuspidal_lift'][1]) if f['cuspidal_lift'][2]=='x': info['cuspidal_hecke_field']=1 else: info['cuspidal_hecke_field']=latex(f['cuspidal_lift'][2]) info['cuspidal_lift_gen']=f['cuspidal_lift'][3] if f['theta_cycle']: info['theta_cycle']=f['theta_cycle'] info['coeffs']=[str(s).replace('x','a').replace('*','') for s in f['coeffs']] if f['deg'] != int(1): try: pol=str(conway_polynomial(f['characteristic'], f['deg'])).replace('x','a').replace('*','') info['field']= pol except: info['field']="" ncoeff=int(round(20/f['deg'])) av_coeffs=min(f['n_coeffs'],100) info['av_coeffs']=int(av_coeffs) if f['coeffs'] != "": coeff=[info['coeffs'][i] for i in range(ncoeff+1)] info['q_exp']=my_latex(print_q_expansion(coeff)) info['q_exp_display'] = url_for(".q_exp_display", label=f['label'], number="") p_range=prime_range(av_coeffs) info['table_list']=[[p_range[i], info['coeffs'][p_range[i]]] for i in range(len(p_range))] info['download_q_exp'] = [ (i, url_for(".render_modlmf_webpage_download", label=info['label'], lang=i)) for i in ['gp', 'magma','sage']] t = "Mod "+str(info['characteristic'])+" Modular Form "+info['label'] info['properties'] = [ ('Label', '%s' %info['label']), ('Field characteristic', '%s' %info['characteristic']), ('Field degree', '%s' %info['deg']), ('Level', '%s' %info['level']), ('Weight grading', '%s' %info['weight_grading'])] return render_template("modlmf-single.html", info=info, credit=credit, title=t, bread=bread, properties2=info['properties'], learnmore=learnmore_list())
def render_modlmf_webpage(**args): C = getDBConnection() data = None if 'label' in args: lab = args.get('label') data = C.mod_l_eigenvalues.modlmf.find_one({'label': lab}) if data is None: t = "Mod ℓ modular form search error" bread = [('mod ℓ Modular Forms', url_for(".modlmf_render_webpage"))] flash( Markup( "Error: <span style='color:black'>%s</span> is not a valid label for a mod ℓ modular form in the database." % (lab)), "error") return render_template("modlmf-error.html", title=t, properties=[], bread=bread, learnmore=learnmore_list()) info = {} info.update(data) info['friends'] = [] bread = [('Modular Forms', "/ModularForm"), ('mod ℓ', url_for(".modlmf_render_webpage")), ('%s' % data['label'], ' ')] credit = modlmf_credit f = C.mod_l_eigenvalues.modlmf.find_one({ 'characteristic': data['characteristic'], 'deg': data['deg'], 'level': data['level'], 'weight_grading': data['weight_grading'], 'reducible': data['reducible'], 'cuspidal_lift': data['cuspidal_lift'], 'dirchar': data['dirchar'], 'atkinlehner': data['atkinlehner'], 'n_coeffs': data['n_coeffs'], 'coeffs': data['coeffs'], 'ordinary': data['ordinary'], 'min_theta_weight': data['min_theta_weight'], 'theta_cycle': data['theta_cycle'] }) for m in [ 'characteristic', 'deg', 'level', 'weight_grading', 'n_coeffs', 'min_theta_weight', 'ordinary' ]: info[m] = int(f[m]) info['atkinlehner'] = f['atkinlehner'] info['dirchar'] = str(f['dirchar']) info['label'] = str(f['label']) if f['reducible']: info['reducible'] = f['reducible'] info['cuspidal_lift'] = f['cuspidal_lift'] info['cuspidal_lift_weight'] = int(f['cuspidal_lift'][0]) info['cuspidal_lift_orbit'] = str(f['cuspidal_lift'][1]) if f['cuspidal_lift'][2] == 'x': info['cuspidal_hecke_field'] = 1 else: info['cuspidal_hecke_field'] = latex(f['cuspidal_lift'][2]) info['cuspidal_lift_gen'] = f['cuspidal_lift'][3] if f['theta_cycle']: info['theta_cycle'] = f['theta_cycle'] info['coeffs'] = [ str(s).replace('x', 'a').replace('*', '') for s in f['coeffs'] ] if f['deg'] != int(1): try: pol = str(conway_polynomial(f['characteristic'], f['deg'])).replace('x', 'a').replace( '*', '') info['field'] = pol except: info['field'] = "" ncoeff = int(round(20 / f['deg'])) av_coeffs = min(f['n_coeffs'], 100) info['av_coeffs'] = int(av_coeffs) if f['coeffs'] != "": coeff = [info['coeffs'][i] for i in range(ncoeff + 1)] info['q_exp'] = my_latex(print_q_expansion(coeff)) info['q_exp_display'] = url_for(".q_exp_display", label=f['label'], number="") p_range = prime_range(av_coeffs) info['table_list'] = [[p_range[i], info['coeffs'][p_range[i]]] for i in range(len(p_range))] info['download_q_exp'] = [(i, url_for(".render_modlmf_webpage_download", label=info['label'], lang=i)) for i in ['gp', 'magma', 'sage']] t = "Mod " + str( info['characteristic']) + " Modular Form " + info['label'] info['properties'] = [('Label', '%s' % info['label']), ('Field characteristic', '%s' % info['characteristic']), ('Field degree', '%s' % info['deg']), ('Level', '%s' % info['level']), ('Weight grading', '%s' % info['weight_grading'])] return render_template("modlmf-single.html", info=info, credit=credit, title=t, bread=bread, properties2=info['properties'], learnmore=learnmore_list())
def render_rep_galois_modl_webpage(**args): C = getDBConnection() data = None if 'label' in args: lab = args.get('label') data = C.mod_l_galois.reps.find_one({'label': lab }) if data is None: t = "Mod ℓ Galois representations Search Error" bread = [('Representations', "/Representation"),("mod ℓ", url_for(".rep_galois_modl_render_webpage"))] flash(Markup("Error: <span style='color:black'>%s</span> is not a valid label for a mod ℓ Galois representation in the database." % (lab)),"error") return render_template("rep_galois_modl-error.html", title=t, properties=[], bread=bread, learnmore=learnmore_list()) info = {} info.update(data) info['friends'] = [] bread = [('Representations', "/Representation"),("mod ℓ", url_for(".rep_galois_modl_render_webpage")), ('%s' % data['label'], ' ')] credit = rep_galois_modl_credit f = C.mod_l_galois.reps.find_one({'base_field':data['base_field'],'rep_type':data['rep_type'],'image_type':data['image_type'],'image_label':data['image_label'],'image_at':data['image_at'], 'projective_type':data['projective_type'],'projective_label':data['projective_label'],'poly_ker':data['poly_ker'],'poly_proj_ker':data['poly_proj_ker'], 'related_objects':data['related_objects'],'dim':data['dim'],'field_char':data['field_char'],'field_deg':data['field_deg'],'conductor':data['conductor'], 'weight': data['weight'],'abs_irr':data['abs_irr'],'image_order':data['image_order'],'degree_proj_field':data['degree_proj_field'], 'primes_conductor':data['primes_conductor'],'bad_prime_list':data['bad_prime_list'],'good_prime_list':data['good_prime_list']}) for m in ['base_field','image_type','image_label','image_at','projective_type','projective_label','related_objects', 'label']: info[m]=str(f[m]) for m in ['dim','field_char','field_deg','conductor','weight','abs_irr','image_order','degree_proj_field']: info[m]=int(f[m]) info['primes_conductor']=[int(i) for i in f['primes_conductor']] for m in ['poly_ker','poly_proj_ker']: info[m]=str(f[m]).replace("*", "").strip('(').strip(')') if f['rep_type'] =="symp": info['rep_type']="Symplectic" elif f['rep_type'] =="orth": info['rep_type']="Orthogonal" else: info['rep_type']="Linear" if info['field_deg'] > int(1): try: pol=str(conway_polynomial(f['characteristic'], f['deg'])).replace("*", "") info['field_str']=str('$\mathbb{F}_%s \cong \mathbb{F}_%s[a]$ where $a$ satisfies: $%s=0$' %(str(f['field_char']), str(f['field_char']), pol)) except: info['field_str']="" info['bad_prime_list']=[] info['good_prime_list']=[] for n in f['bad_prime_list']: try: n1=[int(n[0]), str(n[1]), str(n[2]), int(n[3]), int(n[4])] except: n1=[int(n[0]), str(n[1]), str(n[2]), str(n[3]), str(n[4])] info['bad_prime_list'].append(n1) info['len_good']=[int(i+1) for i in range(len(f['good_prime_list'][0][1]))] for n in f['good_prime_list']: try: n1=[int(n[0]), [str(m) for m in n[1]], str(n[2]), int(n[3]), int(n[4])] except: n1=[int(n[0]), [str(m) for m in n[1]], str(n[2]), str(n[3]), str(n[4])] info['good_prime_list'].append(n1) info['download_list'] = [ (i, url_for(".render_rep_galois_modl_webpage_download", label=info['label'], lang=i)) for i in ['gp', 'magma','sage']] t = "Mod ℓ Galois representation "+info['label'] info['properties'] = [ ('Label', '%s' %info['label']), ('Dimension', '%s' %info['dim']), ('Field characteristic', '%s' %info['field_char']), ('Conductor', '%s' %info['conductor']),] return render_template("rep_galois_modl-single.html", info=info, credit=credit, title=t, bread=bread, properties2=info['properties'], learnmore=learnmore_list())
def render_rep_galois_modl_webpage(**args): data = None if 'label' in args: lab = args.get('label') data = db.modlgal_reps.lookup(lab) if data is None: t = "Mod ℓ Galois representations Search Error" bread = [('Representations', "/Representation"),("mod ℓ", url_for(".rep_galois_modl_render_webpage"))] flash_error("%s is not a valid label for a mod ℓ Galois representation in the database.", lab) return render_template("rep_galois_modl-error.html", title=t, properties=[], bread=bread, learnmore=learnmore_list()) info = {} info.update(data) info['friends'] = [] bread = [('Representations', "/Representation"),("mod ℓ", url_for(".rep_galois_modl_render_webpage")), ('%s' % data['label'], ' ')] credit = rep_galois_modl_credit for m in ['base_field','image_type','image_label','image_at','projective_type','projective_label','related_objects', 'label']: info[m]=str(data[m]) for m in ['dim','field_char','field_deg','conductor','weight','abs_irr','image_order','degree_proj_field']: info[m]=int(data[m]) info['primes_conductor']=[int(i) for i in data['primes_conductor']] for m in ['poly_ker','poly_proj_ker']: info[m]=str(data[m]).replace("*", "").strip('(').strip(')') if data['rep_type'] =="symp": info['rep_type']="Symplectic" elif data['rep_type'] =="orth": info['rep_type']="Orthogonal" else: info['rep_type']="Linear" if info['field_deg'] > int(1): try: pol=str(conway_polynomial(data['characteristic'], data['deg'])).replace("*", "") info['field_str']=str(r'$\mathbb{F}_%s \cong \mathbb{F}_%s[a]$ where $a$ satisfies: $%s=0$' %(str(data['field_char']), str(data['field_char']), pol)) except: info['field_str']="" info['bad_prime_list']=[] info['good_prime_list']=[] for n in data['bad_prime_list']: try: n1=[int(n[0]), str(n[1]), str(n[2]), int(n[3]), int(n[4])] except: n1=[int(n[0]), str(n[1]), str(n[2]), str(n[3]), str(n[4])] info['bad_prime_list'].append(n1) info['len_good']=[int(i+1) for i in range(len(data['good_prime_list'][0][1]))] for n in data['good_prime_list']: try: n1=[int(n[0]), [str(m) for m in n[1]], str(n[2]), int(n[3]), int(n[4])] except: n1=[int(n[0]), [str(m) for m in n[1]], str(n[2]), str(n[3]), str(n[4])] info['good_prime_list'].append(n1) info['download_list'] = [ (i, url_for(".render_rep_galois_modl_webpage_download", label=info['label'], lang=i)) for i in ['gp', 'magma','sage']] t = "Mod ℓ Galois representation "+info['label'] info['properties'] = [ ('Label', '%s' %info['label']), ('Dimension', '%s' %info['dim']), ('Field characteristic', '%s' %info['field_char']), ('Conductor', '%s' %info['conductor']),] return render_template("rep_galois_modl-single.html", info=info, credit=credit, title=t, bread=bread, properties=info['properties'], learnmore=learnmore_list(), KNOWL_ID='gal.modl.%s'%info['label'])