コード例 #1
0
ファイル: main.py プロジェクト: assaferan/lmfdb
        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(
    table=db.av_fq_isog,
    title="Abelian variety search results",
    err_title="Abelian variety search input error",
    columns=abvar_columns,
    shortcuts={
        "jump": jump,
        "download": download_search,
    },
コード例 #2
0
ファイル: main.py プロジェクト: assaferan/lmfdb
        dih_list = [{qfield: z} for z in dihedrals]
        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",
コード例 #3
0
    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),
    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",
コード例 #4
0
        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,
    bread=lambda: get_bread("Search results"),
コード例 #5
0
ファイル: main.py プロジェクト: SamSchiavone/lmfdb
        dih_list = [{qfield: z} for z in dihedrals]
        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,
コード例 #6
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,
    shortcuts={
        "jump": jump,
        "download": download_search,
    },
    postprocess=lambda res, info, query: [AbvarFq_isoclass(x) for x in res],
    url_for_label=url_for_label,
    learnmore=learnmore_list,
    bread=lambda: get_bread(("Search results", " ")),
コード例 #7
0
ファイル: elliptic_curve.py プロジェクト: assaferan/lmfdb
              "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", ""),
           default=True,
           align="center"),
 ProcessedCol("nonmax_primes",
              "ec.maximal_elladic_galois_rep",
              "Nonmax primes",
              lambda primes: ",".join(str(p) for p in primes),
              contingent=lambda info: info.get("nonmax_primes"),
              default=True,
              mathmode=True,
              align="center"),
 ProcessedCol("elladic_images",
              "ec.galois_rep_elladic_image",
              "Galois images",
              ",".join,
コード例 #8
0
# 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)
        rec["class_group_desc"] = wnf.class_group_invariants()
    return res