Differences between revisions 3 and 4
Revision 3 as of 2011-09-26 00:29:36
Size: 3089
Editor: lola
Comment:
Revision 4 as of 2011-09-26 00:30:25
Size: 3115
Editor: lola
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:

#Use the following command to attach the eulerprod package (after downloading it from Purple Sage)
#Use the following command to attach the eulerprod package (after downloading it from Purple Sage):
Line 7: Line 6:
#Auxiliary functions that will be called later on #Auxiliary functions that will be called later on:
Line 23: Line 22:
#Defining the LSeriesTripleProduct class #Here is where we start defining the LSeriesTripleProduct class:
Line 95: Line 94:
L(RealField(5)(2)) #This command current returns a RunTime Error ("Unable to create L-series, due to precision or other limits in PARI") L(RealField(5)(2)) #This command currently returns a RunTime Error ("Unable to create L-series, due to precision or other limits in PARI")

attach /users/lola/desktop/eulerprod.py

#Auxiliary functions that will be called later on:

R_cdf = CDF['x']

def quad_roots(a, p):

  • t = R_cdf([p, -a, 1]).roots() return (t[0][0], t[1][0])

def init(self, N, f, g, h):

  • self._N = ZZ(N)

    if not (self._N.is_squarefree() and self._N > 0):

    • raise ValueError, "N (=%s) must be a squarefree positive integer"%self._N

    self._newforms = (f,g,h)

#Here is where we start defining the LSeriesTripleProduct class:

class LSeriesTripleProduct(LSeriesAbstract):

  • def init(self, N, f, g, h):

    • self._N = ZZ(N) self._f = f self._g = g self._h = h self._newforms = [f, g, h]

      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) self._gen = RDF['X'].gen() self._genC = CDF['X'].gen() self._series = RDF'X'

    def _compute_epsilon(self, p=None):
    • if p is None:
      • # Right below equation (1.11) in [Gross-Kudla] return -prod(self._compute_epsilon(p) for p in self._N.prime_divisors())
      else:
      • if not ZZ(p).is_prime(): if self._N % p != 0: # Equation (1.3) in [Gross-Kudla] a_p, b_p, c_p = [f[p] for f in self._newforms] return -a_p*b_p*c_p
    def _cmp(self, right):
    • return cmp((self._N, self._f, self._g, self._h), (right._N, right._f, right._g, right._h))

    def repr(self):

    • return "L-series triple product of %s" %self._f %self._g %self._h
    def _local_factor(self, P, prec):
    • return charpoly(self, P)

    def call(self, s):

    • return self._function(prec(s))(s)
    def _charpoly_good(self, p):
    • Y = self._genC a = [quad_roots(f[p], p) for f in self._newforms] L = 1 for n in range(8):
      • d = ZZ(n).digits(2) d = [0]*(3-len(d)) + d L *= 1 - prod(a[i][d[i]] for i in range(3))*Y
      return self._gen.parent()([x.real_part() for x in L])
    def _charpoly_bad(self, p):
    • X = self._gen a_p, b_p, c_p = [f[p] for f in self._newforms] return (1 - a_p*b_p*c_p * X) * (1 - a_p*b_p*c_p*p*X)**2
    def charpoly(self, p):
    • if self._N % p == 0:
      • return self._charpoly_bad(p)
      else:
      • return self._charpoly_good(p)

# Examples

L = TripleProductLseries(11, f, f, f)

f = E.anlist(10**7)

L = LSeriesTripleProduct(11, f, f, f)

L.anlist(7)

L.number_of_coefficients(5)

L(RealField(5)(2)) #This command currently returns a RunTime Error ("Unable to create L-series, due to precision or other limits in PARI")

days33/lfunction/tripleproduct (last edited 2012-01-11 19:02:00 by amy)