Ticket #12015: trac_12015-part1_updated.patch

File trac_12015-part1_updated.patch, 31.9 KB (added by Cassie Williams, 11 years ago)
  • doc/en/reference/lfunctions.rst

    # HG changeset patch
    # User Cassie Williams <math.hands@gmail.com>
    # Date 1326339210 18000
    # Node ID 9af15277b8470e2532e6ca187a75d23d9d9750b3
    # Parent  6c4f87098fbc89fb0620366bcc25809d418b7bb1
    Added doctest, added function an, added class LSeriesTripleProduct.
    
    diff -r 6c4f87098fbc -r 9af15277b847 doc/en/reference/lfunctions.rst
    a b  
    99
    1010   sage/lfunctions/lcalc
    1111   sage/lfunctions/sympow
    12    sage/lfunctions/dokchitser
    13  No newline at end of file
     12   sage/lfunctions/dokchitser
     13   sage/lfunctions/eulerprod
     14 No newline at end of file
  • sage/lfunctions/eulerprod.py

    diff -r 6c4f87098fbc -r 9af15277b847 sage/lfunctions/eulerprod.py
    a b  
    33
    44AUTHOR:
    55    - William Stein
     6    - Amy Feaver and Cassie Williams (2012-01-10): added to doctest, proofread and corrected already existing doctest and code
    67
    78TODO:
    89    - Symmetric powers (and modular degree -- see trac 9758)
     
    3940import copy, math, types
    4041
    4142from sage.all import prime_range, cached_method, sqrt, SR, vector
    42 from sage.rings.all import is_RationalField, ZZ, Integer, QQ, O, ComplexField, CDF, primes, infinity as oo
     43from sage.rings.all import is_RationalField, ZZ, Integer, QQ, O, ComplexField, CDF, RDF, primes, infinity as oo
    4344from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve
    44 from sage.misc.all import prod
     45from sage.misc.all import prod, charpoly
    4546from sage.modular.abvar.abvar import is_ModularAbelianVariety
    4647from sage.modular.dirichlet import is_DirichletCharacter
    4748from sage.lfunctions.dokchitser import Dokchitser
     
    115116    EXAMPLES::
    116117
    117118        sage: from sage.lfunctions.eulerprod import prime_below
    118         sage: K.<a> = NumberField(x^2-x-1)
     119        sage: K.<a> = NumberField(x^2+1)
    119120        sage: prime_below(K.prime_above(11))
    120121        11
    121122        sage: prime_below(K.prime_above(5))
     
    124125        3
    125126        sage: prime_below(7)
    126127        7
     128        sage: prime_below(K.ideal(1+a))
     129        2
    127130    """
    128131    try:
    129132        return P.smallest_integer()
     
    166169
    167170    def __cmp__(self, right):
    168171        return cmp((self._lseries,self._k), (right._lseries, right._k))
     172        """
     173
     174        EXAMPLES::
     175
     176        sage: from sage.lfunctions.eulerprod import LSeries
     177        sage: from sage.lfunctions.eulerprod import LSeriesDerivative
     178        sage: K.<a>=NumberField(x^2+1)
     179        sage: L=LSeries(K); L
     180        Dedekind Zeta function of Number Field in a with defining polynomial x^2 + 1
     181        sage: Ld1=LSeriesDerivative(L,1)
     182        sage: Ld2=LSeriesDerivative(L,2)
     183        sage: cmp(Ld1,Ld2)
     184        -1
     185        sage: cmp(Ld2,Ld1)
     186        1
     187
     188        sage: L2 = LSeries(DirichletGroup(5).0); L2
     189        L-series attached to Dirichlet character modulo 5 of conductor 5 mapping 2 |--> zeta4
     190        sage: cmp(L,L2)
     191        -1
     192        sage: L2d2=LSeriesDerivative(L2,2)
     193        sage: cmp(Ld2,L2d2)
     194        -1
     195        sage: cmp(L2d2,Ld2)
     196        1
     197        """
    169198
    170199    def __call__(self, s):
    171200        """
     
    421450         self._poles, self._residues, self._base_field, self._is_selfdual) = (
    422451            conductor, hodge_numbers, weight, epsilon, poles, residues,
    423452            base_field, is_selfdual)
    424 
    425453        # the following parameters allow for specifying a list of
    426454        # possibilities:
    427455        #
     
    476504            return valid
    477505
    478506    def __cmp__(self, right):
     507        """
     508        EXAMPLES:
     509
     510            sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     511            sage: L1 = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
     512            sage: L2 = LSeriesAbstract(conductor=1, hodge_numbers=[0,1], weight=1, epsilon=1, poles=[1,-1], residues=[-1], base_field=QQ)
     513            sage: cmp(L1,L2)
     514            -1
     515        """
    479516        if self is right:
    480517            return 0
    481518        for a in ['degree', 'weight', 'conductor', 'epsilon', 'base_field']:
     
    11111148
    11121149        EXAMPLES::
    11131150       
     1151   
    11141152        """
    11151153        return self._lcalc().zeros(n)
    11161154
     
    11261164        # this will require using Rubinstein's L-calc
    11271165        raise NotImplementedError
    11281166
     1167
    11291168    def anlist(self, bound, prec=None):
    11301169        """
    11311170        Return list `v` of Dirichlet series coefficients `a_n`for `n` up to and including bound,
     
    12281267        extend_multiplicatively_generic(coefficients)
    12291268        yield list(coefficients)
    12301269
     1270    def an(self, n, prec=None):
     1271        """
     1272        INPUT:
     1273        -an integer `n`
     1274       
     1275        OUTPUT:
     1276        -`a_n`, the `n`-th coefficient of L
     1277       
     1278        EXAMPLES::
     1279
     1280            sage: from sage.lfunctions.eulerprod import LSeries
     1281            sage: L=LSeries(EllipticCurve('11a'))
     1282            sage: L.anlist(20)
     1283            [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, -2, 4, 4, -1, -4, -2, 4, 0, 2]
     1284            sage: L.an(3)
     1285            -1
     1286            sage: L.an(18)
     1287            4       
     1288            sage: K.<a>=NumberField(x^2-91)
     1289            sage: L=LSeries(K)
     1290            sage: L.anlist(10)
     1291            [0, 1, 1, 2, 1, 2, 2, 1, 1, 3, 2]
     1292            sage: L.an(9)
     1293            3
     1294            sage: L.an(1)
     1295            1
     1296        """
     1297        return self.anlist(n)[n]
     1298
     1299       
     1300
    12311301    def _symbolic_(self, R, bound=10, prec=None):
    12321302        """
    12331303        Convert self into the symbolic ring as a truncated Dirichleter series, including
     
    13801450        return self._function(prec).taylor_series(center, degree, variable)
    13811451
    13821452    def analytic_rank(self, tiny=1e-8, prec=53):
     1453        """
     1454        EXAMPLES::
     1455
     1456            sage: from sage.lfunctions.eulerprod import LSeries
     1457            sage: L=LSeries('zeta')
     1458            sage: L.analytic_rank(1)
     1459            0
     1460            sage: K.<a>=NumberField(x^2+1)
     1461            sage: L1=LSeries(K);L1
     1462            Dedekind Zeta function of Number Field in a with defining polynomial x^2 + 1
     1463            sage: L1.analytic_rank()
     1464            0
     1465        """
    13831466        center = ComplexField(prec)(self._weight) / 2
    13841467        degree = 4
    13851468        while True:
     
    14041487        eps = self.epsilon(prec)
    14051488        return self._dokchitser(prec, eps, T=T)
    14061489
    1407     def _dokchitser_unitialized(self, prec, epsilon):
     1490    def _dokchitser_uninitialized(self, prec, epsilon):
    14081491        # Create the Dokchitser object
    14091492        if epsilon == 'solve':
    14101493            eps = 'X'
     
    14351518            sage: L.number_of_coefficients(1000)
    14361519            43
    14371520        """
    1438         return self._dokchitser_unitialized(prec, self.epsilon(prec)).num_coeffs(T)
     1521        return self._dokchitser_uninitialized(prec, self.epsilon(prec)).num_coeffs(T)
    14391522
    14401523    def _dokchitser(self, prec, epsilon, T=1.2):
    1441         L = self._dokchitser_unitialized(prec, epsilon)
     1524        L = self._dokchitser_uninitialized(prec, epsilon)
    14421525       
    14431526        # Find out how many coefficients of the Dirichlet series are needed
    14441527        # to compute to the requested precision.
     
    25252608        return LSeriesModularAbelianVariety(X, *args, **kwds)
    25262609       
    25272610    raise NotImplementedError
     2611
     2612#
     2613#
     2614#
     2615#Auxiliary functions that will be called later on:
     2616
     2617R_cdf = CDF['x']
     2618
     2619def quad_roots(a, p):
     2620    t = R_cdf([p, -a, 1]).roots()
     2621    return (t[0][0], t[1][0])
     2622
     2623
     2624def __init__(self, N, f, g, h):
     2625    self._N = ZZ(N)
     2626    if not (self._N.is_squarefree() and self._N > 0):
     2627        raise ValueError, "N (=%s) must be a squarefree positive integer"%self._N
     2628    self._newforms = (f,g,h)
     2629
     2630
     2631#Here is where we start defining the LSeriesTripleProduct class:
     2632
     2633class LSeriesTripleProduct(LSeriesAbstract):
     2634    def __init__(self, N, f, g, h):
     2635        self._N = ZZ(N)
     2636        self._f = f
     2637        self._g = g
     2638        self._h = h
     2639        self._newforms = [f, g, h]
     2640        LSeriesAbstract.__init__(self, conductor = N**10, hodge_numbers = [-1,-1,-1,0,0,0,0,1], weight = 4, epsilon = self._compute_epsilon(), poles = [], residues = [], base_field = QQ, is_selfdual = True)
     2641        self._gen = RDF['X'].gen()
     2642        self._genC = CDF['X'].gen()
     2643        self._series = RDF[['X']]
     2644   
     2645    def _compute_epsilon(self, p=None):
     2646        if p is None:
     2647            # Right below equation (1.11) in [Gross-Kudla]
     2648            return -prod(self._compute_epsilon(p) for p in self._N.prime_divisors())
     2649        else:
     2650            if not ZZ(p).is_prime():
     2651                raise ValueError, "p must be prime"
     2652            if self._N % p != 0:
     2653                raise ValueError, "p must divide the level"
     2654            # Equation (1.3) in [Gross-Kudla]
     2655            a_p, b_p, c_p = [f[p] for f in self._newforms]
     2656            return -a_p*b_p*c_p
     2657   
     2658    def _cmp(self, right):
     2659        return cmp((self._N, self._f, self._g, self._h), (right._N, right._f, right._g, right._h))
     2660       
     2661    def __repr__(self):
     2662        return "L-series triple product of %s" %self._f %self._g %self._h
     2663   
     2664    def _local_factor(self, P, prec):
     2665        return charpoly(self, P)
     2666   
     2667    def __call__(self, s):
     2668        return self._function(prec(s))(s) 
     2669       
     2670    def _charpoly_good(self, p):
     2671        Y = self._genC
     2672        a = [quad_roots(f[p], p) for f in self._newforms]
     2673        L = 1
     2674        for n in range(8):
     2675            d = ZZ(n).digits(2)
     2676            d = [0]*(3-len(d)) + d
     2677            L *= 1 - prod(a[i][d[i]] for i in range(3))*Y
     2678        return self._gen.parent()([x.real_part() for x in L])     
     2679     
     2680    def _charpoly_bad(self, p):
     2681        X = self._gen
     2682        a_p, b_p, c_p = [f[p] for f in self._newforms]
     2683        return (1 - a_p*b_p*c_p * X) * (1 - a_p*b_p*c_p*p*X)**2
     2684   
     2685    def charpoly(self, p):
     2686        if self._N % p == 0:
     2687            return self._charpoly_bad(p)
     2688        else:
     2689            return self._charpoly_good(p)
  • sage/lfunctions/eulerprod_with_tripleprod.py

    diff -r 6c4f87098fbc -r 9af15277b847 sage/lfunctions/eulerprod_with_tripleprod.py
    a b  
    6565
    6666    EXAMPLES::
    6767
    68         sage: from sage.lfunctions.eulerprod import prec
     68        sage: from sage.lfunctions.eulerprod_with_tripleprod import prec
    6969        sage: prec(ComplexField(100)(1))
    7070        100
    7171        sage: prec(RealField(125)(1))
     
    8686
    8787    EXAMPLES::
    8888
    89         sage: from sage.lfunctions.eulerprod import norm
     89        sage: from sage.lfunctions.eulerprod_with_tripleprod import norm
    9090        sage: K.<a> = NumberField(x^2-x-1)
    9191        sage: norm(a+5)
    9292        29
     
    115115   
    116116    EXAMPLES::
    117117
    118         sage: from sage.lfunctions.eulerprod import prime_below
     118        sage: from sage.lfunctions.eulerprod_with_tripleprod import prime_below
    119119        sage: K.<a> = NumberField(x^2+1)
    120120        sage: prime_below(K.prime_above(11))
    121121        11
     
    140140
    141141    EXAMPLES::
    142142
    143         sage: from sage.lfunctions.eulerprod import LSeries
     143        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    144144        sage: L = LSeries('delta')
    145145        sage: L.derivative()
    146146        First derivative of L-function associated to Ramanujan's Delta (a weight 12 cusp form)
     
    149149
    150150    We directly create an instance of the class (users shouldn't need to do this)::
    151151
    152         sage: from sage.lfunctions.eulerprod import LSeriesDerivative
     152        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesDerivative
    153153        sage: Ld = LSeriesDerivative(L, 2); Ld
    154154        Second derivative of L-function associated to Ramanujan's Delta (a weight 12 cusp form)
    155155        sage: type(Ld)
    156         <class 'sage.lfunctions.eulerprod.LSeriesDerivative'>
     156        <class 'sage.lfunctions.eulerprod_with_tripleprod.LSeriesDerivative'>
    157157    """
    158158    def __init__(self, lseries, k):
    159159        """
     
    173173
    174174        EXAMPLES::
    175175
    176         sage: from sage.lfunctions.eulerprod import LSeries
    177         sage: from sage.lfunctions.eulerprod import LSeriesDerivative
     176        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
     177        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesDerivative
    178178        sage: K.<a>=NumberField(x^2+1)
    179179        sage: L=LSeries(K); L
    180180        Dedekind Zeta function of Number Field in a with defining polynomial x^2 + 1
     
    207207
    208208        EXAMPLES::
    209209
    210             sage: from sage.lfunctions.eulerprod import LSeries
     210            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    211211            sage: L = LSeries(EllipticCurve('389a'))
    212212            sage: L1 = L.derivative(1); L1(1)
    213213            -1.94715429754927e-20
     
    228228
    229229        EXAMPLES::
    230230
    231             sage: from sage.lfunctions.eulerprod import LSeries
     231            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    232232            sage: L = LSeries('delta')
    233233            sage: L.derivative(1).__repr__()
    234234            "First derivative of L-function associated to Ramanujan's Delta (a weight 12 cusp form)"
     
    258258       
    259259        EXAMPLES::
    260260
    261             sage: from sage.lfunctions.eulerprod import LSeries
     261            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    262262            sage: f = Newforms(43,2,names='a')[1]; f
    263263            q + a1*q^2 - a1*q^3 + (-a1 + 2)*q^5 + O(q^6)
    264264            sage: L = LSeries(f); L1 = L.derivative()
     
    286286        """
    287287        EXAMPLES::
    288288
    289             sage: from sage.lfunctions.eulerprod import LSeries
     289            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    290290            sage: L = LSeries('zeta')
    291291            sage: P = L.parent(); P
    292292            All L-series objects and their products
     
    333333        """
    334334        Return string representation of this parent object.
    335335
    336             sage: from sage.lfunctions.eulerprod import LSeriesParent
     336            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesParent
    337337            sage: LSeriesParent.__repr__()
    338338            'All L-series objects and their products'
    339339        """
     
    346346
    347347        EXAMPLES::
    348348
    349             sage: from sage.lfunctions.eulerprod import LSeriesParent, LSeriesParentClass
     349            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesParent, LSeriesParentClass
    350350            sage: cmp(LSeriesParent, LSeriesParentClass())
    351351            0
    352352            sage: cmp(LSeriesParent, 7) != 0
     
    423423       
    424424        EXAMPLES::
    425425
    426             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     426            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    427427            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    428428            sage: type(L)
    429             <class 'sage.lfunctions.eulerprod.LSeriesAbstract'>
     429            <class 'sage.lfunctions.eulerprod_with_tripleprod.LSeriesAbstract'>
    430430            sage: L._conductor
    431431            1
    432432            sage: L._hodge_numbers
     
    507507        """
    508508        EXAMPLES:
    509509
    510             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     510            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    511511            sage: L1 = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    512512            sage: L2 = LSeriesAbstract(conductor=1, hodge_numbers=[0,1], weight=1, epsilon=1, poles=[1,-1], residues=[-1], base_field=QQ)
    513513            sage: cmp(L1,L2)
     
    531531
    532532        EXAMPLES::
    533533
    534             sage: from sage.lfunctions.eulerprod import LSeries
     534            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    535535            sage: L = LSeries('delta');  P = L.parent(); P
    536536            All L-series objects and their products
    537537            sage: L in P
     
    545545
    546546        EXAMPLES::
    547547
    548             sage: from sage.lfunctions.eulerprod import LSeries
     548            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    549549            sage: L = LSeries('delta'); 
    550550            sage: L3 = L^3; L3
    551551            (L-function associated to Ramanujan's Delta (a weight 12 cusp form))^3
     
    581581
    582582        EXAMPLES::
    583583
    584             sage: from sage.lfunctions.eulerprod import LSeries
     584            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    585585            sage: d = LSeries('delta'); z = LSeries('zeta')
    586586            sage: d * z
    587587            (Riemann Zeta function viewed as an L-series) * (L-function associated to Ramanujan's Delta (a weight 12 cusp form))
     
    600600
    601601        EXAMPLES::
    602602
    603             sage: from sage.lfunctions.eulerprod import LSeries
     603            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    604604            sage: d = LSeries('delta'); z = LSeries('zeta')
    605605            sage: d / z
    606606            (Riemann Zeta function viewed as an L-series)^-1 * (L-function associated to Ramanujan's Delta (a weight 12 cusp form))
     
    619619
    620620        EXAMPLES::
    621621
    622             sage: from sage.lfunctions.eulerprod import LSeries
     622            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    623623            sage: LSeries('zeta').conductor()
    624624            1
    625625            sage: LSeries('delta').conductor()
     
    646646
    647647        EXAMPLES::
    648648
    649             sage: from sage.lfunctions.eulerprod import LSeries
     649            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    650650            sage: LSeries('zeta').hodge_numbers()
    651651            [0]
    652652            sage: LSeries('delta').hodge_numbers()
     
    668668       
    669669        EXAMPLES::
    670670       
    671             sage: from sage.lfunctions.eulerprod import LSeries
     671            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    672672            sage: LSeries('zeta').weight()
    673673            1
    674674            sage: LSeries('delta').weight()
     
    698698       
    699699        EXAMPLES::
    700700
    701             sage: from sage.lfunctions.eulerprod import LSeries
     701            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    702702            sage: LSeries('zeta').poles()
    703703            [0, 1]
    704704            sage: LSeries('delta').poles()
     
    712712       
    713713        EXAMPLES::
    714714
    715             sage: from sage.lfunctions.eulerprod import LSeries
     715            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    716716            sage: LSeries('zeta').residues()
    717717            [9, 8]
    718718            sage: LSeries('delta').residues()
     
    753753        """
    754754        EXAMPLES::
    755755
    756             sage: from sage.lfunctions.eulerprod import LSeries
     756            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    757757            sage: LSeries('zeta').base_field()
    758758            Rational Field
    759759            sage: L = LSeries(EllipticCurve('11a3').base_extend(QQ[sqrt(2)]), prec=5); L.base_field()
     
    765765        """
    766766        EXAMPLES::
    767767
    768             sage: from sage.lfunctions.eulerprod import LSeries
     768            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    769769            sage: LSeries('zeta').epsilon()
    770770            1
    771771            sage: LSeries('delta').epsilon()
     
    880880
    881881        Many L-series are self dual::
    882882       
    883             sage: from sage.lfunctions.eulerprod import LSeries
     883            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    884884            sage: LSeries('zeta').is_selfdual()
    885885            True
    886886            sage: LSeries('delta').is_selfdual()
     
    910910
    911911        EXAMPLES::
    912912
    913             sage: from sage.lfunctions.eulerprod import LSeries
     913            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    914914            sage: LSeries('zeta').degree()
    915915            1
    916916            sage: LSeries(DirichletGroup(5).0).degree()
     
    950950
    951951        EXAMPLES::
    952952
    953             sage: from sage.lfunctions.eulerprod import LSeries
     953            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    954954            sage: E = EllipticCurve('11a')
    955955            sage: L = LSeries(E); L
    956956            L-series of Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
     
    10561056
    10571057        You must overload this in the derived class::
    10581058
    1059             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     1059            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    10601060            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    10611061            sage: L.local_factor(2)
    10621062            Traceback (most recent call last):
     
    10711071
    10721072        EXAMPLES::
    10731073
    1074             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     1074            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    10751075            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    10761076            sage: L.local_factor(2)
    10771077            Traceback (most recent call last):
     
    10841084        """
    10851085        EXAMPLES::
    10861086       
    1087             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     1087            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    10881088            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    10891089            sage: L.__repr__()
    10901090            'Euler Product L-series with conductor 1, Hodge numbers [0], weight 1, epsilon 1, poles [1], residues [-1] over Rational Field'
     
    11061106
    11071107        EXAMPLES::
    11081108
    1109             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     1109            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    11101110            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    11111111            sage: L._precompute_local_factors(100, 53)
    11121112        """
     
    11211121
    11221122        EXAMPLES::
    11231123
    1124             sage: from sage.lfunctions.eulerprod import LSeriesAbstract
     1124            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesAbstract
    11251125            sage: L = LSeriesAbstract(conductor=1, hodge_numbers=[0], weight=1, epsilon=1, poles=[1], residues=[-1], base_field=QQ)
    11261126            sage: L._primes_above(3)
    11271127            [3]
     
    11801180       
    11811181        EXAMPLES::
    11821182
    1183             sage: from sage.lfunctions.eulerprod import LSeries; L = LSeries('zeta')
     1183            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries; L = LSeries('zeta')
    11841184            sage: L.anlist(30)
    11851185            [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    1186             sage: from sage.lfunctions.eulerprod import LSeries; L = LSeries(EllipticCurve('11a'))
     1186            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries; L = LSeries(EllipticCurve('11a'))
    11871187            sage: L.anlist(30)
    11881188            [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, -2, 4, 4, -1, -4, -2, 4, 0, 2, 2, -2, -1, 0, -4, -8, 5, -4, 0, 2]
    11891189            sage: K.<a> = NumberField(x^2-x-1); L = LSeries(EllipticCurve([0,-a,a,0,0]))
     
    12771277       
    12781278        EXAMPLES::
    12791279
    1280             sage: from sage.lfunctions.eulerprod import LSeries                         
     1280            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    12811281            sage: L=LSeries(EllipticCurve('11a'))
    12821282            sage: L.anlist(20)
    12831283            [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, -2, 4, 4, -1, -4, -2, 4, 0, 2]
     
    13051305
    13061306        EXAMPLES::
    13071307       
    1308             sage: from sage.lfunctions.eulerprod import LSeries
     1308            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    13091309            sage: L = LSeries(EllipticCurve('37a'))
    13101310            sage: SR(L)
    13111311            -2/2^s - 3/3^s + 2/4^s - 2/5^s + 6/6^s - 1/7^s + 6/9^s + 4/10^s + 1           
     
    13261326
    13271327        EXAMPLES::
    13281328
    1329             sage: from sage.lfunctions.eulerprod import LSeries
     1329            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    13301330            sage: L = LSeries(EllipticCurve('37a'))
    13311331            sage: L(1)
    13321332            0
     
    13731373
    13741374        EXAMPLES::
    13751375       
    1376             sage: from sage.lfunctions.eulerprod import LSeries
     1376            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    13771377            sage: L = LSeries('zeta')
    13781378            sage: L.derivative()
    13791379            First derivative of Riemann Zeta function viewed as an L-series
     
    14341434
    14351435        EXAMPLES:::
    14361436
    1437             sage: from sage.lfunctions.eulerprod import LSeries; L = LSeries('zeta')
     1437            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries; L = LSeries('zeta')
    14381438            sage: L.taylor_series()
    14391439            -1.46035450880959 - 3.92264613920915*z - 8.00417850696433*z^2 - 16.0005515408865*z^3 - 31.9998883216853*z^4 - 64.0000050055172*z^5 + O(z^6)
    14401440            sage: RealField(53)(zeta(1/2))
     
    14531453        """
    14541454        EXAMPLES::
    14551455
    1456             sage: from sage.lfunctions.eulerprod import LSeries
     1456            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    14571457            sage: L=LSeries('zeta')
    14581458            sage: L.analytic_rank(1)
    14591459            0
     
    15091509       
    15101510        EXAMPLES::
    15111511
    1512             sage: from sage.lfunctions.eulerprod import LSeries       
     1512            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries       
    15131513            sage: L = LSeries(DirichletGroup(5).0)
    15141514            sage: L.number_of_coefficients(20)
    15151515            8
     
    16221622       
    16231623        EXAMPLES::
    16241624
    1625             sage: from sage.lfunctions.eulerprod import LSeries
     1625            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    16261626            sage: L1 = LSeries('zeta'); L1.is_selfdual()
    16271627            True
    16281628            sage: L2 = LSeries(DirichletGroup(9).0); L2.is_selfdual()
     
    16481648
    16491649        EXAMPLES::
    16501650
    1651             sage: from sage.lfunctions.eulerprod import LSeries
     1651            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    16521652            sage: J = J0(33); L = LSeries(J)
    16531653            sage: L.conductor()
    16541654            3993
     
    16761676       
    16771677        EXAMPLES::
    16781678
    1679             sage: from sage.lfunctions.eulerprod import LSeries
     1679            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    16801680            sage: L = LSeries('zeta') * LSeries(DirichletGroup(9).0)
    16811681            sage: L(2)
    16821682            1.80817853715812 + 0.369298119218816*I
     
    17421742        """
    17431743        EXAMPLE::
    17441744
    1745             sage: from sage.lfunctions.eulerprod import LSeries
     1745            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    17461746            sage: L1 = LSeries('zeta'); L2 = LSeries('delta')
    17471747            sage: f = L1 * L2; f
    17481748            (Riemann Zeta function viewed as an L-series) * (L-function associated to Ramanujan's Delta (a weight 12 cusp form))
     
    17721772
    17731773        We compute the analytic rank of the non-simple 32-dimensional modular abelian variety `J_0(389)`.
    17741774
    1775             sage: from sage.lfunctions.eulerprod import LSeries
     1775            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    17761776            sage: M = ModularSymbols(389,sign=1).cuspidal_subspace()
    17771777            sage: L = LSeries(M); L
    17781778            L-series attached to Modular Symbols subspace of dimension 32 of Modular Symbols space of dimension 33 for Gamma_0(389) of weight 2 with sign 1 over Rational Field
     
    18211821    """
    18221822    EXAMPLES::
    18231823
    1824         sage: from sage.lfunctions.eulerprod import LSeries
     1824        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    18251825        sage: L = LSeries('zeta'); L
    18261826        Riemann Zeta function viewed as an L-series
    18271827        sage: L(2)
     
    18561856    """
    18571857    EXAMPLES::
    18581858
    1859         sage: from sage.lfunctions.eulerprod import LSeriesDelta; L = LSeriesDelta()
     1859        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesDelta; L = LSeriesDelta()
    18601860        sage: L.anlist(10)
    18611861        [0, 1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643, -115920]
    18621862        sage: list(delta_qexp(11))
     
    18741874        """
    18751875        EXAMPLES::
    18761876
    1877             sage: from sage.lfunctions.eulerprod import LSeriesDelta; L = LSeriesDelta()
     1877            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesDelta; L = LSeriesDelta()
    18781878            sage: L.local_factor(2)
    18791879            2048*T^2 + 24*T + 1
    18801880            sage: L._local_factor(11, None)   # really this is called
     
    19071907       
    19081908        EXAMPLES::
    19091909
    1910             sage: from sage.lfunctions.eulerprod import LSeriesDelta; L = LSeriesDelta()
     1910            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesDelta; L = LSeriesDelta()
    19111911            sage: L._lf
    19121912            {}
    19131913            sage: L._precompute_local_factors(10)
     
    19331933    def __init__(self, E, prec=53):
    19341934        """
    19351935        EXAMPLES::
    1936             sage: from sage.lfunctions.eulerprod import LSeriesEllipticCurve
     1936            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesEllipticCurve
    19371937            sage: L = LSeriesEllipticCurve(EllipticCurve('389a'))
    19381938            sage: L(2)
    19391939            0.360092863578881
     
    20112011    """
    20122012    EXAMPLES::
    20132013
    2014         sage: from sage.lfunctions.eulerprod import LSeries
     2014        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    20152015        sage: K.<a> = NumberField(x^3 - 2)
    20162016        sage: L = LSeries(K); L
    20172017        Dedekind Zeta function of Number Field in a with defining polynomial x^3 - 2
     
    20592059    """
    20602060    EXAMPLES::
    20612061   
    2062         sage: from sage.lfunctions.eulerprod import LSeries;  L = LSeries(DirichletGroup(5).0)
     2062        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries;  L = LSeries(DirichletGroup(5).0)
    20632063        sage: L(3)
    20642064        0.988191681624057 + 0.0891051883457395*I
    20652065    """
     
    20882088        """
    20892089        EXAMPLES::
    20902090
    2091             sage: from sage.lfunctions.eulerprod import LSeries;  L = LSeries(DirichletGroup(3).0)
     2091            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries;  L = LSeries(DirichletGroup(3).0)
    20922092            sage: L.__repr__()
    20932093            'L-series attached to Dirichlet character modulo 3 of conductor 3 mapping 2 |--> -1'
    20942094        """
     
    21262126        """
    21272127        EXAMPLES::
    21282128
    2129             sage: from sage.lfunctions.eulerprod import LSeries
     2129            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    21302130            sage: f = Newforms(43,2,names='a')[1]; f
    21312131            q + a1*q^2 - a1*q^3 + (-a1 + 2)*q^5 + O(q^6)
    21322132            sage: LSeries(f).__repr__()
     
    21932193
    21942194        EXAMPLES::
    21952195
    2196             sage: from sage.lfunctions.eulerprod import LSeriesModularSymbolsNewformGamma0
     2196            sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeriesModularSymbolsNewformGamma0
    21972197            sage: M = ModularSymbols(43,sign=1).cuspidal_subspace()[1]; M
    21982198            Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field
    21992199            sage: L0 = LSeriesModularSymbolsNewformGamma0(M,0,check=False,epsilon=1); L0
     
    23582358
    23592359    EXAMPLES::
    23602360
    2361         sage: from sage.lfunctions.eulerprod import LSeries
     2361        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    23622362        sage: L = LSeries(J0(54)); L
    23632363        L-series attached to Abelian variety J0(54) of dimension 4
    23642364        sage: L.factor()
     
    24972497
    24982498    EXAMPLES::
    24992499
    2500     The Dedekind Zeta function of a number field::
     2500        The Dedekind Zeta function of a number field::
    25012501
    2502         sage: from sage.lfunctions.eulerprod import LSeries
     2502        sage: from sage.lfunctions.eulerprod_with_tripleprod import LSeries
    25032503        sage: K.<a> = NumberField(x^2 + 1)
    25042504        sage: L = LSeries(K); L
    25052505        Dedekind Zeta function of Number Field in a with defining polynomial x^2 + 1