def render_hgm_webpage(args): data = None info = {} if 'label' in args: label = clean_input(args['label']) C = base.getDBConnection() data = C.hgm.motives.find_one({'label': label}) if data is None: bread = get_bread([("Search error", url_for('.search'))]) info['err'] = "Motive " + label + " was not found in the database." info['label'] = label return search_input_error(info, bread) title = 'Hypergeometric Motive:' + label A = data['A'] B = data['B'] tn,td = data['t'] t = latex(QQ(str(tn)+'/'+str(td))) primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71] locinfo = data['locinfo'] for j in range(len(locinfo)): locinfo[j] = [primes[j]] + locinfo[j] locinfo[j][2] = poly_with_factored_coeffs(locinfo[j][2], primes[j]) hodge = data['hodge'] prop2 = [ ('Degree', '\(%s\)' % data['degree']), ('Weight', '\(%s\)' % data['weight']), ('Conductor', '\(%s\)' % data['cond']), ] # Now add factorization of conductor Cond = ZZ(data['cond']) if not (Cond.abs().is_prime() or Cond == 1): data['cond'] = "%s=%s" % (str(Cond), factorint(data['cond'])) info.update({ 'A': A, 'B': B, 't': t, 'degree': data['degree'], 'weight': data['weight'], 'sign': data['sign'], 'sig': data['sig'], 'hodge': hodge, 'cond': data['cond'], 'req': data['req'], 'locinfo': locinfo }) AB_data, t_data = data["label"].split("_t") #AB_data = data["label"].split("_t")[0] friends = [("Motive family "+AB_data.replace("_"," "), url_for(".by_family_label", label = AB_data))] friends.append(('L-function', url_for("l_functions.l_function_hgm_page", label=AB_data, t='t'+t_data))) # if rffriend != '': # friends.append(('Discriminant root field', rffriend)) bread = get_bread([(label, ' ')]) return render_template("hgm-show-motive.html", credit=HGM_credit, title=title, bread=bread, info=info, properties2=prop2, friends=friends)
def render_hgm_webpage(label): data = None info = {} data = db.hgm_motives.lookup(label) if data is None: abort( 404, "Hypergeometric motive " + label + " was not found in the database.") title = 'Hypergeometric motive:' + label A = data['A'] B = data['B'] alpha = cyc_to_QZ(A) beta = cyc_to_QZ(B) gammas = ab2gammas(A, B) det = db.hgm_families.lucky({'A': A, 'B': B}, 'det') if det is None: det = 'data not computed' else: det = [det[0], str(det[1])] d1 = det[1] d1 = re.sub(r'\s', '', d1) d1 = re.sub(r'(.)\(', r'\1*(', d1) R = PolynomialRing(ZZ, 't') if det[1] == '': d2 = R(1) else: d2 = R(d1) det = d2(QQ(data['t'])) * det[0] t = latex(QQ(data['t'])) typee = 'Orthogonal' if (data['weight'] % 2) == 1 and (data['degree'] % 2) == 0: typee = 'Symplectic' primes = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71 ] locinfo = data['locinfo'] for j in range(len(locinfo)): locinfo[j] = [primes[j]] + locinfo[j] #locinfo[j][2] = poly_with_factored_coeffs(locinfo[j][2], primes[j]) locinfo[j][2] = list_to_factored_poly_otherorder(locinfo[j][2], vari='x') hodge = data['hodge'] famhodge = data['famhodge'] prop2 = [ ('Label', '%s' % data['label']), ('A', r'\(%s\)' % A), ('B', r'\(%s\)' % B), ('Degree', r'\(%s\)' % data['degree']), ('Weight', r'\(%s\)' % data['weight']), ('Hodge vector', r'\(%s\)' % hodge), ('Conductor', r'\(%s\)' % data['cond']), ] # Now add factorization of conductor Cond = ZZ(data['cond']) if not (Cond.abs().is_prime() or Cond == 1): data['cond'] = "%s=%s" % (str(Cond), factorint(data['cond'])) info.update({ 'A': A, 'B': B, 'alpha': web_latex(alpha), 'beta': web_latex(beta), 'gammas': gammas, 't': t, 'degree': data['degree'], 'weight': data['weight'], 'sign': data['sign'], 'sig': data['sig'], 'hodge': hodge, 'famhodge': famhodge, 'cond': data['cond'], 'req': data['req'], 'lcms': data['lcms'], 'type': typee, 'det': det, 'locinfo': locinfo }) AB_data, t_data = data["label"].split("_t") friends = [("Motive family " + AB_data.replace("_", " "), url_for(".by_family_label", label=AB_data))] friends.append(('L-function', url_for("l_functions.l_function_hgm_page", label=AB_data, t='t' + t_data))) # if rffriend != '': # friends.append(('Discriminant root field', rffriend)) AB = 'A = ' + str(A) + ', B = ' + str(B) t_data = str(QQ(data['t'])) bread = get_bread([('family ' + str(AB), url_for(".by_family_label", label=AB_data)), ('t = ' + t_data, ' ')]) return render_template("hgm-show-motive.html", credit=HGM_credit, title=title, bread=bread, info=info, properties=prop2, friends=friends, learnmore=learnmore_list())
def render_hgm_webpage(args): data = None info = {} if 'label' in args: label = clean_input(args['label']) data = motivedb().find_one({'label': label}) if data is None: bread = get_bread([("Search error", url_for('.search'))]) info['err'] = "Motive " + label + " was not found in the database." info['label'] = label return search_input_error(info, bread) title = 'Hypergeometric Motive:' + label A = data['A'] B = data['B'] myfam = familydb().find_one({'A': A, 'B': B}) if myfam is None: det = 'data not computed' else: det = myfam['det'] det = [det[0],str(det[1])] d1 = det[1] d1 = re.sub(r'\s','', d1) d1 = re.sub(r'(.)\(', r'\1*(', d1) R = PolynomialRing(ZZ, 't') if det[1]=='': d2 = R(1) else: d2 = R(d1) det = d2(QQ(data['t']))*det[0] t = latex(QQ(data['t'])) typee = 'Orthogonal' if (data['weight'] % 2) == 1 and (data['degree'] % 2) == 0: typee = 'Symplectic' primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71] locinfo = data['locinfo'] for j in range(len(locinfo)): locinfo[j] = [primes[j]] + locinfo[j] #locinfo[j][2] = poly_with_factored_coeffs(locinfo[j][2], primes[j]) locinfo[j][2] = list_to_factored_poly_otherorder(locinfo[j][2], vari='x') hodge = string2list(data['hodge']) famhodge = string2list(data['famhodge']) prop2 = [ ('Degree', '\(%s\)' % data['degree']), ('Weight', '\(%s\)' % data['weight']), ('Hodge vector', '\(%s\)' % hodge), ('Conductor', '\(%s\)' % data['cond']), ] # Now add factorization of conductor Cond = ZZ(data['cond']) if not (Cond.abs().is_prime() or Cond == 1): data['cond'] = "%s=%s" % (str(Cond), factorint(data['cond'])) info.update({ 'A': A, 'B': B, 't': t, 'degree': data['degree'], 'weight': data['weight'], 'sign': data['sign'], 'sig': data['sig'], 'hodge': hodge, 'famhodge': famhodge, 'cond': data['cond'], 'req': data['req'], 'lcms': data['lcms'], 'type': typee, 'det': det, 'locinfo': locinfo }) AB_data, t_data = data["label"].split("_t") friends = [("Motive family "+AB_data.replace("_"," "), url_for(".by_family_label", label = AB_data))] friends.append(('L-function', url_for("l_functions.l_function_hgm_page", label=AB_data, t='t'+t_data))) # if rffriend != '': # friends.append(('Discriminant root field', rffriend)) bread = get_bread([(label, ' ')]) return render_template("hgm-show-motive.html", credit=HGM_credit, title=title, bread=bread, info=info, properties2=prop2, friends=friends, learnmore=learnmore_list())
def render_hgm_webpage(label): data = None info = {} data = db.hgm_motives.lookup(label) if data is None: abort(404, "Hypergeometric motive " + label + " was not found in the database.") title = 'Hypergeometric Motive:' + label A = data['A'] B = data['B'] det = db.hgm_families.lucky({'A': A, 'B': B}, 'det') if det is None: det = 'data not computed' else: det = [det[0],str(det[1])] d1 = det[1] d1 = re.sub(r'\s','', d1) d1 = re.sub(r'(.)\(', r'\1*(', d1) R = PolynomialRing(ZZ, 't') if det[1]=='': d2 = R(1) else: d2 = R(d1) det = d2(QQ(data['t']))*det[0] t = latex(QQ(data['t'])) typee = 'Orthogonal' if (data['weight'] % 2) == 1 and (data['degree'] % 2) == 0: typee = 'Symplectic' primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71] locinfo = data['locinfo'] for j in range(len(locinfo)): locinfo[j] = [primes[j]] + locinfo[j] #locinfo[j][2] = poly_with_factored_coeffs(locinfo[j][2], primes[j]) locinfo[j][2] = list_to_factored_poly_otherorder(locinfo[j][2], vari='x') hodge = data['hodge'] famhodge = data['famhodge'] prop2 = [ ('Degree', '\(%s\)' % data['degree']), ('Weight', '\(%s\)' % data['weight']), ('Hodge vector', '\(%s\)' % hodge), ('Conductor', '\(%s\)' % data['cond']), ] # Now add factorization of conductor Cond = ZZ(data['cond']) if not (Cond.abs().is_prime() or Cond == 1): data['cond'] = "%s=%s" % (str(Cond), factorint(data['cond'])) info.update({ 'A': A, 'B': B, 't': t, 'degree': data['degree'], 'weight': data['weight'], 'sign': data['sign'], 'sig': data['sig'], 'hodge': hodge, 'famhodge': famhodge, 'cond': data['cond'], 'req': data['req'], 'lcms': data['lcms'], 'type': typee, 'det': det, 'locinfo': locinfo }) AB_data, t_data = data["label"].split("_t") friends = [("Motive family "+AB_data.replace("_"," "), url_for(".by_family_label", label = AB_data))] friends.append(('L-function', url_for("l_functions.l_function_hgm_page", label=AB_data, t='t'+t_data))) # if rffriend != '': # friends.append(('Discriminant root field', rffriend)) bread = get_bread([(label, ' ')]) return render_template("hgm-show-motive.html", credit=HGM_credit, title=title, bread=bread, info=info, properties2=prop2, friends=friends, learnmore=learnmore_list())
def render_hgm_webpage(args): data = None info = {} if 'label' in args: label = clean_input(args['label']) C = base.getDBConnection() data = C.hgm.motives.find_one({'label': label}) if data is None: bread = get_bread([("Search error", url_for('.search'))]) info['err'] = "Motive " + label + " was not found in the database." info['label'] = label return search_input_error(info, bread) title = 'Hypergeometric Motive:' + label A = data['A'] B = data['B'] tn, td = data['t'] t = latex(QQ(str(tn) + '/' + str(td))) primes = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71 ] locinfo = data['locinfo'] for j in range(len(locinfo)): locinfo[j] = [primes[j]] + locinfo[j] locinfo[j][2] = poly_with_factored_coeffs(locinfo[j][2], primes[j]) hodge = data['hodge'] prop2 = [ ('Degree', '\(%s\)' % data['degree']), ('Weight', '\(%s\)' % data['weight']), ('Conductor', '\(%s\)' % data['cond']), ] # Now add factorization of conductor Cond = ZZ(data['cond']) if not (Cond.abs().is_prime() or Cond == 1): data['cond'] = "%s=%s" % (str(Cond), factorint(data['cond'])) info.update({ 'A': A, 'B': B, 't': t, 'degree': data['degree'], 'weight': data['weight'], 'sign': data['sign'], 'sig': data['sig'], 'hodge': hodge, 'cond': data['cond'], 'req': data['req'], 'locinfo': locinfo }) AB_data, t_data = data["label"].split("_t") #AB_data = data["label"].split("_t")[0] friends = [("Motive family " + AB_data.replace("_", " "), url_for(".by_family_label", label=AB_data))] friends.append(('L-function', url_for("l_functions.l_function_hgm_page", label=AB_data, t='t' + t_data))) # if rffriend != '': # friends.append(('Discriminant root field', rffriend)) bread = get_bread([(label, ' ')]) return render_template("hgm-show-motive.html", credit=HGM_credit, title=title, bread=bread, info=info, properties2=prop2, friends=friends)