Changeset 7500:24ab26bdb823


Ignore:
Timestamp:
11/26/07 20:09:07 (5 years ago)
Author:
Jen Balakrishnan <jen@…>
Branch:
default
Message:

wrappers for Dokchitser L-series for various types of modular forms

Location:
sage/modular/modform
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sage/modular/modform/all.py

    r5908 r7500  
    99from constructor import ModularForms, CuspForms, EisensteinForms 
    1010 
    11 from eis_series import eisenstein_series_qexp 
     11from eis_series import eisenstein_series_qexp, eisenstein_series_Lseries 
    1212 
    1313from half_integral import half_integral_weight_modform_basis 
     
    2323from numerical import NumericalEigenforms as numerical_eigenforms 
    2424 
    25 from element import is_ModularFormElement 
     25from element import is_ModularFormElement, delta_Lseries 
    2626 
    2727#from find_generators import ModularFormsRing, span_of_series, modform_generators 
  • sage/modular/modform/eis_series.py

    r6169 r7500  
    1414 
    1515import sage.modular.dirichlet as dirichlet 
     16 
     17from sage.rings.all import ComplexField, RealField, Integer 
     18 
     19from sage.functions.constants import pi 
    1620 
    1721from sage.rings.all import (bernoulli, CyclotomicField, 
     
    199203    return triples 
    200204 
    201      
     205def eisenstein_series_Lseries(weight, prec=53, 
     206               max_imaginary_part=0, 
     207               max_asymp_coeffs=40): 
     208    r""" 
     209    Return the L-series of the weight $2k$ Eisenstein series  
     210    on $\SL_2(\Z)$. 
     211 
     212    This actually returns an interface to Tim Dokchitser's program 
     213    for computing with the L-series of the Eisenstein series 
     214 
     215    INPUT: 
     216       weight -- even integer 
     217       prec -- integer (bits precision) 
     218       max_imaginary_part -- real number 
     219       max_asymp_coeffs -- integer 
     220 
     221    OUTPUT: 
     222       The L-series of the Eisenstein series. 
     223 
     224    EXAMPLES: 
     225    We compute with the L-series of $E_{16}$: 
     226       sage: L = eisenstein_series_Lseries(16) 
     227       sage: L(1) 
     228       -0.291657724743873 
     229    We compute with the L-series of $E_{20}$: 
     230       sage: L = eisenstein_series_Lseries(20) 
     231       sage: L(2) 
     232       -5.02355351645987  
     233    """ 
     234    f = eisenstein_series_qexp(weight,prec) 
     235    from sage.lfunctions.all import Dokchitser 
     236    key = (prec, max_imaginary_part, max_asymp_coeffs) 
     237    j = weight 
     238    L = Dokchitser(conductor = 1, 
     239                   gammaV = [0,1], 
     240                   weight = j, 
     241                   eps = (-1)**Integer((j/2)), 
     242                   poles = [j], 
     243                   residues = [(-1)**Integer((j/2))*(float(pi))**(0.5)*bernoulli(j)/j], 
     244                   prec = prec) 
     245 
     246    s = 'coeff = %s;'%f.list() 
     247    L.init_coeffs('coeff[k+1]',pari_precode = s,     
     248                  max_imaginary_part=max_imaginary_part, 
     249                  max_asymp_coeffs=max_asymp_coeffs) 
     250    L.check_functional_equation() 
     251    L.rename('L-series associated to the weight %s Eisenstein series %s on SL_2(Z)'%(j,f)) 
     252    return L     
    202253 
    203254def compute_eisenstein_params(character, k): 
     
    223274    else: 
    224275        return __find_eisen_chars_gamma1(N, k) 
    225  
    226  
  • sage/modular/modform/element.py

    r6460 r7500  
    1414import sage.modular.hecke.element as element 
    1515import sage.rings.all as rings 
     16from sage.modular.modsym.modsym import ModularSymbols 
    1617 
    1718def is_ModularFormElement(x): 
     
    2627    """ 
    2728    return isinstance(x, ModularFormElement) 
     29 
     30def delta_Lseries(prec=53, 
     31                 max_imaginary_part=0, 
     32                 max_asymp_coeffs=40): 
     33    r""" 
     34    Return the L-series of the modular form Delta. 
     35 
     36    This actually returns an interface to Tim Dokchitser's program 
     37    for computing with the L-series of the modular form $\Delta$. 
     38 
     39    INPUT: 
     40        prec -- integer (bits precision) 
     41        max_imaginary_part -- real number 
     42        max_asymp_coeffs -- integer 
     43 
     44    OUTPUT: 
     45        The L-series of $\Delta$. 
     46 
     47    EXAMPLES: 
     48        sage: L = delta_Lseries() 
     49        sage: L(1) 
     50        0.0374412812685155 
     51    """ 
     52    from sage.lfunctions.all import Dokchitser 
     53    key = (prec, max_imaginary_part, max_asymp_coeffs) 
     54    L = Dokchitser(conductor = 1, 
     55                   gammaV = [0,1], 
     56                   weight = 12, 
     57                   eps = 1, 
     58                   prec = prec) 
     59    s = 'tau(n) = (5*sigma(n,3)+7*sigma(n,5))*n/12-35*sum(k=1,n-1,(6*k-4*(n-k))*sigma(k,3)*sigma(n-k,5));' 
     60    L.init_coeffs('tau(k)',pari_precode = s, 
     61                  max_imaginary_part=max_imaginary_part, 
     62                  max_asymp_coeffs=max_asymp_coeffs) 
     63    L.set_coeff_growth('2*n^(11/2)') 
     64    L.rename('L-series associated to the modular form Delta') 
     65    return L 
    2866 
    2967class ModularFormElement(element.HeckeModuleElement): 
     
    200238        """ 
    201239        return self.q_expansion(prec) 
     240  
     241    def cuspform_Lseries(self, prec=53, 
     242                         max_imaginary_part=0, 
     243                         max_asymp_coeffs=40): 
     244        r""" 
     245        Return the L-series of the weight k cusp form  
     246        f on $\Gamma_0(N)$. 
     247   
     248        This actually returns an interface to Tim Dokchitser's program 
     249        for computing with the L-series of the cusp form. 
     250   
     251        INPUT: 
     252           prec -- integer (bits precision) 
     253           max_imaginary_part -- real number 
     254           max_asymp_coeffs -- integer 
     255 
     256        OUTPUT: 
     257           The L-series of the cusp form. 
     258 
     259        EXAMPLES: 
     260           sage: f = CuspForms(2,8).0 
     261           sage: L = f.cuspform_Lseries() 
     262           sage: L(1) 
     263           0.0884317737041015 
     264           sage: L(0.5) 
     265           0.0296568512531983 
     266            
     267        Consistency check with delta_Lseries (which computes coefficients in pari): 
     268           sage: delta = CuspForms(1,12).0 
     269           sage: L = delta.cuspform_Lseries() 
     270           sage: L(1) 
     271           0.0374412812685155  
     272           sage: L = delta_Lseries() 
     273           sage: L(1) 
     274           0.0374412812685155 
     275        """ 
     276        if self.q_expansion().list()[0] !=0: 
     277            raise TypeError,"f = %s is not a cusp form"%self 
     278        from sage.lfunctions.all import Dokchitser 
     279        key = (prec, max_imaginary_part, max_asymp_coeffs) 
     280        l = self.weight() 
     281        N = self.level() 
     282        if N == 1: 
     283            e = (-1)**l 
     284        else: 
     285            m = ModularSymbols(N,l,sign=1) 
     286            n = m.cuspidal_subspace().new_subspace() 
     287            e = (-1)**(l/2)*n.atkin_lehner_operator().matrix()[0,0] 
     288        L = Dokchitser(conductor = N, 
     289                       gammaV = [0,1], 
     290                       weight = l, 
     291                       eps = e, 
     292                       prec = prec) 
     293        s = 'coeff = %s;'%self.q_expansion(prec).list() 
     294        L.init_coeffs('coeff[k+1]',pari_precode = s,     
     295                      max_imaginary_part=max_imaginary_part, 
     296                      max_asymp_coeffs=max_asymp_coeffs) 
     297        L.check_functional_equation() 
     298        L.rename('L-series associated to the cusp form %s'%self) 
     299        return L 
     300         
     301    def modform_Lseries(self, prec=53, 
     302                        max_imaginary_part=0, 
     303                        max_asymp_coeffs=40): 
     304        r""" 
     305        Return the L-series of the weight $k$ modular form  
     306        $f$ on $\SL_2(\Z)$. 
     307 
     308        This actually returns an interface to Tim Dokchitser's program 
     309        for computing with the L-series of the modular form. 
     310 
     311        INPUT: 
     312           prec -- integer (bits precision) 
     313           max_imaginary_part -- real number 
     314           max_asymp_coeffs -- integer 
     315 
     316        OUTPUT: 
     317           The L-series of the modular form. 
     318 
     319        EXAMPLES: 
     320        We commpute with the L-series of the Eisenstein series $E_4$: 
     321           sage: f = ModularForms(1,4).0 
     322           sage: L = f.modform_Lseries() 
     323           sage: L(1) 
     324           -0.0304484570583933 
     325        """ 
     326        a = self.q_expansion(prec).list() 
     327        if a[0] == 0: 
     328            raise TypeError,"f = %s is a cusp form; please use f.cuspform_Lseries() instead!"%self 
     329        if self.level() != 1: 
     330            raise TypeError, "f = %s is not a modular form for SL_2(Z)"%self 
     331        from sage.lfunctions.all import Dokchitser 
     332        key = (prec, max_imaginary_part, max_asymp_coeffs) 
     333        l = self.weight() 
     334        L = Dokchitser(conductor = 1, 
     335                       gammaV = [0,1], 
     336                       weight = l, 
     337                       eps = (-1)**l, 
     338                       poles = [l], 
     339                       prec = prec) 
     340        b = a[1] 
     341        for i in range(len(a)):    ##to renormalize so that coefficient of q is 1 
     342            a[i] =(1/b)*a[i] 
     343        s = 'coeff = %s;'%a 
     344        L.init_coeffs('coeff[k+1]',pari_precode = s,     
     345                      max_imaginary_part=max_imaginary_part, 
     346                      max_asymp_coeffs=max_asymp_coeffs) 
     347        L.check_functional_equation() 
     348        L.rename('L-series associated to the weight %s modular form on SL_2(Z)'%l) 
     349        return L         
    202350     
    203351    def weight(self): 
     
    214362        self.__valuation = v 
    215363        return v 
    216  
    217  
    218  
     364         
    219365class ModularFormElement_elliptic_curve(ModularFormElement): 
    220366    """ 
     
    355501        We have $MLt \mid N$, and  
    356502        $$ 
    357           E_k(chi,psi,t) =  
     503          E_k(chi,psi,t) = 
    358504           c_0 + sum_{m \geq 1}[sum_{n|m} psi(n) * chi(m/n) * n^(k-1)] q^{mt}, 
    359505        $$ 
Note: See TracChangeset for help on using the changeset viewer.