예제 #1
0
        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,
                 default=True),
    MathCol("level_norm", "mf.level_norm", "Level norm"),
    MathCol("weight", "mf.hilbert.weight_vector", "Weight"),
    MathCol("dimension", "mf.hilbert.dimension", "Dimension", default=True),
    ProcessedCol("is_CM",
                 "mf.cm",
예제 #2
0
파일: main.py 프로젝트: assaferan/lmfdb
     "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",
     "ec.conductor_label",
     "Conductor", ["field_label", "conductor_label"],
     lambda field, conductor: '<a href="%s">%s</a>' %
     (url_for('.show_ecnf_conductor', nf=field, conductor_label=conductor),
      conductor),
     default=True,
     align="center"),
 MultiProcessedCol(
     "iso_class",
     "ec.isogeny_class",
     "Isogeny class",
예제 #3
0
        "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"),
    ProcessedCol("cond",
                 None,
                 "Conductor",
                 factorint,
                 contingent=lambda info: info["search_type"] == "Motive",
                 default=True,
                 mathmode=True,
                 align="center"),
    MathCol("degree", None, "Degree", default=True),
    MathCol("weight", None, "Weight", default=True),
    MathCol("famhodge", None, "Hodge", default=True)
])
예제 #4
0
        info['field_pretty_name'] = field_pretty(res[0]['field_label'])
    else:
        info['field_pretty_name'] = ''
    res.sort(key=lambda x: [x['level_norm'], int(x['level_number']), x['label_suffix']])
    return res

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),
예제 #5
0
파일: main.py 프로젝트: rbommel/lmfdb
        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,
    learnmore=learn,
    random_projection="label",
    bread=lambda: bread("Search results"),
)
예제 #6
0
파일: main.py 프로젝트: assaferan/lmfdb
            'Prec := 100; // Default precision of 100',
            'return [LocalField( pAdicField(r[1], Prec) , PolynomialRing(pAdicField(r[1], Prec))![c : c in r[2]] ) : r in data];'
        ],
        'sage': [
            'Prec = 100 # Default precision of 100',
            "return [pAdicExtension(Qp(r[0], Prec), PolynomialRing(Qp(r[0], Prec),'x')(r[1]), var_name='x') for r in data]"
        ],
        'gp': ['[[c[1], Polrev(c[2])]|c<-data];']
    }


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"],
예제 #7
0
    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"),
    ProcessedCol("fricke_eigenvalue",
                 "cmf.fricke",
                 "Fricke",
                 fricke_pretty,
                 short_title="Fricke",
                 default=True,
                 align="center")
],
                              db_cols=[
                                  "maass_id", "level", "weight",
                                  "conrey_index", "spectral_parameter",
                                  "symmetry", "fricke_eigenvalue"
                              ])
예제 #8
0
파일: main.py 프로젝트: SamSchiavone/lmfdb
def parse_group_order(inp, query, qfield, parse_singleton=int):
    if LIST_RE.match(inp):
        collapse_ors(parse_range2_extend(inp, qfield, parse_singleton), query)
    else:
        raise ValueError("It needs to be an integer (such as 25), \
                    a range of integers (such as 2-10 or 2..10), \
                    a linear function of variable g for genus (such as 84(g-1), 84g-84, 84g, or g-1), \
                    or a comma-separated list of these (such as 4,9,16 or 4-25, 81-121).")

hgcwa_columns = SearchColumns([
    LinkCol("passport_label", "dq.curve.highergenus.aut.label", "Refined passport label",
            lambda label: f"/HigherGenus/C/Aut/{label}",
            default=True),
    MathCol("genus", "ag.curve.genus", "Genus", default=True),
    MathCol("g0", "curve.highergenus.aut.quotientgenus", "Quotient genus"),
    ProcessedCol("group", "group.small_group_label", "Group", group_display, mathmode=True, align="center", default=True),
    MathCol("group_order", "group.order", "Group order", default=True),
    MathCol("dim", "curve.highergenus.aut.dimension", "Dimension", default=True),
    ProcessedCol("signature", "curve.highergenus.aut.signature", "Signature", lambda sig: sign_display(ast.literal_eval(sig)), default=True, mathmode=True)])
hgcwa_columns.languages = ['gap', 'magma']

@search_wrap(
    table=db.hgcwa_passports,
    title='Family of higher genus curves with automorphisms search results',
    err_title='Family of higher genus curves with automorphisms search input error',
    columns=hgcwa_columns,
    per_page=50,
    url_for_label=url_for_label,
    random_projection="passport_label",
    shortcuts={'jump': higher_genus_w_automorphisms_jump,
               'download': hgcwa_code_download_search },
예제 #9
0
파일: main.py 프로젝트: rbommel/lmfdb
            raise ValueError("A CM discriminant must be a fundamental discriminant of an imaginary quadratic field.")
    cm_list += [-el for el in cm_list]
    return cm_list

@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", "ec.conductor_label", "Conductor",
                      ["field_label", "conductor_label"],
                      lambda field, conductor: '<a href="%s">%s</a>' %(
                          url_for('.show_ecnf_conductor', nf=field, conductor_label=conductor),
                          conductor),
                      default=True, align="center"),
    MultiProcessedCol("iso_class", "ec.isogeny_class", "Isogeny class",
                      ["field_label", "conductor_label", "iso_label", "short_class_label"],
                      lambda field, conductor, iso, short_class_label: '<a href="%s">%s</a>' % (
                          url_for('.show_ecnf_isoclass', nf=field, conductor_label=conductor, class_label=iso),
                          short_class_label),
                      default=True, align="center"),
    MultiProcessedCol("ainvs", "ec.weierstrass_coeffs", "Weierstrass coefficients",
                      ["field_label", "conductor_label", "iso_label", "number", "ainvs"],
                      lambda field, conductor, iso, number, ainvs: '<a href="%s">%s</a>' % (
예제 #10
0
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"),
     ProcessedCol("geom_end_alg", "ag.endomorphism_algebra", r"$\textrm{End}^0(E_{\overline\Q})$",
                  lambda v: r"$\Q$" if not v else r"$\Q(\sqrt{%d})$"%(integer_squarefree_part(v)),
                  short_title="Qbar-end algebra", align="center", orig="cm"),
     ProcessedCol("cm_discriminant", "ec.complex_multiplication", "CM", lambda v: "" if v == 0 else v,
                  short_title="CM discriminant", mathmode=True, align="center", default=True, orig="cm"),
     ProcessedCol("sato_tate_group", "st_group.definition", "Sato-Tate", lambda v: st_display_knowl('1.2.A.1.1a' if v==0 else '1.2.B.2.1a'),
                  short_title="Sato-Tate group", align="center", orig="cm"),
     CheckCol("semistable", "ec.reduction", "Semistable"),
     CheckCol("potential_good_reduction", "ec.reduction", "Potentially good"),
     ProcessedCol("nonmax_primes", "ec.maximal_elladic_galois_rep", r"Nonmax $\ell$", lambda primes: ", ".join([str(p) for p in primes]),
예제 #11
0
    query["__sort__"] = d[info.get("sort_order")]


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("eqn",
                 "g2c.minimal_equation",
                 "Equation",
                 lambda v: min_eqn_pretty(literal_eval(v)),
                 default=True,
                 mathmode=True),
    ProcessedCol("st_group",
                 "g2c.st_group",
                 "Sato-Tate",
                 lambda v: st_link_by_name(1, 4, v),
                 default=True,
                 align="center"),
    CheckCol("is_simple_geom",
             "ag.geom_simple",
             r"\(\overline{\Q}\)-simple",
             default=True),
    CheckCol("is_gl2_type", "g2c.gl2type", r"\(\GL_2\)", default=True),
    MathCol("analytic_rank", "g2c.analytic_rank", "Rank*", default=True)
])
예제 #12
0
         "ec.weierstrass_coeffs",
         "Weierstrass coefficients",
         default=True,
         align="left"),
 MultiProcessedCol("disc",
                   "ec.discriminant",
                   "Discriminant", ["signD", "absD"],
                   lambda s, a: f"+{a}" if s == 1 else "-{a}",
                   contingent=lambda info: info.get("discriminant"),
                   default=True,
                   mathmode=True,
                   align="center"),
 ProcessedCol("faltings_height",
              "ec.q.faltings_height",
              "Faltings height",
              RealField(20),
              contingent=lambda info: info.get("faltings_height"),
              default=True,
              align="center"),
 MathCol("rank", "ec.rank", "Rank", default=True),
 ProcessedCol("torsion_structure",
              "ec.torsion_subgroup",
              "Torsion",
              lambda tors: f"${tors}$" if tors else "trivial",
              default=True,
              align="center"),
 SearchCol("cm",
           "ec.complex_multiplication",
           "CM disc",
           contingent=lambda info: info.get("cm") == "CM" or "," in info.
           get("cm", ""),
예제 #13
0
        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),
    ProcessedCol("level_ideal",
                 "mf.hilbert.level_norm",
                 "Level",
                 teXify_pol,
                 mathmode=True,
                 default=True),
    MathCol("dimension", "mf.hilbert.dimension", "Dimension", default=True)
])
hmf_columns.dummy_download = True


@search_wrap(table=db.hmf_forms,
             title='Hilbert modular form search results',
예제 #14
0
파일: main.py 프로젝트: SamSchiavone/lmfdb
    function_body = {
        "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"),
예제 #15
0
        return redirect(url_for(".number_field_render_webpage"))

# This doesn't seem to be used currently
#def number_field_algebra(info):
#    fields = info['algebra'].split('_')
#    fields2 = [WebNumberField.from_coeffs(a) for a in fields]
#    for j in range(len(fields)):
#        if fields2[j] is None:
#            fields2[j] = WebNumberField.fakenf(fields[j])
#    t = 'Number field algebra'
#    info = {'results': fields2}
#    return render_template("number_field_algebra.html", info=info, title=t, bread=bread)

nf_columns = SearchColumns([
    ProcessedCol("label", "nf.label", "Label",
                 lambda label: '<a href="%s">%s</a>' % (url_for_label(label), nf_label_pretty(label)),
                 default=True),
    SearchCol("poly", "nf.defining_polynomial", "Polynomial", default=True),
    MathCol("disc", "nf.discriminant", "Discriminant", default=True, align="left"),
    SearchCol("galois", "nf.galois_group", "Galois group", default=True),
    SearchCol("class_group_desc", "nf.ideal_class_group", "Class group", default=True)],
    db_cols=["class_group", "coeffs", "degree", "disc_abs", "disc_sign", "galois_label", "label", "ramps", "used_grh"])

def nf_postprocess(res, info, query):
    galois_labels = [rec["galois_label"] for rec in res if rec.get("galois_label")]
    cache = knowl_cache(list(set(galois_labels)))
    for rec in res:
        wnf = WebNumberField.from_data(rec)
        rec["poly"] = wnf.web_poly()
        rec["disc"] = wnf.disc_factored_latex()
        rec["galois"] = wnf.galois_string(cache=cache)
예제 #16
0
파일: main.py 프로젝트: rbommel/lmfdb
    query["__sort__"] = d[info.get("sort_order")]


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("eqn",
                 "g2c.minimal_equation",
                 "Equation",
                 lambda v: min_eqn_pretty(literal_eval(v)),
                 default=True,
                 mathmode=True),
    ProcessedCol("st_group",
                 "g2c.st_group",
                 "Sato-Tate",
                 lambda v: st_link_by_name(1, 4, v),
                 default=True,
                 align="center"),
    ProcessedCol("end_alg",
                 "g2c.end_alg",
                 r"\(\Q\)-end algebra",
                 lambda v: r"\(%s\)" % end_alg_name(v),
                 short_title="Q-end algebra",
                 align="center"),
    ProcessedCol("geom_end_alg",