Beispiel #1
0
class LFStats(StatsDisplay):
    table = db.lf_fields
    baseurl_func = ".index"
    short_display = {
        'galois_label': 'Galois group',
        'n': 'degree',
        'e': 'ramification index',
        'c': 'discriminant exponent'
    }
    sort_keys = {'galois_label': galdata}
    formatters = {'galois_label': galformatter}
    query_formatters = {
        'galois_label': (lambda gal: r'gal=%s' % (galunformatter(gal)))
    }

    stat_list = [
        ramdisp(2),
        ramdisp(3),
        discdisp(2),
        discdisp(3),
        galdisp(2, 4),
        galdisp(2, 6),
        galdisp(2, 8),
        galdisp(2, 10),
        galdisp(2, 12),
        galdisp(2, 14),
        galdisp(3, 6),
        galdisp(3, 9),
        galdisp(3, 12),
        galdisp(3, 15),
        galdisp(5, 10),
        galdisp(5, 15),
        galdisp(7, 14)
    ]

    def __init__(self):
        self.numfields = db.lf_fields.count()

    @property
    def short_summary(self):
        return self.summary + '  Here are some <a href="%s">further statistics</a>.' % (
            url_for(".statistics"))

    @property
    def summary(self):
        return r'The database currently contains %s %s, including all with $p < 200$ and %s $n < 16$.' % (
            comma(self.numfields),
            display_knowl("lf.padic_field", r"$p$-adic fields"),
            display_knowl("lf.degree", "degree"))
Beispiel #2
0
class ArtinStats(StatsDisplay):
    table = db.artin_reps
    baseurl_func = ".index"

    stat_list = [
        {"cols": ["Dim", "Conductor"],
         "constraint": {"Hide": 0},
         "totaler": totaler(),
         "proportioner": proportioners.per_row_total},
        {"cols": ["Dim", "NumBadPrimes"],
         "constraint": {"Hide": 0},
         "totaler": totaler(),
         "proportioner": proportioners.per_row_total},
        {"cols": ["Indicator", "Dim"],
         "constraint": {"Hide": 0}},
        {"cols": ["Is_Even", "Dim"],
         "constraint": {"Hide": 0}},
        {"cols": ["GaloisLabel"],
         "constraint": {"Hide": 0}},
        {"cols": ["Proj_nTj"],
         "constraint": {"Hide": 0}},
        {"cols": ["Container"],
         "constraint": {"Hide": 0}}
    ]
    knowls = {"Dim": "artin.dimension",
              "Conductor": "artin.conductor",
              "GaloisLabel": "artin.gg_quotient",
              "Is_Even": "artin.parity",
              "Proj_nTj": "artin.projective_image",
              "NumBadPrimes": "artin.ramified_primes",
              "Container": "artin.permutation_container",
              "Indicator": "artin.frobenius_schur_indicator"}
    top_titles = {"Indicator": "Frobenius-Schur indicators",
                  "Container": "smallest permutation containers",
                  "Is_Even": "parities"}
    short_display = {"Dim": "dimension",
                     "Conductor": "conductor",
                     "GaloisLabel": "Galois group",
                     "Is_Even": "parity",
                     "Proj_nTj": "projective image",
                     "Container": "container",
                     "NumBadPrimes": "number of ramified primes",
                     "Indicator": "indicator"}
    sort_keys = {"GaloisLabel": galdata,
                 "Proj_nTj": galdata,
                 "Container": galdata}
    formatters = {"Conductor": lambda N: scinot(range_formatter(N)),
                  "Is_Even": lambda x: "even" if x in ["even", True] else "odd",
                  "GaloisLabel": galformatter,
                  "Container": contformatter,
                  "Proj_nTj": projformatter}
    query_formatters = {
        "Dim": (lambda d: "dimension=%s" % range_formatter(d)),
        "Conductor": (lambda N: "conductor=%s" % (unsci(range_formatter(N)))),
        "NumBadPrimes": (lambda N: "num_ram=%s" % range_formatter(N)),
        "GaloisLabel": (lambda gal: r"group=%s" % (galunformatter(gal))),
        "Proj_nTj": (lambda proj: r"projective_image=%s" % (galunformatter(proj))),
        "Container": (lambda cont: r"container=%s" % (galunformatter(cont))),
        "Is_Even": (lambda x: r"parity=%s" % ("even" if x in ["even", True] else "odd")),
        "Indicator": (lambda ind: r"frobenius_schur_indicator=%s" % ind),
    }
    buckets = {
        "Conductor": [trange(a, b) for (a,b) in intervals(0,8,2) + intervals(8,24,4) + intervals(24,56,8) + intervals(56,88,16)] + [trange(88,None)],
        "Dim": [str(x) for x in range(1,13)] + ["14-21", "24-30", "35", "40-70"]
    }

    def __init__(self):
        hide = {"Hide": 0}
        self.nreps = db.artin_reps.count(hide)
        self.nfields = db.artin_reps.count_distinct("NFGal", hide)
        self.ngroups = db.artin_reps.count_distinct("GaloisLabel", hide)
        self.maxdim = db.artin_reps.max("Dim")
        maxcond = ZZ(db.artin_reps.max("Conductor"))
        self.maxcond = maxcond.factor()._latex_()
        self.amaxcond = maxcond.n(digits=2)._latex_()

    @property
    def summary(self):
        return r"The database currently contains {nreps} Galois conjugacy classes of {repknowl}, for a total of {nfields} {nfknowl} with {ngroups} {gpknowl}.  The largest {dimknowl} is ${mdim}$ and the largest {condknowl} is ${mcond} \approx {amcond}$.".format(
            nreps=comma(self.nreps),
            repknowl=display_knowl("artin", "Artin representations"),
            nfields=comma(self.nfields),
            nfknowl=display_knowl("artin.number_field", "number fields"),
            ngroups=self.ngroups,
            gpknowl=display_knowl("artin.gg_quotient", "Galois groups"),
            dimknowl=display_knowl("artin.dimension", "dimension"),
            mdim=self.maxdim,
            condknowl=display_knowl("artin.conductor", "conductor"),
            mcond=self.maxcond,
            amcond=self.amaxcond)

    @property
    def short_summary(self):
        return r'The database currently contains {nreps} Galois conjugacy classes of {repknowl}, for a total of {nfields} {nfknowl}.  Here are some <a href="{url}">further statistics</a>.'.format(
            nreps=comma(self.nreps),
            repknowl=display_knowl("artin", "Artin representations"),
            nfields=comma(self.nfields),
            nfknowl=display_knowl("artin.number_field", "number fields"),
            url=url_for(".statistics"))