From 224a3ded41270fac30caaee3251c16552ca81245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 29 Jan 2024 19:14:53 +0100 Subject: [PATCH] add lfunction to hypergeometric motives --- src/sage/lfunctions/pari.py | 22 +++++++++++++++++++++ src/sage/modular/hypergeometric_motive.py | 24 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py index e4968866303..694f3ad123e 100644 --- a/src/sage/lfunctions/pari.py +++ b/src/sage/lfunctions/pari.py @@ -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. diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index 8dbec096831..c11bebdadd6 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -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.