def friends(self): from lmfdb.lfunctions.LfunctionDatabase import get_lfunction_by_url f = [] cglink = url_character(type=self.type, number_field=self.nflabel, modulus=self.modlabel) f.append(("Character group", cglink)) if self.nflabel: f.append(('Number field', '/NumberField/' + self.nflabel)) if self.type == 'Dirichlet' and self.chi.is_primitive( ) and self.conductor < 10000: url = url_character(type=self.type, number_field=self.nflabel, modulus=self.modlabel, number=self.numlabel) if get_lfunction_by_url(url[1:]): f.append(('L-function', '/L' + url)) else: if self.conductor == 1: f.append(('L-function', '/L/Riemann')) if self.type == 'Dirichlet': f.append(('Sato-Tate group', '/SatoTateGroup/0.1.%d' % self.order)) if len(self.vflabel) > 0: f.append(("Value field", '/NumberField/' + self.vflabel)) return f
def friends(self): from lmfdb.lfunctions.LfunctionDatabase import get_lfunction_by_url friendlist = [] cglink = url_character(type=self.type, modulus=self.modulus) friendlist.append(("Character group", cglink)) gal_orb_link = url_character(type=self.type, modulus=self.modulus, orbit_label=self.orbit_label) friendlist.append(("Character orbit", gal_orb_link)) if self.type == "Dirichlet" and self.isprimitive == bool_string(True): url = url_character(type=self.type, number_field=None, modulus=self.modulus, number=self.number) if get_lfunction_by_url(url[1:]): friendlist.append(('L-function', '/L' + url)) else: if self.conductor == 1: friendlist.append(('L-function', '/L/Riemann')) friendlist.append( ('Sato-Tate group', '/SatoTateGroup/0.1.%d' % self.order)) if len(self.vflabel) > 0: friendlist.append(("Value field", '/NumberField/' + self.vflabel)) if self.symbol_numerator(): if self.symbol_numerator() > 0: assoclabel = '2.2.%d.1' % self.symbol_numerator() else: assoclabel = '2.0.%d.1' % -self.symbol_numerator() friendlist.append( ("Associated quadratic field", '/NumberField/' + assoclabel)) label = "%s.%s" % (self.modulus, self.number) myrep = db.artin_reps.lucky({'Dets': {'$contains': label}}) if myrep is not None: j = myrep['Dets'].index(label) artlabel = myrep['Baselabel'] + '.' + num2letters(j + 1) friendlist.append(( 'Artin representation ' + artlabel, url_for( 'artin_representations.render_artin_representation_webpage', label=artlabel))) if self.type == "Dirichlet" and self.isprimitive == bool_string(False): friendlist.append(('Primitive character ' + self.inducing, url_for('characters.render_Dirichletwebpage', modulus=self.conductor, number=self.indlabel))) return friendlist
def friends(self): f = [] cglink = url_character(type=self.type,number_field=self.nflabel,modulus=self.modlabel) f.append( ("Character Group", cglink) ) if self.nflabel: f.append( ('Number Field', '/NumberField/' + self.nflabel) ) if self.type == 'Dirichlet' and self.chi.is_primitive() and self.conductor < 10000: url = url_character(type=self.type, umber_field=self.nflabel, modulus=self.modlabel, number=self.numlabel) if lmfdb.lfunctions.LfunctionDatabase.getInstanceLdata(url[1:]): f.append( ('L-function', '/L'+ url) ) if self.type == 'Dirichlet': f.append( ('Sato-Tate group', '/SatoTateGroup/0.1.%d'%self.order) ) if len(self.vflabel)>0: f.append( ("Value Field", '/NumberField/' + self.vflabel) ) return f
def __init__(self, data): # Need to set mf_dim, eis_dim, cusp_dim, new_dim, old_dim self.__dict__.update(data) if self.level == 1 or ZZ(self.level).is_prime(): self.factored_level = '' else: self.factored_level = ' = ' + ZZ(self.level).factor()._latex_() self.char_conrey = self.char_labels[0] self.char_conrey_str = '\chi_{%s}(%s,\cdot)' % (self.level, self.char_conrey) self.char_conrey_link = url_character(type='Dirichlet', modulus=self.level, number=self.char_conrey) self.newforms = list(db.mf_newforms.search({'space_label':self.label}, projection=2)) oldspaces = db.mf_subspaces.search({'label':self.label, 'sub_level':{'$ne':self.level}}, ['sub_level', 'sub_char_orbit_index', 'sub_char_labels', 'sub_mult']) self.oldspaces = [(old['sub_level'], old['sub_char_orbit_index'], old['sub_char_labels'][0], old['sub_mult']) for old in oldspaces] self.dim_grid = DimGrid.from_db(data) self.plot = db.mf_newspace_portraits.lookup(self.label, projection = "portrait") # Properties self.properties = [('Label',self.label)] if self.plot is not None: self.properties += [(None, '<a href="{0}"><img src="{0}" width="200" height="200"/></a>'.format(self.plot))] self.properties +=[ ('Level',str(self.level)), ('Weight',str(self.weight)), ('Character orbit',self.char_orbit_label), ('Rep. character',r'\(%s\)'%self.char_conrey_str), ('Character field',r'\(\Q%s\)' % ('' if self.char_degree==1 else r'(\zeta_{%s})' % self.char_order)), ('Dimension',str(self.dim)), ('Sturm bound',str(self.sturm_bound)), ('Trace bound',str(self.trace_bound)) ] # Breadcrumbs self.bread = get_bread(level=self.level, weight=self.weight, char_orbit_label=self.char_orbit_label) # Downloads self.downloads = [('Download all stored data', url_for('.download_newspace', label=self.label))] if self.char_labels[0] == 1: self.trivial_character = True character_str = "Trivial Character" if self.dim == 0: self.dim_str = r"\(%s\)"%(self.dim) else: self.minus_dim = self.dim - self.plus_dim self.dim_str = r"\(%s + %s\)"%(self.plus_dim, self.minus_dim) else: self.trivial_character = False character_str = r"Character \(\chi_{{{level}}}({conrey}, \cdot)\)".format(level=self.level, conrey=self.char_labels[0]) self.dim_str = r"\(%s\)"%(self.dim) self.title = r"Space of Cuspidal Newforms of Weight %s, Level %s and %s"%(self.weight, self.level, character_str) self.friends = []
def friends(self): friendlist = [] cglink = url_character(type=self.type, modulus=self.modulus) friendlist.append( ("Character group", cglink) ) if self.type == "Dirichlet" and self.isprimitive == bool_string(True): friendlist.append( ('Sato-Tate group', '/SatoTateGroup/0.1.%d' % self.order) ) if len(self.vflabel) > 0: friendlist.append( ("Value field", '/NumberField/' + self.vflabel) ) if self.symbol_numerator(): if self.symbol_numerator() > 0: assoclabel = '2.2.%d.1' % self.symbol_numerator() else: assoclabel = '2.0.%d.1' % -self.symbol_numerator() friendlist.append(("Associated quadratic field", '/NumberField/' + assoclabel)) if self.type == "Dirichlet" and self.isprimitive == bool_string(False): friendlist.append(('Primitive orbit '+self.inducing, url_for('characters.render_Dirichletwebpage', modulus=self.conductor, orbit_label=self.ind_orbit_label))) return friendlist
def __init__(self, data, space=None, all_m = False, all_n = False): #TODO validate data # Need to set level, weight, character, num_characters, degree, has_exact_qexp, has_complex_qexp, hecke_ring_index, is_twist_minimal # Make up for db_backend currently deleting Nones for elt in db.mf_newforms.col_type: if elt not in data: data[elt] = None self.__dict__.update(data) self._data = data self.hecke_orbit_label = cremona_letter_code(self.hecke_orbit - 1) if self.level == 1 or ZZ(self.level).is_prime(): self.factored_level = '' else: self.factored_level = ' = ' + ZZ(self.level).factor()._latex_() # We always print analytic conductor with 1 decimal digit self.analytic_conductor = '%.1f'%(self.analytic_conductor) self.single_generator = self.hecke_ring_power_basis or (self.dim == 2) if self.has_inner_twist != 0: if self.inner_twist_proved: if len(self.inner_twist == 1): self.star_twist = 'inner twist' else: self.star_twist = 'inner twists' elif len(self.inner_twist) == 1: self.star_twist = 'inner twist*' else: self.star_twist = 'inner twists*' self.has_analytic_rank = data.get('analytic_rank') is not None eigenvals = db.mf_hecke_nf.search({'hecke_orbit_code':self.hecke_orbit_code, 'n':{'$lt':100}}, ['n','an','trace_an'], sort=['n']) if eigenvals: # this should always be true self.has_exact_qexp = True zero = [0] * self.dim self.qexp = [zero] self.texp = [0] for i, ev in enumerate(eigenvals, 1): if ev['n'] != i: raise ValueError("Missing eigenvalue") self.texp.append(ev['trace_an']) if ev.get('an'): self.qexp.append(ev['an']) else: # only had traces self.has_exact_qexp = False self.qexp_prec = len(self.qexp) self.texp_prec = len(self.texp) else: self.has_exact_qexp = False self.rel_dim = self.dim // self.char_degree ## CC_DATA self.cqexp_prec = 1001 # Initial estimate for error messages in render_newform_webpage. # Should get updated in setup_cc_data. self.has_complex_qexp = False # stub, overwritten by setup_cc_data. self.char_conrey = self.char_labels[0] self.char_conrey_str = '\chi_{%s}(%s,\cdot)' % (self.level, self.char_conrey) self.char_conrey_link = url_character(type='Dirichlet', modulus=self.level, number=self.char_conrey) if self.has_inner_twist: self.inner_twist = [(chi,url_character(type='Dirichlet', modulus=self.level, number=chi)) for chi in self.inner_twist] self.character_label = "\(" + str(self.level) + "\)." + self.char_orbit_label self.has_further_properties = (self.is_cm != 0 or self.__dict__.get('is_twist_minimal') or self.has_inner_twist != 0 or self.char_orbit_index == 1 and self.level != 1 or self.hecke_cutters) self.plot = db.mf_newform_portraits.lookup(self.label, projection = "portrait") # properties box self.properties = [('Label', self.label)] if self.plot is not None: self.properties += [(None, '<a href="{0}"><img src="{0}" width="200" height="200"/></a>'.format(self.plot))] self.properties += [('Level', str(self.level)), ('Weight', str(self.weight)), ('Character orbit', '%s.%s' % (self.level, self.char_orbit_label))] if self.is_self_dual != 0: self.properties += [('Self dual', 'Yes' if self.is_self_dual == 1 else 'No')] self.properties += [('Analytic conductor', self.analytic_conductor)] if self.analytic_rank is not None: self.properties += [('Analytic rank', str(int(self.analytic_rank)))] self.properties += [('Dimension', str(self.dim))] if self.projective_image: self.properties += [('Projective image', '\(%s\)' % self.projective_image_latex)] if self.artin_degree: # artin_degree > 0 self.properties += [('Artin image size', str(self.artin_degree))] if self.artin_image: self.properties += [('Artin image', '\(%s\)' % self.artin_image_display)] if self.is_self_twist ==1: if self.is_cm == 1: disc = ' and '.join([ str(d) for d in self.self_twist_discs if d < 0 ]) self.properties += [('CM discriminant', disc)] elif self.is_cm == -1: self.properties += [('CM', 'No')] if self.weight == 1: if self.is_rm == 1: disc = ' and '.join([ str(d) for d in self.self_twist_discs if d > 0 ]) self.properties += [('RM discriminant', disc)] elif self.is_rm == -1: self.properties += [('RM', 'No')] # Breadcrumbs self.bread = get_bread(level=self.level, weight=self.weight, char_orbit_label=self.char_orbit_label, hecke_orbit=cremona_letter_code(self.hecke_orbit - 1)) self.title = "Newform %s"%(self.label)