Exemplo n.º 1
0
                           title="Galois groups",
                           bread=bread,
                           info=info,
                           learnmore=learnmore_list())


# For the search order-parsing
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"],
Exemplo n.º 2
0
        '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"],
                      show_slope_content,
                      default=True,
                      mathmode=True)
Exemplo n.º 3
0
        ],
        "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"),
    MathCol("num_rat_pts", "g2c.all_rational_points", r"$\Q$-points", short_title="Q-points*"),
    MathCol("num_rat_wpts", "g2c.num_rat_wpts",  r"$\Q$-Weierstrass points", short_title="Q-Weierstrass points"),
Exemplo n.º 4
0
                          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>' % (
                          url_for('.show_ecnf', nf=field, conductor_label=conductor, class_label=iso, number=number),
                          web_ainvs(field, ainvs)),
                      short_title="Weier. coeffs", default=True),
    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")])
ecnf_columns.above_results = """<p>&nbsp;&nbsp;*The rank, regulator and analytic order of &#1064; are
not known for all curves in the database; curves for which these are
unknown will not appear in searches specifying one of these
quantities.</p>"""

@search_wrap(table=db.ec_nfcurves,
             title='Elliptic curve search results',
             err_title='Elliptic curve search input error',
             columns=ecnf_columns,
             shortcuts={'jump':elliptic_curve_jump,
                        'download':download_search},
             url_for_label=url_for_label,
Exemplo n.º 5
0
                           credit=credit_string)


def url_for_label(label):
    if label == "random":
        return url_for(".random_abstract_group")
    return url_for(".by_label", label=label)


def get_url(label):
    return url_for(".by_label", label=label)


glnQ_columns = SearchColumns([
    LinkCol("label", "group.label", "Label", get_url, default=True),
    MathCol("tex_name", "group.name", "Name", default=True),
    MathCol("order", "group.order", "Order", default=True),
    MathCol("dim", "group.dimension", "Dimension", default=True)
],
                             db_cols=["label", "group", "order", "dim"])
glnQ_columns.dummy_download = True


def glnQ_postprocess(res, info, query):
    tex_names = {
        rec["label"]: rec["tex_name"]
        for rec in db.gps_groups.search(
            {"label": {
                "$in": [gp["group"] for gp in res]
            }}, ["label", "tex_name"])
    }
Exemplo n.º 6
0
            return redirect(url_for(".abelian_varieties"))

        def extended_code(c):
            if c < 0:
                return 'a' + cremona_letter_code(-c)
            return cremona_letter_code(c)

        jump_box = "%s.%s.%s" % (g, q, "_".join(
            extended_code(cdict.get(i, 0)) for i in range(1, g + 1)))
    return by_label(jump_box)


abvar_columns = SearchColumns([
    LinkCol("label", "ab.fq.lmfdb_label", "Label", url_for_label,
            default=True),
    MathCol("g", "ag.dimension", "Dimension", default=True),
    MathCol("field", "ag.base_field", "Base field", default=True),
    MathCol("formatted_polynomial",
            "av.fq.l-polynomial",
            "L-polynomial",
            default=True),
    MathCol("p_rank", "av.fq.p_rank", "$p$-rank", default=True),
    SearchCol("decomposition_display_search", "av.decomposition",
              "Isogeny factors")
], [
    "label", "g", "q", "poly", "p_rank", "is_simple", "simple_distinct",
    "simple_multiplicities", "is_primitive", "primitive_models"
])


@search_wrap(
Exemplo n.º 7
0
        query[qfield] = {'$or': dih_list}
        #query[qfield] = {'$in': dihedrals}
        if current and current not in dihedrals:
            raise ValueError(
                'Projective image and projective image type are inconsistent')
        elif current:
            query[qfield] = current


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


artin_columns = SearchColumns([
    SearchCol("galois_links", "artin.label", "Label", default=True),
    MathCol("dimension", "artin.dimension", "Dimension", default=True),
    MathCol("factored_conductor_latex",
            "artin.conductor",
            "Conductor",
            default=True),
    MathCol("num_ramps", "artin.ramified_primes", "Ramified prime count"),
    SearchCol("field_knowl",
              "artin.stem_field",
              "Artin stem field",
              default=True,
              short_title="Artin stem field"),
    SearchCol("pretty_galois_knowl",
              "artin.gg_quotient",
              "$G$",
              default=True,
              align="center",
Exemplo n.º 8
0
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,
    learnmore=learn,
Exemplo n.º 9
0
                 "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)
])


@search_wrap(
    table=db.g2c_curves,
    title="Genus 2 curve search results",
    err_title="Genus 2 curves search input error",
    shortcuts={
        "jump": genus2_jump,
        "download": G2C_download()
    },
    columns=g2c_columns,
    bread=lambda: get_bread("Search results"),
    learnmore=learnmore_list,
    url_for_label=lambda label: url_for(".by_label", label=label),
Exemplo n.º 10
0
            for i in range(1, g):
                if cdict.get(2*g-i, 0) != q**(g-i) * cdict.get(i, 0):
                    raise ValueError
        except ValueError:
            flash_error ("%s is not valid input.  Expected a label or Weil polynomial.", jump_box)
            return redirect(url_for(".abelian_varieties"))
        def extended_code(c):
            if c < 0:
                return 'a' + cremona_letter_code(-c)
            return cremona_letter_code(c)
        jump_box = "%s.%s.%s" % (g, q, "_".join(extended_code(cdict.get(i, 0)) for i in range(1, g+1)))
    return by_label(jump_box)

abvar_columns = SearchColumns([
    LinkCol("label", "ab.fq.lmfdb_label", "Label", url_for_label, default=True),
    MathCol("g", "ag.dimension", "Dimension", default=True),
    MathCol("field", "ag.base_field", "Base field", default=True),
    MathCol("p", "ag.base_field", "Base char.", short_title="base characteristic"),
    MathCol("formatted_polynomial", "av.fq.l-polynomial", "L-polynomial", short_title="L-polynomial", default=True),
    MathCol("p_rank", "av.fq.p_rank", "$p$-rank", default=True),
    MathCol("p_rank_deficit", "av.fq.p_rank", "$p$-rank deficit"),
    MathCol("curve_count", "av.fq.curve_point_counts", "points on curve"),
    MathCol("abvar_count", "ag.fq.point_counts", "points on variety"),
    SearchCol("decomposition_display_search", "av.decomposition", "Isogeny factors", default=True)],
    db_cols=["label", "g", "q", "poly", "p_rank", "p_rank_deficit", "is_simple", "simple_distinct", "simple_multiplicities", "is_primitive", "primitive_models", "curve_count", "abvar_count"])

@search_wrap(
    table=db.av_fq_isog,
    title="Abelian variety search results",
    err_title="Abelian variety search input error",
    columns=abvar_columns,
Exemplo n.º 11
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"),
Exemplo n.º 12
0
                 lambda label: url_for(".by_ec_label", label=label),
                 default=True,
                 align="center"),
         MultiProcessedCol("cremona_iso",
                           "ec.q.cremona_label",
                           "Cremona label", ["Ciso", "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),
 MathCol("ainvs",
         "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"),
Exemplo n.º 13
0
        "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',
             err_title='Hilbert modular form search error',
             columns=hmf_columns,
             per_page=50,
             shortcuts={'jump': hilbert_modular_form_jump},
             bread=lambda: get_bread("Search results"),
             learnmore=learnmore_list,
             url_for_label=url_for_label,
             properties=lambda: [])
def hilbert_modular_form_search(info, query):
Exemplo n.º 14
0
    # given by the character, and update level/$or
    if '$or' in query and all(level_field in D for D in query['$or']):
        if not any(contains_level(D) for D in query['$or']):
            raise ValueError(
                "The modulus is not consistent with the specified level.")
        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",
Exemplo n.º 15
0
    bread = get_bread()
    info = to_dict(request.args, search_array=GalSearchArray(), stats=GaloisStats())
    if request.args:
        return galois_group_search(info)
    info['degree_list'] = list(range(1, 48))
    return render_template("gg-index.html", title="Galois groups", bread=bread, info=info, learnmore=learnmore_list())

# For the search order-parsing
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),
    MathCol("nilpotency", "group.nilpotent", "Nil. class", short_title="nilpotency class"),
    MathCol("num_conj_classes", "gg.conjugacy_classes", "Conj. classes", short_title="conjugacy classes"),
    MultiProcessedCol("subfields", "gg.subfields", "Subfields",
                      ["subfields", "cache"],
                      lambda subs, cache: WebGaloisGroup(None, {"subfields": subs}).subfields(cache=cache),
                      default=lambda info: info["show_subs"]),
    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=["bound_siblings", "gapid", "label", "name", "order", "parity", "pretty", "siblings", "solv", "subfields", "nilpotency", "num_conj_classes"])
gg_columns.dummy_download = True
Exemplo n.º 16
0
    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"),
    ProcessedCol("bc", "mf.bianchi.base_change", "Base change", bc_info, default=True, align="center"),
    ProcessedCol("CM", "mf.bianchi.cm", "CM", cm_info, default=True, align="center")])

bmf_columns.dummy_download = True

@search_wrap(table=db.bmf_forms,
             title='Bianchi modular form search results',
             err_title='Bianchi modular forms search input error',
             columns=bmf_columns,
             shortcuts={'jump': bianchi_modular_form_jump},
             bread=lambda:get_bread("Search results"),
             url_for_label=url_for_label,
Exemplo n.º 17
0
        label_cols = ["plabel", "plabel"]
        tables = ["belyi_passports_fixed", "belyi_galmaps_fixed"]
    elif label.count("-") == 2: # galmap label length
        labels = [label, "-".join(label.split("-")[:-1]), label]
        label_cols = ["label", "plabel", "label"]
        tables = ["belyi_galmaps_fixed", "belyi_passports_fixed", "belyi_galmap_portraits"]
    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,
Exemplo n.º 18
0
            if isom(A, gram):
                query['gram'] = gram
                proj = lattice_search_projection
                count = parse_count(info)
                start = parse_start(info)
                res = db.lat_lattices.search(query, proj, limit=count, offset=start, info=info)
                break

    return res

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

lattice_columns = SearchColumns([
    LinkCol("label", "lattice.label", "Label", url_for_label, default=True),
    MathCol("dim", "lattice.dimension", "Dimension", default=True),
    MathCol("det", "lattice.determinant", "Determinant", default=True),
    MathCol("level", "lattice.level", "Level", default=True),
    MathCol("class_number", "lattice.class_number", "Class number", default=True),
    MathCol("minimum", "lattice.minimal_vector", "Minimal vector", default=True),
    MathCol("aut", "lattice.group_order", "Aut. group order", default=True)])

@search_wrap(table=db.lat_lattices,
             title='Integral lattices search results',
             err_title='Integral lattices search error',
             columns=lattice_columns,
             shortcuts={'download':download_search,
                        'label':lambda info:lattice_by_label_or_name(info.get('label'))},
             postprocess=lattice_search_isometric,
             url_for_label=url_for_label,
             bread=lambda: get_bread("Search results"),
Exemplo n.º 19
0
        query[qfield] = {'$or': dih_list}
        #query[qfield] = {'$in': dihedrals}
        if current and current not in dihedrals:
            raise ValueError(
                'Projective image and projective image type are inconsistent')
        elif current:
            query[qfield] = current


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


artin_columns = SearchColumns([
    SearchCol("galois_links", "artin.label", "Label", default=True),
    MathCol("dimension", "artin.dimension", "Dimension", default=True),
    MathCol("factored_conductor_latex",
            "artin.conductor",
            "Conductor",
            default=True),
    SearchCol(
        "field_knowl", "artin.stem_field", "Artin stem field", default=True),
    SearchCol("pretty_galois_knowl",
              "artin.gg_quotient",
              "$G$",
              default=True,
              align="center"),
    MathCol(
        "indicator", "artin.frobenius_schur_indicator", "Ind", default=True),
    MathCol("trace_complex_conjugation",
            "artin.trace_of_complex_conj",
Exemplo n.º 20
0
        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"),
    ProcessedCol("cond",
                 None,
                 "Conductor",
                 factorint,
                 contingent=lambda info: info["search_type"] == "Motive",
                 default=True,
Exemplo n.º 21
0
@search_parser(clean_info=True, prep_ranges=True)
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",
Exemplo n.º 22
0

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",
                 "CM",
                 lambda cm: "&#x2713;" if cm == "yes" else "",
                 align="center"),
Exemplo n.º 23
0
#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)
        rec["class_group_desc"] = wnf.class_group_invariants()
    return res