Ejemplo n.º 1
0
    def make_class(self):
        curves_data = db_g2c().curves.find({
            "class": self.label
        }).sort([("disc_key", pymongo.ASCENDING),
                 ("label", pymongo.ASCENDING)])
        self.curves = [{
            "label": c['label'],
            "equation_formatted": list_to_min_eqn(c['min_eqn']),
            "url": url_for_label(c['label'])
        } for c in curves_data]
        self.ncurves = curves_data.count()
        self.bad_lfactors = [[c[0],
                              list_to_factored_poly_otherorder(c[1])]
                             for c in self.bad_lfactors]
        for endalgtype in [
                'end_alg', 'rat_end_alg', 'real_end_alg', 'geom_end_alg',
                'rat_geom_end_alg', 'real_geom_end_alg'
        ]:
            if hasattr(self, endalgtype):
                setattr(self, endalgtype + '_name',
                        end_alg_name(getattr(self, endalgtype)))
            else:
                setattr(self, endalgtype + '_name', '')

        self.st_group_name = st_group_name(self.st_group)

        if hasattr(self, 'geom_end_field') and self.geom_end_field <> '':
            self.geom_end_field_name = field_pretty(self.geom_end_field)
        else:
            self.geom_end_field_name = ''

        if self.is_gl2_type:
            self.is_gl2_type_name = 'yes'
        else:
            self.is_gl2_type_name = 'no'
        if hasattr(self, 'is_simple'):
            if self.is_simple:
                self.is_simple_name = 'yes'
            else:
                self.is_simple_name = 'no'
        else:
            self.is_simple_name = '?'
        if hasattr(self, 'is_geom_simple'):
            if self.is_geom_simple:
                self.is_geom_simple_name = 'yes'
            else:
                self.is_geom_simple_name = 'no'
        else:
            self.is_geom_simple_name = '?'

        x = self.label.split('.')[1]

        self.friends = [('L-function',
                         url_for("l_functions.l_function_genus2_page",
                                 cond=self.cond,
                                 x=x)), ('Siegel modular form someday', '.')]

        self.ecproduct_wurl = []
        if hasattr(self, 'ecproduct'):
            for i in range(2):
                curve_label = self.ecproduct[i]
                crv_url = url_for("ec.by_ec_label", label=curve_label)
                if i == 1 or len(set(self.ecproduct)) <> 1:
                    self.friends.append(
                        ('Elliptic curve ' + curve_label, crv_url))
                self.ecproduct_wurl.append({
                    'label': curve_label,
                    'url': crv_url
                })

        self.ecquadratic_wurl = []
        if hasattr(self, 'ecquadratic'):
            for i in range(len(self.ecquadratic)):
                curve_label = self.ecquadratic[i]
                crv_spl = curve_label.split('-')
                crv_url = url_for("ecnf.show_ecnf_isoclass",
                                  nf=crv_spl[0],
                                  conductor_label=crv_spl[1],
                                  class_label=crv_spl[2])
                self.friends.append(('Elliptic curve ' + curve_label, crv_url))
                self.ecquadratic_wurl.append({
                    'label': curve_label,
                    'url': crv_url,
                    'nf': crv_spl[0]
                })

        if hasattr(self, 'mfproduct'):
            for i in range(len(self.mfproduct)):
                mf_label = self.mfproduct[i]
                mf_spl = mf_label.split('.')
                mf_spl.append(mf_spl[2][-1])
                mf_spl[2] = mf_spl[2][:-1]  # Need a splitting function
                mf_url = url_for("emf.render_elliptic_modular_forms",
                                 level=mf_spl[0],
                                 weight=mf_spl[1],
                                 character=mf_spl[2],
                                 label=mf_spl[3])
                self.friends.append(('Modular form ' + mf_label, mf_url))

        if hasattr(self, 'mfhilbert'):
            for i in range(len(self.mfhilbert)):
                mf_label = self.mfhilbert[i]
                mf_spl = mf_label.split('-')
                mf_url = url_for("hmf.render_hmf_webpage",
                                 field_label=mf_spl[0],
                                 label=mf_label)
                self.friends.append(
                    ('Hilbert modular form ' + mf_label, mf_url))

        self.properties = [('Label', self.label),
                           ('Number of curves', str(self.ncurves)),
                           ('Conductor', '%s' % self.cond),
                           ('Sato-Tate group', '\(%s\)' % self.st_group_name),
                           ('\(\mathrm{End}(J_{\overline{\Q}}) \otimes \R\)',
                            '\(%s\)' % self.real_geom_end_alg_name),
                           ('\(\mathrm{GL}_2\)-type',
                            '%s' % self.is_gl2_type_name)]

        self.title = "Genus 2 Isogeny Class %s" % (self.label)
        self.downloads = [
            ('Download Euler factors', ".")
        ]  # url_for(".download_g2c_eulerfactors", label=self.label)),
        #                          ('Download stored data for all curves', url_for(".download_g2c_all", label=self.label))]

        self.bread = [('Genus 2 Curves', url_for(".index")),
                      ('$\Q$', url_for(".index_Q")),
                      ('%s' % self.cond,
                       url_for(".by_conductor", conductor=self.cond)),
                      ('%s' % self.label, ' ')]
Ejemplo n.º 2
0
    def make_class(self):
        curves_data = db_g2c().curves.find({"class" : self.label}).sort([("disc_key", pymongo.ASCENDING), ("label", pymongo.ASCENDING)])
        self.curves = [ {"label" : c['label'], "equation_formatted" : list_to_min_eqn(c['min_eqn']), "url": url_for_label(c['label'])} for c in curves_data ]
        self.ncurves = curves_data.count()
        self.bad_lfactors = [ [c[0], list_to_factored_poly_otherorder(c[1])] for c in self.bad_lfactors]
        for endalgtype in ['end_alg', 'rat_end_alg', 'real_end_alg', 'geom_end_alg', 'rat_geom_end_alg', 'real_geom_end_alg']:
            if hasattr(self, endalgtype):
                setattr(self,endalgtype + '_name',end_alg_name(getattr(self,endalgtype)))
            else:
                setattr(self,endalgtype + '_name','')

        self.st_group_name = st_group_name(self.st_group)

        if hasattr(self, 'geom_end_field') and self.geom_end_field <> '':
            self.geom_end_field_name = field_pretty(self.geom_end_field)
        else:
            self.geom_end_field_name = ''

        if self.is_gl2_type:
            self.is_gl2_type_name = 'yes'
        else:
            self.is_gl2_type_name = 'no'
        if hasattr(self, 'is_simple'):
            if self.is_simple:
                self.is_simple_name = 'yes'
            else:
                self.is_simple_name = 'no'
        else:
            self.is_simple_name = '?'
        if hasattr(self, 'is_geom_simple'):
            if self.is_geom_simple:
                self.is_geom_simple_name = 'yes'
            else:
                self.is_geom_simple_name = 'no'
        else:
            self.is_geom_simple_name = '?'

        x = self.label.split('.')[1]
        
        self.friends = [
          ('L-function', url_for("l_functions.l_function_genus2_page", cond=self.cond,x=x)),
          ('Siegel modular form someday', '.')]

        self.ecproduct_wurl = []
        if hasattr(self, 'ecproduct'):
            for i in range(2):
                curve_label = self.ecproduct[i]
                crv_url = url_for("ec.by_ec_label", label=curve_label)
                if i == 1 or len(set(self.ecproduct)) <> 1:
                    self.friends.append(('Elliptic curve ' + curve_label, crv_url))
                self.ecproduct_wurl.append({'label' : curve_label, 'url' : crv_url})

        self.ecquadratic_wurl = []
        if hasattr(self, 'ecquadratic'):
            for i in range(len(self.ecquadratic)):
                curve_label = self.ecquadratic[i]
                crv_spl = curve_label.split('-')
                crv_url = url_for("ecnf.show_ecnf_isoclass", nf = crv_spl[0], conductor_label = crv_spl[1], class_label = crv_spl[2])
                self.friends.append(('Elliptic curve ' + curve_label, crv_url))
                self.ecquadratic_wurl.append({'label' : curve_label, 'url' : crv_url, 'nf' : crv_spl[0]})

        if hasattr(self, 'mfproduct'):
            for i in range(len(self.mfproduct)):
                mf_label = self.mfproduct[i]
                mf_spl = mf_label.split('.')
                mf_spl.append(mf_spl[2][-1])
                mf_spl[2] = mf_spl[2][:-1] # Need a splitting function
                mf_url = url_for("emf.render_elliptic_modular_forms", level=mf_spl[0], weight=mf_spl[1], character=mf_spl[2], label=mf_spl[3])
                self.friends.append(('Modular form ' + mf_label, mf_url))

        if hasattr(self, 'mfhilbert'):
            for i in range(len(self.mfhilbert)):
                mf_label = self.mfhilbert[i]
                mf_spl = mf_label.split('-')
                mf_url = url_for("hmf.render_hmf_webpage", field_label=mf_spl[0], label=mf_label)
                self.friends.append(('Hilbert modular form ' + mf_label, mf_url))

        self.properties = [('Label', self.label),
                           ('Number of curves', str(self.ncurves)),
                           ('Conductor','%s' % self.cond),
                           ('Sato-Tate group', '\(%s\)' % self.st_group_name),
                           ('\(\mathrm{End}(J_{\overline{\Q}}) \otimes \R\)','\(%s\)' % self.real_geom_end_alg_name),
                           ('\(\mathrm{GL}_2\)-type','%s' % self.is_gl2_type_name)]

        self.title = "Genus 2 Isogeny Class %s" % (self.label)
        self.downloads = [
                          ('Download Euler factors', ".")] # url_for(".download_g2c_eulerfactors", label=self.label)),
#                          ('Download stored data for all curves', url_for(".download_g2c_all", label=self.label))]
        
        self.bread = [
                       ('Genus 2 Curves', url_for(".index")),
                       ('$\Q$', url_for(".index_Q")),
                       ('%s' % self.cond, url_for(".by_conductor", conductor=self.cond)),
                       ('%s' % self.label, ' ')
                     ]
Ejemplo n.º 3
0
g2c_columns = SearchColumns([
    LinkCol("label", "g2c.label", "Label", url_for_curve_label, default=True),
    ProcessedLinkCol("class", "g2c.isogeny_class", "Class", lambda v: url_for_isogeny_class_label(class_from_curve_label(v)), class_from_curve_label, default=True, orig="label"),
    ProcessedCol("cond", "g2c.conductor", "Conductor", lambda v: web_latex(factor(v)), align="center", default=True),
    MultiProcessedCol("disc", "ec.discriminant", "Discriminant", ["disc_sign", "abs_disc"], lambda s, a: web_latex_factored_integer(s*ZZ(a)),
                      default=lambda info: info.get("abs_disc"), align="center"),

    MathCol("analytic_rank", "g2c.analytic_rank", "Rank*", default=True),
    MathCol("two_selmer_rank", "g2c.two_selmer_rank", "2-Selmer rank"),
    ProcessedCol("torsion_subgroup", "g2c.torsion", "Torsion",
                 lambda tors: r"\oplus".join([r"\Z/%s\Z"%n for n in literal_eval(tors)]) if tors != "[]" else r"\mathsf{trivial}",
                 default=True, mathmode=True, align="center"),
    ProcessedCol("geom_end_alg", "g2c.geom_end_alg", r"$\textrm{End}^0(J_{\overline\Q})$", lambda v: r"\(%s\)"%geom_end_alg_name(v),
                 short_title="Qbar-end algebra", default=True, align="center"),
    ProcessedCol("end_alg", "g2c.end_alg", r"$\textrm{End}^0(J)$", lambda v: r"\(%s\)"%end_alg_name(v), short_title="Q-end algebra", align="center"),
    CheckCol("is_gl2_type", "g2c.gl2type", r"$\GL_2\textsf{-type}$", short_title="GL2-type"),
    ProcessedCol("st_label", "g2c.st_group", "Sato-Tate", st_display_knowl, short_title='Sato-Tate group', align="center"),
    CheckCol("is_simple_base", "ag.simple", r"$\Q$-simple", short_title="Q-simple"),
    CheckCol("is_simple_geom", "ag.geom_simple", r"\(\overline{\Q}\)-simple", short_title="Qbar-simple"),
    MathCol("aut_grp_tex", "g2c.aut_grp", r"\(\Aut(X)\)", short_title="Q-automorphisms"),
    MathCol("geom_aut_grp_tex", "g2c.geom_aut_grp", r"\(\Aut(X_{\overline{\Q}})\)", short_title="Qbar-automorphisms"),
    MathCol("num_rat_pts", "g2c.all_rational_points", r"$\Q$-points", short_title="Q-points*"),
    MathCol("num_rat_wpts", "g2c.num_rat_wpts",  r"$\Q$-Weierstrass points", short_title="Q-Weierstrass points"),
    CheckCol("locally_solvable", "g2c.locally_solvable", "Locally solvable"),
    CheckCol("has_square_sha", "g2c.analytic_sha", "Square ле*"),
    MathCol("analytic_sha", "g2c.analytic_sha", "Analytic ле*"),
    ProcessedCol("tamagawa_product", "g2c.tamagawa", "Tamagawa", lambda v: web_latex(factor(v)), short_title="Tamagawa product", align="center"),
    ProcessedCol("regulator", "g2c.regulator", "Regulator", lambda v: r"\(%.6f\)"%v, align="right"),
    ProcessedCol("real_period", "g2c.real_period", "Real period", lambda v: r"\(%.6f\)"%v, align="right"),
    ProcessedCol("leading_coeff", "g2c.bsd_invariants", "Leading coefficient", lambda v: r"\(%.6f\)"%v, align="right"),
Ejemplo n.º 4
0
    def make_class(self):
        from lmfdb.genus2_curves.genus2_curve import url_for_curve_label

        # Data
        curves_data = g2cdb().curves.find({"class" : self.label},{'_id':int(0),'label':int(1),'min_eqn':int(1),'disc_key':int(1)}).sort([("disc_key", ASCENDING), ("label", ASCENDING)])
        assert curves_data
        self.curves = [ {"label" : c['label'], "equation_formatted" : list_to_min_eqn(c['min_eqn']),
            "url": url_for_curve_label(c['label'])} for c in curves_data ]
        self.ncurves = curves_data.count()
        self.bad_lfactors = [ [c[0], list_to_factored_poly_otherorder(c[1])]
            for c in self.bad_lfactors]

        # Data derived from Sato-Tate group
        self.st_group_name = st_group_name(self.st_group)
        self.st_group_href = st_group_href(self.st_group)
        self.st0_group_name = st0_group_name(self.real_geom_end_alg)
        # Later used in Lady Gaga box:
        self.real_geom_end_alg_disp = [r'\End(J_{\overline{\Q}}) \otimes \R',
                end_alg_name(self.real_geom_end_alg)]
        if self.is_gl2_type:
            self.is_gl2_type_name = 'yes'
        else:
            self.is_gl2_type_name = 'no'

        # Endomorphism data
        endodata = g2cdb().endomorphisms.find_one({"label" :
            self.curves[0]['label']})
        self.gl2_statement_base = \
            gl2_statement_base(endodata['factorsRR_base'], r'\(\Q\)')
        self.endo_statement_base = \
            """Endomorphism algebra over \(\Q\):<br>""" + \
            endo_statement_isog(endodata['factorsQQ_base'],
                endodata['factorsRR_base'], r'')
        endodata['fod_poly'] = intlist_to_poly(endodata['fod_coeffs'])
        self.fod_statement = fod_statement(endodata['fod_label'],
            endodata['fod_poly'])
        if endodata['fod_label'] != '1.1.1.1':
            self.endo_statement_geom = \
                """Endomorphism algebra over \(\overline{\Q}\):<br>""" + \
                endo_statement_isog(endodata['factorsQQ_geom'],
                    endodata['factorsRR_geom'], r'\overline{\Q}')
        else:
            self.endo_statement_geom = ''

        # Title
        self.title = "Genus 2 Isogeny Class %s" % (self.label)

        # Lady Gaga box
        self.properties = (
                ('Label', self.label),
                ('Number of curves', str(self.ncurves)),
                ('Conductor','%s' % self.cond),
                ('Sato-Tate group', self.st_group_href),
                ('\(%s\)' % self.real_geom_end_alg_disp[0],
                 '\(%s\)' % self.real_geom_end_alg_disp[1]),
                ('\(\mathrm{GL}_2\)-type','%s' % self.is_gl2_type_name)
                )
        x = self.label.split('.')[1]
        self.friends = [('L-function', url_for("l_functions.l_function_genus2_page", cond=self.cond,x=x))]
        #self.downloads = [('Download Euler factors', ".")]
        #self.downloads = [
        #        ('Download Euler factors', "."),
        #            url_for(".download_g2c_eulerfactors", label=self.label)),
        #        ('Download stored data for all curves',
        #            url_for(".download_g2c_all", label=self.label))
        #        ]

        # Breadcrumbs
        self.bread = (
                       ('Genus 2 Curves', url_for(".index")),
                       ('$\Q$', url_for(".index_Q")),
                       ('%s' % self.cond, url_for(".by_conductor", cond=self.cond)),
                       ('%s' % self.label, ' ')
                     )

        # More friends (NOTE: to be improved)
        self.ecproduct_wurl = []
        if hasattr(self, 'ecproduct'):
            for i in range(2):
                curve_label = self.ecproduct[i]
                crv_url = url_for("ec.by_ec_label", label=curve_label)
                if i == 1 or len(set(self.ecproduct)) != 1:
                    self.friends.append(('Elliptic curve ' + curve_label,
                        crv_url))
                self.ecproduct_wurl.append({'label' : curve_label, 'url' :
                    crv_url})

        self.ecquadratic_wurl = []
        if hasattr(self, 'ecquadratic'):
            for i in range(len(self.ecquadratic)):
                curve_label = self.ecquadratic[i]
                crv_spl = curve_label.split('-')
                crv_url = url_for("ecnf.show_ecnf_isoclass", nf = crv_spl[0],
                        conductor_label = crv_spl[1], class_label = crv_spl[2])
                self.friends.append(('Elliptic curve ' + curve_label, crv_url))
                self.ecquadratic_wurl.append({'label' : curve_label, 'url' :
                    crv_url, 'nf' : crv_spl[0]})

        if hasattr(self, 'mfproduct'):
            for i in range(len(self.mfproduct)):
                mf_label = self.mfproduct[i]
                mf_spl = mf_label.split('.')
                mf_spl.append(mf_spl[2][-1])
                mf_spl[2] = mf_spl[2][:-1] # Need a splitting function
                mf_url = url_for("emf.render_elliptic_modular_forms",
                        level=mf_spl[0], weight=mf_spl[1], character=mf_spl[2],
                        label=mf_spl[3])
                self.friends.append(('Modular form ' + mf_label, mf_url))

        if hasattr(self, 'mfhilbert'):
            for i in range(len(self.mfhilbert)):
                mf_label = self.mfhilbert[i]
                mf_spl = mf_label.split('-')
                mf_url = url_for("hmf.render_hmf_webpage",
                        field_label=mf_spl[0], label=mf_label)
                self.friends.append(('Hilbert modular form ' + mf_label, mf_url))
Ejemplo n.º 5
0
 ProcessedCol("eqn",
              "g2c.minimal_equation",
              "Equation",
              lambda v: min_eqn_pretty(literal_eval(v)),
              default=True,
              mathmode=True),
 ProcessedCol("st_group",
              "g2c.st_group",
              "Sato-Tate",
              lambda v: st_link_by_name(1, 4, v),
              default=True,
              align="center"),
 ProcessedCol("end_alg",
              "g2c.end_alg",
              r"\(\Q\)-end algebra",
              lambda v: r"\(%s\)" % end_alg_name(v),
              short_title="Q-end algebra",
              align="center"),
 ProcessedCol("geom_end_alg",
              "g2c.geom_end_alg",
              r"\(\overline{\Q}\)-end algebra",
              lambda v: r"\(%s\)" % geom_end_alg_name(v),
              short_title="Qbar-end algebra",
              align="center"),
 CheckCol("is_simple_base",
          "ag.simple",
          r"\(\Q\)-simple",
          short_title="Q-simple"),
 CheckCol("is_simple_geom",
          "ag.geom_simple",
          r"\(\overline{\Q}\)-simple",