Esempio n. 1
0
def hilbert_modular_form_jump(info):
    lab = info['jump'].strip()
    info['label'] = lab
    try:
        split_full_label(lab)
        return hilbert_modular_form_by_label(lab)
    except ValueError:
        return redirect(url_for(".hilbert_modular_form_render_webpage"))


hmf_columns = SearchColumns([
    MultiProcessedCol(
        "label",
        "mf.hilbert.label",
        "Label", ["field_label", "label", "short_label"],
        lambda fld, label, short: '<a href="%s">%s</a>' % (url_for(
            'hmf.render_hmf_webpage', field_label=fld, label=label), short),
        default=True),
    ProcessedCol("field_label",
                 "nf",
                 "Base field",
                 lambda fld: nf_display_knowl(fld, field_pretty(fld)),
                 default=True),
    MathCol("deg", "nf.degree", "Field degree"),
    MathCol("disc", "nf.discriminant", "Field discriminant"),
    ProcessedCol("level_ideal",
                 "mf.hilbert.level_norm",
                 "Level",
                 teXify_pol,
                 mathmode=True,
Esempio n. 2
0

@search_parser
def parse_cm_list(inp, query, qfield):
    query[qfield] = {'$in': make_cm_query(inp)}


ecnf_columns = SearchColumns([
    MultiProcessedCol(
        "label",
        "ec.curve_label",
        "Label", [
            "short_label", "field_label", "conductor_label", "iso_label",
            "number"
        ],
        lambda label, field, conductor, iso, number: '<a href="%s">%s</a>' %
        (url_for('.show_ecnf',
                 nf=field,
                 conductor_label=conductor,
                 class_label=iso,
                 number=number), label),
        default=True,
        align="center"),
    ProcessedCol("field_label",
                 "nf",
                 "Base field",
                 lambda field: nf_display_knowl(field, field_pretty(field)),
                 default=True,
                 align="center"),
    MultiProcessedCol(
        "conductor",
Esempio n. 3
0
def url_for_label(label):
    if label.count("_") == 2:
        ab, t = label.rsplit("_", 1)
        return url_for(".by_label", label=ab, t=t)
    else:
        return url_for(".by_family_label", label=label)


hgm_columns = SearchColumns([
    MultiProcessedCol(
        "label",
        None,
        "Label", ["A", "B", "t"],
        lambda A, B, t: '<a href="%s">%s</a>' %
        (url_for('.by_family_label', label=ab_label(A, B))
         if t is None else url_for('.by_label',
                                   label=ab_label(A, B),
                                   t=make_t_label(t)), ab_label(A, B)
         if t is None else make_abt_label(A, B, t)),
        default=True),
    MathCol("A", None, "$A$", default=True),
    MathCol("B", None, "$B$", default=True),
    ProcessedCol("t",
                 None,
                 "$t$",
                 display_t,
                 contingent=lambda info: info["search_type"] == "Motive",
                 default=True,
                 mathmode=True,
                 align="center"),
Esempio n. 4
0
def url_for_label(label):
    return url_for(".render_bmf_webpage",
                   **dict(zip(
                       ['field_label', 'level_label', 'label_suffix'],
                       label.split('-')
                   )))

bmf_columns = SearchColumns([
    ProcessedCol("field_label", "nf", "Base field",
                 lambda fld: nf_display_knowl(fld, field_pretty(fld)),
                 default=True),
    MultiProcessedCol("level", "mf.bianchi.level", "Level", ["field_label", "level_label"],
                      lambda fld, lvl: '<a href="{}">{}</a>'.format(
                          url_for("bmf.render_bmf_space_webpage",
                                  field_label=fld,
                                  level_label=lvl),
                          lvl),
                      default=True), # teXify_pol(v['level_ideal'])
    MultiProcessedCol("label", "mf.bianchi.labels", "Label", ["field_label", "level_label", "label_suffix", "short_label"],
                      lambda fld, lvl, suff, short: '<a href="{}">{}</a>'.format(
                          url_for("bmf.render_bmf_webpage",
                                  field_label=fld,
                                  level_label=lvl,
                                  label_suffix=suff),
                          short),
                      default=True),
    MathCol("dimension", "mf.bianchi.newform", "Dimension", default=True),
    ProcessedCol("sfe", "mf.bianchi.sign", "Sign",
                 lambda v: "$+1$" if v == 1 else ("$-1$" if v == -1 else "?"),
                 default=True, align="center"),
Esempio n. 5
0
    return url_for(".render_Dirichletwebpage", modulus=modulus, number=number)

def display_galois_orbit(orbit, modulus):
    trunc = (len(orbit) > 5)
    if trunc:
        orbit = [orbit[0], orbit[-1]]
    disp = [r'<a href="{0}/{1}">\(\chi_{{{0}}}({1}, \cdot)\)</a>'.format(modulus, o) for o in orbit]
    if trunc:
        disp = r"$, \cdots ,$".join(disp)
    else:
        disp = "$,$&nbsp".join(disp)
    return f'<p style="margin-top: 0px;margin-bottom:0px;">\n{disp}\n</p>'

character_columns = SearchColumns([
    LinkCol("label", "character.dirichlet.galois_orbit_label", "Orbit label", lambda label: label.replace(".", "/"), default=True, align="center"),
    MultiProcessedCol("conrey", "character.dirichlet.conrey'", "Conrey labels", ["galois_orbit", "modulus"],
                      display_galois_orbit, default=True, align="center"),
    MathCol("modulus", "character.dirichlet.modulus", "Modulus", default=True),
    MathCol("conductor", "character.dirichlet.conductor", "Conductor", default=True),
    MathCol("order", "character.dirichlet.order", "Order", default=True),
    ProcessedCol("parity", "character.dirichlet.primitive", "Parity", lambda parity: "even" if parity == 1 else "odd", default=True),
    CheckCol("is_primitive", "character.dirichlet.primitive", "Primitive", default=True)])

character_columns.dummy_download = True

@search_wrap(
    table=db.char_dir_orbits,
    title="Dirichlet character search results",
    err_title="Dirichlet character search input error",
    columns=character_columns,
    shortcuts={"jump": jump},
    url_for_label=url_for_label,
Esempio n. 6
0

lf_columns = SearchColumns([
    LinkCol("label", "lf.field.label", "Label", url_for_label, default=True),
    ProcessedCol("coeffs",
                 "lf.defining_polynomial",
                 "Polynomial",
                 format_coeffs,
                 default=True),
    MathCol("p", "lf.qp", "$p$", default=True),
    MathCol("e", "lf.ramification_index", "$e$", default=True),
    MathCol("f", "lf.residue_field_degree", "$f$", default=True),
    MathCol("c", "lf.discriminant_exponent", "$c$", default=True),
    MultiProcessedCol(
        "gal",
        "nf.galois_group",
        "Galois group", ["n", "gal", "cache"],
        lambda n, t, cache: group_pretty_and_nTj(n, t, cache=cache),
        default=True),
    MultiProcessedCol("slopes",
                      "lf.slope_content",
                      "Slope content", ["slopes", "t", "u"],
                      show_slope_content,
                      default=True,
                      mathmode=True)
],
                           db_cols=[
                               "c", "coeffs", "e", "f", "gal", "label", "n",
                               "p", "slopes", "t", "u"
                           ])

Esempio n. 7
0
        del query['$or']
    elif level_field in query:
        if not contains_level(query[level_field]):
            raise ValueError(
                "The modulus is not consistent with the specified level.")
    query[level_field] = level
    query[conrey_index_field] = conrey_index


maass_columns = SearchColumns([
    MathCol("level", "mf.maass.mwf.level", "Level", default=True),
    MathCol("weight", "mf.maass.mwf.weight", "Weight", default=True),
    MultiProcessedCol("character",
                      "mf.maass.mwf.character",
                      "Char", ["level", "conrey_index"],
                      character_link,
                      short_title="character",
                      default=True,
                      align="center"),
    MultiProcessedCol("spectral",
                      "mf.maass.mwf.spectralparameter",
                      "Spectral parameter", ["maass_id", "spectral_parameter"],
                      lambda mid, param: '<a href="%s">%s</a>' %
                      (url_for('.by_label', label=mid), param),
                      default=True),
    ProcessedCol("symmetry",
                 "mf.maass.mwf.symmetry",
                 "Symmetry",
                 symmetry_pretty,
                 default=True,
                 align="center"),
Esempio n. 8
0
def make_order_key(order):
    order1 = int(ZZ(order).log(10))
    return '%03d%s' % (order1, str(order))


gg_columns = SearchColumns([
    LinkCol("label", "gg.label", "Label", url_for_label, default=True),
    SearchCol("pretty", "gg.simple_name", "Name", default=True),
    MathCol("order", "group.order", "Order", default=True, align="right"),
    MathCol("parity", "gg.parity", "Parity", default=True, align="right"),
    CheckCol("solv", "group.solvable", "Solvable", default=True),
    MultiProcessedCol(
        "subfields",
        "gg.subfields",
        "Subfields", ["subfields", "cache"],
        lambda subs, cache: WebGaloisGroup(None, {
            "subfields": subs
        }).subfields(cache=cache),
        contingent=lambda info: info["show_subs"],
        default=True),
    MultiProcessedCol(
        "siblings",
        "gg.other_representations",
        "Low Degree Siblings", ["siblings", "bound_siblings", "cache"],
        lambda sibs, bnd, cache: WebGaloisGroup(None, {
            "siblings": sibs,
            "bound_siblings": bnd
        }).otherrep_list(givebound=False, cache=cache),
        default=True)
],
                           db_cols=[
Esempio n. 9
0
    else:
        return abort(404, f"Invalid label {label}")
    return datapage(labels, tables, title=f"Belyi map data - {label}", bread=bread, label_cols=label_cols)

def url_for_label(label):
    return url_for(".by_url_belyi_search_url", smthorlabel=label)

belyi_columns = SearchColumns([
    LinkCol("label", "belyi.label", "Label", url_for_belyi_galmap_label, default=True),
    MathCol("deg", "belyi.degree", "Degree", default=True),
    SearchCol("group", "belyi.group", "Group", default=True),
    MathCol("abc", "belyi.abc", "abc", default=True, align="left", short_title="abc triple"),
    MathCol("lambdas", "belyi.ramification_type", "Ramification type", default=True, align="left"),
    MathCol("g", "belyi.genus", "Genus", default=True),
    MathCol("orbit_size", "belyi.orbit_size", "Orbit Size", default=True),
    MultiProcessedCol("field", "belyi.base_field", "Base field", ["base_field_label", "base_field"], lambda label, disp: field_display_gen(label, disp, truncate=16), default=True)])


@search_wrap(
    table=db.belyi_galmaps_fixed,
    title="Belyi map search results",
    err_title="Belyi map search input error",
    columns=belyi_columns,
    shortcuts={"jump": belyi_jump, "download": Belyi_download()},
    url_for_label=url_for_label,
    bread=lambda: get_bread("Search results"),
    learnmore=learnmore_list,
)
def belyi_search(info, query):
    if "group" in query:
        info["group"] = query["group"]
Esempio n. 10
0
    data_description = "defining the elliptic curve y^2 + a1xy + a3y = x^3 + a2x^2 + a4x + a6."
    function_body = {
        "magma": [
            "return [EllipticCurve([a:a in ai]):ai in data];", # convert ai from list to sequence
        ],
        "sage": [
            "return [EllipticCurve(ai) for ai in data]",
        ],
        "gp": ["[ellinit(ai)|ai<-data];"],
    }

ec_columns = SearchColumns([
     LinkCol("lmfdb_label", "ec.q.lmfdb_label", "Label", lambda label: url_for(".by_ec_label", label=label),
             default=True, align="center", short_title="LMFDB curve label"),
     MultiProcessedCol("cremona_label", "ec.q.cremona_label", "Cremona label",
                       ["Clabel", "conductor"],
                       lambda label, conductor: '<a href="%s">%s</a>' % (url_for(".by_ec_label", label=label), label) if conductor < CREMONA_BOUND else " - ",
                       align="center", short_title="Cremona curve label"),
     LinkCol("lmfdb_iso", "ec.q.lmfdb_label", "Class", lambda label: url_for(".by_ec_label", label=label),
             default=True, align="center", short_title="LMFDB class label"),
     MultiProcessedCol("cremona_iso", "ec.q.cremona_label", "Cremona class",
                       ["Ciso", "conductor"],
                       lambda label, conductor: '<a href="%s">%s</a>' % (url_for(".by_ec_label", label=label), label) if conductor < CREMONA_BOUND else " - ",
                       align="center", short_title="Cremona class label"),
     MathCol("class_size", "ec.isogeny_class", "Class size", align="center", default=lambda info: info.get("class_size") or info.get("optimal") == "on"),
     MathCol("class_deg", "ec.isogeny_class_degree", "Class degree", align="center", default=lambda info: info.get("class_deg")),
     ProcessedCol("conductor", "ec.q.conductor", "Conductor", lambda v: web_latex_factored_integer(ZZ(v)), default=True, align="center"),
     MultiProcessedCol("disc", "ec.discriminant", "Discriminant", ["signD", "absD"], lambda s, a: web_latex_factored_integer(s*ZZ(a)),
                       default=lambda info: info.get("discriminant"), align="center"),
     MathCol("rank", "ec.rank", "Rank", default=True),
     ProcessedCol("torsion_structure", "ec.torsion_subgroup", "Torsion",
                  lambda tors: r"\oplus".join([r"\Z/%s\Z"%n for n in tors]) if tors else r"\mathsf{trivial}", default=True, mathmode=True, align="center"),
Esempio n. 11
0
ec_columns = SearchColumns([
    ColGroup(
        "curve_labels",
        None,
        "Curve", [
            LinkCol("lmfdb_label",
                    "ec.q.lmfdb_label",
                    "LMFDB label",
                    lambda label: url_for(".by_ec_label", label=label),
                    default=True,
                    align="center"),
            MultiProcessedCol("cremona_label",
                              "ec.q.cremona_label",
                              "Cremona label", ["Clabel", "conductor"],
                              lambda label, conductor: '<a href="%s">%s</a>' %
                              (url_for(".by_ec_label", label=label), label)
                              if conductor < CREMONA_BOUND else " - ",
                              default=True,
                              align="center")
        ],
        default=True),
    ColGroup(
        "iso_labels",
        "ec.isogeny_class",
        "Isogeny class", [
            LinkCol("lmfdb_iso",
                    "ec.q.lmfdb_label",
                    "LMFDB label",
                    lambda label: url_for(".by_ec_label", label=label),
                    default=True,
                    align="center"),
Esempio n. 12
0
        "magma": [
            "R<x>:=PolynomialRing(Rationals());",
            "return [HyperellipticCurve(R![c:c in r[1]],R![c:c in r[2]]):r in data];",
        ],
        "sage": [
            "R.<x>=PolynomialRing(QQ)",
            "return [HyperellipticCurve(R(r[0]),R(r[1])) for r in data]",
        ],
        "gp": ["[apply(Polrev,c)|c<-data];"],
    }

g2c_columns = SearchColumns([
    LinkCol("label", "g2c.label", "Label", url_for_curve_label, default=True),
    ProcessedLinkCol("class", "g2c.isogeny_class", "Class", lambda v: url_for_isogeny_class_label(class_from_curve_label(v)), class_from_curve_label, default=True, orig="label"),
    ProcessedCol("cond", "g2c.conductor", "Conductor", lambda v: web_latex(factor(v)), align="center", default=True),
    MultiProcessedCol("disc", "ec.discriminant", "Discriminant", ["disc_sign", "abs_disc"], lambda s, a: web_latex_factored_integer(s*ZZ(a)),
                      default=lambda info: info.get("abs_disc"), align="center"),

    MathCol("analytic_rank", "g2c.analytic_rank", "Rank*", default=True),
    MathCol("two_selmer_rank", "g2c.two_selmer_rank", "2-Selmer rank"),
    ProcessedCol("torsion_subgroup", "g2c.torsion", "Torsion",
                 lambda tors: r"\oplus".join([r"\Z/%s\Z"%n for n in literal_eval(tors)]) if tors != "[]" else r"\mathsf{trivial}",
                 default=True, mathmode=True, align="center"),
    ProcessedCol("geom_end_alg", "g2c.geom_end_alg", r"$\textrm{End}^0(J_{\overline\Q})$", lambda v: r"\(%s\)"%geom_end_alg_name(v),
                 short_title="Qbar-end algebra", default=True, align="center"),
    ProcessedCol("end_alg", "g2c.end_alg", r"$\textrm{End}^0(J)$", lambda v: r"\(%s\)"%end_alg_name(v), short_title="Q-end algebra", align="center"),
    CheckCol("is_gl2_type", "g2c.gl2type", r"$\GL_2\textsf{-type}$", short_title="GL2-type"),
    ProcessedCol("st_label", "g2c.st_group", "Sato-Tate", st_display_knowl, short_title='Sato-Tate group', align="center"),
    CheckCol("is_simple_base", "ag.simple", r"$\Q$-simple", short_title="Q-simple"),
    CheckCol("is_simple_geom", "ag.geom_simple", r"\(\overline{\Q}\)-simple", short_title="Qbar-simple"),
    MathCol("aut_grp_tex", "g2c.aut_grp", r"\(\Aut(X)\)", short_title="Q-automorphisms"),
    MathCol("geom_aut_grp_tex", "g2c.geom_aut_grp", r"\(\Aut(X_{\overline{\Q}})\)", short_title="Qbar-automorphisms"),