This file is a Jupyter notebook hosted on CoCalc (formerly SageMathCloud). The embedded code is to be run using the standard SageMath 8.1 kernel; see below for discussion of hypergeometric motives in Sage.

To retrieve this file, see my web site (http://kskedlaya.org) and click on "Talks".

Thanks to Fernando Rodriguez Villegas for helpful discussions. The author was supported by NSF grant DMS-1501214 and the UCSD Department of Mathematics (Stefan E. Warschawski Chair).

- [BCH]: F. Beukers, H. Cohen, and A. Mellit, Finite hypergeometric functions, arXiv:1505.02900.
- [Dw]: B. Dwork,
*Generalized Hypergeometric Functions*, Clarendon Press, Oxford, 1990. - [BH]: F. Beukers and G. Heckman, Monodromy for the hypergeometric function ${}_nF_{n-1}$,
*Inventiones Mathematicae***95**(1989), 325-354. - [Ka]: N.M. Katz,
*Exponential Sums and Differential Equations*, Annals of Math. Studies 124, Princeton Univ. Press, Princeton, 1990. - [Sh1]: I. Shapiro, Frobenius map for quintic threefolds,
*International Mathematics Research Notices*(2009), 2519-2545. - [Sh2]: I. Shapiro, Frobenius map and the $p$-adic Gamma function,
*Journal of Number Theory***132**(2012), 1770-1779.

See also my slides and Jupyter notebook from ICTP, September 2017 (on my web site; see above).

Throughout this talk, by a *(hypergeometric) datum* we will mean two tuples $\underline{\alpha} = (\alpha_1,\dots,\alpha_n)$ and $\underline{\beta} = (\beta_1,\dots,\beta_n)$ of the same length $n$ such that:

- $\alpha_i,\beta_j \in \mathbb{Q} \cap [0,1)$ for $i,j=1,\dots,n$;
- $\underline{\alpha}$ and $\underline{\beta}$ are disjoint: $\alpha_i \neq \beta_j$ for $i,j=1,\dots,n$. (However, there may be repeats within $\underline{\alpha}$ or $\underline{\beta}$.)

We say that this datum is *Galois-stable* if:

- in each of $\underline{\alpha}$ and $\underline{\beta}$, for any $r,r',s \in \mathbb{Z}$ with $s > 0, \quad 0 \leq r,r' < s, \quad \gcd(r,s) = \gcd(r',s) = 1,$ the fractions $\frac{r}{s}$ and $\frac{r'}{s}$ occur with the same multiplicity.

We consider the generalized hypergeometric equation with parameters $\underline{\alpha}, \underline{\beta}$ using the normalization of [BH]: $\left( t(D + \alpha_1) \cdots (D + \alpha_n) - (D+\beta_1-1)\cdots(D+\beta_n-1) \right)(y) = 0 \qquad D = t \frac{d}{dt}.$ For $i=1,\dots,n$, we have a (formal) solution at $t=0$ of the form $y = t^{1-\beta_i} {}_nF_{n-1} \left( \left. \genfrac{}{}{0pt}{}{\alpha_1-\beta_i+1, \dots, \alpha_n-\beta_i+1}{\beta_1-\beta_i+1, \dots, \widehat{\beta_i - \beta_i + 1},\dots,\beta_n - \beta_i + 1} \right| t \right)$ expressed in terms of the Clausen-Thomae hypergeometric series ${}_nF_{n-1} \left( \left. \genfrac{}{}{0pt}{}{\alpha_1,\dots,\alpha_n}{\beta_1,\dots,\beta_{n-1}} \right| t \right) := \sum_{k=0}^\infty \frac{(\alpha_1)_k \cdots (\alpha_n)_k}{(\beta_1)_k \cdots (\beta_{n-1})_k} \frac{t^k}{k!}.$

As described in [Ka], to any Galois-stable datum $\underline{\alpha}, \underline{\beta}$ one can (modulo formal difficulties with the definition of motives) associate a family of *hypergeometric motives* over $\mathbf{P}^1_{\mathbb{Q}} - \{0,1,\infty\}$ whose associated variation of Hodge structures has Picard-Fuchs equation (for a suitable choice of period) equal to the hypergeometric equation with parameters $\underline{\alpha}, \underline{\beta}$.

Starting with version 8.1, Sage includes a partial port of the Magma hypergeometric motives package; this is joint work with Frédéric Chapoton. At present, this is limited to basic combinatorial functions plus the hypergeometric trace formula for good primes; see Sage's trac server for running discussion.

**Warning:** there is a normalization discrepancy between Magma and Sage; the parameter value $t$ in Sage corresponds to $1/t$ in Magma. (The convention in Sage is the one compatible with [BH].)

In [1]:

from sage.modular.hypergeometric_motive import HypergeometricData as HGData

In [2]:

H = HGData(alpha_beta = ([1/6,5/6,1/8,3/8,5/8,7/8],[0,1/2,1/12,5/12,7/12,11/12])) H

Hypergeometric data for [1/8, 1/6, 3/8, 5/8, 5/6, 7/8] and [0, 1/12, 5/12, 1/2, 7/12, 11/12]

The degree of this Hodge structure is the integer $n$.

In [3]:

n = H.degree(); n

6

The minimal weight $w$ and the Hodge numbers are computed using the "zigzag function": $Z(x) := \#\{k: \alpha_k \leq x\} - \#\{k: \beta_k \leq x\}.$ To wit, the Hodge vector has $i$-th component $\#\{j \in \{1,\dots,n\}: Z(\beta_j)-\min_k\{Z(\beta_k)\} = i\}$ and $w$ is the largest $i$ for which this component is nonzero. (Note: $nw$ is always even.)

In [4]:

w = H.weight(); w

2

In [5]:

H.hodge_numbers()

[2, 2, 2]

For $t$ in a number field $K$, the $L$-function of the hypergeometric motive (without completion by archimedean factors) has the form
$\prod_{\mathfrak{p}} L_{\mathfrak{p}}(\mathrm{Norm}(\mathfrak{p})^{-s})^{-1}$ where for each finite place $\mathfrak{p}$ of $K$, $L_{\mathfrak{p}}(T)$ is some polynomial of degree at most $n$. We say that $\mathfrak{p}$ is *good* if:

- $\mathfrak{p}$ does not divide the denominator of some member of $\underline{\alpha}$ or $\underline{\beta}$ (otherwise $\mathfrak{p}$ is
*wild*); - $v_{\mathfrak{p}}(t) = v_{\mathfrak{p}}(t-1) = 0$ (otherwise $\mathfrak{p}$ is
*tame*unless it is wild).

For $\mathfrak{p}$ good of absolute norm $q$, the polynomial $L_{\mathfrak{p}}(T)$ has the following properties.

- The degree of $L_{\mathfrak{p}}(T)$ is exactly $n$.
- The Hodge numbers, interpreted as slope multiplicities, give a lower bound on the Newton polygon of $L_{\mathfrak{p}}(T)$ which is "usually" sharp. (This occurs when $\mathfrak{p}$ is an
*ordinary*prime for this motive.) - There is a functional equation of the form $L_{\mathfrak{p}}(T) = \pm T^n q^{nw/2} L_{\mathfrak{p}}(q^{-w} T^{-1})$ where the sign is given by an explicit formula (and it is always $+$ if $w$ is odd).
- $L_{\mathfrak{p}}(T)$ is
*pure of weight $w$*: its roots in $\mathbb{C}$ all lie on the circle $|T| = q^{-w/2}$.

In [6]:

t0 = 3 p = 17 P.<T> = PolynomialRing(QQ) Lp = H.euler_factor(t0, p)(T)

In [7]:

show(Lp) show(T^n*p^(n*w/2)*Lp(1/(p^w*T)))

$24137569 T^{6} + 668168 T^{5} - 53465 T^{4} - 7752 T^{3} - 185 T^{2} + 8 T + 1$

$24137569 T^{6} + 668168 T^{5} - 53465 T^{4} - 7752 T^{3} - 185 T^{2} + 8 T + 1$

In [8]:

print(Lp.roots(CC))

[(-0.0509543817618668 - 0.0293914714113240*I, 1), (-0.0509543817618668 + 0.0293914714113240*I, 1), (-0.0214702716789809 - 0.0547652722670809*I, 1), (-0.0214702716789809 + 0.0547652722670809*I, 1), (0.0585838229910207 - 0.00530502556200247*I, 1), (0.0585838229910207 + 0.00530502556200247*I, 1)]

In [9]:

print([i.abs()^(-2) for i,_ in Lp.roots(CC)])

[289.000000000000, 289.000000000000, 289.000000000000, 289.000000000000, 289.000000000000, 289.000000000000]

The computation of $L_p(T)$ in Sage or Magma uses a certain *trace formula* which we now describe briefly.

For $\mathfrak{p}$ good, lying over the rational prime $p$, we can interpret $L_{\mathfrak{p}}(T) = \det(1 - T F_{\mathfrak{p}})$ where $F_{\mathfrak{p}}$ is an endomorphism of a certain $n$-dimensional vector space $V$ over a field of characteristic 0. To compute $L_{\mathfrak{p}}(T)$, it would be equivalent to compute $\mathrm{Trace}(F_{\mathfrak{p}}^i)$ for $i=1,\dots,\lfloor n/2 \rfloor$ (and then use the functional equation). For $q = \mathrm{Norm}(\mathfrak{p})^i$, denote this trace by $H_q(\underline{\alpha}, \underline{\beta}|t)$.

In [BCM], an explicit formula for $H_q(\underline{\alpha}, \underline{\beta}|t)$ is given in terms of Gauss sums; we will not recall the details here. Using the Gross-Koblitz formula, one can convert this into a formula in terms of the $p$-adic Gamma function $\Gamma_p$; this formula is used for the computation of $L_{\mathfrak{p}}(T)$ in both Magma and Sage. See the Magma documentation or Mark Watkins's writeup for further details (with caution about normalizations; see above).

One key feature of the formula in question is that it involves a sum over $q-1$ terms. This becomes prohibitive for $n$ large. (Magma's implementation is noticeably more efficient than Sage, but the general point applies either way.)

A possible alternative to the hypergeometric trace formula is to compute the *Frobenius structure* on the hypergeometric equation induced by the motivic construction. This approach has previously been used (notably by Lauder) in the computation of zeta functions of algebraic varieties over finite fields, where it is commonly known as the *deformation method*. However, for a given family of varieties, the complexity of the method depends strongly on the number of singularities of the associated Picard-Fuchs equation; thus hypergeometric motives provide a particularly favorable scenario for this approach.

As noted earlier, $L_{\mathfrak{p}}(T)$ can be interpreted as $\det(1 - T F_{\mathfrak{p}})$ where $F_{\mathfrak{p}}$ is a certain endomorphism of a certain finite-dimensional vector space $V$ over a certain field $K$ of characteristic 0. There are in fact multiple natural constructions that give rise to such data (known as *Weil cohomology theories*).

- The most widely known is
*étale cohomology*, in which $K$ may be taken to be $\mathbb{Q}_{\ell}$ for any prime $\ell \neq p$. - However, there are also several related constructions of
*$p$-adic Weil cohomology*in which $K$ is either $\mathbb{Q}_p$ or an unramified extension thereof; these include*Dwork cohomology*and*(rational) crystalline cohomology*. (The latter is a special case of*rigid cohomology*, which also includes*Monsky-Washnitzer cohomology*as another special case.)

While étale cohomology is often favored over $p$-adic cohomology because its foundations are somewhat more developed, this gap has closed dramatically in recent years. Moreover, for computational applications it is generally much easier to work with $p$-adic cohomology.

The approach we describe for computing $L_{\mathfrak{p}}(T)$ involves computing (to suitable $p$-adic precision) the matrix of action of $F_{\mathfrak{p}}$ on a particular basis of $p$-adic cohomology. We exploit the fact that this matrix arises by specialization from a $p$-adic analytic family of matrices closely related to the hypergeometric equation; this is the *Frobenius structure* in the title.

In order to describe Frobenius structures on a hypergeometric differential equation $0 = \frac{1}{t-1}\left( t \prod_{i=1}^n (D + \alpha_i) - \prod_{i=1}^n (D + \beta_i - 1) \right) (y) = D^n + a_0 D^{n-1} + \cdots + a_{n-1}$ we introduce the companion matrix $N = \begin{pmatrix} 0 & -1 & \cdots & 0 & 0 \\ 0 & 0 & & 0 & 0 \\ \vdots & & \ddots & & \vdots \\ 0 & 0 & & 0 & -1 \\ a_0 & a_1 & \cdots & a_{n-2} & a_{n-1} \end{pmatrix}.$

In [10]:

def companion_matrix(l): n = len(l) matlist = [[0 for j in range(n)] for i in range(n)] for i in range(n-1): matlist[i][i+1] = -1 for i in range(n): matlist[n-1][i] = l[i] return(matrix(matlist))

In [11]:

alpha, beta = H.alpha_beta() show(alpha, beta)

$\left[\frac{1}{8}, \frac{1}{6}, \frac{3}{8}, \frac{5}{8}, \frac{5}{6}, \frac{7}{8}\right] \left[0, \frac{1}{12}, \frac{5}{12}, \frac{1}{2}, \frac{7}{12}, \frac{11}{12}\right]$

In [12]:

R.<t> = PolynomialRing(QQ) pol2.<D> = PolynomialRing(R.fraction_field()) diffop = (t*prod(D+a for a in alpha) - prod(D+b-1 for b in beta))/(t-1) N = companion_matrix(diffop.list()[:-1]) show(N)

$\left(\begin{array}{rrrrrr}
0 & -1 & 0 & 0 & 0 & 0 \\
0 & 0 & -1 & 0 & 0 & 0 \\
0 & 0 & 0 & -1 & 0 & 0 \\
0 & 0 & 0 & 0 & -1 & 0 \\
0 & 0 & 0 & 0 & 0 & -1 \\
\frac{\frac{175}{49152} t - \frac{385}{41472}}{t - 1} & \frac{\frac{2705}{36864} t + \frac{2593}{13824}}{t - 1} & \frac{\frac{20497}{36864} t - \frac{24001}{20736}}{t - 1} & \frac{\frac{283}{144} t + \frac{475}{144}}{t - 1} & \frac{\frac{1003}{288} t - \frac{347}{72}}{t - 1} & \frac{3 t + \frac{7}{2}}{t - 1}
\end{array}\right)$

For a Galois-stable datum, a *Frobenius structure* on $N$ is an $n \times n$ matrix $F$ satisfying
$NF - pF \sigma(N) + D(F) = 0$
where $\sigma$ is the substitution $t \mapsto t^p$. Geometrically, this amounts to giving an isomorphism of the connection associated to $N$ with its $\sigma$-pullback.

The catch is that the entries of $F$ will not be in $\mathbb{Q}(t)$; rather, they will be rigid analytic functions on a certain subspace of $\mathbf{P}^1_{\mathbb{Q}_p}$. More precisely:

- $F$ is holomorphic away from the residue discs containing $0,1,\infty$;
- $F$ is meromorphic at $0$ and $\infty$, with no further singularities in those discs;
- in the residue disc at 1, $F$ is holomorphic away from a certain subdisc containing the $p$-th roots of 1.

For the purpose of representing a $p$-adic approximation of $F$ to suitable accuracy, we may use a rational function with poles at $0,\mu_p,\infty$.

In the general case, we must modify this definition slightly to assert that $N'F - pF \sigma(N) + D(F) = 0$ where $N'$ is the companion matrix associated to the datum $p\underline{\alpha} \pmod{1}, p\underline{\beta} \pmod{1}$.

Such a Frobenius structure always exists and is unique up to a $\mathbb{Q}_p$-scalar. In the Galois-stable case, there is a unique normalization with the following property: for $t$ in the unramified extension $\mathbb{Q}_{p^k}$, the matrix of $F_{\mathfrak{p}}$ on a suitable basis is given by $\prod_{i=0}^{k-1} F([\overline{t}]^{p^{i}})$ where $\overline{t}$ is the reduction mod $p$ and $[\overline{t}]$ is the Teichmüller lift. In particular, if $K = \mathbb{Q}$ then the matrix we want is simply $F([\overline{t}])$. (But even if $K \neq \mathbb{Q}$, the computation of $F$ takes place over $\mathbb{Q}_p$.)

By results of [Dw], there exists a Frobenius structure which is locally analytic in $\underline{\alpha}, \underline{\beta}$ (with analyticity on mod-$p$ residue classes), and again this is unique up to normalization. However, I have not confirmed that there is a choice of normalization which specializes to the geometric normalization in all Galois-stable cases.

The commutation relation between $F$ and $N$ amounts to a differential equation on the entries of $F$, which we can solve using the known solutions of the hypergeometric equation plus an initial condition. Let us demonstrate this in the case where the original datum is Galois-stable and $\underline{\beta}$ is *multiplicity-free*, i.e., $\beta_1,\dots,\beta_n$ are pairwise distinct.

In this case, we obtain a full basis $(t^{1-\beta_i} y_i: i=1,\dots,n)$ of solutions of the hypergeometric equation in the Puiseux field by taking
$y_i := \prod_{j=1}^n \frac{(\alpha_j - \beta_i)^+}{(\beta_j - \beta_i)^+} {}_nF_{n-1}\left( \left. \genfrac{}{}{0pt}{}{\alpha_1-\beta_i+1,\dots,\alpha_n-\beta_i+1}{\beta_1-\beta_i+1,\dots,\widehat{\beta_i - \beta_i + 1}, \dots, \beta_{n-1}-\beta_i+1} \right| t \right)$
where for $x \in (-1,1)$ we write
We then form the *formal solution matrix* $U$ by setting
$U_{ij} := (D+1-\beta_i)^{j-1}(y_i) \qquad (i,j=1,\dots,n);$
this will satisfy
$U^{-1} N U + U^{-1} D(U) = N_0, \qquad N_0 := \mathrm{Diag}(\beta_1-1, \dots, \beta_n - 1).$

In [13]:

def formal_solution_matrix(H, R, tprec, K=None): if K is None: K = R.base_ring() alpha, beta = H.alpha_beta() d = H.degree() l = [] for b in beta: tmp = [K(prod(a2-b for a2 in alpha if a2>b)/prod(b2-b for b2 in beta if b2>b))] for i in range(1,tprec): tmp.append(tmp[-1] * prod(a2-b+i for a2 in alpha)/prod(b2-b+i for b2 in beta)) l.append(R(tmp).add_bigoh(tprec)) matlist = [l] # These are the modified solution functions t = R.gen() for _ in range(d-1): matlist.append([(1-beta[j])*matlist[-1][j] + (matlist[-1][j]<<1).derivative() for j in range(d)]) return(matrix(matlist))

To compute $F$, we first identify the matrix $F_0 := U^{-1} F \sigma(U)$, which satisfies $N_0F_0 - pF_0 \sigma(N_0) + D(F_0) = 0.$ This equation has the following consequence: the $(i,j)$ entry of $F_0$ can only be nonzero when $\beta_i \equiv p \beta_j \pmod{1}$, and in this case it must equal $t^{-p+1+\lfloor p\beta_j \rfloor}$ times some scalar in $\mathbb{Q}_p$.

**Conjecture**: that scalar equals
$p^{Z(\beta_j)-\min_k\{Z(\beta_k)\}} (-1)^{1+Z(\beta_i)} \prod_{k=1}^n \frac{\Gamma_p((\alpha_k - \beta_i) \mod{1})/ \Gamma_p(\alpha_k)}{\Gamma_p((\beta_k - \beta_i) \mod{1})/\Gamma_p(\beta_k)},$
where $Z$ again denotes the zigzag function. Note that the powers of $p$ correspond to the Hodge numbers.

In [14]:

def initial_Frobenius_matrix(H,t,p,pprec=20): alpha, beta = H.alpha_beta() d = H.degree() gamma_prods = {} K = Qp(p,prec=pprec) perm = [beta.index(frac(p*b)) for b in beta] m = min(H.zigzag(b) for b in beta) for j in range(d): i = perm[j] u = K((-1)^(1+H.zigzag(beta[i]))) u *= p^(H.zigzag(beta[j])-m) u *= prod(K(frac(a-beta[i])).gamma()/K(a).gamma() for a in alpha) u /= prod(K(frac(b-beta[i])).gamma()/K(b).gamma() for b in beta) gamma_prods[i,j] = u*t^(-p+1+floor(p*beta[j])) return matrix(gamma_prods)

Given $F_0$ (i.e., assuming the conjecture), we compute $F = U F_0 \sigma(U)^{-1}$ as a Laurent series. Note that $U$ and $U^{-1}$ converge to holomorphic functions on the open unit disc, but do not extend toany larger region (because their coefficients are unbounded); by contrast, $F$ does have bounded coefficients and does admit a meromorphic continuation to a suitable subspace of $\mathbf{P}^1_{\mathbb{Q}_p}$; this observation can itself be used to compute $F_0$ (compare the lecture by van Straten).

In [15]:

from itertools import izip, repeat, chain def sigma(y,p,tprec): R = y.parent() l = izip(y, *repeat(repeat(0), p-1)) # Interpose p-1 zeroes between elements of y return(R(list(chain.from_iterable(l)), p*y.valuation()).add_bigoh(tprec))

In [16]:

def frobenius_structure(H, R, p, tprec, pprec): t = R.gen() U = formal_solution_matrix(H,R,tprec+p) F0 = initial_Frobenius_matrix(H,t,p,pprec) Utrunc = U.apply_map(lambda x: x.add_bigoh(tprec//p+1)) Uinvsig = (~Utrunc).apply_map(lambda x: sigma(x,p,tprec+p)) F = U * F0 * Uinvsig return(F)

To extract $L_{\mathfrak{p}}(T)$ for a particular parameter value $t_0$, we must evaluate at $t = [\overline{t}_0]$. The power series converges for $|t| < 1$, so we cannot plug in the value directly; instead, we must reduce modulo some power of $p$, multiply by a suitable power of $t^p-1$ to clear denominators, resolve to a polynomial, evaluate, then divide by the evaluation of the same power of $t^p-1$.

**Warning:** doing this correctly and efficiently involves making some extra analysis to work out the levels of $t$-adic and $p$-adic precision and the pole order in the reduction. For this demonstration, we are eyeballing all of this.

In [17]:

def euler_factor(H,t0,p,pprec=None,tprec=None,e=None): d = H.degree() alpha,beta = H.alpha_beta() if len(set(beta)) < d: raise ValueError("Repeated values in beta not allowed") if any(x.valuation(p) < 0 for x in alpha+beta): raise ValueError("Wild primes not allowed") if t0.valuation(p) < 0 or t0%p in (0,1): raise ValueError("Tame primes not allowed") w = H.weight() if e is None: e=max(5, ceil(d*w/2) + ceil(d/2)*ceil(log(d,p))) if tprec is None: tprec=(e+3)*p if pprec is None: pprec=ceil(2*e*(1+3/log(p))) K = Qp(p, pprec) R.<t> = LaurentSeriesRing(K, tprec+p) F = frobenius_structure(H, R, p, tprec, pprec) u = t^p - 1 s = e + 1 arg = K.teichmuller(t0) F1 = F.apply_map(lambda x: (x*u^s).truncate(tprec)(arg)/u(arg)^s) l = [IntegerModRing(p^e)(x).lift_centered() for x in reversed(list(F1.charpoly()))] return(PolynomialRing(ZZ,name='T')(l))

In [18]:

H

Hypergeometric data for [1/8, 1/6, 3/8, 5/8, 5/6, 7/8] and [0, 1/12, 5/12, 1/2, 7/12, 11/12]

In [ ]:

```
```

In [19]:

show(H.euler_factor(t0, p))

$24137569T^{6} + 668168T^{5} - 53465T^{4} - 7752T^{3} - 185T^{2} + 8T + 1$

In [ ]:

```
```

In [20]:

show(euler_factor(H, t0, p)) # Takes longer, but should give the same answer

```
---------------------------------------------------------------------------
```

```
TypeError Traceback (most recent call last)
```

```
<ipython-input-20-ad26551453b3> in <module>()
----> 1 show(euler_factor(H, t0, p)) # Takes longer, but should give the same answer
```

```
<ipython-input-17-0d98919d0dfa> in euler_factor(H, t0, p, pprec, tprec, e)
16 K = Qp(p, pprec)
17 R = LaurentSeriesRing(K, tprec+p, names=('t',)); (t,) = R._first_ngens(1)
---> 18 F = frobenius_structure(H, R, p, tprec, pprec)
19 u = t**p - Integer(1)
20 s = e + Integer(1)
```

```
<ipython-input-16-34c4ea810d6a> in frobenius_structure(H, R, p, tprec, pprec)
4 F0 = initial_Frobenius_matrix(H,t,p,pprec)
5 Utrunc = U.apply_map(lambda x: x.add_bigoh(tprec//p+Integer(1)))
----> 6 Uinvsig = (~Utrunc).apply_map(lambda x: sigma(x,p,tprec+p))
7 F = U * F0 * Uinvsig
8 return(F)
```

```
/ext/sage/sage-8.3_1804/local/lib/python2.7/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__invert__ (build/cythonized/sage/matrix/matrix0.c:37188)()
5303
5304 A = self.augment(self.parent().identity_matrix())
-> 5305 A.echelonize()
5306
5307 # Now we want to make sure that B is of the form [I|X], in
```

```
/ext/sage/sage-8.3_1804/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.echelonize (build/cythonized/sage/matrix/matrix2.c:52993)()
6722 if self.base_ring().is_field():
6723 if algorithm in ['classical', 'partial_pivoting', 'scaled_partial_pivoting']:
-> 6724 self._echelon_in_place(algorithm)
6725 elif algorithm == 'strassen':
6726 self._echelon_strassen(cutoff)
```

```
/ext/sage/sage-8.3_1804/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix._echelon_in_place (build/cythonized/sage/matrix/matrix2.c:54956)()
7001 scale_factor = 0
7002 for c in range(nc):
-> 7003 abs_val = A.get_unsafe(r, c).abs()
7004 if abs_val > scale_factor:
7005 scale_factor = abs_val
```

```
/ext/sage/sage-8.3_1804/local/lib/python2.7/site-packages/sage/structure/element.pyx in sage.structure.element.RingElement.abs (build/cythonized/sage/structure/element.c:19373)()
2715 ArithmeticError: absolute valued not defined on integers modulo n.
2716 """
-> 2717 return abs(self)
2718
2719 def is_prime(self):
```

```
TypeError: bad operand type for abs(): 'sage.rings.laurent_series_ring_element.LaurentSeries'
```

We have tested the conjecture (and the code) extensively on random hypergeometric data of degree at most 6, by computing the resulting Euler factors and comparing against the trace formula. Here is a small example. (This test runs 10 times; I have run it several thousand times with no failures, though one occasionally sees a discrepancy due to too little $p$-adic precision in the calculation.)

In [ ]:

from sage.modular.hypergeometric_motive import possible_hypergeometric_data as possible poss = [] for d in range(3,7): poss.append([]) for H in possible(d): alpha,beta = H.alpha_beta() if len(set(beta))==d: poss[-1].append(H) if len(set(alpha))==d: H = H.swap_alpha_beta() poss[-1].append(H)

In [ ]:

import random for _ in range(10): H = random.choice(random.choice(poss)) p = random_prime(50, lbound=3) alpha, beta = H.alpha_beta() if any(x.valuation(p) < 0 for x in alpha+beta): continue t0 = ZZ.random_element(p-2) + 2 try: P = euler_factor(H, t0, p) Q = H.euler_factor(t0, p) if P != Q: print("Discrepancy", H.alpha_beta(), p, t0, P, Q) except ValueError: print("Fail", H.alpha_beta(), p, t0) print("All tests completed")

For fun, here is a larger example that demonstrates the crossover between computing the trace formula and computing the Frobenius structure when the degree gets large enough. (I wasn't able to get a timing using Sage's built-in function because it is *so* much slower than Magma; it was still running after 6 hours.)

In [ ]:

H = HGData(alpha_beta=([0 for _ in range(12)],[i/13 for i in range(1,13)]))

In [ ]:

H.degree()

In [ ]:

H.weight()

In [ ]:

t0 = 3 p = 17 P = euler_factor(H, t0, p)

# Answer from Sage (this code) on a reference machine which also runs Magma. Time: 9m 30s sage: euler_factor(H, 3, 17) 1620424537653706124163623118049428940979124903532013480548031299441192142935188769*T^12 + 231918100755787659275118586119206936199658025307666859614931289170335335008*T^11 + 20182957687062258732203903537758608256143309713376397469047940582564*T^10 - 1469752788755235821167098334539748493356928081725386845464463*T^9 - 37690568343169351781454593977180880184163410197085525*T^8 + 263732308274784474538180871697652950211073891878*T^7 + 32544845073122731262663959685250016598757*T^6 + 7695293715511338589329322411765766*T^5 - 32089017196595110093924725*T^4 - 36511517823836880799*T^3 + 14629593842084*T^2 + 4905056*T + 1

# Answer from Magma on the reference machine. Time: 47m 7s > H := HypergeometricData([1,1,1,1,1,1,1,1,1,1,1,1],[13]); > time EulerFactor(H, 1/3, 17); 1620424537653706124163623118049428940979124903532013480548031299441192142935188769*$.1^12 + 231918100755787659275118586119206936199658025307666859614931289170335335008*$.1^11 + 20182957687062258732203903537758608256143309713376397469047940582564*$.1^10 - 1469752788755235821167098334539748493356928081725386845464463*$.1^9 - 37690568343169351781454593977180880184163410197085525*$.1^8 + 263732308274784474538180871697652950211073891878*$.1^7 + 32544845073122731262663959685250016598757*$.1^6 + 7695293715511338589329322411765766*$.1^5 - 32089017196595110093924725*$.1^4 - 36511517823836880799*$.1^3 + 14629593842084*$.1^2 + 4905056*$.1 + 1

In [ ]:

p^H.weight()

In [ ]:

# Check that the answer is pure of the correct weight. [i.abs()^(-2) for i,_ in P.roots(ComplexField(200))]

**Non-Galois data:** In some sense, this conjecture should remain valid for non-Galois data. The tricky part is to specify a "geometric" normalization, i.e., to nail down the construction of a family of hypergeometric motives (no longer with coefficients in $\mathbb{Q}$).

**Repeated parameters:** It would obviously be desirable to be able to treat the case where $\underline{\beta}$ is not multiplicity-free. We have not done any computations in this case yet, but let me indicate conceptually what should be done.

Suppose that $\beta_i = \beta_{i+1} = \cdots = \beta_{i+h}$ for some $h>0$ (and that this value does not repeat elsewhere). We formally introduce a "positive" power series variable $\epsilon$ and consider what happens when $\beta_{i+j} = \beta_{i+j-1} + \epsilon \qquad (j=1,\dots,h).$ For $j,j' \in \{i,\dots,i+h\}$, we formally have Using the functional equation for $\Gamma_p$ and the consideration that $\epsilon$ should be considered to be divisible by $p$, we formally have

This should yield an expression for $F$ without poles; at this point, setting $\epsilon = 0$ should give a correct conjectural formula for the Frobenius structure. Note that this will naturally produce derivatives of $\Gamma_p$ of order up to $h$.

This is consistent with a result of Shapiro [Sh1, Sh2] (see also the earlier lecture by van Straten): in the case $\underline{\alpha} = (\frac{1}{5}, \frac{2}{5}, \frac{3}{5}, \frac{4}{5}), \underline{\beta} = (0,0,0,0)$ corresponding to the Dwork pencil of quintic threefolds, the matrix $F_0$ has a unique off-diagonal entry which can be expressed in terms of $\zeta_p(3)$, or equivalently in terms of $\Gamma_p^{(i)}(0)$ for $i=0,1,2,3$.

**Generalization to GKZ hypergeometrics, and proving the conjecture:** It may be possible to handle both of these using the methods of [Dw] and/or the unpublished work of Adolphson mentioned in the earlier lecture by Horja.

**Recovering information from the Frobenius structure**: It should be possible to recover the trace formula from this description of the Frobenius structure. Can one also recover some supercongruences and/or identify new ones?

In [ ]:

```
```