Exemplo n.º 1
0
 def jump_box(self, info):
     info["jump_example"] = "169.a.169.1"
     info["jump_egspan"] = "e.g. 169.a.169.1 or 169.a or 1088.b"
     info["jump_egspan"] += " or x^5 + 1 or x^5, x^2 + x + 1"
     info["jump_knowl"] = "g2c.search_input"
     info["jump_prompt"] = "Label or polynomial"
     return SearchArray.jump_box(self, info)
Exemplo n.º 2
0
 def jump_box(self, info):
     info["jump_example"] = "169.a.169.1"
     info["jump_egspan"] = "e.g. 169.a.169.1 or 169.a or 1088.b"
     info["jump_knowl"] = "g2c.search_input"
     info["jump_prompt"] = "Label"
     if info.get("equation_search"):
         info["jump_egspan"] += " or x^5 + 1"
     return SearchArray.jump_box(self, info)
Exemplo n.º 3
0
 def main_table(self, info=None):
     if info is None:
         bool_table = self._print_table(self.bool_array, None, "vertical")
         browse_table = self._print_table(self.browse_array, None,
                                          "horizontal")
         return bool_table + "\n" + browse_table
     else:
         return SearchArray.main_table(self, info)
Exemplo n.º 4
0
Arquivo: main.py Projeto: asym57/lmfdb
    def __init__(self):
        geometric_invariants_type = SelectBox(
            name="geometric_invariants_type",
            width=108,
            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_col=False,
        )  # the last 1 is irrelevant

        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",
        )

        bad_quantifier = SelectBox(
            name="bad_quantifier",
            width=85,
            options=[
                ("", "include"),
                ("exclude", "exclude"),
                ("exactly", "exactly"),
                ("subset", "subset"),
            ],
        )

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

        is_gl2_type = SelectBox(
            name="is_gl2_type",
            knowl="g2c.gl2type",
            label="$\GL_2$-type",
            options=[("", ""), ("True", "True"), ("False", "False")],
        )

        st_group = SelectBox(
            name="st_group",
            knowl="g2c.st_group",
            label="Sato-Tate group",
            short_label=r"\(\mathrm{ST}\)",
            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\)",
            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]),
        )

        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 = SelectBox(
            name="locally_solvable",
            knowl="g2c.locally_solvable",
            label="Locally solvable",
            options=[("", ""), ("True", "True"), ("False", "False")],
        )

        has_square_sha = SelectBox(
            name="has_square_sha",
            knowl="g2c.analytic_sha",
            label=r"Order of Ш is square*",
            short_label=r"Square Ш*",
            options=[("", ""), ("True", "True"), ("False", "False")],
        )

        geometrically_simple = SelectBox(
            name="is_simple_geom",
            knowl="ag.geom_simple",
            label="Geometrically simple",
            short_label=r"\(\overline{\Q}\)-simple",
            options=[("", ""), ("True", "True"), ("False", "False")],
        )

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

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

        refine_array = [
            [
                conductor,
                discriminant,
                rational_points,
                rational_weirstrass_points,
                torsion_order,
            ],
            [
                bad_primes,
                two_selmer_rank,
                analytic_rank,
                analytic_sha,
                torsion_structure,
            ],
            [
                is_gl2_type,
                st_group,
                Q_automorphism,
                has_square_sha,
                geometrically_simple,
            ],
            [
                geometric_endomorphism,
                st_group_identity_component,
                geometric_automorphism,
                locally_solvable,
            ],
        ]
        SearchArray.__init__(self, browse_array, refine_array)
Exemplo n.º 5
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=40,
            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=40,
            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=40,
            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=40,
            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 labels"),
            colspan=(1, 3, 1),
            width=40,
            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 = SelectBox(
            "simple",
            label="Simple",
            options=[("yes", "yes"), ("", "unrestricted"), ("no", "no")],
            knowl="av.simple",
        )
        geom_simple = SelectBox(
            "geom_simple",
            label="Geometrically simple",
            options=[("yes", "yes"), ("", "unrestricted"), ("no", "no")],
            knowl="av.geometrically_simple",
            short_label="geom. simple",
        )
        primitive = SelectBox(
            "primitive",
            label="Primitive",
            options=[("yes", "yes"), ("", "unrestricted"), ("no", "no")],
            knowl="ag.primitive",
        )
        uopts = [
            ("yes", "yes"),
            ("not_no", "yes or unknown"),
            ("", "unrestricted"),
            ("not_yes", "no or unknown"),
            ("no", "no"),
            ("unknown", "unknown"),
        ]
        polarizable = SelectBox(
            "polarizable",
            label="Principally polarizable",
            options=uopts,
            knowl="av.princ_polarizable",
            short_label="princ polarizable",
        )
        jacobian = SelectBox("jacobian",
                             label="Jacobian",
                             options=uopts,
                             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 = SelectBox(
            "simple_quantifier",
            options=[("contained", "subset of"), ("exactly", "exactly"),
                     ("", "superset of")],
        )
        simple_factors = TextBoxWithSelect(
            "simple_factors",
            label="Simple factors",
            select_box=simple_quantifier,
            knowl="av.decomposition",
            colspan=(1, 3, 2),
            width=40,
            short_width=25,
            example="1.2.b,1.2.b,2.2.a_b",
            advanced=True,
        )
        count = TextBox(
            "count",
            label="Maximum number of isogeny classes to display",
            colspan=(2, 1, 1),
            width=10,
        )
        refine_array = [
            [q, p, g, p_rank, initial_coefficients],
            [
                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],
            #[size],
            [simple, geom_simple, primitive, polarizable, jacobian],
            use_geom_refine,
            [dim1, dim2, dim3, dim4, dim5],
            [dim1d, dim2d, dim3d, number_field, galois_group],
        ]
        browse_array = [
            [q, primitive],
            [p, simple],
            [g, geom_simple],
            [initial_coefficients, polarizable],
            [p_rank, jacobian],
            [p_rank_deficit],
            [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],
        ]
        SearchArray.__init__(self, browse_array, refine_array)
Exemplo n.º 6
0
 def jump_box(self, info):
     info["jump_example"] = "169.a.169.1"
     info["jump_egspan"] = "e.g. 169.a.169.1 or 169.a or 1088.b"
     if info.get("equation_search"):
         info["jump_egspan"] += " or x^5 + 1"
     return SearchArray.jump_box(self, info)