Skip to content

Commit

Permalink
add lfunction to hypergeometric motives
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Jan 29, 2024
1 parent 3dd953c commit 224a3de
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/sage/lfunctions/pari.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,28 @@ def lfun_character(chi):
return pari.lfuncreate([G, v])


def lfun_hgm(motif, t):
"""
Create the L-function of an hypergeometric motive.
OUTPUT:
one :pari:`lfun` object
EXAMPLES::
sage: from sage.lfunctions.pari import lfun_hgm, LFunction
sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(gamma_list=([3,-1,-1,-1]))
sage: L = LFunction(lfun_hgm(H, 1/5))
sage: L(3)
0.901925346034773
"""
H = pari.hgminit(*motif.alpha_beta())
lf = pari.lfunhgm(H, t)
return pari.lfuncreate(lf)


def lfun_elliptic_curve(E):
"""
Create the L-function of an elliptic curve.
Expand Down
24 changes: 24 additions & 0 deletions src/sage/modular/hypergeometric_motive.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,30 @@ def has_symmetry_at_one(self):
beta_twist = self.twist()._beta
return self.degree() % 2 == 0 and self._alpha == beta_twist

def lfunction(self, t, prec=53):
"""
Return the L-function of ``self``.
The result is a wrapper around a PARI L-function.
INPUT:
- ``prec`` -- precision (default 53)
EXAMPLES::
sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3],[4]))
sage: L = H.lfunction(1/64); L
PARI L-function associated to Hypergeometric data for [1/3, 2/3] and [1/4, 3/4]
sage: L(4)
0.997734256321692
"""
from sage.lfunctions.pari import lfun_hgm, LFunction
Z = LFunction(lfun_hgm(self, t), prec=prec)
Z.rename('PARI L-function associated to %s' % self)
return Z

def canonical_scheme(self, t=None):
"""
Return the canonical scheme.
Expand Down

0 comments on commit 224a3de

Please sign in to comment.