Ejemplo n.º 1
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    conductor_label = unquote(conductor_label)
    conductor_label = convert_IQF_label(nf,conductor_label)
    try:
        nf_label, nf_pretty = get_nf_info(nf)
    except ValueError:
        return search_input_error()
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    bread = [("Elliptic Curves", url_for(".index"))]
    if not isinstance(cl, ECNF_isoclass):
        info = {'query':{}, 'err':'No elliptic curve isogeny class in the database has label %s.' % label}
        return search_input_error(info, bread)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (full_class_label, cl.field_name)
    bread.append((nf_pretty, url_for(".show_ecnf1", nf=nf)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append((class_label, url_for(".show_ecnf_isoclass", nf=nf_label, conductor_label=quote(conductor_label), class_label=class_label)))
    return render_template("ecnf-isoclass.html",
                           credit=ecnf_credit,
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties2=cl.properties,
                           friends=cl.friends,
                           learnmore=learnmore_list())
Ejemplo n.º 2
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    nf_label = parse_field_string(nf)
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (
        full_class_label, cl.ECNF.field.field_pretty())
    bread = [("Elliptic Curves", url_for(".index"))]
    bread.append(
        (cl.ECNF.field.field_pretty(), url_for(".show_ecnf1", nf=nf_label)))
    bread.append((conductor_label,
                  url_for(".show_ecnf_conductor",
                          nf=nf_label,
                          conductor_label=conductor_label)))
    bread.append((class_label,
                  url_for(".show_ecnf_isoclass",
                          nf=nf_label,
                          conductor_label=conductor_label,
                          class_label=class_label)))
    info = {}
    return render_template("show-ecnf-isoclass.html",
                           credit=ecnf_credit,
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties2=cl.properties,
                           friends=cl.friends)
Ejemplo n.º 3
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    if not FIELD_RE.fullmatch(nf):
        return abort(404)
    conductor_label = unquote(conductor_label)
    conductor_label = convert_IQF_label(nf,conductor_label)
    try:
        nf_label, nf_pretty = get_nf_info(nf)
    except ValueError:
        flash_error("%s is not a valid number field label", nf_label)
        return redirect(url_for(".index"))
    label = "-".join([nf_label, conductor_label, class_label])
    if not CLASS_LABEL_RE.fullmatch(label):
        flash_error("%s is not a valid elliptic curve isogeny class label", label)
        return redirect(url_for(".index"))
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    if not isinstance(cl, ECNF_isoclass):
        flash_error("There is no elliptic curve isogeny class with label %s in the database", label)
        return redirect(url_for(".index"))
    bread = [("Elliptic curves", url_for(".index"))]
    title = "Elliptic curve isogeny class %s over number field %s" % (full_class_label, cl.field_name)
    bread.append((nf_pretty, url_for(".show_ecnf1", nf=nf)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append((class_label, url_for(".show_ecnf_isoclass", nf=nf_label, conductor_label=quote(conductor_label), class_label=class_label)))
    return render_template("ecnf-isoclass.html",
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties=cl.properties,
                           friends=cl.friends,
                           learnmore=learnmore_list())
Ejemplo n.º 4
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    conductor_label = unquote(conductor_label)
    conductor_label = convert_IQF_label(nf,conductor_label)
    try:
        nf_label, nf_pretty = get_nf_info(nf)
    except ValueError:
        return search_input_error()
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    bread = [("Elliptic curves", url_for(".index"))]
    if not isinstance(cl, ECNF_isoclass):
        info = {'query':{}, 'err':'No elliptic curve isogeny class in the database has label %s.' % label}
        return search_input_error(info, bread)
    title = "Elliptic curve isogeny class %s over number field %s" % (full_class_label, cl.field_name)
    bread.append((nf_pretty, url_for(".show_ecnf1", nf=nf)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append((class_label, url_for(".show_ecnf_isoclass", nf=nf_label, conductor_label=quote(conductor_label), class_label=class_label)))
    return render_template("ecnf-isoclass.html",
                           credit=ecnf_credit,
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties=cl.properties,
                           friends=cl.friends,
                           learnmore=learnmore_list())
Ejemplo n.º 5
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    try:
        nf_label = nf_string_to_label(nf)
    except ValueError:
        return search_input_error()
    conductor_label = unquote(conductor_label)
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (full_class_label, cl.field)
    bread = [("Elliptic Curves", url_for(".index"))]
    bread.append((cl.field, url_for(".show_ecnf1", nf=nf_label)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append(
        (
            class_label,
            url_for(
                ".show_ecnf_isoclass", nf=nf_label, conductor_label=quote(conductor_label), class_label=class_label
            ),
        )
    )
    info = {}
    return render_template(
        "show-ecnf-isoclass.html",
        credit=ecnf_credit,
        title=title,
        bread=bread,
        cl=cl,
        properties2=cl.properties,
        friends=cl.friends,
        learnmore=learnmore_list(),
    )
Ejemplo n.º 6
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    try:
        nf_label = nf_string_to_label(nf)
    except ValueError:
        return search_input_error()
    conductor_label = unquote(conductor_label)
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (
        full_class_label, cl.field)
    bread = [("Elliptic Curves", url_for(".index"))]
    bread.append((cl.field, url_for(".show_ecnf1", nf=nf_label)))
    bread.append((conductor_label,
                  url_for(".show_ecnf_conductor",
                          nf=nf_label,
                          conductor_label=conductor_label)))
    bread.append((class_label,
                  url_for(".show_ecnf_isoclass",
                          nf=nf_label,
                          conductor_label=quote(conductor_label),
                          class_label=class_label)))
    info = {}
    return render_template("show-ecnf-isoclass.html",
                           credit=ecnf_credit,
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties2=cl.properties,
                           friends=cl.friends,
                           learnmore=learnmore_list())
Ejemplo n.º 7
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    conductor_label = unquote(conductor_label)
    if re.match(OLD_COND_RE, conductor_label):
        conductor_label = '.'.join(conductor_label[1:-1].split(','))
        return redirect(url_for('.show_ecnf_isoclass',nf=nf,conductor_label=conductor_label,class_label=class_label),301)
    try:
        nf_label = nf_string_to_label(nf)
    except ValueError:
        return search_input_error()
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    bread = [("Elliptic Curves", url_for(".index"))]
    if not isinstance(cl, ECNF_isoclass):
        info = {'query':{}, 'err':'No elliptic curve isogeny class in the database has label %s.' % label}
        return search_input_error(info, bread)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (full_class_label, cl.field)
    bread.append((cl.field, url_for(".show_ecnf1", nf=nf_label)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append((class_label, url_for(".show_ecnf_isoclass", nf=nf_label, conductor_label=quote(conductor_label), class_label=class_label)))
    return render_template("ecnf-isoclass.html",
                           credit=ecnf_credit,
                           title=title,
                           bread=bread,
                           cl=cl,
                           properties2=cl.properties,
                           friends=cl.friends,
                           learnmore=learnmore_list())
Ejemplo n.º 8
0
def show_ecnf_isoclass(nf, conductor_label, class_label):
    nf_label = parse_field_string(nf)
    label = "-".join([nf_label, conductor_label, class_label])
    full_class_label = "-".join([conductor_label, class_label])
    cl = ECNF_isoclass.by_label(label)
    title = "Elliptic Curve isogeny class %s over Number Field %s" % (full_class_label, cl.ECNF.field.field_pretty())
    bread = [("Elliptic Curves", url_for(".index"))]
    bread.append((cl.ECNF.field.field_pretty(), url_for(".show_ecnf1", nf=nf_label)))
    bread.append((conductor_label, url_for(".show_ecnf_conductor", nf=nf_label, conductor_label=conductor_label)))
    bread.append(
        (
            class_label,
            url_for(".show_ecnf_isoclass", nf=nf_label, conductor_label=conductor_label, class_label=class_label),
        )
    )
    info = {}
    return render_template(
        "show-ecnf-isoclass.html",
        credit=ecnf_credit,
        title=title,
        bread=bread,
        cl=cl,
        properties2=cl.properties,
        friends=cl.friends,
    )