def __init__(self): parity = ParityBox(name="parity", label="Parity", knowl="gg.parity", width=50, short_width=170) cyc = YesNoBox(name="cyc", label="Cyclic", knowl="group.cyclic", width=50, short_width=170) solv = YesNoBox(name="solv", label="Solvable", knowl="group.solvable", width=50, short_width=170) prim = YesNoBox(name="prim", label="Primitive", knowl="gg.primitive", width=50, short_width=170) n = TextBox(name="n", label="Degree", knowl="gg.degree", example="6", example_span="6 or 4,6 or 2..5 or 4,6..8") t = TextBox(name="t", label="$T$-number", knowl="gg.tnumber", example="3", example_span="3 or 4,6 or 2..5 or 4,6..8") order = TextBox(name="order", label="Order", knowl="group.order", example="6", example_span="6 or 4,6 or 2..35 or 4,6..80") gal = TextBoxNoEg( name="gal", label="Group", knowl="group", example="[8,3]", example_span= "list of %s, e.g. [8,3] or [16,7], group names from the %s, e.g. C5 or S12, and %s, e.g., 7T2 or 11T5" % (display_knowl("group.small_group_label", "GAP id's"), display_knowl("nf.galois_group.name", "list of group labels"), display_knowl("gg.label", "transitive group labels"))) nilpotency = TextBox(name="nilpotency", label="Nilpotency class", knowl="group.nilpotent", example="1..100", example_span="-1, or 1..3") count = TextBox(name="count", label="Results to display", example=50) self.bool_array = [[parity, cyc, solv, prim]] self.browse_array = [[n], [t], [order], [gal], [nilpotency], [count]] self.refine_array = [[parity, cyc, solv, prim], [n, t, order, gal, nilpotency]]
def summary(self): return "The database currently contains %s %s of %s up to %s, lying in %s %s. The tables below show counts of Galois orbits." % ( comma(self.nchars), display_knowl("character.dirichlet", "Dirichlet characters"), display_knowl("character.dirichlet.modulus", "modulus"), comma(self.maxmod), comma(self.norbits), display_knowl("character.dirichlet.galois_orbit", "Galois orbits"))
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"))
def ratpts_table(pts,pts_v): def sorted_points(pts): return sorted(pts,key=lambda P:(max([abs(x) for x in P]),sum([abs(x) for x in P]))) if len(pts) > 1: # always put points at infinity first, regardless of height pts = sorted_points([P for P in pts if P[2] == 0]) + sorted_points([P for P in pts if P[2] != 0]) kid = 'g2c.all_rational_points' if pts_v else 'g2c.known_rational_points' if len(pts) == 0: if pts_v: return 'This curve has no %s.' % display_knowl(kid, 'rational points') else: return 'No %s for this curve.' % display_knowl(kid, 'rational points are known') spts = [point_string(P) for P in pts] caption = 'All points' if pts_v else 'Known points' tabcols = 6 if len(pts) <= tabcols+1: return r'%s: \(%s\)' % (display_knowl(kid,caption),r',\, '.join(spts)) ptstab = ['<table class="ntdata">', '<thead>', '<tr>', th_wrap(kid, caption)] ptstab.extend(['<th></th>' for i in range(tabcols-1)]) ptstab.extend(['</tr>', '</thead>', '<tbody>']) for i in range(0,len(pts),6): ptstab.append('<tr>') ptstab.extend([td_wrapc(P) for P in spts[i:i+6]]) if i+6 > len(pts): ptstab.extend(['<td></td>' for i in range(i+6-len(pts))]) # pad last line ptstab.append('</tr>') ptstab.extend(['</tbody>', '</table>']) return '\n'.join(ptstab)
def ratpts_table(pts, pts_v): if len(pts) > 1: pts = sorted(pts, key=lambda P: (max([abs(x) for x in P]), sum([abs(x) for x in P]))) kid = 'g2c.all_rational_points' if pts_v else 'g2c.known_rational_points' if len(pts) == 0: if pts_v: return '<p>This curve has no %s.</p>' % display_knowl( kid, 'rational points') else: return '<p>No %s for this curve.</p>' % display_knowl( kid, 'rational points are known') strpts = ['(' + ' : '.join(map(str, P)) + ')' for P in pts] caption = 'Points' if pts_v else 'Known points' tabcols = 6 if len(pts) <= tabcols + 1: return r'<p>%s: \(%s\)</p>' % (display_knowl( kid, caption), r',\, '.join(strpts)) ptstab = [ '<table class="ntdata">', '<thead>', '<tr>', th_wrap(kid, caption) ] ptstab.extend(['<th></th>' for i in range(tabcols - 1)]) ptstab.extend(['</tr>', '</thead>', '<tbody>']) for i in range(0, len(pts), 6): ptstab.append('<tr>') ptstab.extend([td_wrapc(P) for P in strpts[i:i + 6]]) if i + 6 > len(pts): ptstab.extend(['<td></td>' for i in range(i + 6 - len(pts))]) # pad last line ptstab.append('</tr>') ptstab.extend(['</tbody>', '</table>']) return '\n'.join(ptstab)
def __init__(self): dimension = TextBox(name="dimension", label="Dimension", knowl="artin.dimension", example="2", example_span="1, 2-4") conductor = TextBox(name="conductor", label="Conductor", knowl="artin.conductor", example="51,100-200") group = TextBoxNoEg( name="group", label="Group", knowl="artin.gg_quotient", example="A5", example_span= "list of %s, e.g. [8,3] or [16,7], group names from the %s, e.g. C5 or S12, and %s, e.g., 7T2 or 11T5" % (display_knowl("group.small_group_label", "GAP id's"), display_knowl("nf.galois_group.name", "list of group labels"), display_knowl("gg.label", "transitive group labels"))) parity = ParityBox(name="parity", label="Parity", knowl="artin.parity") container = TextBox(name="container", label="Smallest permutation container", knowl="artin.permutation_container", example="6T13", example_span="6T13 or 7T6") ram_quantifier = SubsetNoExcludeBox(name="ram_quantifier") ramified = TextBoxWithSelect(name="ramified", label="Ramified primes", knowl="artin.ramified_primes", example="2, 3", select_box=ram_quantifier, example_span="2, 3 (no range allowed)") unramified = TextBox(name="unramified", label="Unramified primes", knowl="artin.unramified_primes", example="5,7", example_span="5, 7, 13 (no range allowed)") root_number = TextBoxNoEg(name="root_number", label="Root number", knowl="artin.root_number", example="1", example_span="at the moment, one of 1 or -1") fsind = TextBoxNoEg( name="frobenius_schur_indicator", label="Frobenius-Schur indicator", knowl="artin.frobenius_schur_indicator", example="1", example_span= "+1 for orthogonal, -1 for symplectic, 0 for non-real character") count = CountBox() self.browse_array = [[dimension], [conductor], [group], [parity], [container], [ramified], [unramified], [root_number], [fsind], [count]] self.refine_array = [[ dimension, conductor, group, root_number, parity ], [container, ramified, unramified, fsind]]
def short_summary(self): return 'The database currently contains %s %s of %s up to %s, lying in %s %s. Among these, L-functions are available for characters of modulus up to 2,800 (and some of higher modulus). Here are some <a href="%s">further statistics</a>.' % ( comma(self.nchars), display_knowl("character.dirichlet", "Dirichlet characters"), display_knowl("character.dirichlet.modulus", "modulus"), comma(self.maxmod), comma(self.norbits), display_knowl("character.dirichlet.galois_orbit", "Galois orbits"), url_for(".statistics"))
def display_character(self): if self.char_order == 1: ord_deg = " (trivial)" else: ord_knowl = display_knowl('character.dirichlet.order', title='order') deg_knowl = display_knowl('character.dirichlet.degree', title='degree') ord_deg = r" (of %s \(%d\) and %s \(%d\))" % (ord_knowl, self.char_order, deg_knowl, self.char_degree) return self.char_orbit_link + ord_deg
def summary(self): return r"The database currently contains %s %s of weight 2 over %s imaginary quadratic fields. It also contains %s %s over %s imaginary quadratic fields (including all with class number one)." % ( comma(self.nforms), display_knowl( "mf.bianchi.bianchimodularforms", "Bianchi modular forms"), self.nformfields, comma(self.ndims), display_knowl("mf.bianchi.spaces", "spaces of cusp forms"), self.ndimfields)
def display_character(self): if self.char_order == 1: ord_deg = " (trivial)" else: ord_knowl = display_knowl('character.dirichlet.order', title='order') deg_knowl = display_knowl('character.dirichlet.degree', title='degree') ord_deg = r" (of %s \(%d\) and %s \(%d\))" % (ord_knowl, self.char_order, deg_knowl, self.char_degree) return self.char_orbit_link + ord_deg
def short_summary(self): return r'The database currently contains all %s %s of %s 1 and %s up to 4, as well as all Sato-Tate groups of weight 0 and degree 1 with %s of order at most $10^{20}$. Here are some <a href="%s">further statistics</a>.' % ( display_knowl('st_group.rational', 'rational'), display_knowl('st_group.definition', 'Sato-Tate groups'), display_knowl('st_group.weight', 'weight'), display_knowl('st_group.degree', 'degree'), display_knowl('st_group.component_group', 'component group'), url_for('.statistics'))
def __init__(self): ncurves = comma(db.g2c_curves.count()) nclasses = comma(db.lfunc_instances.count({'type':'G2Q'})) max_D = comma(db.g2c_curves.max('abs_disc')) g2c_knowl = display_knowl('g2c.g2curve', title='genus 2 curves') disc_knowl = display_knowl('g2c.abs_discriminant', title = "absolute discriminant") stats_url = url_for(".statistics") self.short_summary = 'The database currently contains %s %s over $\Q$ of %s up to %s. Here are some <a href="%s">further statistics</a>.' % (ncurves, g2c_knowl, disc_knowl, max_D, stats_url) self.summary = 'The database currently contains %s genus 2 curves in %s isogeny classes, with %s at most %s.' % (ncurves, nclasses, disc_knowl, max_D)
def show_special_labels(self): raw = [x.split(".")[-1] for x in self.special_labels] specials = [] for x in raw: if ( x == "N" or x == "M" ): # labels for normal subgroups and maximal subgroups continue if x == "Z": specials.append(display_knowl("group.center", "center")) elif x == "D": specials.append( display_knowl("group.commutator_subgroup", "commutator subgroup") ) elif x == "F": specials.append( display_knowl("group.fitting_subgroup", "Fitting subgroup") ) elif x == "Phi": specials.append( display_knowl("group.frattini_subgroup", "Frattini subgroup") ) elif x == "R": specials.append(display_knowl("group.radical", "radical")) elif x == "S": specials.append(display_knowl("group.socle", "socle")) else: n = to_ordinal(int(x[1:]) + 1) if x.startswith("U"): specials.append( "%s term in the %s" % ( n, display_knowl("group.upper_central_series", "upper central series"), ) ) elif x.startswith("L"): specials.append( "%s term in the %s" % ( n, display_knowl("group.lower_central_series", "lower central series"), ) ) elif x.startswith("D"): specials.append( "%s term in the %s" % (n, display_knowl("group.derived_series", "derived series")) ) # Don't show chief series since it's not canonical if self.sylow: specials.append( display_knowl("group.sylow_subgroup", "%s-Sylow subgroup" % self.sylow) ) return ", ".join(specials)
def short_summary(self): return 'The database currently contains %s %s of %s up to %s, lying in %s %s. Among these, L-functions are available for characters of modulus up to 2,800 (and some of higher modulus). In addition, %s, Galois orbits and %s are available up to modulus $10^{20}$. Here are some <a href="%s">futher statistics</a>.' % ( comma(self.nchars), display_knowl("character.dirichlet", "Dirichlet characters"), display_knowl("character.dirichlet.modulus", "modulus"), comma(self.maxmod), comma(self.norbits), display_knowl("character.dirichlet.galois_orbit", "Galois orbits"), display_knowl("character.dirichlet.basic_properties", "basic properties"), display_knowl("character.dirichlet.value_field", "field of values"), url_for(".statistics"))
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)
def __init__(self): nforms = comma(db.mf_newforms.count()) nspaces = comma(db.mf_newspaces.count()) ndim = comma(db.mf_hecke_cc.count()) weight_knowl = display_knowl('mf.elliptic.weight', title='weight') level_knowl = display_knowl('mf.elliptic.level', title='level') newform_knowl = display_knowl('mf.elliptic.newform', title='newforms') #stats_url = url_for(".statistics") self.short_summary = r'The database currently contains %s (Galois orbits of) %s of %s \(k\) and %s \(N\) satisfying \(Nk^2 \le %s\), corresponding to %s modular forms over the complex numbers.' % ( nforms, newform_knowl, weight_knowl, level_knowl, Nk2_bound(), ndim) self.summary = r"The database currently contains %s (Galois orbits of) %s and %s spaces of %s \(k\) and %s \(N\) satisfying \(Nk^2 \le %s\), corresponding to %s modular forms over the complex numbers." % ( nforms, newform_knowl, nspaces, weight_knowl, level_knowl, Nk2_bound(), ndim)
def ALdim_table(al_dims, level, weight): # Assume that the primes always appear in the same order al_dims = sorted(al_dims, key=lambda x:tuple(-ev for (p,ev) in x[0])) header = [] first_row = al_dims[0][0] primes = [p for (p,ev) in first_row] num_primes = len(primes) for p, ev in first_row: header.append(r'<th>\(%s\)</th>'%p) if len(first_row) > 1: header.append(r"<th class='right'>%s</th>"%(display_knowl('cmf.fricke', title='Fricke').replace('"',"'"))) header.append('<th>Dim.</th>') rows = [] fricke = {1:0,-1:0} for i, (vec, dim, cnt) in enumerate(al_dims): row = [] sign = 1 s = '' for p, ev in vec: if ev == 1: s += '%2B' symb = '+' else: sign = -sign s += '-' symb = '-' row.append(r'<td>\(%s\)</td>'%(symb)) if len(vec) > 1: row.append(r"<td class='right'>\(%s\)</td>"%('+' if sign == 1 else '-')) query = {'level':level, 'weight':weight, 'char_order':1, 'atkin_lehner_string':s} if cnt == 1: query['jump'] = 'yes' link = newform_search_link(r'\(%s\)'%dim, **query) row.append(r'<td>%s</td>'%(link)) fricke[sign] += dim if i == len(al_dims) - 1 and len(vec) > 1: tr = "<tr class='endsection'>" else: tr = "<tr>" rows.append(tr + ''.join(row) + '</tr>') if num_primes > 1: plus_knowl = display_knowl('cmf.plus_space',title='Plus space').replace('"',"'") plus_link = newform_search_link(r'\(%s\)'%fricke[1], level=level, weight=weight, char_order=1, fricke_eigenval=1) minus_knowl = display_knowl('cmf.minus_space',title='Minus space').replace('"',"'") minus_link = newform_search_link(r'\(%s\)'%fricke[-1], level=level, weight=weight, char_order=1, fricke_eigenval=-1) rows.append(r"<tr><td colspan='%s'>%s</td><td class='right'>\(+\)</td><td>%s</td></tr>"%(num_primes, plus_knowl, plus_link)) rows.append(r"<tr><td colspan='%s'>%s</td><td class='right'>\(-\)</td><td>%s</td></tr>"%(num_primes, minus_knowl, minus_link)) return ("<table class='ntdata'><thead><tr>%s</tr></thead><tbody>%s</tbody></table>" % (''.join(header), ''.join(rows)))
def __init__(self): parity = ParityBox(name="parity", label="Parity", knowl="gg.parity") cyc = YesNoBox(name="cyc", label="Cyclic", knowl="group.cyclic") solv = YesNoBox(name="solv", label="Solvable", knowl="group.solvable") prim = YesNoBox(name="prim", label="Primitive", knowl="gg.primitive") n = TextBox(name="n", label="Degree", knowl="gg.degree", example="6", example_span="6 or 4,6 or 2..5 or 4,6..8") t = TextBox(name="t", label="$T$-number", knowl="gg.tnumber", example="3", example_span="3 or 4,6 or 2..5 or 4,6..8") order = TextBox(name="order", label="Order", knowl="group.order", example="6", example_span="6 or 4,6 or 2..35 or 4,6..80") gal = TextBoxNoEg( name="gal", label="Group", knowl="group", example_span_colspan=8, example="[8,3]", example_span= "list of %s, e.g. [8,3] or [16,7], group names from the %s, e.g. C5 or S12, and %s, e.g., 7T2 or 11T5" % (display_knowl("group.small_group_label", "GAP id's"), display_knowl("nf.galois_group.name", "list of group labels"), display_knowl("gg.label", "transitive group labels"))) nilpotency = TextBox(name="nilpotency", label="Nilpotency class", knowl="group.nilpotent", example="1..100", example_span="-1, or 1..3") arith_equiv = TextBox(name="arith_equiv", label="Equivalent siblings", knowl="gg.arithmetically_equiv_input", example="1", example_span="1 or 2,3 or 1..5 or 1,3..10") count = CountBox() self.browse_array = [[n, parity], [t, cyc], [order, solv], [nilpotency, prim], [gal], [arith_equiv], [count]] self.refine_array = [[parity, cyc, solv, prim, arith_equiv], [n, t, order, gal, nilpotency]]
def ALdim_table(al_dims, level, weight): # Assume that the primes always appear in the same order al_dims = sorted(al_dims, key=lambda x:tuple(-ev for (p,ev) in x[0])) header = [] first_row = al_dims[0][0] primes = [p for (p,ev) in first_row] num_primes = len(primes) for p, ev in first_row: header.append(r'<th>\(%s\)</th>'%p) if len(first_row) > 1: header.append(r"<th class='right'>%s</th>"%(display_knowl('cmf.fricke', title='Fricke').replace('"',"'"))) header.append('<th>Dim.</th>') rows = [] fricke = {1:0,-1:0} for i, (vec, dim, cnt) in enumerate(al_dims): row = [] sign = 1 s = '' for p, ev in vec: if ev == 1: s += '%2B' symb = '+' else: sign = -sign s += '-' symb = '-' row.append(r'<td>\(%s\)</td>'%(symb)) if len(vec) > 1: row.append(r"<td class='right'>\(%s\)</td>"%('+' if sign == 1 else '-')) query = {'level':level, 'weight':weight, 'char_order':1, 'atkin_lehner_string':s} if cnt == 1: query['jump'] = 'yes' link = newform_search_link(r'\(%s\)'%dim, **query) row.append(r'<td>%s</td>'%(link)) fricke[sign] += dim if i == len(al_dims) - 1 and len(vec) > 1: tr = "<tr class='endsection'>" else: tr = "<tr>" rows.append(tr + ''.join(row) + '</tr>') if num_primes > 1: plus_knowl = display_knowl('cmf.plus_space',title='Plus space').replace('"',"'") plus_link = newform_search_link(r'\(%s\)'%fricke[1], level=level, weight=weight, char_order=1, fricke_eigenval=1) minus_knowl = display_knowl('cmf.minus_space',title='Minus space').replace('"',"'") minus_link = newform_search_link(r'\(%s\)'%fricke[-1], level=level, weight=weight, char_order=1, fricke_eigenval=-1) rows.append(r"<tr><td colspan='%s'>%s</td><td class='right'>\(+\)</td><td>%s</td></tr>"%(num_primes, plus_knowl, plus_link)) rows.append(r"<tr><td colspan='%s'>%s</td><td class='right'>\(-\)</td><td>%s</td></tr>"%(num_primes, minus_knowl, minus_link)) return ("<table class='ntdata'><thead><tr>%s</tr></thead><tbody>%s</tbody></table>" % (''.join(header), ''.join(rows)))
def __init__(self): self.genus_max = db.hgcwa_passports.max('genus') self.dim_max = db.hgcwa_passports.max('dim') self.g0_max = db.hgcwa_passports.max('g0') self.refined_passports_knowl = display_knowl( 'curve.highergenus.aut.refinedpassport', title='refined passports') self.generating_vectors_knowl = display_knowl( 'curve.highergenus.aut.generatingvector', title='generating vectors') self.dimension_knowl = display_knowl('curve.highergenus.aut.dimension', title='dimension'), self.distinct_generating_vectors = comma(db.hgcwa_passports.count()) self.distinct_refined_passports = comma(compute_total_refined_pp()) self.by_genus_data = init_by_genus_data()
def __init__(self): self.ncurves = db.ec_curvedata.count() self.ncurves_c = comma(self.ncurves) self.nclasses = db.ec_classdata.count() self.nclasses_c = comma(self.nclasses) self.max_N_Cremona = 500000 self.max_N_Cremona_c = comma(500000) self.max_N = db.ec_curvedata.max('conductor') self.max_N_c = comma(self.max_N) self.max_rank = db.ec_curvedata.max('rank') self.max_rank_c = comma(self.max_rank) self.cond_knowl = display_knowl('ec.q.conductor', title="conductor") self.rank_knowl = display_knowl('ec.rank', title="rank") self.ec_knowl = display_knowl('ec.q', title='elliptic curves') self.cl_knowl = display_knowl('ec.isogeny', title="isogeny classes")
def __init__(self): degree = TextBox(name='n', label='Degree', knowl='lf.degree', example='6', example_span='6, or a range like 3..5') qp = TextBox(name='p', label=r'Prime $p$ for base field $\Q_p$', short_label='Prime $p$', knowl='lf.qp', example='3', example_span='3, or a range like 3..7') c = TextBox(name='c', label='Discriminant exponent $c$', knowl='lf.discriminant_exponent', example='8', example_span='8, or a range like 2..6') e = TextBox(name='e', label='Ramification index $e$', knowl='lf.ramification_index', example='3', example_span='3, or a range like 2..6') topslope = TextBox( name='topslope', label='Top slope', knowl='lf.top_slope', example='4/3', example_span='0, 1, 2, 4/3, 3.5, or a range like 3..5') gal = TextBoxNoEg( name='gal', label='Galois group $G$', short_label='Galois group', knowl='nf.galois_group', example='5T3', example_span= 'list of %s, e.g. [8,3] or [16,7], group names from the %s, e.g. C5 or S12, and %s, e.g., 7T2 or 11T5' % (display_knowl('group.small_group_label', "GAP id's"), display_knowl('nf.galois_group.name', 'list of group labels'), display_knowl('gg.label', 'transitive group labels'))) results = TextBox( "count", label="Results to display", example=50, ) self.browse_array = [[degree], [qp], [c], [e], [topslope], [gal], [results]] self.refine_array = [[degree, c, gal], [qp, e, topslope]]
def short_summary(self): stats_url = url_for(".statistics") g2c_knowl = display_knowl("g2c.g2curve", title="genus 2 curves") return ( r'The database currently contains %s %s over $\Q$ of %s up to %s. Here are some <a href="%s">further statistics</a>.' % (self.ncurves, g2c_knowl, self.disc_knowl, self.max_D, stats_url))
def __init__(self): self.ncurves = db.ec_curves.count() self.ncurves_c = comma(db.ec_curves.count()) self.max_N = db.ec_curves.max('conductor') # round up to nearest multiple of 1000 self.max_N = 1000 * int((self.max_N / 1000) + 1) # NB while we only have the Cremona database, the upper bound # will always be a multiple of 1000, but it looks funny to # show the maximum condictor as something like 399998; there # are no elliptic curves whose conductor is a multiple of # 1000. self.max_N_c = comma(self.max_N) self.max_rank = db.ec_curves.max('rank') self.max_rank_c = comma(self.max_rank) self.cond_knowl = display_knowl('ec.q.conductor', title="conductor") self.rank_knowl = display_knowl('ec.rank', title="rank")
def __init__(self): ngalmaps = comma(db.belyi_galmaps.stats.count()) npassports = comma(db.belyi_passports.stats.count()) max_deg = comma(db.belyi_passports.max('deg')) deg_knowl = display_knowl('belyi.degree', title = "degree") belyi_knowl = '<a title="Belyi maps (up to Galois conjugation) [belyi.galmap]" knowl="belyi.galmap" kwargs="">Belyi maps</a>' stats_url = url_for(".statistics") self.short_summary = 'The database currently contains %s %s of %s up to %s. Here are some <a href="%s">further statistics</a>.' % (ngalmaps, belyi_knowl, deg_knowl, max_deg, stats_url) self.summary = "The database currently contains %s Galois orbits of Belyi maps in %s passports, with %s at most %s." % (ngalmaps, npassports, deg_knowl, max_deg)
def __init__(self): ngalmaps = comma(db.belyi_galmaps.stats.count()) npassports = comma(db.belyi_passports.stats.count()) max_deg = comma(db.belyi_passports.max('deg')) deg_knowl = display_knowl('belyi.degree', title="degree") belyi_knowl = '<a title="Belyi maps (up to Galois conjugation) [belyi.galmap]" knowl="belyi.galmap" kwargs="">Belyi maps</a>' stats_url = url_for(".statistics") self.short_summary = 'The database currently contains %s %s of %s up to %s. Here are some <a href="%s">further statistics</a>.' % ( ngalmaps, belyi_knowl, deg_knowl, max_deg, stats_url) self.summary = "The database currently contains %s Galois orbits of Belyi maps in %s passports, with %s at most %s." % ( ngalmaps, npassports, deg_knowl, max_deg)
def __init__(self): self.nlats = comma(db.lat_lattices.count()) self.max_cn = db.lat_lattices.max("class_number") self.max_dim = db.lat_lattices.max("dim") self.max_det = db.lat_lattices.max("det") self.kposdef = display_knowl('lattice.postive_definite', 'positive definite') self.kintegral = display_knowl('lattice.definition', 'integral lattices') self.kcatalogue = display_knowl('lattice.catalogue_of_lattices', 'Catalogue of Lattices') self.kcn = display_knowl('lattice.class_number', 'class number') self.kdim = display_knowl('lattice.dimension', 'dimension') self.kdet = display_knowl('lattice.determinant', 'determinant') self.kpri = display_knowl('lattice.primitive', 'primitive')
def display_hecke_cutters(self): polynomials = [bigpoly_knowl(F, var='T%s'%p) for p,F in self.hecke_cutters] title = 'linear operator' if len(polynomials) > 1: title += 's' knowl = display_knowl('cmf.hecke_cutter', title=title) desc = "<p>This newform can be constructed as the " if len(polynomials) > 1: desc += "intersection of the kernels of the following %s acting on %s:</p>\n<table>" desc = desc % (knowl, self.display_newspace()) desc += "\n".join("<tr><td>%s</td></tr>" % F for F in polynomials) + "\n</table>" elif len(polynomials) == 1: desc += "kernel of the %s %s acting on %s." desc = desc % (knowl, polynomials[0], self.display_newspace()) else: desc = r"<p>There are no other newforms in %s.</p>"%(self.display_newspace()) return desc
def display_inner_twists(self): if self.inner_twist_count == -1: # Only CM data available if self.is_cm: discriminant = self.cm_discs[0] return '<p>Only self twists have been computed for this newform, which has CM by %s.</p>' % (quad_field_knowl(discriminant)) else: return '<p>This newform does not have CM; other inner twists have not been computed.</p>' def th_wrap(kwl, title): return ' <th>%s</th>' % display_knowl(kwl, title=title) def td_wrap(val): return ' <td>%s</th>' % val twists = ['<table class="ntdata">', '<thead>', ' <tr>', th_wrap('character.dirichlet.galois_orbit_label', 'Char. orbit'), th_wrap('character.dirichlet.parity', 'Parity'), #th_wrap('character.dirichlet.order', 'Order'), th_wrap('cmf.inner_twist_multiplicity', 'Mult.'), th_wrap('cmf.self_twist_col', 'Type'), th_wrap('cmf.inner_twist_proved', 'Proved'), ' </tr>', '</thead>', '<tbody>'] trivial = [elt for elt in self.inner_twists if elt[6] == 1] CMRM = sorted([elt for elt in self.inner_twists if elt[6] not in [0,1]], key = lambda elt: elt[2]) other = sorted([elt for elt in self.inner_twists if elt[6] == 0], key = lambda elt: (elt[2],elt[3])) self.inner_twists = trivial + CMRM + other for proved, mult, modulus, char_orbit_index, parity, order, discriminant in self.inner_twists: label = '%s.%s' % (modulus, cremona_letter_code(char_orbit_index-1)) parity = 'Even' if parity == 1 else 'Odd' proved = 'yes' if proved == 1 else 'no' link = display_knowl('character.dirichlet.orbit_data', title=label, kwargs={'label':label}) if discriminant == 0: field = '' elif discriminant == 1: field = 'trivial' else: cmrm = 'CM by ' if discriminant < 0 else 'RM by ' field = cmrm + quad_field_knowl(discriminant) twists.append(' <tr>') twists.extend(map(td_wrap, [link, parity, mult, field, proved])) # add order back eventually twists.append(' </tr>') twists.extend(['</tbody>', '</table>']) return '\n'.join(twists)
def display_hecke_cutters(self): polynomials = [] truncated = False for p,F in self.hecke_cutters: cut = len(F) - 1 count = 0 while cut >= 0 and count < 8: if F[cut]: count += 1 cut -= 1 if count < 8 or cut == 0 and abs(F[0]) < 100: F = latex(coeff_to_poly(F, 'T%s'%p)) else: # truncate to the first 8 nonzero coefficients F = [0]*(cut+1) + F[cut+1:] F = latex(coeff_to_poly(F, 'T%s'%p)) + r' + \cdots' truncated = True polynomials.append(web_latex_split_on_pm(F)) title = 'linear operator' if len(polynomials) > 1: title += 's' knowl = display_knowl('mf.elliptic.hecke_cutter', title=title) desc = "<p>This newform can be constructed as the " if truncated or len(polynomials) > 1: if len(polynomials) > 1: desc += "intersection of the kernels " else: desc += "kernel " desc += "of the following %s acting on %s:</p>\n<table>" desc = desc % (knowl, self.display_newspace()) desc += "\n".join("<tr><td>%s</td></tr>" % F for F in polynomials) + "\n</table>" elif len(polynomials) == 1: desc += "kernel of the %s %s acting on %s." desc = desc % (knowl, polynomials[0], self.display_newspace()) else: desc = r"<p>There are no other newforms in %s.</p>"%(self.display_newspace()) return desc
def __init__(self): degree = TextBox(name="degree", label="Degree", knowl="nf.degree", example=3) signature = TextBox(name="signature", label="Signature", knowl="nf.signature", example="[1,1]") discriminant = TextBox(name="discriminant", label="Discriminant", knowl="nf.discriminant", example="-1000..-1", example_span="-3 or 1000-2000") rd = TextBox(name="rd", label="Root discriminant", knowl="nf.root_discriminant", example="1..4.3", example_span="a range such as 1..4.3 or 3-10") cm_field = YesNoBox(name="cm_field", label="CM field", knowl="nf.cm_field") gal = TextBoxNoEg( name="galois_group", label="Galois group", knowl="nf.galois_group", example="C5", example_span_colspan=4, example_span= "%s, e.g. [8,3] or [16,7]; %s, e.g. C5 or S12; %s, e.g., 7T2 or 11T5" % (display_knowl("group.small_group_label", "GAP id's"), display_knowl("nf.galois_group.name", "group names"), display_knowl("gg.label", "transitive group labels"))) regulator = TextBox(name="regulator", label="Regulator", knowl="nf.regulator", example="1..3.5", example_span="a range such as 1..3.5") class_number = TextBox(name="class_number", label="Class number", knowl="nf.class_number", example="5") class_group = TextBox(name="class_group", label="Class group structure", knowl="nf.ideal_class_group", example="[2,4]", example_span="[ ], [3], or [2,4]") num_ram = TextBox(name="num_ram", label="Ramified prime count", knowl="nf.ramified_primes", example=2) ram_quantifier = SubsetNoExcludeBox(name="ram_quantifier") ram_primes = TextBoxWithSelect(name="ram_primes", label="Ramified", knowl="nf.ramified_primes", example="2,3", select_box=ram_quantifier) ur_primes = TextBox(name="ur_primes", label="Unramified primes", knowl="nf.unramified_prime", example="2,3") subfield = TextBox(name="subfield", label="Intermediate field", knowl="nf.intermediate_fields", example_span="2.2.5.1 or x^2-5 or a " + display_knowl("nf.nickname", "field nickname"), example="x^2-5") count = CountBox() self.browse_array = [[degree, signature], [discriminant, rd], [gal], [class_number, class_group], [num_ram, cm_field], [ram_primes, ur_primes], [regulator, subfield], [count]] self.refine_array = [[ degree, signature, gal, class_number, class_group ], [regulator, num_ram, ram_primes, ur_primes, cm_field], [discriminant, rd, subfield]]
def th_wrap(kwl, title): return ' <th>%s</th>' % display_knowl(kwl, title=title)
def char_conrey_link(self): if self.embedding_label is None: raise ValueError label = '%s.%s' % (self.level, self.embedding_label.split('.')[0]) return display_knowl('character.dirichlet.data', title=label, kwargs={'label':label})
def __init__(self): degree = TextBox(name="degree", label="Degree", knowl="nf.degree", example=3) signature = TextBox(name="signature", label="Signature", knowl="nf.signature", example="[1,1]") discriminant = TextBox(name="discriminant", label="Discriminant", knowl="nf.discriminant", example="-1000..-1", example_span="-3 or 1000-2000") rd = TextBox(name="rd", label="Root discriminant", knowl="nf.root_discriminant", example="1..4.3", example_span="a range such as 1..4.3 or 3-10") cm_field = YesNoBox(name="cm_field", label="CM field", knowl="nf.cm_field") gal = TextBox(name="galois_group", label="Galois group", knowl="nf.galois_search", example="C5", example_span="[8,3], C5 or 7T2") is_galois = YesNoBox(name="is_galois", label="Is Galois", knowl="nf.galois_group") regulator = TextBox(name="regulator", label="Regulator", knowl="nf.regulator", example="1..3.5", example_span="a range such as 1..3.5") class_number = TextBox(name="class_number", label="Class number", knowl="nf.class_number", example="5") class_group = TextBox(name="class_group", label="Class group structure", knowl="nf.ideal_class_group", example="[2,4]", example_span="[ ], [3], or [2,4]") num_ram = TextBox(name="num_ram", label="Ramified prime count", knowl="nf.ramified_primes", example=2) ram_quantifier = SubsetNoExcludeBox(name="ram_quantifier") ram_primes = TextBoxWithSelect(name="ram_primes", label="Ramified", knowl="nf.ramified_primes", example="2,3", select_box=ram_quantifier) ur_primes = TextBox(name="ur_primes", label="Unramified primes", knowl="nf.unramified_prime", example="2,3") subfield = TextBox(name="subfield", label="Intermediate field", knowl="nf.intermediate_fields", example_span="2.2.5.1 or x^2-5 or a " + display_knowl("nf.nickname", "field nickname"), example="x^2-5") count = CountBox() self.browse_array = [[degree, signature], [discriminant, rd], [gal, is_galois], [class_number, class_group], [num_ram, cm_field], [ram_primes, ur_primes], [regulator, subfield], [count]] self.refine_array = [[ degree, signature, class_number, class_group, cm_field ], [num_ram, ram_primes, ur_primes, gal, is_galois], [discriminant, rd, regulator, subfield]]
def short_label(d): return display_knowl("av.decomposition", "Dim %s factors" % d)
def nbsp(knowl, label): return " " + display_knowl(knowl, label)
def short_summary(self): stats_url = url_for(".statistics") g2c_knowl = display_knowl('g2c.g2curve', title='genus 2 curves') return 'The database currently contains %s %s over $\Q$ of %s up to %s. Here are some <a href="%s">further statistics</a>.' % (self.ncurves, g2c_knowl, self.disc_knowl, self.max_D, stats_url)
def __init__(self): self.ncurves = comma(db.g2c_curves.count()) self.max_D = comma(db.g2c_curves.max('abs_disc')) self.disc_knowl = display_knowl('g2c.abs_discriminant', title = "absolute discriminant")
def th_wrap(kwl, title): return ' <th>%s</th>' % display_knowl(kwl, title=title)
def __init__(self): self.ngalmaps = comma(db.belyi_galmaps_fixed.stats.count()) self.npassports = comma(db.belyi_passports_fixed.stats.count()) self.max_deg = comma(db.belyi_passports_fixed.max("deg")) self.deg_knowl = display_knowl("belyi.degree", title="degree") self.belyi_knowl = '<a title="Belyi maps (up to Galois conjugation) [belyi.galmap]" knowl="belyi.galmap" kwargs="">Belyi maps</a>'
def char_orbit_link(self): label = '%s.%s' % (self.level, self.char_orbit_label) return display_knowl('character.dirichlet.orbit_data', title=label, kwargs={'label':label})