diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index 8e726fc877e..d21d34da445 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -1496,9 +1496,11 @@ def H_value(self, p, f, t, ring=None): Using instead :class:`UniversalCyclotomicfield`, this is much slower than the `p`-adic version :meth:`padic_H_value`. + Unlike in :meth:`padic_H_value`, tame and wild primes are not supported. + EXAMPLES: - With values in the UniversalCyclotomicField (slow):: + With values in the :class:`UniversalCyclotomicField` (slow):: sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp sage: H = Hyp(alpha_beta=([1/2]*4, [0]*4)) @@ -1513,7 +1515,7 @@ def H_value(self, p, f, t, ring=None): sage: [H.H_value(13,i,-1) for i in range(1,3)] # not tested [-84, -1420] - With values in ComplexField:: + With values in :class:`ComplexField`:: sage: [H.H_value(5,i,-1, ComplexField(60)) for i in range(1,3)] [-4, 276] @@ -1750,7 +1752,7 @@ def euler_factor(self, t, p, deg=None, cache_p=False): INPUT: - - ``t`` -- rational number, not 0 or 1 + - ``t`` -- rational number, not 0 - ``p`` -- prime number of good reduction @@ -1837,6 +1839,15 @@ def euler_factor(self, t, p, deg=None, cache_p=False): sage: H.euler_factor(1/7^4, 7) 7*T^3 + 7*T^2 + T + 1 + This is an example with `t = 1`:: + + sage: H = Hyp(cyclotomic=[[4,2], [3,1]]) + sage: H.euler_factor(1, 7) + -T^2 + 1 + sage: H = Hyp(cyclotomic=[[5], [1,1,1,1]]) + sage: H.euler_factor(1, 7) + 343*T^2 - 6*T + 1 + TESTS:: sage: H1 = Hyp(alpha_beta=([1,1,1], [1/2,1/2,1/2])) @@ -1926,7 +1937,7 @@ def euler_factor(self, t, p, deg=None, cache_p=False): - [Watkins]_ """ t = QQ(t) - if t in [0, 1]: + if t == 0: raise ValueError('invalid t') if not is_prime(p): raise ValueError('p not prime') @@ -2003,7 +2014,7 @@ def euler_factor(self, t, p, deg=None, cache_p=False): ans = characteristic_polynomial_from_traces(traces, d, p, w, sign, deg=deg) # In the multiplicative case, we sometimes need to add extra factors. - if typ == "mult": + if typ == "mult" and t != 1: if self.degree() % 2 == 0: ans *= tmp if w % 2 == 0 and (t-1).valuation(p) % 2 == 0: