Пример #1
0
 def __init__(self):
     category = SelectBox(name="category",
                          label="Category",
                          options=[("", "")] + categories)
     keywords = TextBox(name="keywords", label="Keywords")
     speaker = TextBox(name="speaker", label="Speaker")
     affiliation = TextBox(name="affiliation", label="Affiliation")
     institution = TextBox(name="institution", label="Institution")
     title = TextBox(name="title", label="Title")
     online = SelectBox(name="online",
                        label="Online",
                        options=[("", "only"), ("all", "and offline"),
                                 ("exclude", "exclude")])
     when = SelectBox(name="when",
                      label="Occuring in",
                      options=[("", ""), ("future", "the future"),
                               ("past", "the past")])
     date = TextBox(  # should have date widget?
         name="date", label="Date")
     video = YesNoBox(name="video", label="Has video")
     avail = SelectBox(name="access",
                       label="Access",
                       options=[("", ""), ("open", "open only")])
     count = TextBox(name="count", label="Results to display", example=50)
     self.browse_array = [[category, keywords], [speaker, affiliation],
                          [title, institution], [when, date], [online],
                          [video, avail], [count]]
Пример #2
0
    def __init__(self):
        deg = TextBox(name="deg",
                      label="Degree",
                      knowl="belyi.degree",
                      example="5",
                      example_span="4, 5-6")
        group = TextBox(name="group",
                        label="Group",
                        knowl="belyi.group",
                        example="4T5")
        abc = TextBox(name="abc",
                      label="Orders",
                      knowl="belyi.orders",
                      example="5",
                      example_span="4, 5-6")
        abc_list = TextBox(name="abc_list",
                           label=r"\([a,b,c]\) triple",
                           knowl="belyi.abc",
                           example="[4,4,3]")
        g = TextBox(name="g",
                    label="Genus",
                    knowl="belyi.genus",
                    example="1",
                    example_span="1, 0-2")
        pass_size = TextBox(name="pass_size",
                            label="Passport size",
                            knowl="belyi.pass_size",
                            example="2",
                            example_span="2, 5-6")
        orbit_size = TextBox(name="orbit_size",
                             label="Orbit size",
                             knowl="belyi.orbit_size",
                             example="2",
                             example_span="2, 5-6")
        geomtype = SelectBox(name="geomtype",
                             label="Geometry type",
                             knowl="belyi.geometry_type",
                             options=[("", "")] +
                             list(geometry_types_dict.items()))
        is_primitive = YesNoBox(name="is_primitive",
                                label="Primitive",
                                knowl="belyi.primitive",
                                example="yes")
        field = TextBox(name="field",
                        label="Base field",
                        knowl="belyi.base_field",
                        example="2.2.5.1",
                        example_span="2.2.5.1 or Qsqrt5")
        count = CountBox()

        self.browse_array = [[deg], [group], [abc], [abc_list], [g],
                             [orbit_size], [pass_size], [field], [geomtype],
                             [is_primitive], [count]]

        self.refine_array = [[deg, group, abc, abc_list],
                             [g, orbit_size, pass_size, field],
                             [geomtype, is_primitive]]
Пример #3
0
    def __init__(self):
        field = TextBox(
            name='field_label',
            label='Base field',
            knowl='nf',
            example='2.0.4.1',
            example_span=
            r'either a field label, e.g. 2.0.4.1 for \(\mathbb{Q}(\sqrt{-1})\), or a nickname, e.g. Qsqrt-1',
            example_span_colspan=4)
        level = TextBox(name='level_norm',
                        label='Level norm',
                        knowl='mf.bianchi.level',
                        example='1',
                        example_span='e.g. 1 or 1-100')

        # See Issue #4170
        # dimension = TextBox(
        #     name='dimension',
        #     label='Dimension',
        #     knowl='mf.bianchi.spaces',
        #     example='1',
        #     example_span='e.g. 1 or 2')

        sign = SelectBox(name='sfe',
                         label='Sign',
                         knowl='mf.bianchi.sign',
                         options=[("", ""), ("+1", "+1"), ("-1", "-1")],
                         example_col=True)
        base_change = ExcludeOnlyBox(name='include_base_change',
                                     label='Base change',
                                     knowl='mf.bianchi.base_change',
                                     example="exclude")
        CM = ExcludeOnlyBox(name='include_cm',
                            label='CM',
                            knowl='mf.bianchi.cm')
        field_bad_quant = SubsetBox(name="field_bad_quantifier")
        field_bad_primes = TextBoxWithSelect(name="field_bad_primes",
                                             label="Field bad primes",
                                             knowl="nf.ramified_primes",
                                             example="5,13",
                                             select_box=field_bad_quant)
        level_bad_quant = SubsetBox(name="level_bad_quantifier")
        level_bad_primes = TextBoxWithSelect(name="level_bad_primes",
                                             label="Level bad primes",
                                             knowl="mf.bianchi.level",
                                             example="5,13",
                                             select_box=level_bad_quant)
        count = CountBox()

        self.browse_array = [[field], [level, sign], [base_change, CM],
                             [field_bad_primes, level_bad_primes], [count]]
        self.refine_array = [[field, level, CM],
                             [
                                 sign, base_change, field_bad_primes,
                                 level_bad_primes
                             ]]
Пример #4
0
    def __init__(self):
        weight = TextBox(name="weight",
                         label="Weight",
                         knowl="st_group.weight",
                         example="1",
                         example_span="1 or 0-3")
        degree = TextBox(name="degree",
                         label="Degree",
                         knowl="st_group.degree",
                         example="4",
                         example_span="4 or 1-6")
        include_irrational = SelectBox(name="include_irrational",
                                       label="Include irrational",
                                       knowl="st_group.rational",
                                       options=[("", "no"), ("yes", "yes")])
        identity_component = SelectBox(name="identity_component",
                                       label="Identity component",
                                       short_label=r"$\mathrm{ST}^0$",
                                       knowl="st_group.identity_component",
                                       example_span="U(1) or USp(4)",
                                       options=[("", "")] +
                                       [(r, r) for r in st0_list])
        components = TextBox(name="components",
                             label="Components",
                             knowl="st_group.components",
                             example="1",
                             example_span="1 (connected) or 4-12")
        trace_zero_density = TextBox(name="trace_zero_density",
                                     label="Trace zero density",
                                     knowl="st_group.trace_zero_density",
                                     short_label="$\mathrm{P}[a_1=0]$",
                                     example="1/2",
                                     example_span="0, 1/2, or 3/8")
        count = TextBox(name="count", label="Results to display", example=50)

        self.browse_array = [[weight], [degree], [include_irrational],
                             [identity_component], [components],
                             [trace_zero_density], [count]]

        self.refine_array = [[
            weight, degree, include_irrational, identity_component, components,
            trace_zero_density
        ]]
Пример #5
0
    def __init__(self):
        field = TextBox(
            name='field_label',
            label='Base field',
            knowl='nf',
            example='2.0.4.1',
            example_span=r'either a field label, e.g. 2.0.4.1 for \(\mathbb{Q}(\sqrt{-1})\), or a nickname, e.g. Qsqrt-1',
            example_span_colspan=4)
        level = TextBox(
            name='level_norm',
            label='Level norm',
            knowl='mf.bianchi.level',
            example='1',
            example_span='e.g. 1 or 1-100')
        dimension = TextBox(
            name='dimension',
            label='Dimension',
            knowl='mf.bianchi.spaces',
            example='1',
            example_span='e.g. 1 or 2')

        sign = SelectBox(
            name='sfe',
            label='Sign',
            knowl='mf.bianchi.sign',
            options=[("", ""), ("+1", "+1"), ("-1", "-1")],
            example_col=True
        )
        base_change = ExcludeOnlyBox(
            name='include_base_change',
            label='Base change',
            knowl='mf.bianchi.base_change'
        )
        CM = ExcludeOnlyBox(
            name='include_cm',
            label='CM',
            knowl='mf.bianchi.cm'
        )
        count = CountBox()

        self.browse_array = [
            [field],
            [level, sign],
            [dimension, base_change],
            [count, CM]
        ]
        self.refine_array = [
            [field, level, dimension],
            [sign, base_change, CM]
        ]
Пример #6
0
    def __init__(self):
        deg = TextBox(
            name="deg",
            label="Degree",
            knowl="belyi.degree",
            example="5",
            example_span="4, 5-6")
        group = TextBox(
            name="group",
            label="Group",
            knowl="belyi.group",
            example="4T5")
        abc = TextBox(
            name="abc",
            label="Orders",
            knowl="belyi.orders",
            example="5",
            example_span="4, 5-6")
        abc_list = TextBox(
            name="abc_list",
            label=r"\([a,b,c]\) triple",
            knowl="belyi.abc",
            example="[4,4,3]")
        g = TextBox(
            name="g",
            label="Genus",
            knowl="belyi.genus",
            example="1",
            example_span="1, 0-2")
        orbit_size = TextBox(
            name="orbit_size",
            label="Orbit size",
            knowl="belyi.orbit_size",
            example="2",
            example_span="2, 5-6")
        geomtype = SelectBox(
            name="geomtype",
            label="Geometry type",
            knowl="belyi.geometry_type",
            options=[("", "")] + list(geometry_types_dict.items()))
        count = CountBox()

        self.browse_array = [[deg], [group], [abc], [abc_list], [g], [orbit_size], [geomtype], [count]]

        self.refine_array = [[deg, group, abc, abc_list], [g, orbit_size, geomtype]]
Пример #7
0
    def __init__(self):       
        level = TextBox(name="level", label="Level", knowl="mf.maass.mwf.level", example="1", example_span="997 or 1-10")
        weight = TextBox(name="weight", label="Weight", knowl="mf.maass.mwf.weight", example="0", example_span="0 (only weight 0 currenlty available)")
        character = TextBox(name="character", label="Character", knowl="mf.maass.mwf.character", example="1.1", example_span="1.1 or 5.1 (only trivial character currently available)")
        symmetry = SelectBox(name="symmetry", label="Symmetry",  knowl="mf.maass.mwf.symmetry", options=[("", "any symmetry"), ("1", "even only"), ("-1", "odd only")])
        spectral_parameter = TextBox(name="spectral_parameter",
                                     label="Spectral parameter",
                                     knowl="mf.maass.mwf.spectralparameter",
                                     example="9.5-9.6",
                                     example_span="1.23 or 1.99-2.00 or 40-50")
        count = CountBox()

        self.browse_array = [
            [level],
            [weight],
            [character],
            [spectral_parameter],
            [symmetry],
            [count]]

        self.refine_array = [[level, weight, character, spectral_parameter, symmetry]]
Пример #8
0
    def __init__(self):
        ## subjects
        subject = SelectBox(name="seminar_subject",
                            label="Subject",
                            options=[("", "")] + subject_pairs())
        ## topics
        topic = SelectBox(name="talk_topic",
                          label="Topic",
                          options=[("", "")] + user_topics())

        ## pick institution where it is held
        institution = SelectBox(
            name="talk_institution",
            label="Institution",
            options=[
                ("", ""),
                (
                    "None",
                    "No institution",
                ),
            ] + [(elt["shortname"], elt["name"])
                 for elt in institutions_shortnames()],
        )

        venue = SelectBox(name="talk_venue",
                          label=static_knowl("venue"),
                          options=[("", ""), ("online", "online"),
                                   ("in-person", "in-person")])
        assert venue

        ## keywords for seminar or talk
        keywords = TextBox(
            name="talk_keywords",
            label="Anywhere",
            colspan=(1, 2, 1),
            width=textwidth,
        )
        ## type of access
        access = SelectBox(
            name="talk_access",
            label="Access",
            options=[
                ("", ""),
                ("open", "Any visitor can view link"),
                ("users", "Any logged-in user can view link"),
            ],
        )
        ## number of results to display
        # count = TextBox(name="talk_count", label="Results to display", example=50, example_value=True)

        speaker = TextBox(
            name="speaker",
            label="Speaker",
            colspan=(1, 2, 1),
            width=textwidth,
        )
        affiliation = TextBox(
            name="affiliation",
            label="Affiliation",
            colspan=(1, 2, 1),
            width=160 * 2 - 1 * 20,
        )
        title = TextBox(
            name="title",
            label="Title",
            colspan=(1, 2, 1),
            width=textwidth,
        )
        date = TextBox(
            name="daterange",
            id="daterange",
            label="Date",
            example=datetime.now(current_user.tz).strftime("%B %d, %Y -"),
            example_value=True,
            colspan=(1, 2, 1),
            width=160 * 2 - 1 * 20,
        )
        lang_dict = languages_dict()
        language = SelectBox(
            name="talk_language",
            label="Language",
            options=[("", ""), ("en", "English")] +
            [(code, lang_dict[code])
             for code in sorted(db.talks.distinct("language"))
             if code != "en"],
        )
        video = Toggle(name="video", label="Has video")
        self.array = [[subject, keywords], [topic, title],
                      [institution, speaker], [language, affiliation],
                      [access, date], [video]
                      # [venue],
                      # [count],
                      ]
Пример #9
0

def seminars_parser(info, query):
    parse_category(info, query)
    parse_institution_sem(info, query)
    parse_online(info, query)
    parse_substring(info, query, "keywords", "keywords")
    parse_access(info, query)

    parse_substring(info, query, "name", "name")


# Common boxes
## categories
category = SelectBox(
    name="category", label="Category", options=[("", "")] + categories()
)
## pick institution where it is held


def institutions_shortnames():
    return sorted(db.institutions.search({}, projection="shortname"))


institution = SelectBox(
    name="institution",
    label="Institution",
    options=[("", ""), ("No institution", "None"),]
    + [(elt, elt) for elt in institutions_shortnames()],
)
## online only?
Пример #10
0
    def __init__(self):
        degree = TextBox(name="degree",
                         label="Degree",
                         knowl="hgm.degree",
                         example="4",
                         extra=['class="family"'])
        weight = TextBox(name="weight",
                         label="Weight",
                         knowl="hgm.weight",
                         example="3",
                         extra=['class="family"'])
        famhodge = TextBox(name="famhodge",
                           label="Family Hodge vector",
                           knowl="hgm.familyhodgevector",
                           example="[1,1,1,1]",
                           extra=['class="family"'])
        A = TextBox(name="A",
                    label="$A$",
                    knowl="hgm.defining_parameters",
                    example="[3,2,2]",
                    extra=['class="family"'])
        B = TextBox(name="B",
                    label="$B$",
                    knowl="hgm.defining_parameters",
                    example="[6,4]",
                    extra=['class="family"'])
        p = SelectBox(name="p",
                      label="Prime $p$",
                      example_col=True,
                      options=[("", 2), ("3", 3), ("5", 5), ("7", 7)])
        Ap = TextBox(name="Ap",
                     label="$A_p$",
                     knowl="hgm.defining_parameter_ppart",
                     example="[2,2,1,1]",
                     extra=['class="family"'])
        Bp = TextBox(name="Bp",
                     label="$B_p$",
                     knowl="hgm.defining_parameter_ppart",
                     example="[2,2,1,1]",
                     extra=['class="family"'])
        Apperp = TextBox(name="Apperp",
                         label=r"$A^\perp_p$",
                         knowl="hgm.defining_parameter_primetoppart",
                         example="[2,2,1,1]",
                         extra=['class="family"'])
        Bpperp = TextBox(name="Bpperp",
                         label=r"$B^\perp_p$",
                         knowl="hgm.defining_parameter_primetoppart",
                         example="[2,2,1,1]",
                         extra=['class="family"'])
        spacer = BasicSpacer("")

        conductor = TextBox(
            name="conductor",
            label="Conductor",
            knowl="hgm.conductor",
            example="64",
            example_span=
            "a value, like 32, a list, like 32,64, or a range like 1..10000")
        hodge = TextBox(name="hodge",
                        label="Hodge vector",
                        knowl="mot.hodgevector",
                        example="[1,1,1,1]")
        t = TextBox(
            name="t",
            label="Specialization point $t$",
            knowl="hgm.specpoint",
            example="3/2",
            example_span=
            "3/2 (1 has an associated degree drop and is always in the database)"
        )
        sign = TextBoxNoEg(
            name="sign",
            label=r"Root number $\epsilon$",
            knowl="lfunction.sign",
            example="-1",
            example_span=
            "1 or -1, with -1 occurring only in the symplectic case")
        # The following two boxes are not yet enabled
        #generic = YesNoBox(
        #    name="generic",
        #    label="Generic",
        #    knowl="hgm.generic")
        #irreducible = YesNoBox(
        #    name="irreducible",
        #    label="Irreducible",
        #    knowl="hgm.irreducible")
        count = CountBox()

        self.family_array = [[degree, weight], [famhodge, A, B], [p, Ap, Bp],
                             [spacer, Apperp, Bpperp]]

        self.motive_array = [[conductor], [hodge], [t], [sign], [count]]

        self.refine_family_array = [[degree, weight, famhodge, A, B],
                                    [p, Ap, Bp, Apperp, Bpperp]]

        self.refine_motive_array = [[degree, weight, famhodge, A, B],
                                    [conductor, t, hodge, sign],
                                    [p, Ap, Bp, Apperp, Bpperp]]
Пример #11
0
    def __init__(self):
        cond = TextBox(
            name="conductor",
            label="Conductor",
            knowl="ec.q.conductor",
            example="389",
            example_span="389 or 100-200")
        rank = TextBox(
            name="rank",
            label="Rank",
            knowl="ec.rank",
            example="0")
        torsion = TextBox(
            name="torsion",
            label="Torsion order",
            knowl="ec.torsion_order",
            example="2")
        sha = TextBox(
            name="sha",
            label="Analytic order of Ш",
            knowl="ec.analytic_sha_order",
            example="4")
        surj_primes = TextBox(
            name="surj_primes",
            label="Maximal primes",
            knowl="ec.maximal_galois_rep",
            example="2,3")
        isodeg = TextBox(
            name="isogeny_degrees",
            label="Cyclic isogeny degree",
            knowl="ec.isogeny",
            example="16")
        class_size = TextBox(
            name="class_size",
            label="Isogeny class size",
            knowl="ec.isogeny",
            example="4")
        class_deg = TextBox(
            name="class_deg",
            label="Isogeny class degree",
            knowl="ec.isogeny",
            example="16")
        num_int_pts = TextBox(
            name="num_int_pts",
            label="Number of %s" % display_knowl("ec.q.integral_points", "integral points"),
            example="2",
            example_span="2 or 4-15")

        jinv = TextBox(
            name="jinv",
            label="j-invariant",
            knowl="ec.q.j_invariant",
            example="1728",
            example_span="1728 or -4096/11")
        cm = SelectBox(
            name="include_cm",
            label="CM",
            knowl="ec.complex_multiplication",
            options=[('', ''), ('only', 'potential CM'), ('exclude', 'no potential CM')])
        tor_opts = ([("", ""),
                     ("[]", "trivial")] +
                    [("[%s]"%n, "C%s"%n) for n in range(2, 13) if n != 11] +
                    [("[2,%s]"%n, "C2×C%s"%n) for n in range(2, 10, 2)])
        torsion_struct = SelectBox(
            name="torsion_structure",
            label="Torsion structure",
            knowl="ec.torsion_subgroup",
            options=tor_opts)
        optimal = SelectBox(
            name="optimal",
            label="Curves per isogeny class",
            knowl="ec.isogeny_class",
            example="all, one",
            options=[("", "all"),
                     ("on", "one")])
        surj_quant = SubsetNoExcludeBox(
            name="surj_quantifier")
        nonsurj_primes = TextBoxWithSelect(
            name="nonsurj_primes",
            label="Nonmax $p$",
            knowl="ec.maximal_galois_rep",
            example="2,3",
            select_box=surj_quant)
        bad_quant = SubsetBox(
            name="bad_quantifier")
        bad_primes = TextBoxWithSelect(
            name="bad_primes",
            label="Bad $p$",
            knowl="ec.q.reduction_type",
            example="5,13",
            select_box=bad_quant)
        sha_quant = SubsetBox(
            name="sha_quantifier")
        sha_primes = TextBoxWithSelect(
            name="sha_primes",
            label="$p$ dividing |Ш|",
            short_label="$p$ div |Ш|",
            knowl="ec.analytic_sha_order",
            example="3,5",
            select_box=sha_quant)
        regulator = TextBox(
            name="regulator",
            label="Regulator",
            knowl="ec.q.regulator",
            example="8.4-9.1")
        semistable = YesNoBox(
            name="semistable",
            label="Semistable",
            example="Yes",
            knowl="ec.semistable")
        potentially_good = YesNoBox(
            name="potential_good_reduction",
            label="Potential good reduction",
            example="Yes",
            knowl="ec.potential_good_reduction")
        cm_opts = [('', ''), ('-3', '-3'), ('-4', '-4'), ('-7', '-7'), ('-8', '-8'), ('-11', '-11'), ('-12', '-12'),
                        ('-16', '-16'), ('-19', '-19'), ('-27', '-27'), ('-28', '-28'), ('-43', '-43'), ('-67', '-67'),
                        ('-163', '-163'), ('-3,-12,-27', '-3,-12,-27'), ('-4,-16', '-4,-16'), ('-7,-28', '-7,-28')]
        cm_disc = SelectBox(
            name="cm_disc",
            label="CM discriminant",
            example="-3",
            knowl="ec.complex_multiplication",
            options=cm_opts
            )

        count = CountBox()

        self.browse_array = [
            [cond, jinv],
            [rank, regulator],
            [torsion, torsion_struct],
            [cm_disc, cm],
            [sha, sha_primes],
            [surj_primes, nonsurj_primes],
            [isodeg, bad_primes],
            [class_size, num_int_pts],
            [class_deg, semistable],
            [optimal, potentially_good],
            [count]
            ]

        self.refine_array = [
            [cond, jinv, rank, torsion, torsion_struct],
            [sha, sha_primes, surj_primes, nonsurj_primes, bad_primes],
            [num_int_pts, regulator, cm, cm_disc, semistable],
            [optimal, isodeg, class_size, class_deg, potentially_good]
            ]
Пример #12
0
    def __init__(self):
        qshort = display_knowl("ag.base_field", "Base field")
        q = TextBox(
            "q",
            label="Cardinality of the %s" % (qshort),
            short_label=qshort,
            example="81",
            example_span="81 or 3-49",
        )
        pshort = display_knowl("ag.base_field", "Base char.")
        p = TextBox(
            "p",
            label="Characteristic of the %s" % (qshort),
            short_label=pshort,
            example="3",
            example_span="3 or 2-5",
        )
        g = TextBox("g",
                    label="Dimension",
                    knowl="ag.dimension",
                    example="2",
                    example_span="2 or 3-5")
        p_rank = TextBox("p_rank",
                         label="$p$-rank",
                         knowl="av.fq.p_rank",
                         example="2")
        p_rank_deficit = TextBox(
            "p_rank_deficit",
            label="$p$-rank deficit",
            knowl="av.fq.p_rank",
            example="2",
            advanced=True,
        )
        angle_rank = TextBox(
            "angle_rank",
            label="Angle rank",
            knowl="av.fq.angle_rank",
            example="3",
            example_col=False,
            advanced=True,
        )
        newton_polygon = TextBox(
            "newton_polygon",
            label="Slopes of Newton polygon",
            knowl="lf.newton_polygon",
            example="[0,0,1/2]",
            colspan=(1, 3, 1),
            width=3 * 190 - 30,
            short_width=160,
            short_label="Slopes",
            advanced=True,
        )
        initial_coefficients = TextBox(
            "initial_coefficients",
            label="Initial coefficients",
            knowl="av.fq.initial_coefficients",
            example="[2, -1, 3, 9]",
        )
        abvar_point_count = TextBox(
            "abvar_point_count",
            label="Point counts of the variety",
            knowl="ag.fq.point_counts",
            example="[75,7125]",
            colspan=(1, 3, 1),
            width=3 * 190 - 30,
            short_width=160,
            short_label="Points on variety",
            advanced=True,
        )
        curve_point_count = TextBox(
            "curve_point_count",
            label="Point counts of the curve",
            knowl="av.fq.curve_point_counts",
            example="[9,87]",
            colspan=(1, 3, 1),
            width=3 * 190 - 30,
            short_width=160,
            short_label="Points on curve",
            advanced=True,
        )

        def nbsp(knowl, label):
            return "    " + display_knowl(knowl, label)

        number_field = TextBox(
            "number_field",
            label=nbsp("av.fq.number_field", "Number field"),
            short_label=display_knowl("av.fq.number_field", "Number field"),
            example="4.0.29584.2",
            example_span="4.0.29584.2 or Qzeta8",
            colspan=(1, 3, 1),
            width=3 * 190 - 30,
            short_width=160,
            advanced=True,
        )
        galois_group = TextBox(
            "galois_group",
            label=nbsp("nf.galois_group", "Galois group"),
            short_label=display_knowl("nf.galois_group", "Galois group"),
            example="4T3",
            example_span="C4, or 8T12, a list of " +
            display_knowl("nf.galois_group.name", "group names"),
            colspan=(1, 3, 1),
            width=3 * 190 - 30,
            short_width=160,
            advanced=True,
        )
        #size = TextBox(
        #    "size",
        #    label="Isogeny class size",
        #    knowl="av.fq.isogeny_class_size",
        #    example="1",
        #    example_col=False,
        #    advanced=True,
        #)
        gdshort = display_knowl("av.endomorphism_field", "End.") + " degree"
        gdlong = "Degree of " + display_knowl("av.endomorphism_field",
                                              "endomorphism_field")
        geom_deg = TextBox(
            "geom_deg",
            label=gdlong,
            short_label=gdshort,
            example="168",
            example_span="6-12, 168",
            advanced=True,
        )
        jac_cnt = TextBox(
            "jac_cnt",
            label="Number of Jacobians",
            knowl="av.jacobian_count",
            example="6",
            short_label="# Jacobians",
            advanced=True,
        )
        hyp_cnt = TextBox(
            "hyp_cnt",
            label="Number of hyperelliptic Jacobians",
            knowl="av.hyperelliptic_count",
            example="6",
            example_col=False,
            short_label="# Hyp. Jacobians",
            advanced=True,
        )
        tcshort = display_knowl("av.twist", "# twists")
        tclong = "Number of " + display_knowl("av.twist", "twists")
        twist_count = TextBox(
            "twist_count",
            label=tclong,
            short_label=tcshort,
            example="390",
            advanced=True,
        )
        max_twist_degree = TextBox(
            "max_twist_degree",
            label="Max twist degree",
            knowl="av.twist",
            example="16",
            example_col=False,
            advanced=True,
        )
        simple = YesNoBox(
            "simple",
            label="Simple",
            knowl="av.simple",
        )
        geom_simple = YesNoBox(
            "geom_simple",
            label="Geometrically simple",
            knowl="av.geometrically_simple",
            short_label="Geom. simple",
        )
        geom_squarefree = SelectBox(name="geom_squarefree",
                                    knowl="av.geometrically_squarefree",
                                    label="(Geometrically) Squarefree",
                                    short_label="(Geom.) Sq.free",
                                    options=[('', ''), ('Yes', 'yes'),
                                             ('YesAndGeom', 'yes; and geom.'),
                                             ('YesNotGeom', 'yes; not geom.'),
                                             ('No', 'no'),
                                             ('NotGeom', 'not geom.')],
                                    advanced=True)
        primitive = YesNoBox(
            "primitive",
            label="Primitive",
            knowl="ag.primitive",
        )
        polarizable = YesNoMaybeBox(
            "polarizable",
            label="Principally polarizable",
            knowl="av.princ_polarizable",
            short_label="Princ. polarizable",
        )
        jacobian = YesNoMaybeBox("jacobian",
                                 label="Jacobian",
                                 knowl="ag.jacobian")
        uglabel = "Use %s in the following inputs" % display_knowl(
            "av.decomposition", "Geometric decomposition")
        use_geom_decomp = CheckBox("use_geom_decomp",
                                   label=uglabel,
                                   short_label=uglabel)
        use_geom_index = CheckboxSpacer(use_geom_decomp,
                                        colspan=4,
                                        advanced=True)
        use_geom_refine = CheckboxSpacer(use_geom_decomp,
                                         colspan=5,
                                         advanced=True)

        def long_label(d):
            return nbsp("av.decomposition", "Dimension %s factors" % d)

        def short_label(d):
            return display_knowl("av.decomposition", "Dim %s factors" % d)

        dim1 = TextBox(
            "dim1_factors",
            label=long_label(1),
            example="1-3",
            example_col=False,
            short_label=short_label(1),
            advanced=True,
        )
        dim1d = TextBox(
            "dim1_distinct",
            label="Distinct factors",
            knowl="av.decomposition",
            example="1-2",
            example_span="2 or 1-3",
            short_label="(distinct)",
            advanced=True,
        )
        dim2 = TextBox(
            "dim2_factors",
            label=long_label(2),
            example="1-3",
            example_col=False,
            short_label=short_label(2),
            advanced=True,
        )
        dim2d = TextBox(
            "dim2_distinct",
            label="Distinct factors",
            knowl="av.decomposition",
            example="1-2",
            example_span="2 or 1-3",
            short_label="(distinct)",
            advanced=True,
        )
        dim3 = TextBox(
            "dim3_factors",
            label=long_label(3),
            example="2",
            example_col=False,
            short_label=short_label(3),
            advanced=True,
        )
        dim3d = TextBox(
            "dim3_distinct",
            label="Distinct factors",
            knowl="av.decomposition",
            example="1",
            example_span="2 or 0-1",
            short_label="(distinct)",
            advanced=True,
        )
        dim4 = TextBox(
            "dim4_factors",
            label=long_label(4),
            example="2",
            example_col=False,
            short_label=short_label(4),
            advanced=True,
        )
        dim5 = TextBox(
            "dim5_factors",
            label=long_label(5),
            example="2",
            example_col=False,
            short_label=short_label(5),
            advanced=True,
        )
        dim4d = dim5d = SkipBox(example_span="0 or 1", advanced=True)
        simple_quantifier = SubsetBox("simple_quantifier", )
        simple_factors = TextBoxWithSelect(
            "simple_factors",
            label="Simple factors",
            select_box=simple_quantifier,
            knowl="av.decomposition",
            colspan=(1, 3, 2),
            width=3 * 190 - 30,
            short_width=2 * 190 - 30,
            example="1.2.b,1.2.b,2.2.a_b",
            advanced=True,
        )
        count = CountBox()

        self.refine_array = [
            [q, p, g, p_rank, initial_coefficients],
            [simple, geom_simple, primitive, polarizable, jacobian],
            [
                newton_polygon, abvar_point_count, curve_point_count,
                simple_factors
            ],
            [angle_rank, jac_cnt, hyp_cnt, twist_count, max_twist_degree],
            [geom_deg, p_rank_deficit, geom_squarefree],
            use_geom_refine,
            [dim1, dim2, dim3, dim4, dim5],
            [dim1d, dim2d, dim3d, number_field, galois_group],
        ]
        self.browse_array = [
            [q, primitive],
            [p, simple],
            [g, geom_simple],
            [initial_coefficients, polarizable],
            [p_rank, jacobian],
            [p_rank_deficit, geom_squarefree],
            [jac_cnt, hyp_cnt],
            [geom_deg, angle_rank],
            [twist_count, max_twist_degree],
            [newton_polygon],
            [abvar_point_count],
            [curve_point_count],
            [simple_factors],
            use_geom_index,
            [dim1, dim1d],
            [dim2, dim2d],
            [dim3, dim3d],
            [dim4, dim4d],
            [dim5, dim5d],
            [number_field],
            [galois_group],
            [count],
        ]
Пример #13
0
    def __init__(self):
        field = TextBox(name="field",
                        label="Base field",
                        knowl="ag.base_field",
                        example="2.2.5.1",
                        example_span="2.2.5.1 or Qsqrt5")
        include_base_change = ExcludeOnlyBox(name="include_base_change",
                                             label="Base change curves",
                                             knowl="ec.base_change")
        include_Q_curves = ExcludeOnlyBox(name="include_Q_curves",
                                          label=r"\(\Q\)-curves",
                                          knowl="ec.q_curve")
        conductor_norm = TextBox(name="conductor_norm",
                                 label="Conductor norm",
                                 knowl="ec.conductor",
                                 example="31",
                                 example_span="31 or 1-100")
        one = SelectBox(name="one",
                        label="Curves per isogeny class",
                        knowl="ec.isogeny_class",
                        example="all, one",
                        options=[("", "all"), ("yes", "one")])
        include_cm = SelectBox(name="include_cm",
                               label="CM",
                               knowl="ec.complex_multiplication",
                               options=[('', ''), ('PCM', 'potential CM'),
                                        ('PCMnoCM', 'potential CM but no CM'),
                                        ('CM', 'CM'),
                                        ('noPCM', 'no potential CM')])
        cm_disc = TextBox(name="cm_disc",
                          label="CM discriminant",
                          example="-4",
                          example_span="-4 or -3,-8",
                          knowl="ec.complex_multiplication")
        jinv = TextBox(name="jinv",
                       label="j-invariant",
                       knowl="ec.j_invariant",
                       width=685,
                       short_width=160,
                       colspan=(1, 4, 1),
                       example_span_colspan=2,
                       example="105474/49 + a*34213/49",
                       example_span="")
        rank = TextBox(name="rank",
                       label="Rank*",
                       knowl="ec.rank",
                       example="2")
        torsion = TextBox(name="torsion",
                          label="Torsion order",
                          knowl="ec.torsion_order",
                          example="2")
        bf_deg = SelectBox(name="bf_deg",
                           label="Base field degree",
                           knowl="nf.degree",
                           options=[("", ""), ("2", "2"), ("3", "3"),
                                    ("4", "4"), ("5", "5"), ("6", "6")])

        tor_opts = (
            [("", ""), ("[]", "trivial")] +
            [disp_tor(tuple(t)) for t in ECNF_stats().torsion_counts if t])
        torsion_structure = SelectBox(name="torsion_structure",
                                      label="Torsion structure",
                                      knowl="ec.torsion_subgroup",
                                      options=tor_opts)
        sha = TextBox(name="sha",
                      label="Analytic order* of Ш",
                      knowl="ec.analytic_sha_order",
                      example="4")
        regulator = TextBox(name="regulator",
                            label="Regulator*",
                            knowl="ec.regulator",
                            example="8.4-9.1")
        bad_quant = SubsetBox(name="bad_quantifier")
        bad_primes = TextBoxWithSelect(name="conductor_norm_factors",
                                       label="Bad primes",
                                       knowl="ec.reduction_type",
                                       example="5,13",
                                       select_box=bad_quant)
        isodeg = TextBox(name="isodeg",
                         label="Cyclic isogeny degree",
                         knowl="ec.isogeny",
                         example="16")
        semistable = YesNoBox(name="semistable",
                              label="Semistable",
                              example="Yes",
                              knowl="ec.semistable")
        potential_good_reduction = YesNoBox(
            name="potential_good_reduction",
            label="Potential good reduction",
            example="Yes",
            knowl="ec.potential_good_reduction")
        class_size = TextBox(name="class_size",
                             label="Isogeny class size",
                             knowl="ec.isogeny",
                             example="4")
        class_deg = TextBox(name="class_deg",
                            label="Isogeny class degree",
                            knowl="ec.isogeny",
                            example="16")
        count = CountBox()

        self.browse_array = [[field, bf_deg],
                             [conductor_norm, include_base_change],
                             [rank, include_Q_curves],
                             [torsion, torsion_structure],
                             [cm_disc, include_cm], [sha, regulator],
                             [isodeg, one], [class_size, class_deg],
                             [semistable, potential_good_reduction], [jinv],
                             [count, bad_primes]]

        self.refine_array = [
            [field, conductor_norm, rank, torsion, cm_disc],
            [
                bf_deg, include_base_change, include_Q_curves,
                torsion_structure, include_cm
            ],
            [sha, isodeg, class_size, semistable, jinv],
            [regulator, one, class_deg, potential_good_reduction, bad_primes],
        ]
Пример #14
0
    def __init__(self):
        geometric_invariants_type = SelectBox(
            name="geometric_invariants_type",
            min_width=115,
            options=[("", "Igusa-Clebsh"), ("igusa_inv", "Igusa"),
                     ("g2_inv", "G2")],
        )

        geometric_invariants = TextBoxWithSelect(
            name="geometric_invariants",
            knowl="g2c.geometric_invariants",
            label=r"\(\overline{\Q}\)-invariants",
            example="[8,3172,30056,-692224]",
            select_box=geometric_invariants_type,
            width=689,
            colspan=(1, 4, 1),
            example_span="",
        )  # the last 1 is irrelevant

        bad_quantifier = SubsetBox(
            name="bad_quantifier",
            min_width=115,
        )

        bad_primes = TextBoxWithSelect(
            name="bad_primes",
            knowl="g2c.good_reduction",
            label="Bad primes",
            short_label=r"Bad \(p\)",
            example="5,13",
            example_span="2 or 2,3,5",
            select_box=bad_quantifier,
        )

        conductor = TextBox(
            name="cond",
            knowl="ag.conductor",
            label="Conductor",
            example="169",
            example_span="169, 100-1000",
        )

        discriminant = TextBox(
            name="abs_disc",
            knowl="g2c.abs_discriminant",
            label="Absolute discriminant",
            short_label="Discriminant",
            example="169",
            example_span="169, 0-1000",
        )

        rational_points = TextBox(
            name="num_rat_pts",
            knowl="g2c.num_rat_pts",
            label="Rational points*",
            example="1",
            example_span="0, 20-26",
        )

        rational_weirstrass_points = TextBox(
            name="num_rat_wpts",
            knowl="g2c.num_rat_wpts",
            label="Rational Weierstrass points",
            short_label="Weierstrass",
            example="1",
            example_span="1, 0-6",
        )

        torsion_order = TextBox(
            name="torsion_order",
            knowl="g2c.torsion_order",
            label="Torsion order",
            example="2",
        )

        torsion_structure = TextBox(
            name="torsion",
            knowl="g2c.torsion",
            label="Torsion structure",
            short_label="Torsion",
            example="[2,2,2]",
        )

        two_selmer_rank = TextBox(
            name="two_selmer_rank",
            knowl="g2c.two_selmer_rank",
            label="2-Selmer rank",
            example="1",
        )

        analytic_sha = TextBox(
            name="analytic_sha",
            knowl="g2c.analytic_sha",
            label="Analytic order of Ш*",
            short_label="Analytic Ш*",
            example="2",
        )

        analytic_rank = TextBox(
            name="analytic_rank",
            knowl="g2c.analytic_rank",
            label="Analytic rank*",
            example="1",
        )

        is_gl2_type = YesNoBox(
            name="is_gl2_type",
            knowl="g2c.gl2type",
            label=r"$\GL_2$-type",
        )

        st_group = SelectBox(
            name="st_group",
            knowl="g2c.st_group",
            label="Sato-Tate group",
            short_label=r"\(\mathrm{ST}(X)\)",
            options=([("", "")] + [(elt, st_group_dict[elt])
                                   for elt in st_group_list]),
        )

        st_group_identity_component = SelectBox(
            name="real_geom_end_alg",
            knowl="g2c.st_group_identity_component",
            label="Sate-Tate identity component",
            short_label=r"\(\mathrm{ST}^0(X)\)",
            options=([("", "")] + [(elt, real_geom_end_alg_to_ST0_dict[elt])
                                   for elt in real_geom_end_alg_list]),
        )

        Q_automorphism = SelectBox(
            name="aut_grp_id",
            knowl="g2c.aut_grp",
            label=r"\(\Q\)-automorphism group",
            short_label=r"\(\mathrm{Aut}(X)\)",
            options=([("", "")] + [(elt, aut_grp_dict[elt])
                                   for elt in aut_grp_list]),
        )

        geometric_automorphism = SelectBox(
            name="geom_aut_grp_id",
            knowl="g2c.aut_grp",
            label=r"\(\overline{\Q}\)-automorphism group",
            short_label=r"\(\mathrm{Aut}(X_{\overline{\Q}})\)",
            options=([("", "")] + [(elt, geom_aut_grp_dict[elt])
                                   for elt in geom_aut_grp_list]),
        )

        Q_endomorphism = SelectBox(
            name="end_alg",
            knowl="g2c.end_alg",
            label=r"\(\Q\)-endomorphism algebra",
            short_label=r"\(\Q\)-end algebra",
            options=([("", "")] + [(elt, end_alg_dict[elt])
                                   for elt in end_alg_list]),
        )

        geometric_endomorphism = SelectBox(
            name="geom_end_alg",
            knowl="g2c.geom_end_alg",
            label=r"\(\overline{\Q}\)-endomorphism algebra",
            short_label=r"\(\overline{\Q}\)-end algebra",
            options=([("", "")] + [(elt, geom_end_alg_dict[elt])
                                   for elt in geom_end_alg_list]),
        )

        locally_solvable = YesNoBox(
            name="locally_solvable",
            knowl="g2c.locally_solvable",
            label="Locally solvable",
        )

        has_square_sha = YesNoBox(
            name="has_square_sha",
            knowl="g2c.analytic_sha",
            label=r"Order of Ш is square*",
            short_label=r"Square Ш*",
        )

        geometrically_simple = YesNoBox(
            name="is_simple_geom",
            knowl="ag.geom_simple",
            label="Geometrically simple",
            short_label=r"\(\overline{\Q}\)-simple",
        )

        count = CountBox()

        self.browse_array = [
            [geometric_invariants],
            [bad_primes, geometrically_simple],
            [conductor, is_gl2_type],
            [discriminant, st_group],
            [rational_points, st_group_identity_component],
            [rational_weirstrass_points, Q_automorphism],
            [torsion_order, geometric_automorphism],
            [torsion_structure, Q_endomorphism],
            [two_selmer_rank, geometric_endomorphism],
            [analytic_sha, has_square_sha],
            [analytic_rank, locally_solvable],
            [count],
        ]

        self.refine_array = [
            [
                conductor,
                discriminant,
                rational_points,
                rational_weirstrass_points,
                torsion_order,
            ],
            [
                bad_primes,
                two_selmer_rank,
                analytic_rank,
                analytic_sha,
                torsion_structure,
            ],
            [
                Q_endomorphism,
                st_group,
                Q_automorphism,
                has_square_sha,
                geometrically_simple,
            ],
            [
                geometric_endomorphism,
                st_group_identity_component,
                geometric_automorphism,
                locally_solvable,
                is_gl2_type,
            ],
        ]
Пример #15
0
    def __init__(self):
        field = TextBox(name="field",
                        label="Base field",
                        knowl="nf",
                        example="2.2.5.1",
                        example_span="2.2.5.1 or Qsqrt5")
        include_base_change = ExcludeOnlyBox(name="include_base_change",
                                             label="Base change curves",
                                             knowl="ec.base_change")
        include_Q_curves = ExcludeOnlyBox(name="include_Q_curves",
                                          label=r"\(\Q\)-curves",
                                          knowl="ec.q_curve")
        conductor_norm = TextBox(name="conductor_norm",
                                 label="Conductor norm",
                                 knowl="ec.conductor",
                                 example="31",
                                 example_span="31 or 1-100")
        one = SelectBox(name="one",
                        label="Curves per isogeny class",
                        knowl="ec.isogeny_class",
                        options=[("", ""), ("yes", "one")])
        include_cm = ExcludeOnlyBox(name="include_cm",
                                    label="CM",
                                    knowl="ec.complex_multiplication")
        cm_disc = TextBox(name="cm_disc",
                          label="CM discriminant",
                          example="-4",
                          example_span="-4 or -3,-8",
                          knowl="ec.complex_multiplication")
        jinv = TextBox(name="jinv",
                       label="j-invariant",
                       knowl="ec.j_invariant",
                       width=675,
                       short_width=160,
                       colspan=(1, 4, 1),
                       example_span_colspan=2,
                       example="105474/49 + a*34213/49",
                       example_span="")
        torsion = TextBox(name="torsion",
                          label="Torsion order",
                          knowl="ec.torsion_order",
                          example="2")

        def disp_tor(t):
            if len(t) == 1:
                return "[%s]" % t, "C%s" % t
            else:
                return "[%s,%s]" % t, "C%s×C%s" % t

        tor_opts = (
            [("", ""), ("[]", "trivial")] +
            [disp_tor(tuple(t)) for t in ECNF_stats().torsion_counts if t])
        torsion_structure = SelectBox(name="torsion_structure",
                                      label="Torsion structure",
                                      knowl="ec.torsion_subgroup",
                                      options=tor_opts)
        isodeg = TextBox(name="isodeg",
                         label="Cyclic isogeny degree",
                         knowl="ec.isogeny",
                         example="16")
        count = CountBox()

        self.browse_array = [[jinv], [field, include_base_change],
                             [conductor_norm, include_Q_curves],
                             [torsion, torsion_structure],
                             [cm_disc, include_cm], [isodeg, one], [count]]

        self.refine_array = [[
            field, conductor_norm, jinv, include_base_change, include_Q_curves
        ], [isodeg, torsion, torsion_structure, include_cm, cm_disc], [one]]
Пример #16
0
    def __init__(self):
        cond = TextBox(name="conductor",
                       label="Conductor",
                       knowl="ec.q.conductor",
                       example="389",
                       example_span="389 or 100-200")
        rank = TextBox(name="rank", label="Rank", knowl="ec.rank", example="0")
        torsion = TextBox(name="torsion",
                          label="Torsion order",
                          knowl="ec.torsion_order",
                          example="2")
        sha = TextBox(name="sha",
                      label="Analytic order of Ш",
                      knowl="ec.q.analytic_sha_order",
                      example="4")
        surj_primes = TextBox(name="surj_primes",
                              label="Maximal primes",
                              knowl="ec.maximal_galois_rep",
                              example="2,3")
        isodeg = TextBox(name="isodeg",
                         label="Cyclic isogeny degree",
                         knowl="ec.isogeny",
                         example="16")
        num_int_pts = TextBox(
            name="num_int_pts",
            label="Number of %s" %
            display_knowl("ec.q.integral_points", "integral points"),
            example="2",
            example_span="2 or 4-15")

        jinv = TextBox(name="jinv",
                       label="j-invariant",
                       knowl="ec.q.j_invariant",
                       example="1728",
                       example_span="1728 or -4096/11")
        cm = IncludeOnlyBox(name="include_cm",
                            label="CM",
                            knowl="ec.complex_multiplication")
        tor_opts = ([("", "any"),
                     ("[]", "trivial")] + [("[%s]" % n, "C%s" % n)
                                           for n in range(2, 13) if n != 11] +
                    [("[2,%s]" % n, "C2×C%s" % n)
                     for n in range(2, 10, 2)])
        torsion_struct = SelectBox(name="torsion_structure",
                                   label="Torsion structure",
                                   knowl="ec.torsion_subgroup",
                                   options=tor_opts)
        optimal = SelectBox(name="optimal",
                            label="Curves per isogeny class",
                            knowl="ec.isogeny_class",
                            options=[("", "all"), ("on", "one")])
        surj_quant = SelectBox(name="surj_quantifier",
                               options=[("", "include"),
                                        ("exactly", "exactly")],
                               width=75)
        nonsurj_primes = TextBoxWithSelect(name="nonsurj_primes",
                                           label="Non-maximal primes",
                                           short_label="Non-max. $p$",
                                           knowl="ec.maximal_galois_rep",
                                           example="2,3",
                                           select_box=surj_quant)
        bad_quant = SelectBox(name="bad_quantifier",
                              options=[("", "include"), ("exclude", "exclude"),
                                       ("exactly", "exactly"),
                                       ("subset", "subset of")],
                              width=75)
        bad_primes = TextBoxWithSelect(name="bad_primes",
                                       label="Bad primes",
                                       knowl="ec.q.reduction_type",
                                       example="5,13",
                                       select_box=bad_quant)
        regulator = TextBox(name="regulator",
                            label="Regulator",
                            knowl="ec.q.regulator",
                            example="8.4-9.1")

        count = TextBox(name="count", label="Results to display", example=50)

        self.browse_array = [[cond, jinv], [rank,
                                            cm], [torsion, torsion_struct],
                             [sha, optimal], [surj_primes, nonsurj_primes],
                             [isodeg, bad_primes], [num_int_pts, regulator],
                             [count]]

        self.refine_array = [[cond, jinv, rank, torsion, torsion_struct],
                             [
                                 sha, isodeg, surj_primes, nonsurj_primes,
                                 bad_primes
                             ], [num_int_pts, regulator, cm, optimal]]
Пример #17
0
    def __init__(self):
        weight = TextBox(name="weight",
                         label="Weight",
                         knowl="st_group.weight",
                         example="1",
                         example_span="1 or 0-3")
        degree = TextBox(name="degree",
                         label="Degree",
                         knowl="st_group.degree",
                         example="4",
                         example_span="4 or 1-6")
        include_irrational = SelectBox(name="include_irrational",
                                       label="Include irrational",
                                       knowl="st_group.rational",
                                       example_col=True,
                                       options=[("", "no"), ("yes", "yes")])
        identity_component = SelectBox(name="identity_component",
                                       label="Identity component",
                                       short_label=r"$\mathrm{ST}^0$",
                                       knowl="st_group.identity_component",
                                       example_span="U(1) or USp(4)",
                                       options=[("", "")] +
                                       [(r, r) for r in st0_list])
        components = TextBox(name="components",
                             label="Components",
                             knowl="st_group.components",
                             example="1",
                             example_span="1 (connected) or 4-12")
        trace_zero_density = TextBox(name="trace_zero_density",
                                     label="Trace zero density",
                                     knowl="st_group.trace_zero_density",
                                     short_label=r"$\mathrm{P}[a_1=0]$",
                                     example="1/2",
                                     example_span="0, 1/2, or 3/8")
        second_trace_moment = TextBox(name="second_trace_moment",
                                      label="Second trace moment",
                                      knowl="st_group.moments",
                                      example="8")
        fourth_trace_moment = TextBox(name="fourth_trace_moment",
                                      label="Fourth trace moment",
                                      knowl="st_group.moments",
                                      example="96")
        first_a2_moment = TextBox(name="first_a2_moment",
                                  label="First $a_2$ moment",
                                  knowl="st_group.moments",
                                  example="4")
        maximal = YesNoBox(name="maximal",
                           label="Maximal",
                           knowl="st_group.supgroups",
                           example_col=True)
        component_group = TextBox(
            name="component_group",
            label="Component group",
            knowl="st_group.component_group",
            example="[48,48]",
            example_span="list of %s, e.g. [8,3], or %s, e.g. S4." %
            (display_knowl("group.small_group_label", "GAP ids"),
             display_knowl("nf.galois_group.name", "group labels")))
        count = CountBox()

        self.browse_array = [[weight, trace_zero_density],
                             [degree, second_trace_moment],
                             [include_irrational, fourth_trace_moment],
                             [identity_component, first_a2_moment],
                             [maximal, components], [count, component_group]]

        self.refine_array = [
            [weight, degree, include_irrational, identity_component, maximal],
            [
                components, component_group, trace_zero_density,
                second_trace_moment, fourth_trace_moment
            ], [first_a2_moment]
        ]
Пример #18
0
    def __init__(self):
        ## subjects
        subject = SelectBox(name="seminar_subject",
                            label="Subject",
                            options=[("", "")] + subject_pairs())
        ## topics
        topic = SelectBox(name="seminar_topic",
                          label="Topic",
                          options=[("", "")] + user_topics())

        ## pick institution where it is held
        institution = SelectBox(
            name="seminar_institution",
            label="Institution",
            options=[
                ("", ""),
                (
                    "None",
                    "No institution",
                ),
            ] + [(elt["shortname"], elt["name"])
                 for elt in institutions_shortnames()],
        )

        venue = SelectBox(name="seminar_venue",
                          label=static_knowl("venue"),
                          options=[("", ""), ("online", "online"),
                                   ("in-person", "in-person")])
        assert venue

        ## keywords for seminar or talk
        keywords = TextBox(
            name="seminar_keywords",
            label="Anywhere",
            width=textwidth,
        )
        ## type of access
        access = SelectBox(
            name="seminar_access",
            label="Access",
            options=[
                ("", ""),
                ("open", "Any visitor can view link"),
                ("users", "Any logged-in user can view link"),
            ],
        )
        lang_dict = languages_dict()
        language = SelectBox(
            name="seminar_language",
            label="Language",
            options=[("", ""), ("en", "English")] +
            [(code, lang_dict[code])
             for code in sorted(db.talks.distinct("language"))
             if code != "en"],
        )
        ## number of results to display
        # count = TextBox(name="seminar_count", label="Results to display", example=50, example_value=True)

        name = TextBox(
            name="name",
            label="Name",
            width=textwidth,
            example="Thule topology colloquium series",
        )

        self.array = [
            [subject, keywords],
            [topic, name],
            [institution, access],
            [language],
            # [venue],
            # [count],
        ]
Пример #19
0
    def __init__(self):
        conductor_quantifier = SelectBox(
            name='conductor_type',
            options=[('', ''),
                     ('prime', 'prime'),
                     ('prime_power', 'p-power'),
                     ('squarefree', 'sq-free'),
                     ('divides','divides'),
                     ],
            min_width=85)
        cond = TextBoxWithSelect(
            name="conductor",
            label="Conductor",
            knowl="ec.q.conductor",
            example="389",
            example_span="389 or 100-200",
            select_box=conductor_quantifier)
        disc = TextBox(
            name="discriminant",
            label="Discriminant",
            knowl="ec.discriminant",
            example="389",
            example_span="389 or 100-200")
        rank = TextBox(
            name="rank",
            label="Rank",
            knowl="ec.rank",
            example="0")
        sha = TextBox(
            name="sha",
            label="Analytic order of Ш",
            knowl="ec.analytic_sha_order",
            example="4")
        isodeg = TextBox(
            name="isogeny_degrees",
            label="Cyclic isogeny degree",
            knowl="ec.isogeny",
            example="16")
        class_size = TextBox(
            name="class_size",
            label="Isogeny class size",
            knowl="ec.isogeny_class",
            example="4")
        class_deg = TextBox(
            name="class_deg",
            label="Isogeny class degree",
            knowl="ec.isogeny_class_degree",
            example="16")
        num_int_pts = TextBox(
            name="num_int_pts",
            label="Integral points",
            knowl="ec.q.integral_points",
            example="2",
            example_span="2 or 4-15")
        jinv = TextBox(
            name="jinv",
            label="j-invariant",
            knowl="ec.q.j_invariant",
            example="1728",
            example_span="1728 or -4096/11")
        torsion_opts = ([("", ""), ("[]", "trivial")] +
                        [("%s"%n, "order %s"%n) for n in range(4,16,4)] +
                        [("[%s]"%n, "C%s"%n) for n in range(2, 13) if n != 11] +
                        [("[2,%s]"%n, "C2×C%s"%n) for n in range(2, 10, 2)])
        torsion = SelectBox(
            name="torsion",
            label="Torsion",
            knowl="ec.torsion_subgroup",
            example="C3",
            options=torsion_opts)
        optimal = SelectBox(
            name="optimal",
            label="Curves per isogeny class",
            knowl="ec.isogeny_class",
            example="all, one",
            options=[("", "all"),
                     ("on", "one")])
        bad_quant = SubsetBox(
            name="bad_quantifier")
        bad_primes = TextBoxWithSelect(
            name="bad_primes",
            label="Bad primes $p$",
            short_label=r"Bad$\ p$",
            knowl="ec.q.reduction_type",
            example="5,13",
            select_box=bad_quant)
        sha_quant = SubsetBox(
            name="sha_quantifier")
        sha_primes = TextBoxWithSelect(
            name="sha_primes",
            label="$p$ dividing |Ш|",
            short_label=r"$p\ $div$\ $|Ш|",
            knowl="ec.analytic_sha_order",
            example="3,5",
            select_box=sha_quant)
        regulator = TextBox(
            name="regulator",
            label="Regulator",
            knowl="ec.q.regulator",
            example="8.4-9.1")
        faltings_height = TextBox(
            name="faltings_height",
            label="Faltings height",
            knowl="ec.q.faltings_height",
            example="-1-2")
        reduction_opts = ([("", ""),
                           ("semistable",  "semistable"),
                           ("not semistable",  "not semistable"),
                           ("potentially good", "potentially good"),
                           ("not potentially good", "not potentially good")])
        reduction = SelectBox(
            name="reduction",
            label="Reduction",
            example="semistable",
            knowl="ec.reduction",
            options=reduction_opts)
        galois_image = TextBox(
            name="galois_image",
            label=r"Galois image",
            short_label=r"Galois image",
            example="13S4 or 13.91.3.2",
            knowl="ec.galois_image_search")
        nonmax_quant = SubsetBox(
            name="nonmax_quantifier")
        nonmax_primes = TextBoxWithSelect(
            name="nonmax_primes",
            label=r"Nonmaximal $\ell$",
            short_label=r"Nonmax$\ \ell$",
            knowl="ec.maximal_elladic_galois_rep",
            example="2,3",
            select_box=nonmax_quant)
        cm_opts = ([('', ''), ('noCM', 'no potential CM'), ('CM', 'potential CM')] +
                   [('-4,-16', 'CM field Q(sqrt(-1))'), ('-3,-12,-27', 'CM field Q(sqrt(-3))'), ('-7,-28', 'CM field Q(sqrt(-7))')] +
                   [('-%d'%d, 'CM discriminant -%d'%d) for d in [3,4,7,8,11,12,16,19,27,38,43,67,163]])
        cm = SelectBox(
            name="cm",
            label="Complex multiplication",
            example="potential CM by Q(i)",
            knowl="ec.complex_multiplication",
            options=cm_opts
            )

        count = CountBox()

        self.browse_array = [
            [cond, bad_primes],
            [disc,  jinv],
            [torsion, cm],
            [rank, sha],
            [regulator, sha_primes],
            [galois_image, nonmax_primes],
            [class_size, class_deg],
            [num_int_pts, isodeg],
            [optimal, reduction],
            [count, faltings_height]
            ]

        self.refine_array = [
            [cond, jinv, rank, torsion, cm],
            [bad_primes, disc, regulator, sha, galois_image],
            [class_size, class_deg, isodeg, sha_primes, nonmax_primes],
            [optimal, reduction, num_int_pts, faltings_height]
            ]
Пример #20
0
    def __init__(self):
        field = TextBox(name="field",
                        label="Base field",
                        knowl="ag.base_field",
                        example="2.2.5.1",
                        example_span="2.2.5.1 or Qsqrt5")
        include_base_change = ExcludeOnlyBox(name="include_base_change",
                                             label="Base change curves",
                                             knowl="ec.base_change")
        include_Q_curves = ExcludeOnlyBox(name="include_Q_curves",
                                          label=r"\(\Q\)-curves",
                                          knowl="ec.q_curve")
        conductor_norm = TextBox(name="conductor_norm",
                                 label="Conductor norm",
                                 knowl="ec.conductor",
                                 example="31",
                                 example_span="31 or 1-100")
        one = SelectBox(name="one",
                        label="Curves per isogeny class",
                        knowl="ec.isogeny_class",
                        options=[("", ""), ("yes", "one")])
        include_cm = SelectBox(name="include_cm",
                               label="CM",
                               knowl="ec.complex_multiplication",
                               options=[('', ''), ('PCM', 'potential CM'),
                                        ('PCMnoCM', 'potential CM but no CM'),
                                        ('CM', 'CM'),
                                        ('noPCM', 'no potential CM')])
        cm_disc = TextBox(name="cm_disc",
                          label="CM discriminant",
                          example="-4",
                          example_span="-4 or -3,-8",
                          knowl="ec.complex_multiplication")
        jinv = TextBox(name="jinv",
                       label="j-invariant",
                       knowl="ec.j_invariant",
                       width=675,
                       short_width=160,
                       colspan=(1, 4, 1),
                       example_span_colspan=2,
                       example="105474/49 + a*34213/49",
                       example_span="")
        rank = TextBox(name="rank",
                       label="Rank*",
                       knowl="ec.rank",
                       example="2")
        torsion = TextBox(name="torsion",
                          label="Torsion order",
                          knowl="ec.torsion_order",
                          example="2")
        bf_deg = SelectBox(name="bf_deg",
                           label="Base field degree",
                           knowl="nf.degree",
                           options=[("", ""), ("2", "2"), ("3", "3"),
                                    ("4", "4"), ("5", "5"), ("6", "6")])

        tor_opts = (
            [("", ""), ("[]", "trivial")] +
            [disp_tor(tuple(t)) for t in ECNF_stats().torsion_counts if t])
        torsion_structure = SelectBox(name="torsion_structure",
                                      label="Torsion structure",
                                      knowl="ec.torsion_subgroup",
                                      options=tor_opts)
        isodeg = TextBox(name="isodeg",
                         label="Cyclic isogeny degree",
                         knowl="ec.isogeny",
                         example="16")
        count = CountBox()

        self.browse_array = [[jinv], [field, bf_deg],
                             [conductor_norm, include_base_change],
                             [rank, include_Q_curves],
                             [torsion, torsion_structure],
                             [cm_disc, include_cm], [isodeg, one], [count]]

        self.refine_array = [[
            field, bf_deg, conductor_norm, jinv, include_base_change
        ], [include_Q_curves, isodeg, rank, torsion, torsion_structure],
                             [include_cm, cm_disc, one]]
Пример #21
0
    def __init__(self):
        field = TextBox(name="field",
                        label="Base field",
                        knowl="nf",
                        example="2.2.5.1",
                        example_span="2.2.5.1 or Qsqrt5")
        include_base_change = IncludeOnlyBox(name="include_base_change",
                                             label="Base change curves",
                                             knowl="ec.base_change",
                                             width=50,
                                             short_width=170)
        include_Q_curves = IncludeOnlyBox(name="include_Q_curves",
                                          label=r"\(\Q\)-curves",
                                          knowl="ec.q_curve",
                                          width=50,
                                          short_width=170)
        conductor_norm = TextBox(name="conductor_norm",
                                 label="Conductor norm",
                                 knowl="ec.conductor",
                                 example="31",
                                 example_span="31 or 1-100")
        include_isogenous = IncludeBox(name="include_isogenous",
                                       label=r"Isogenous curves",
                                       knowl="ec.isogeny",
                                       width=50,
                                       short_width=170)
        include_cm = IncludeOnlyBox(name="include_cm",
                                    label="CM curves",
                                    knowl="ec.complex_multiplication",
                                    width=50,
                                    short_width=170)
        jinv = TextBox(name="jinv",
                       label="j-invariant",
                       width=300,
                       short_width=160,
                       colspan=(1, 2, 1),
                       example_span_colspan=2,
                       example="105474/49 + a*34213/49",
                       example_span="105474/49 + a*34213/49 over 2.0.7.1")
        torsion = TextBox(name="torsion",
                          label="Torsion order",
                          knowl="ec.torsion_order",
                          example="2")

        def disp_tor(t):
            if len(t) == 1:
                return "[%s]" % t, "C%s" % t
            else:
                return "[%s,%s]" % t, "C%s×C%s" % t

        tor_opts = (
            [("", "any"), ("[]", "trivial")] +
            [disp_tor(tuple(t)) for t in ECNF_stats().torsion_counts if t])
        torsion_structure = SelectBox(name="torsion_structure",
                                      label="Torsion structure",
                                      knowl="ec.torsion_subgroup",
                                      options=tor_opts,
                                      width=50,
                                      short_width=170)
        isodeg = TextBox(name="isodeg",
                         label="Cyclic isogeny degree",
                         knowl="ec.isogeny",
                         example="16")
        count = TextBox(name="count", label="Results to display", example="50")

        self.browse_array = [[field, include_base_change, include_Q_curves],
                             [conductor_norm, include_isogenous, include_cm],
                             [jinv], [torsion, torsion_structure], [isodeg],
                             [count]]

        self.refine_array = [[
            field, conductor_norm, include_isogenous, include_base_change,
            include_Q_curves
        ], [jinv, isodeg, torsion, torsion_structure, include_cm]]