Пример #1
0
def initLfunction(L, args, request):
    ''' Sets the properties to show on the homepage of an L-function page.
    '''

    info = {'title': L.title}
    try:
        info['citation'] = L.citation
    except AttributeError:
        info['citation'] = ""
    try:
        info['support'] = L.support
    except AttributeError:
        info['support'] = ""

    info['Ltype'] = L.Ltype()

    # Here we should decide which values are indeed special values
    # According to Brian, odd degree has special value at 1, and even
    # degree has special value at 1/2.
    # (however, I'm not sure this is true if L is not primitive -- GT)

    # Now we usually display both
    if L.Ltype() != "artin" or (L.Ltype() == "artin" and L.sign != 0):
    #    if is_even(L.degree) :
    #        info['sv12'] = specialValueString(L, 0.5, '1/2')
    #    if is_odd(L.degree):
    #        info['sv1'] = specialValueString(L, 1, '1')
        info['sv1'] = specialValueString(L, 1, '1')
        info['sv12'] = specialValueString(L, 0.5, '1/2')

    info['args'] = args

    info['credit'] = L.credit
    # info['citation'] = L.citation

    try:
        info['factorization'] = L.factorization
    except:
        pass

    try:
        info['url'] = L.url
    except:
        info['url'] = ''

    info['degree'] = int(L.degree)

    info['zeroeslink'] = (request.url.replace('/L/', '/L/Zeros/').
                          replace('/Lfunction/', '/L/Zeros/').
                          replace('/L-function/', '/L/Zeros/'))  # url_for('zeroesLfunction',  **args)

    info['plotlink'] = (request.url.replace('/L/', '/L/Plot/').
                        replace('/Lfunction/', '/L/Plot/').
                        replace('/L-function/', '/L/Plot/'))  # info['plotlink'] = url_for('plotLfunction',  **args)

    info['bread'] = []
    info['properties2'] = set_gaga_properties(L)

    # Create friendlink by removing 'L/' and ending '/'
    friendlink = request.url.replace('/L/', '/').replace('/L-function/', '/').replace('/Lfunction/', '/')
    splitlink = friendlink.rpartition('/')
    friendlink = splitlink[0] + splitlink[2]
    logger.debug(L.Ltype())

    if L.Ltype() == 'maass':
        if L.group == 'GL2':
            minNumberOfCoefficients = 100     # TODO: Fix this to take level into account

            if len(L.dirichlet_coefficients) < minNumberOfCoefficients:
                info['zeroeslink'] = ''
                info['plotlink'] = ''
            info['bread'] = get_bread(2, [('Maass Form',
                                           url_for('.l_function_maass_browse_page')),
                                          ('\(' + L.texname + '\)', request.url)])
            info['friends'] = [('Maass Form ', friendlink)]
        else:
            info['bread'] = get_bread(L.degree,
                                      [('Maass Form', url_for('.l_function_maass_gln_browse_page',
                                        degree='degree' + str(L.degree))),
                                     (L.dbid, request.url)])

    elif L.Ltype() == 'riemann':
        info['bread'] = get_bread(1, [('Riemann Zeta', request.url)])
        info['friends'] = [('\(\mathbb Q\)', url_for('number_fields.by_label', label='1.1.1.1')), ('Dirichlet Character \(\\chi_{1}(1,\\cdot)\)',
                           url_character(type='Dirichlet', modulus=1, number=1))]

    elif L.Ltype() == 'dirichlet':
        mod, num = L.charactermodulus, L.characternumber
        Lpattern = r"\(L(s,\chi_{%s}(%s,&middot;))\)"
        if mod > 1:
            pmod,pnum = WebDirichlet.prevprimchar(mod, num)
            Lprev = (Lpattern%(pmod,pnum),url_for('.l_function_dirichlet_page',modulus=pmod,number=pnum))
        else:
            Lprev = ('','')
        nmod,nnum = WebDirichlet.nextprimchar(mod, num)
        Lnext = (Lpattern%(nmod,nnum),url_for('.l_function_dirichlet_page',modulus=nmod,number=nnum))
        info['navi'] = (Lprev,Lnext)
        snum = str(L.characternumber)
        smod = str(L.charactermodulus)
        charname = WebDirichlet.char2tex(smod, snum)
        info['bread'] = get_bread(1, [(charname, request.url)])
        info['friends'] = [('Dirichlet Character ' + str(charname), friendlink)]

    elif L.Ltype() == 'ellipticcurveQ':
        label = L.label
        while friendlink[len(friendlink) - 1].isdigit():  # Remove any number at the end to get isogeny class url
            friendlink = friendlink[0:len(friendlink) - 1]

        info['friends'] = [('Isogeny class ' + label, friendlink)]
        for i in range(1, L.nr_of_curves_in_class + 1):
            info['friends'].append(('Elliptic curve ' + label + str(i), friendlink + str(i)))
        if L.modform:
            info['friends'].append(('Modular form ' + label.replace('.', '.2'), url_for("emf.render_elliptic_modular_forms",
                                                                                        level=L.modform['level'], weight=2, character=0, label=L.modform['iso'])))
            info['friends'].append(('L-function ' + label.replace('.', '.2'),
                                    url_for('.l_function_emf_page', level=L.modform['level'],
                                            weight=2, character=0, label=L.modform['iso'], number=0)))
        info['friends'].append(
            ('Symmetric square L-function', url_for(".l_function_ec_sym_page", power='2', label=label)))
        info['friends'].append(
            ('Symmetric cube L-function', url_for(".l_function_ec_sym_page", power='3', label=label)))
        info['bread'] = get_bread(2, [('Elliptic curve', url_for('.l_function_ec_browse_page')),
                                 (label, url_for('.l_function_ec_page', label=label))])

    elif L.Ltype() == 'ellipticmodularform':
        friendlink = friendlink + L.addToLink        # Strips off the embedding
        friendlink = friendlink.rpartition('/')[0]   # number for the L-function
        if L.character:
            info['friends'] = [('Modular form ' + str(
                L.level) + '.' + str(L.weight) + '.' + str(L.character) + str(L.label), friendlink)]
        else:
            info['friends'] = [('Modular form ' + str(L.level) + '.' + str(L.weight) + str(
                L.label), friendlink)]
        if L.ellipticcurve:
            info['friends'].append(
                ('EC isogeny class ' + L.ellipticcurve, url_for("by_ec_label", label=L.ellipticcurve)))
            info['friends'].append(('L-function ' + str(L.level) + '.' + str(L.label),
                                    url_for('.l_function_ec_page', label=L.ellipticcurve)))
            for i in range(1, L.nr_of_curves_in_class + 1):
                info['friends'].append(('Elliptic curve ' + L.ellipticcurve + str(i),
                                       url_for("by_ec_label", label=L.ellipticcurve + str(i))))
            info['friends'].append(
                ('Symmetric square L-function', url_for(".l_function_ec_sym_page", power='2', label=label)))
            info['friends'].append(
                ('Symmetric cube L-function', url_for(".l_function_ec_sym_page", power='3', label=label)))

    elif L.Ltype() == 'hilbertmodularform':
        friendlink = '/'.join(friendlink.split('/')[:-1])
        info['friends'] = [('Hilbert Modular Form', friendlink.rpartition('/')[0])]

    elif L.Ltype() == 'dedekindzeta':
        info['friends'] = [('Number Field', friendlink)]

    elif L.Ltype() in ['lcalcurl', 'lcalcfile']:
        info['bread'] = [('L-functions', url_for('.l_function_top_page'))]

    elif L.Ltype() == 'SymmetricPower':
        def ordinal(n):
            if n == 2:
                return "Square"
            elif n == 3:
                return "Cube"
            elif 10 <= n % 100 < 20:
                return str(n) + "th Power"
            else:
                return str(n) + {1: 'st', 2: 'nd', 3: 'rd'}.get(n % 10, "th") + " Power"

        if L.m == 2:
            info['bread'] = get_bread(3, [("Symmetric square of Elliptic curve",
                                    url_for('.l_function_ec_sym2_browse_page')),
                                 (L.label, url_for('.l_function_ec_sym_page',
                                                   label=L.label,power=L.m))])
        elif L.m == 3:
            info['bread'] = get_bread(4, [("Symmetric cube of Elliptic curve",
                                    url_for('.l_function_ec_sym3_browse_page')),
                                 (L.label, url_for('.l_function_ec_sym_page',
                                                   label=L.label,power=L.m))])
        else:
            info['bread'] = [('L-functions', url_for('.l_function_top_page')),
                                 ('Symmetric %s of Elliptic curve ' % ordinal(L.m)
                                   + str(L.label),
                                  url_for('.l_function_ec_sym_page',
                                                   label=L.label,power=L.m))]

        friendlink = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/')
        splitlink = friendlink.rpartition('/')
        friendlink = splitlink[0] + splitlink[2]

        friendlink2 = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/L/')
        splitlink = friendlink2.rpartition('/')
        friendlink2 = splitlink[0] + splitlink[2]

        info['friends'] = [('Isogeny class ' + L.label, friendlink), ('Symmetric 1st Power', friendlink2)]
        for j in range(2, L.m + 2):
            if j != L.m:
                friendlink3 = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/L/SymmetricPower/%d/' % j)
                info['friends'].append(('Symmetric %s' % ordinal(j), friendlink3))

    elif L.Ltype() == 'siegelnonlift' or L.Ltype() == 'siegeleisenstein' or L.Ltype() == 'siegelklingeneisenstein' or L.Ltype() == 'siegelmaasslift':
        weight = str(L.weight)
        number = str(L.number)
        info['friends'] = [('Siegel Modular Form', friendlink)]

    elif L.Ltype() == "artin":
        # info['zeroeslink'] = ''
        # info['plotlink'] = ''
        info['friends'] = [('Artin representation', L.artin.url_for())]
        if L.sign == 0:           # The root number is now unknown
            info['zeroeslink'] = ''
            info['plotlink'] = ''

    info['dirichlet'] = lfuncDStex(L, "analytic")
    info['eulerproduct'] = lfuncEPtex(L, "abstract")
    info['functionalequation'] = lfuncFEtex(L, "analytic")
    info['functionalequationSelberg'] = lfuncFEtex(L, "selberg")

    if len(request.args) == 0:
        lcalcUrl = request.url + '?download=lcalcfile'
    else:
        lcalcUrl = request.url + '&download=lcalcfile'

    info['downloads'] = [('Lcalcfile', lcalcUrl)]

    return info
Пример #2
0
    def general_webpagedata(self):
        info = {}
        try:
            info['support'] = self.support
        except AttributeError:
            info['support'] = ''

        info['Ltype'] = self.Ltype()
        info['label'] = self.label
        info['credit'] = self.credit

        info['degree'] = int(self.degree)
        info['conductor'] = self.level
        if not is_prime(int(self.level)):
            info['conductor_factored'] = latex(factor(int(self.level)))

        info['sign'] = "$" + styleTheSign(self.sign) + "$"
        info['algebraic'] = self.algebraic
        if self.selfdual:
            info['selfdual'] = 'yes'
        else:
            info['selfdual'] = 'no'
        if self.primitive:
            info['primitive'] = 'yes'
        else:
            info['primitive'] = 'no'
        info['dirichlet'] = lfuncDShtml(self, "analytic")
        # Hack, fix this more general?
        info['dirichlet'] = info['dirichlet'].replace('*I','<em>i</em>')
        
        info['eulerproduct'] = lfuncEPtex(self, "abstract")
        info['functionalequation'] = lfuncFEtex(self, "analytic")
        info['functionalequationSelberg'] = lfuncFEtex(self, "selberg")

        if hasattr(self, 'positive_zeros'):
            info['positive_zeros'] = self.positive_zeros
            info['negative_zeros'] = self.negative_zeros

        if hasattr(self, 'plot'):
            info['plot'] = self.plot

        if hasattr(self, 'factorization'):
            info['factorization'] = self.factorization
            
        if self.fromDB and self.algebraic:
            info['dirichlet_arithmetic'] = lfuncDShtml(self, "arithmetic")
            info['eulerproduct_arithmetic'] = lfuncEPtex(self, "arithmetic")
            info['functionalequation_arithmetic'] = lfuncFEtex(self, "arithmetic")

            if self.motivic_weight % 2 == 0:
               arith_center = "\\frac{" + str(1 + self.motivic_weight) + "}{2}"
            else:
               arith_center = str(ZZ(1)/2 + self.motivic_weight/2)
            svt_crit = specialValueTriple(self, 0.5, '\\frac12',arith_center)
            info['sv_critical'] = svt_crit[0] + "\\ =\\ " + svt_crit[2]
            info['sv_critical_analytic'] = [svt_crit[0], svt_crit[2]]
            info['sv_critical_arithmetic'] = [svt_crit[1], svt_crit[2]]

            if self.motivic_weight % 2 == 1:
               arith_edge = "\\frac{" + str(2 + self.motivic_weight) + "}{2}"
            else:
               arith_edge = str(ZZ(1) + self.motivic_weight/2)

            svt_edge = specialValueTriple(self, 1, '1',arith_edge)
            info['sv_edge'] = svt_edge[0] + "\\ =\\ " + svt_edge[2]
            info['sv_edge_analytic'] = [svt_edge[0], svt_edge[2]]
            info['sv_edge_arithmetic'] = [svt_edge[1], svt_edge[2]]

            info['st_group'] = self.st_group
            info['st_link'] = self.st_link
            info['rank'] = self.order_of_vanishing
            info['motivic_weight'] = self.motivic_weight
        
        elif self.Ltype() != "artin" or (self.Ltype() == "artin" and self.sign != 0):
            try:
                info['sv_edge'] = specialValueString(self, 1, '1')
                info['sv_critical'] = specialValueString(self, 0.5, '1/2')
            except:
                info['sv_critical'] = "L(1/2): not computed"
                info['sv_edge'] = "L(1): not computed"

        return info
Пример #3
0
def initLfunction(L, args, request):
    ''' Sets the properties to show on the homepage of an L-function page.
    '''

    info = {'title': L.title}
    try:
        info['citation'] = L.citation
    except AttributeError:
        info['citation'] = ""
    try:
        info['support'] = L.support
    except AttributeError:
        info['support'] = ""

    info['Ltype'] = L.Ltype()

    # Here we should decide which values are indeed special values
    # According to Brian, odd degree has special value at 1, and even
    # degree has special value at 1/2.
    # (however, I'm not sure this is true if L is not primitive -- GT)

    # Now we usually display both
    if L.Ltype() != "artin" or (L.Ltype() == "artin" and L.sign != 0):
    #    if is_even(L.degree) :
    #        info['sv12'] = specialValueString(L, 0.5, '1/2')
    #    if is_odd(L.degree):
    #        info['sv1'] = specialValueString(L, 1, '1')
        info['sv1'] = specialValueString(L, 1, '1')
        info['sv12'] = specialValueString(L, 0.5, '1/2')

    info['args'] = args

    info['credit'] = L.credit
    # info['citation'] = L.citation

    try:
        info['factorization'] = L.factorization
    except:
        pass

    try:
        info['url'] = L.url
    except:
        info['url'] = ''

    info['degree'] = int(L.degree)

    info['zeroeslink'] = (request.url.replace('/L/', '/L/Zeros/').
                          replace('/Lfunction/', '/L/Zeros/').
                          replace('/L-function/', '/L/Zeros/'))  # url_for('zeroesLfunction',  **args)

    info['plotlink'] = (request.url.replace('/L/', '/L/Plot/').
                        replace('/Lfunction/', '/L/Plot/').
                        replace('/L-function/', '/L/Plot/'))  # info['plotlink'] = url_for('plotLfunction',  **args)

    info['bread'] = []
    info['properties2'] = set_gaga_properties(L)

    # Create friendlink by removing 'L/' and ending '/'
    friendlink = request.url.replace('/L/', '/').replace('/L-function/', '/').replace('/Lfunction/', '/')
    splitlink = friendlink.rpartition('/')
    friendlink = splitlink[0] + splitlink[2]
    logger.debug(L.Ltype())

    if L.Ltype() == 'maass':
        if L.group == 'GL2':
            minNumberOfCoefficients = 100     # TODO: Fix this to take level into account

            if len(L.dirichlet_coefficients) < minNumberOfCoefficients:
                info['zeroeslink'] = ''
                info['plotlink'] = ''
            info['bread'] = get_bread(2, [('Maass Form',
                                           url_for('.l_function_maass_browse_page')),
                                          ('\(' + L.texname + '\)', request.url)])
            info['friends'] = [('Maass Form ', friendlink)]
        else:
            info['bread'] = get_bread(L.degree,
                                      [('Maass Form', url_for('.l_function_maass_gln_browse_page',
                                        degree='degree' + str(L.degree))),
                                     (L.dbid, request.url)])

    elif L.Ltype() == 'riemann':
        info['bread'] = get_bread(1, [('Riemann Zeta', request.url)])
        info['friends'] = [('\(\mathbb Q\)', url_for('number_fields.by_label', label='1.1.1.1')), ('Dirichlet Character \(\\chi_{1}(1,\\cdot)\)',
                           url_for('render_Character', arg1=1, arg2=1))]

    elif L.Ltype() == 'dirichlet':
        info['navi'] = getPrevNextNavig(L.charactermodulus, L.characternumber, "L")
        snum = str(L.characternumber)
        smod = str(L.charactermodulus)
        charname = '\(\\chi_{%s}({%s},\\cdot)\)' % (smod, snum)
        info['bread'] = get_bread(1, [(charname, request.url)])
        info['friends'] = [('Dirichlet Character ' + str(charname), friendlink)]

    elif L.Ltype() == 'ellipticcurve':
        label = L.label
        while friendlink[len(friendlink) - 1].isdigit():  # Remove any number at the end to get isogeny class url
            friendlink = friendlink[0:len(friendlink) - 1]

        info['friends'] = [('Isogeny class ' + label, friendlink)]
        for i in range(1, L.nr_of_curves_in_class + 1):
            info['friends'].append(('Elliptic curve ' + label + str(i), friendlink + str(i)))
        if L.modform:
            info['friends'].append(('Modular form ' + label.replace('.', '.2'), url_for("emf.render_elliptic_modular_forms",
                                                                                        level=L.modform['level'], weight=2, character=0, label=L.modform['iso'])))
            info['friends'].append(('L-function ' + label.replace('.', '.2'),
                                    url_for('.l_function_emf_page', level=L.modform['level'],
                                            weight=2, character=0, label=L.modform['iso'], number=0)))
        info['friends'].append(
            ('Symmetric square L-function', url_for(".l_function_ec_sym_page", power='2', label=label)))
        info['friends'].append(
            ('Symmetric cube L-function', url_for(".l_function_ec_sym_page", power='3', label=label)))
        info['bread'] = get_bread(2, [('Elliptic curve', url_for('.l_function_ec_browse_page')),
                                 (label, url_for('.l_function_ec_page', label=label))])

    elif L.Ltype() == 'ellipticmodularform':
        friendlink = friendlink + L.addToLink        # Strips off the embedding
        friendlink = friendlink.rpartition('/')[0]   # number for the L-function
        if L.character:
            info['friends'] = [('Modular form ' + str(
                L.level) + '.' + str(L.weight) + '.' + str(L.character) + str(L.label), friendlink)]
        else:
            info['friends'] = [('Modular form ' + str(L.level) + '.' + str(L.weight) + str(
                L.label), friendlink)]
        if L.ellipticcurve:
            info['friends'].append(
                ('EC isogeny class ' + L.ellipticcurve, url_for("by_ec_label", label=L.ellipticcurve)))
            info['friends'].append(('L-function ' + str(L.level) + '.' + str(L.label),
                                    url_for('.l_function_ec_page', label=L.ellipticcurve)))
            for i in range(1, L.nr_of_curves_in_class + 1):
                info['friends'].append(('Elliptic curve ' + L.ellipticcurve + str(i),
                                       url_for("by_ec_label", label=L.ellipticcurve + str(i))))
            info['friends'].append(
                ('Symmetric square L-function', url_for(".l_function_ec_sym_page", power='2', label=label)))
            info['friends'].append(
                ('Symmetric cube L-function', url_for(".l_function_ec_sym_page", power='3', label=label)))

    elif L.Ltype() == 'hilbertmodularform':
        friendlink = '/'.join(friendlink.split('/')[:-1])
        info['friends'] = [('Hilbert Modular Form', friendlink.rpartition('/')[0])]

    elif L.Ltype() == 'dedekindzeta':
        info['friends'] = [('Number Field', friendlink)]

    elif L.Ltype() in ['lcalcurl', 'lcalcfile']:
        info['bread'] = [('L-function', url_for('.l_function_top_page'))]

    elif L.Ltype() == 'SymmetricPower':
        def ordinal(n):
            if n == 2:
                return "Square"
            elif n == 3:
                return "Cube"
            elif 10 <= n % 100 < 20:
                return str(n) + "th Power"
            else:
                return str(n) + {1: 'st', 2: 'nd', 3: 'rd'}.get(n % 10, "th") + " Power"
        friendlink = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/')
        splitlink = friendlink.rpartition('/')
        friendlink = splitlink[0] + splitlink[2]

        friendlink2 = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/L/')
        splitlink = friendlink2.rpartition('/')
        friendlink2 = splitlink[0] + splitlink[2]

        info['friends'] = [('Isogeny class ' + L.label, friendlink), ('Symmetric 1st Power', friendlink2)]
        for j in range(2, L.m + 2):
            if j != L.m:
                friendlink3 = request.url.replace('/L/SymmetricPower/%d/' % L.m, '/L/SymmetricPower/%d/' % j)
                info['friends'].append(('Symmetric %s' % ordinal(j), friendlink3))

    elif L.Ltype() == 'siegelnonlift' or L.Ltype() == 'siegeleisenstein' or L.Ltype() == 'siegelklingeneisenstein' or L.Ltype() == 'siegelmaasslift':
        weight = str(L.weight)
        number = str(L.number)
        info['friends'] = [('Siegel Modular Form', friendlink)]

    elif L.Ltype() == "artin":
        # info['zeroeslink'] = ''
        # info['plotlink'] = ''
        info['friends'] = [('Artin representation', L.artin.url_for())]
        if L.sign == 0:           # The root number is now unknown
            info['zeroeslink'] = ''
            info['plotlink'] = ''

    info['dirichlet'] = lfuncDStex(L, "analytic")
    info['eulerproduct'] = lfuncEPtex(L, "abstract")
    info['functionalequation'] = lfuncFEtex(L, "analytic")
    info['functionalequationSelberg'] = lfuncFEtex(L, "selberg")

    if len(request.args) == 0:
        lcalcUrl = request.url + '?download=lcalcfile'
    else:
        lcalcUrl = request.url + '&download=lcalcfile'

    info['downloads'] = [('Lcalcfile', lcalcUrl)]

    return info
Пример #4
0
    def general_webpagedata(self):
        info = {}
        try:
            info['support'] = self.support
        except AttributeError:
            info['support'] = ''

        info['Ltype'] = self.Ltype()

        try:
            info['label'] = self.label
        except AttributeError:
            info['label'] = ""

        try:
            info['credit'] = self.credit
        except AttributeError:
            info['credit'] = ""

        info['degree'] = int(self.degree)
        info['conductor'] = self.level
        if not is_prime(int(self.level)):
            info['conductor_factored'] = latex(factor(int(self.level)))

        info['sign'] = "$" + styleTheSign(self.sign) + "$"
        info['algebraic'] = self.algebraic
        if self.selfdual:
            info['selfdual'] = 'yes'
        else:
            info['selfdual'] = 'no'
        if self.primitive:
            info['primitive'] = 'yes'
        else:
            info['primitive'] = 'no'
        info['dirichlet'] = lfuncDShtml(self, "analytic")
        # Hack, fix this more general?
        info['dirichlet'] = info['dirichlet'].replace('*I', '<em>i</em>')

        info['eulerproduct'] = lfuncEPtex(self, "abstract")
        info['functionalequation'] = lfuncFEtex(self, "analytic")
        info['functionalequationSelberg'] = lfuncFEtex(self, "selberg")

        if hasattr(self, 'positive_zeros'):
            info['positive_zeros'] = self.positive_zeros
            info['negative_zeros'] = self.negative_zeros

        if hasattr(self, 'plot'):
            info['plot'] = self.plot

        if hasattr(self, 'factorization'):
            info['factorization'] = self.factorization

        if self.fromDB and self.algebraic:
            info['dirichlet_arithmetic'] = lfuncDShtml(self, "arithmetic")
            info['eulerproduct_arithmetic'] = lfuncEPtex(self, "arithmetic")
            info['functionalequation_arithmetic'] = lfuncFEtex(
                self, "arithmetic")

            if self.motivic_weight % 2 == 0:
                arith_center = "\\frac{" + str(1 +
                                               self.motivic_weight) + "}{2}"
            else:
                arith_center = str(ZZ(1) / 2 + self.motivic_weight / 2)
            svt_crit = specialValueTriple(self, 0.5, '\\frac12', arith_center)
            info['sv_critical'] = svt_crit[0] + "\\ =\\ " + svt_crit[2]
            info['sv_critical_analytic'] = [svt_crit[0], svt_crit[2]]
            info['sv_critical_arithmetic'] = [svt_crit[1], svt_crit[2]]

            if self.motivic_weight % 2 == 1:
                arith_edge = "\\frac{" + str(2 + self.motivic_weight) + "}{2}"
            else:
                arith_edge = str(ZZ(1) + self.motivic_weight / 2)

            svt_edge = specialValueTriple(self, 1, '1', arith_edge)
            info['sv_edge'] = svt_edge[0] + "\\ =\\ " + svt_edge[2]
            info['sv_edge_analytic'] = [svt_edge[0], svt_edge[2]]
            info['sv_edge_arithmetic'] = [svt_edge[1], svt_edge[2]]

            chilatex = "$\chi_{" + str(self.charactermodulus) + "} (" + str(
                self.characternumber) + ", \cdot )$"
            info['chi'] = '<a href="' + url_for(
                'characters.render_Dirichletwebpage',
                modulus=self.charactermodulus,
                number=self.characternumber)
            info['chi'] += '">' + chilatex + '</a>'

            info['st_group'] = self.st_group
            info['st_link'] = self.st_link
            info['rank'] = self.order_of_vanishing
            info['motivic_weight'] = self.motivic_weight

        elif self.Ltype() != "artin" or (self.Ltype() == "artin"
                                         and self.sign != 0):
            try:
                info['sv_edge'] = specialValueString(self, 1, '1')
                info['sv_critical'] = specialValueString(self, 0.5, '1/2')
            except:
                info['sv_critical'] = "L(1/2): not computed"
                info['sv_edge'] = "L(1): not computed"

        return info
Пример #5
0
    def general_webpagedata(self):
        info = {}
        try:
            info['support'] = self.support
        except AttributeError:
            info['support'] = ''

        info['Ltype'] = self.Ltype()

        try:
            info['label'] = self.label
        except AttributeError:
            info['label'] = ""

        try:
            info['credit'] = self.credit
        except AttributeError:
            info['credit'] = ""

        info['degree'] = int(self.degree)
        info['conductor'] = self.level
        if not is_prime(int(self.level)):
            if self.level >= 10**8:
                info['conductor'] = latex(self.level_factored)
            else:
                info['conductor_factored'] = latex(self.level_factored)


        info['sign'] = "$" + styleTheSign(self.sign) + "$"
        info['algebraic'] = self.algebraic
        if self.selfdual:
            info['selfdual'] = 'yes'
        else:
            info['selfdual'] = 'no'
        if self.primitive:
            info['primitive'] = 'yes'
        else:
            info['primitive'] = 'no'
        info['dirichlet'] = lfuncDShtml(self, "analytic")
        # Hack, fix this more general?
        info['dirichlet'] = info['dirichlet'].replace('*I','<em>i</em>')

        info['eulerproduct'] = lfuncEPtex(self, "abstract")
        info['functionalequation'] = lfuncFEtex(self, "analytic")
        info['functionalequationSelberg'] = lfuncFEtex(self, "selberg")

        if hasattr(self, 'positive_zeros'):
            info['positive_zeros'] = self.positive_zeros
            info['negative_zeros'] = self.negative_zeros

        if hasattr(self, 'plot'):
            info['plot'] = self.plot

        if hasattr(self, 'factorization'):
            info['factorization'] = self.factorization

        if self.fromDB and self.algebraic:
            info['dirichlet_arithmetic'] = lfuncDShtml(self, "arithmetic")
            info['eulerproduct_arithmetic'] = lfuncEPtex(self, "arithmetic")
            info['functionalequation_arithmetic'] = lfuncFEtex(self, "arithmetic")

            if self.motivic_weight % 2 == 0:
               arith_center = "\\frac{" + str(1 + self.motivic_weight) + "}{2}"
            else:
               arith_center = str(ZZ(1)/2 + self.motivic_weight/2)
            svt_crit = specialValueTriple(self, 0.5, '\\frac12',arith_center)
            info['sv_critical'] = svt_crit[0] + "\\ =\\ " + svt_crit[2]
            info['sv_critical_analytic'] = [svt_crit[0], svt_crit[2]]
            info['sv_critical_arithmetic'] = [svt_crit[1], svt_crit[2]]

            if self.motivic_weight % 2 == 1:
               arith_edge = "\\frac{" + str(2 + self.motivic_weight) + "}{2}"
            else:
               arith_edge = str(ZZ(1) + self.motivic_weight/2)

            svt_edge = specialValueTriple(self, 1, '1',arith_edge)
            info['sv_edge'] = svt_edge[0] + "\\ =\\ " + svt_edge[2]
            info['sv_edge_analytic'] = [svt_edge[0], svt_edge[2]]
            info['sv_edge_arithmetic'] = [svt_edge[1], svt_edge[2]]

            chilatex = "$\chi_{" + str(self.charactermodulus) + "} (" + str(self.characternumber) +", \cdot )$"
            info['chi'] = ''
            if self.charactermodulus != self.level:
                info['chi'] += "induced by "
            info['chi'] += '<a href="' + url_for('characters.render_Dirichletwebpage', 
                                                    modulus=self.charactermodulus, number=self.characternumber)
            info['chi'] += '">' + chilatex + '</a>'

            info['st_group'] = self.st_group
            info['st_link'] = self.st_link
            info['rank'] = self.order_of_vanishing
            info['motivic_weight'] = r'\(%d\)' % self.motivic_weight

        elif self.Ltype() == "riemann":
            info['sv_edge'] = r"\[\zeta(1) \approx $\infty$\]"
            info['sv_critical'] = r"\[\zeta(1/2) \approx -1.460354508\]"

        elif self.Ltype() != "artin" or (self.Ltype() == "artin" and self.sign != 0):
            try:
                info['sv_edge'] = specialValueString(self, 1, '1')
                info['sv_critical'] = specialValueString(self, 0.5, '1/2')
            except:
                info['sv_critical'] = "L(1/2): not computed"
                info['sv_edge'] = "L(1): not computed"

        return info