key: cord-0664026-jv6qnjpg authors: Costa, Edgar; Kedlaya, Kiran S.; Roe, David title: Hypergeometric L-functions in average polynomial time date: 2020-05-27 journal: nan DOI: nan sha: 250c6104ca1534b3280c103b6a0a0b1fa977a78a doc_id: 664026 cord_uid: jv6qnjpg We describe an algorithm for computing, for all primes $p leq X$, the mod-$p$ reduction of the trace of Frobenius at $p$ of a fixed hypergeometric motive in time quasilinear in $X$. This combines the Beukers--Cohen--Mellit trace formula with average polynomial time techniques of Harvey et al. In the past, computation of arithmetic L-functions has largely been limited to familiar classes of low-dimensional geometric objects, such as hyperelliptic curves or K3 surfaces [CHK19] . Recently, it has emerged that families of motives whose associated (Picard-Fuchs) differential equation is a hypergeometric equation also have L-functions which can be computed at large scale. Such motives provide accessible examples of arithmetic L-functions with diverse configurations of Hodge numbers, some of which arise in heretofore unanticipated applications. For example, certain hypergeometric motives appear among families of Calabi-Yau threefolds, where they give rise to arithmetic manifestations of mirror symmetry (as in [DKS + 18]). Explicit formulas for the L-function of a hypergeometric motive were found by Greene [Gre87] , Katz [Kat90] , and Beukers-Cohen-Mellit [BCM15] . The latter was translated by Cohen and Rodriguez Villegas, using the Gross-Koblitz formula [GK79] to replace classical Gauss sums with the Morita p-adic gamma function. That work is unpublished, but is documented in the manuscript [Wat15] ; the resulting formula appears in [Coh15, §8] and [FKS16, §7.1]; it is implemented in GP/PARI [PAR19] , Magma [BCP97] , and SageMath [Sag20] ; and it is being used to tabulate hypergeometric L-functions in the L-Functions and Modular Forms Database [LMF20] . (For an alternate approach using the p-adic Frobenius structure on a hypergeometric equation, see [Ked19] .) The purpose of this paper is to describe a preliminary adaptation of average polynomial time techniques for computation of L-functions to the setting of hypergeometric motives. Such techniques, based on accumulating remainder trees, were introduced by Costa-Gerbicz-Harvey [CGH14] for the problem of finding Wilson primes; adapted to computing L-functions by Harvey [Har14, Har15] ; and further elaborated (and made practical in particular cases) by Harvey-Sutherland [HS14, HS16] and Harvey-Massierer-Sutherland [HMS16] . Date: June 2020. 2010 Mathematics Subject Classification. 11Y16, 33C20 (primary), and 11G09, 11M38, 11T24 (secondary). Costa and Roe were supported by the Simons Collaboration on Arithmetic Geometry, Number Theory, and Computation via Simons Foundation grant 550033. Kedlaya was supported by NSF (DMS-1802161) and UCSD (Warschawski Professorship). To simplify matters, we consider here only a limited form of the problem: given a hypergeometric motive over Q and a bound X, for each prime p ≤ X, we compute the reduction modulo p of the trace of Frobenius at p in time quasilinear in X. This eliminates some technical issues that would arise when computing the mod-p e reduction for e > 1, such as the computation of Teichmüller lifts and evaluation of the Morita p-adic gamma function in average polynomial time. Modulo p, the trace formula at p for a parameter value t is a polynomial in t of degree O(p) whose coefficients are essentially ratios of Pochhammer symbols. Computing the Pochhammer symbols themselves in average polynomial time is a straightforward adaptation of the corresponding computation for factorials done in [CGH14] ; this approach can then be modified to include the polynomial evaluation. At the end of the paper, we discuss the prospects of lifting our present restrictions of working modulo p (rather than a higher power) and of computing only the trace of the p-power Frobenius (rather than a higher power). Eliminating both restrictions would yield an average polynomial time algorithm for computing arbitrary hypergeometric L-series. However, the restricted computation described here is already of significant value for hypergeometric motives of weight 1, for which the trace of the p-power Frobenius is determined uniquely by its reduction modulo p (except when p is very small). Since the formula for the trace of the q-power Frobenius involves a summation over q − 1 terms, our method reduces the complexity of computing the first X terms of the L-series from X 2 to X 3/2 (see Theorem 2.29). We end this introduction by asking (as in [Ked19] ) whether a similar trace formula exists for the A-hypergeometric systems of Gelfand-Kapranov-Zelevinsky [GKZ08] . Such a formula might unlock even more classes of previously inaccessible L-functions. Definition 2.1. The (Morita) p-adic gamma function is the unique continuous function Γ p : Z p → Z × p which satisfies Γ(n + 1) p n/p Γ( n/p + 1) for all n ∈ Z ≥0 . For p ≥ 3, it is Lipschitz continuous with C = 1, i.e., There is also a functional equation analogous to the one for the complex Γ function: Remark 2.5. It was originally observed by Dwork (writing pseudonymously in [Boy80] , as corroborated in [KT99] ; see [RV07, §6.2] for the formulation given here) that Γ p admits an easily computable Mahler expansion on any mod-p residue disc: where (x) k := x(x + 1) · · · (x + k − 1) is the usual Pochhammer symbol, and c n is defined by the recursion (2.7) nc n = c n−1 + c n−p , c 0 = 1, c n = 0 for n < 0. Thus, one may compute Γ p (x) modulo p f using O(pf ) ring operations. 2.2. Hypergeometric motives and their L-functions. While the following discussion is needed to put our work in context, the reader is encouraged to skip ahead to (2.22), as the essential content of the paper is the computation of that formula. Definition 2.8. A hypergeometric datum is a pair of disjoint tuples α = (α 1 , . . . , α r ) and β = (β 1 , . . . , β r ) valued in Q ∩ [0, 1) which are Galois-stable (or balanced ): any two reduced fractions with the same denominator occur with the same multiplicity. Remark 2.9. There are several equivalent ways to specify a hypergeometric datum. One is to specify two tuples A and B for which the identity r j=1 x Notation 2.11. We denote by M α,β the putative (see Remark 2.17) hypergeometric family over P 1 associated to the hypergeometric datum (α, β). Its expected properties are as follows. • It is a pure motive of degree r with base field Q(t) and coefficient field Q. • Its Hodge realization is the one constructed by Fedorov in [Fed18] . This means that as per [Fed18, Theorem 2], its minimal motivic weight is and a similar recipe (see [ Then the primes of bad reduction for M α,β z are those primes p at which z and z − 1 are not both p-adic units (called tame primes) and those primes p at which the α i and β i are not all integral (called wild primes). By the compatibility with Katz, the L-function associated to M α,β z is given by the Beukers-Cohen-Mellit trace formula [BCM15] . Remark 2.13. In order to avoid some case subdivisions in what follows, we assume hereafter that 0 / ∈ α. This is relatively harmless because of the isomorphism For other (putative) examples, see [BK12] and [Nas17] . Remark 2.17. We use the qualifier "putative" in Notation 2.11 for two reasons. One is to avoid any precision about motives; while [BCM15] describes a specific variety whose -adic cohomology includes Katz's perverse sheaf, lifting this containment to the motivic level would require a deeper dive into motivic categories (including a choice of which such category to consider). The other, more serious issue is that there is no existing reference that provides this missing precision on hypergeometric motives. The reader seeking to remedy this should start with [And04] for a user's guide to motives. 2.2.1. Trace formulas. We are particularly interested in computing where Frob is the Frobenius automorphism at a prime p of good reduction for M α,β z . (For concreteness, we may replace M α,β z with anétale realization.) We ignore primes of bad reduction both because they are small enough to be handled individually and because a somewhat different recipe is required (see [Wat15, § 11] for a partial description, noting that our z is Watkins's 1/t). and then define a p-adic analogue of the Pochhammer symbol by setting . Let Teich(z) be the Teichmüller representative in Z p of the residue class of z (the unique (p − 1)-st root of 1 congruent to z modulo p). As in [Wat15, § 2], write (2.22) By adapting [BCM15, Theorem 1.3] using the Gross-Koblitz formula as in [Wat15, § 2] (and twisting by q D to minimize the weight), we deduce the following. From [Wat15, § 11], we also have a precise formula for the functional equation associated to det(1 − T Frob |M α,β z ). Theorem 2.27. We have Here A, B, Φ a , Φ b are as in Remark 2.9 and ∆ p is the Kronecker symbol. Using these two results, we can recover det(1 − T Frob |M α,β z ) from the values H p f α β z for f = 1, . . . , r 2 . Computing H p f α β z via (2.22) requires O(f p f ) arithmetic operations, 1 due to the number of terms in the sum and product [Wat15, §2.1.4]. As these operations are in Z p , we must also pay attention to p-adic working precision; since H p f α β z is the sum of r algebraic integers of complex norm p wf /2 , it is uniquely determined by its reduction modulo p e for e > 1 2 wf + log p (2r). For the use case of computing L-series, a different analysis applies. The use of a remainder tree to expedite modular reduction has its origins in the fast Fourier transform (FFT). An early description was given by Borodin-Moenck [BM74] ; for a modern treatment with more historical references, see [Ber08] . Accumulating remainder trees were introduced in [CGH14] in order to compute (p − 1)! (mod p 2 ) for many primes p. We use the variant described in [HS14, §4] . Definition 3.1. Suppose P is a sequence p 1 , . . . , p b−1 of pairwise coprime integers with p i ≤ X, and A 0 , . . . , A b−2 is a sequence of 2 × 2 integer matrices. We may use an accumulating remainder tree to compute (3.2) C n := A 0 · · · A n−1 mod p n for 1 ≤ n < b as follows. For notational convenience we assume b = 2 , set A b−1 = 0 and p 0 = 1. Then as in [HS14, § 4], write 1 The factor of f comes from computing Γp. We do not incur a factor of f from computing Γ * 3.1. Accumulating remainder tree with spacing. In most applications (including this one), there is not a one-to-one correspondence between the moduli p i and the multiplicands A i . Rather, we will be given: • a list of matrices A 0 , . . . , A b−1 , • a list of primes p 1 , . . . , p c , and • a list of distinct cut points b 1 , . . . , b c with the aim of computing C n := A 0 · · · A bn−1 mod p n for 1 ≤ n < c. This reduces to Algorithm 1 by suitably grouping terms; see Algorithm 2. (One may also handle repeated cut points, as long as the cut points up to X occur at most O(X) times.) Remark 3.5. One can improve the space complexity by replacing remainder trees with remainder forests [HS14, Theorem 4.2]. However, we also have to split our computation into separate remainder trees at discontinuities of (2.22); it is not clear whether this splitting can be subsumed by working with remainder forests. We record two technical lemmas used in the description of our algorithm. For the rest of the paper, we make the simplifying assumption q = p in Theorem 2.26. Note that b(δ − ) = −(a + r) = mb − ap so m + ≡ δ (mod p). The fact that δ ∈ I b follows from the bounds 0 ≤ a, r ≤ b. Proof. Since q = p, we have Consequently, the only way for η m (α) − η m (β) to change values when m goes to m + 1 is for there to exist γ ∈ α ∪ β such that This occurs precisely when m = γ(p−1) . Meanwhile, by (2.24), ξ m (β) = ξ m+1 (β) unless β j = m p−1 or β j = m+1 p−1 = 0 for some j. Throughout this section, fix α, β and z. We now describe how to compute the trace H p α β z modulo p in average polynomial time using equation (2.22), which we duplicate here modulo p for ease of reference: Overview of the algorithm. In order to apply Algorithm 2, we would like to identify 2 × 2 integer matrices B(m), such that we may extract H p α β z (mod p) from B(0)B(1) · · · B(p − 2). In practice, we will consider shorter subproducts and choose B(m) based on the residue of p modulo a fixed integer (independent of m and p); we will then apply Algorithm 2 once for each subproduct and residue class. As a first approximation, let us instead model the sum If we can find f (m), g(m) ∈ Z[m] so that and B = B(0) . . . B(p − 2) (mod p), so that B ≡ g(0) · · · g(p − 2) 1 0 and so p−2 m=0 P m ≡ B 21 / B 11 (mod p). That is, B 11 tracks a common denominator, B 22 tracks the product P m , and B 12 computes the sum of the P m . There are two problems with the approach described above. First, to correctly simulate (5.1) we must sum not P m but which we cannot directly handle by modifying B(m) 21 because the extra factor depends on both p and m. Second, while we can find polynomials f and g satisfying (5.3) for most values of m using (2.21) and the functional equation (2.4), there will be a few values of m where f (m) or g(m) is a multiple of p. We cannot filter these values out during the remainder tree because p is not fixed. The solution to both of these issues is to break up the range [0, p − 2] into intervals on which equation (5.3) holds and the values η m (α) − η m (β) and ξ m (β) are constant. The breaks between these intervals occur when m = γ(p−1) , where γ ∈ α ∪ β. We thus use a separate accumulating remainder tree for each interval, yielding for each p a fixed number of subproducts with isolated missing terms in between; we then compute separately for each p to bridge the gaps. A third issue is that while we can vary the endpoint in an accumulating remainder tree as a function of p (as described in Section 3), it is more difficult to change the start point. Our solution is to use Lemma 4.1 to find a rational number δ so that adding δ to each α j and β j has the effect of shifting the start point to 0. 5.2. Construction of the matrix product. We now construct the matrix product described above. We begin with the division of the interval [0, p − 1] and the division of primes into residue classes. We assume that q = p is good and not 2. Definition 5.6. Given a hypergeometric motive M α,β z , let 0 = γ 0 < · · · < γ s = 1 be the distinct elements in α ∪ β ∪ {0, 1}. Let b be the least common denominator of α ∪ β and fix c ∈ (Z/bZ) × . Let p be a prime congruent to c modulo b and not dividing the denominator of z. Write m i for γ i (p − 1) . We next exhibit polynomials that we use to compute Pochhammer symbols and their partial sums on the interval (γ i , γ i+1 ). Definition 5.7. Fix an interval (γ i , γ i+1 ), choose δ i and i associated to γ i as in Lemma 4.1, and let as follows: set (5.9) Lemma 5.10. Define P m as in (5.2), and suppose m i < m < m i+1 . Then Proof. We first focus on a single Pochhammer symbol (α j ) * m . First note that for m i < m ≤ m i+1 , by (4.4) we have Combining (5.11) with Lefschetz continuity (2.3) and the functional equation for Γ p (2.4) and Lemma 4.1, for m i < m < m i+1 we obtain (5.12) = −(α j + m + ι(α j , γ i ))Γ p (α j + m + ι(α j , γ i )) Taking the product over all the Pochhammer symbols, the minus sign cancels out, and we obtain the equation (5.9), as desired. We next account for the power of p in the product, and assemble a matrix product that computes the sum between two breaks. Definition 5.13. Let ξ(β) = #{j : β j = 0} and (5.14) By Lemma 4.2, σ i gives the value of (−p) ηm(α)−ηm(β) p ξm(β)+D mod p for all m with m i < m < m i+1 . Now set . Since A i,c (k) depends only on c and not p, we can use an accumulating remainder tree for each c to compute Lemma 5.17. For P m as defined in (5.5), Proof. By Lemma 5.10, for k = 1, . . . , m i+1 − m i − 1, and hence (A i,c (1) · · · A i,c (k)) 21 (A i,c (1) · · · A i,c (k)) 11 ≡ σ i k l=1 P mi+l P mi+1 (mod p). Taking k = m i+1 − m i − 1, then applying Lemma 4.2 to replace σ i with P m /P m , yields the desired result. It remains to deal with the breaks. Since the number of breaks is independent of p, we have the luxury of computing matrices T i (p) separately for each p that move the Pochhammer symbols and partial sums past the break γ i . Definition 5.19. With ω defined as in (2.4), let if γ(p − 1) ≥ m i + 1 ω(γ + m i + 1)ω(γ + m i ) otherwise (5.20) Z α,β (γ i−1 ) + ξ mi (β) + D = 0 and Z α,β (γ i−1 ) ≡ 0 (mod 2) −1 Z α,β (γ i−1 ) + ξ mi (β) + D = 0 and Z α,β (γ i−1 ) ≡ 1 (mod 2) 0 otherwise Proof. This follows by induction on i using Lemma 5.17. Summing up, we obtain the following. Proposition 5.25. For p ≡ c (mod b) not dividing the denominator of z, H p α β z ≡ S(p) 21 /S(p) 11 (mod p). Proof. This follows from (5.1) and the case i = s of Lemma 5.24. 5.3. Algorithm and runtime. We summarize with Algorithm 3. Theorem 5.26. Algorithm 3 is correct and runs in time where b is the least common denominator of α ∪ β. Proof. Correctness is immediate from Proposition 5.25. The runtime is dominated by the calls to Algorithm 2; these calls takes place inside a loop over consecutive elements of α ∪ β ∪ {0, 1} and a second loop over residue classes modulo a divisor of b. These two loops together have length O(rb); combining with the runtime estimate from Theorem 3.4 yields the desired result. 5.4. Implementation notes. We have developed and tested a prototype implementation of Algorithm 3 in SageMath (using a variant of Algorithm 2). This prototype already outperforms SageMath and Magma; see Table 5 .27. Nonetheless, computing at scales of interest (e.g., 10 7 Dirichlet coefficients of an L-series) will probably require an implementation in a lower-overhead language. which scales linearly in p rather than q. We may then argue as in Theorem 2.29 to compute the first X coefficients of an L-series in average polynomial time. which interferes with our division of the summation into a fixed number of ranges. To see this in more detail, fix v ∈ {0, . . . , f − 1}such breaks. It is unclear whether one can rearrange the formula (2.22) to remedy this issue Une introduction aux motifs (motifs purs, motifs mixtes, périodes), volume 17 of Panoramas et Synthèses The Magma algebra system. I. The user language Fast multiplication and its applications Hypergeometric functions and a family of algebraic curves Fast modular transforms p-adic gamma functions and Dwork cohomology Hypergeometric equations and weighted projective spaces A search for Wilson primes Zeta functions of nondegenerate hypersurfaces in toric varieties via controlled reduction in p-adic cohomology Computing L-functions: a survey Zeta functions of alternate mirror Calabi-Yau families Variations of Hodge structures for hypergeometric differential operators and parabolic Higgs bundles Sato-Tate groups of some weight 3 motives Gauss sums and the p-adic Γ-function Discriminants, resultants and multidimensional determinants. Modern Birkhäuser Classics Hypergeometric functions over finite fields Counting points on hyperelliptic curves in average polynomial time Computing zeta functions of arithmetic schemes Computing L-series of geometrically hyperelliptic curves of genus three Computing Hasse-Witt matrices of hyperelliptic curves in average polynomial time Computing Hasse-Witt matrices of hyperelliptic curves in average polynomial time, II Integer multiplication in time O(n log n). hal-02070778 Exponential sums and differential equations Frobenius structures on hypergeometric equations Bernard Dwork (1923-1998) The LMFDB Collaboration. The L-functions and modular forms database On a certain hypergeometric motive of weight 2 and rank 3 Values of Gaussian hypergeometric series PARI/GP version 2.11 A course in p-adic analysis, volume 198 of Graduate Texts in Mathematics Experimental number theory The Sage Developers. SageMath, the Sage Mathematics Software System Hypergeometric motives over Q and their L-functions Algorithm 3: Trace mod p 1 def Traces(α, β, z, X):Input : α, β ∈ Q ∩ [0, 1) r , z ∈ Q and a bound X 3 ) and z = 1/5. 5.5. An example. Let α = ( 1 4 , 1 2 , 1 2 , 3 4 ), β = ( 1 3 , 1 3 , 2 3 , 2 3 ) and z = 1 5 . We plot the zigzag function in Figure 5 .27. Using equation (2.12), we see that M α,β has weight 1 and the intervals contributing to the computation of H p α β z are (γ 2 , γ 3 ) = ( 1 3 , 1 2 ) and (γ 4 , γ 5 ) = ( 2 3 , 3 4 ). For the remainder of the example we will focus on the congruence class p ≡ 7 (mod 12). Applying Lemma 4.1 to γ 2 = 1 3 (resp. γ 4 = 2 3 ), we obtain δ 2 = 2 3 and 2 = 1 (resp. δ 4 = 1 3 and 4 = 1). By (5.9) and (5.14), f 2,7 (k) = 5184k 4 + 8640k 3 + 4428k 2 + 852k + 55, g 2,7 (k) = 25920k 4 + 69120k 3 + 63360k 2 + 23040k + 2880, f 4,7 (k) = 5184k 4 + 12096k 3 + 9612k 2 + 2820k + 175, g 4,7 (k) = 25920k 4 + 86400k 3 + 106560k 2 + 57600k + 11520, and σ 2 = σ 4 = −1. Taking We would like to be able to compute H p f α β z (mod p e ) in average polynomial time for general e and f , but we currently only implement this for e = f = 1. We highlight the key points at which new ideas would be needed to achieve this goal.