\section{Elementary divisors of edge Hecke operators}\label{sec:elementary-divisors} This section proves the theorem on elementary divisors used at the exceptional primes (\cref{thm:marked-colength}). A Hecke operator of an edge type, acting on functions on lattices with values in forms of large degree twisted by a cycle of Frobenius powers, is shown to be onto modulo $p^m$ up to a colength whose mean exponent per coordinate is at most $3c_{\rm div}+\theta m$, with $c_{\rm div}$ small (\cref{thm:elementary-divisors}). The proof factors the operator through functions on edges, $M\subseteq M_{\rm all}\subseteq M_{\rm edge}\to\mathcal N\subseteq M^\circ$, and bounds three things: the colength of the integral functions on lattices among the functions on edges that depend only on the origin (\emph{depth}, \cref{ss:depth}); the image of the adding map, through a near inverse that satisfies congruences at each edge (\emph{averaging}, \cref{ss:averaging}); and the number of further generators these congruences leave room for (\emph{defect count}, \cref{ss:defect-count}), which rests on a root lemma of Stepanov type and on the volume of the cone of Pieri's inequalities. \subsection{Frobenius cycles}\label{ss:frobenius-cycles} \begin{definition}[Frobenius cycle]\label{def:frobenius-cycle} Let $W$ be a local ring with finite residue field and $R$ a ring. A \emph{Frobenius cycle} with $N$ letters consists of a prime $p$, an exponent $o$ with $P=p^o\ge5$, ring maps $\iota_s\colon W\to R$ for the \emph{letters} $s\in\Z/N$, each marked \emph{even} or \emph{odd} with neighbouring letters of opposite parity, and an element $w\in R$ with $w^2=p$, such that $\iota_{s+1}(x)\equiv\iota_s(x)^P\pmod p$ for all $x$ and the residue field of $W$ has $q=P^N$ elements. \end{definition} \lean{New.FrobeniusCycle, New.FrobeniusCycle.P, New.FrobeniusCycle.q, New.FrobeniusCycle.map, New.FrobeniusCycle.one_lt_P, New.FrobeniusCycle.one_lt_q, New.FrobeniusCycle.frobenius_pow_congr, New.FrobeniusCycle.sqrtPrime_ne_zero, New.FrobeniusCycle.finite_residueField, New.FrobeniusCycle.five_mul_P_pow_le_q, New.FrobeniusCycle.five_le_q, New.FrobeniusCycle.card_isEven_add_self, New.FrobeniusCycle.two_le_card_letters, New.FrobeniusCycle.p_dvd_embedding_of_mem_maximalIdeal} The variables are $x_{b,s}$ with $b3kc$, then $w^c$ divides the pairing of $v$ with $\rho(g)e_\beta$. In particular $\mathcal M_{\rm all}$ satisfies the \emph{defect conditions}: its block diagonal translates have no term of defect above $9kc$ modulo $w^c$. \item Suppose every edge from every origin occurs among the edges $e$, with origin $\mathrm{src}(e)$ and basis change $g_e$, and all depths are at most $x$. The functions on edges that depend only on the origin form a direct summand, the image of a matrix $Q$ with a left inverse; and the restriction of integral functions on origins is $Qd$ with $\det d\mid w^{l}$, $l=\#X\sum_{1\le\delta\le x}\dim\mathcal D_\delta$, where $\mathcal D_\delta$ is the space over the residue field of forms all of whose translates have depth at least $\delta$. \end{enumerate} \end{proposition} \lean{New.FrobeniusCycle.IsEdgePairing, New.FrobeniusCycle.IsEdgePairing.dotProduct_letterRep_mulVec, New.FrobeniusCycle.IsEdgePairing.pairing_mul_eq_pow_mul_dotProduct, New.FrobeniusCycle.exists_isEdgePairing, New.FrobeniusCycle.edgeRestriction, New.FrobeniusCycle.originFunctions, New.FrobeniusCycle.edgeRestriction_mulVec_apply, New.FrobeniusCycle.transpose_edgeRestriction_mulVec, New.FrobeniusCycle.dvd_depthScaling_mulVec_of_dvd_edgeRestriction, New.FrobeniusCycle.apply_mem_allEdgesForms, New.FrobeniusCycle.dvd_of_forall_dvd_mul_inv_apply, New.FrobeniusCycle.exists_originFunctions_factorization_det_dvd, New.FrobeniusCycle.mulVec_mulVec_eq_self_of_mem_originFunctions, New.FrobeniusCycle.pow_add_dvd_of_le_defect, New.FrobeniusCycle.pow_dvd_letterRep_mulVec_of_mem_allEdgesForms, New.FrobeniusCycle.allEdgesForms_le_defectConditions, New.FrobeniusCycle.IsEdgePairing.pow_dvd_pairing_letterRep} \begin{proof} (a) For a letter $s$ let $\Delta_s$ be the diagonal matrix with $w$ at the deep variables of $s$ and $1$ at the others; then $\Delta$ is the Kronecker product over the letters of the $n$-th symmetric powers of the $\Delta_s$. For $u$ parahoric, the entries of the letter matrix $u_s$ in a shallow row and a deep column are divisible by $p$: for even $s$ they come from the entries of $u$ in the positions $(i,j)$ with $i0$, $X_s$ the weight $c(X_s)+qP_s\rho$ and the other variables their weights $c$. As $5P_s\le q$ and the increments lie in $[\frac12,1]$, the cross terms change the image of $f$ only in a level higher by $\frac1{20}$, and the hypothesis on the terms of $f$ puts the image at level $l$ plus the weight of $x^\alpha$. Hence $\Phi\ne0$ has degree at most $q\nu'$: this is the expansion at infinity. \emph{The finite points.} For $r\in W$ let $\gamma_r$ be the element of the root $\mathrm{SL}_2(W)$ that is $\begin{psmallmatrix}0&1\\-1&\pm r\end{psmallmatrix}$ in the rows and columns $a$, $a'$; it is a transposition times a transvection times a diagonal sign. It sends $X_s$ to $Y_s$ and $Y_s$ to $X_s+\epsilon_s\iota_s(r)Y_s$ up to signs. Acting by $\gamma_r$, substituting as above and replacing $t$ by $t+\iota_i(r)$ gives, up to signs, the substitution applied to the variables with $X_s$ and $Y_s$ exchanged, plus the Frobenius errors $(t+\iota_i(r))^{P^n}-t^{P^n}-\iota_{i+n}(r)$, which are multiples of $p$ (as $\iota_{i+n}\equiv\iota_i^{P^n}$ modulo $p$) and so gain $2$ in the filtration. Applying the hypothesis to the translate of $f$ by $\gamma_r^{-1}$, in the filtration in which $t$ weighs $\rho$ and a variable $z$ weighs $c(z)$ minus its zero order times $\rho$, the shifted polynomial $\Phi(t+\iota_i(r))$ has its coefficients of $t^j$ divisible by $w^{l+1}$ for $j<\nu$: it vanishes to order at least $\nu$ at $t=\iota_i(r)$. \emph{Stepanov.} By \cref{lem:stepanov-count} with $E=\nu$, $\nu q\le\deg\Phi\le q\nu'$, so $\mathrm{def}_i(\alpha)\le0$. For the second statement, over a field of characteristic $p$, take $w=0$, so that orders are $0$ or infinite, and the weights the heights, which rise by $1$; a term of least height among the terms of all translates satisfies the hypothesis with $l$ its height minus its weight. \end{proof} \subsection{The cone of Pieri's inequalities}\label{ss:pieri} Vectors $\nu$ are real functions of $(b,s)$. The \emph{step map} sends $\nu$ to the signed gaps between consecutive letters, twisted by permutations, and the \emph{Pieri cone} is cut out by the inequalities $\mathrm{def}_i\le0$ along all simple roots $(b,b+1)$ at all letters, one half of the interlacing inequalities between $\nu$ and $P$ times its shift. The \emph{slab} of degrees $D$ consists of the $\beta\ge0$ whose degree in each letter $s$ lies in $[D_s-1,D_s]$. \lean{New.permStep, New.degreeSlab, New.pieriCone, New.positiveStepSet, New.detOneSubPerm, New.FrobeniusCycle.defectCone, New.FrobeniusCycle.permStep_mem_defectCone_iff, New.FrobeniusCycle.convex_defectCone_inter_degreeSlab, New.isBounded_degreeSlab, New.isBounded_inter_degreeSlab} \begin{proposition}[Volume of the cone]\label{prop:pieri-volume} For every slab, $\prod_{ly_0\ge x_1>y_1\ge\dots$ and $0$ otherwise, by induction on $k$: as every $x_{b+1}\le y_0$, interlacing is $y_01$ the step map with permutations $\sigma$ is invertible (in its kernel $P\nu$ would only rearrange the entries of $\nu$), and up to a constant independent of $\sigma$ its determinant is $\det(1-\bar\sigma/q)$, $\bar\sigma=\sigma_0\cdots\sigma_{N-1}$, by factoring it as a signed shift, a triangular map and a permutation of blocks that moves all twists to the last step and using $\det(1-BA)=\det(1-AB)$. The set of $\nu$ whose image under the step map with permutations lies in the slab and has positive entries has volume $\vol(\text{slab})/\abs{\det}$, the walls being null. Integrating the pointwise identity over $\nu$ shows that the cone fills the share \[ c=\frac{\abs{\det(1-1/q)}}{k!}\sum_\tau\frac{\mathrm{sign}\,\tau}{\abs{\det(1-\tau/q)}} \] of every slab, the sum over the permutations of $\{0,\dots,k-1\}$, after summing over the families with a given product, each product occurring $k!^{N-1}$ times. \emph{One letter.} The share depends only on $k$ and $q$, so it may be computed for one letter with the sign $+$ and $q$ in place of $P$. There the cone $\{q\beta_{b+1}\le\beta_b\}$ meets the simplex $\{\beta\ge0,\ \sum\beta_b\le1\}$ in an orthant for the coordinates $\beta_b-q\beta_{b+1}$; rescaling these coordinates by suitable factors gives a triangular map that keeps the degree $\sum_b\beta_b$, and its determinant is $\prod_{l0$, and let $z_t$ be at least $\prod_u\kappa_u$ distinct points at which each $X_u^{\kappa_u}$ agrees with a polynomial $g_u$ whose monomials cost less than $1$. Then every $f\ne0$ that vanishes to order $d$ at all these points has a monomial of cost at least $d$. \end{lemma} \lean{New.exists_le_weight_of_mem_vanishingIdeal_pow, New.monomial_mul_bind₁_mem_of_weight_le, New.bind₁_monomial_mem_vanishingIdeal_pow, New.coeff_translate_eq_zero_of_mem_vanishingIdeal_pow, New.exists_forall_coeff_translate_eq, New.mem_of_forall_monomial_mem, New.wellFounded_lt_of_monotone_finsupp} \begin{proof} Put $\psi_u=X_u^{\kappa_u}-g_u$, which vanishes at all the points, and $b_{\alpha,\gamma}=X^\alpha\psi^\gamma$. \emph{Division.} If $\mathrm{cost}(\alpha)+\abs\gamma\le R$, then $b_{\alpha,\gamma}$ is a combination of the $b_{\beta,\gamma'}$ with $\beta<\kappa$ entrywise and $\mathrm{cost}(\beta)+\abs{\gamma'}\le R$: by induction on the cost, if $\alpha_u\ge\kappa_u$ write $X^\alpha=X^{\alpha-\kappa_ue_u}(\psi_u+g_u)$; the first term raises $\abs\gamma$ by $1$ and lowers the cost by $1$, and the second replaces $X_u^{\kappa_u}$ by monomials of cost below $1$. \emph{Jets.} Let $J$ send a polynomial to its jets of order below $d$ at the points, the coefficients of degree below $d$ after translating each point to $0$. As the points are distinct, $J$ is onto, and $b_{\alpha,\gamma}$ with $\abs\gamma\ge d$ lies in its kernel. By division every polynomial lies in the span of the $b_{\beta,\gamma}$ with $\beta<\kappa$, $\abs\gammac^*$; by \cref{prop:edges}(c) these pairings are divisible by $w^c$. Adding the differences along a chain of subsets from $\emptyset$ to all copies gives $\langle\mathrm{Av}\,h,h'\rangle\equiv p^{Nc_0}\langle h,h'\rangle$ modulo $w^c$. \end{proof} \begin{proposition}[Conditions at an edge]\label{prop:edge-condition} Let $p$ be a non-unit of $O$, the degree be large (\cref{def:large-degree}), $(b,b')$ an edge pairing and $c=5Nc_0$. There are a module $\mathcal C$ containing $\mathcal M_{\rm all}$ and $w^c O^{\rm exp}$, a matrix $\mathrm{Av}$ with values in $\mathcal C$ that paired against $\mathcal M_{\rm all}$ is multiplication by $p^{Nc_0}$ modulo $w^c$, and a space $S$ over the residue field containing the reductions of the $h$ with $w^{c-1}h\in\mathcal C$, with $[\GL_k(W):\text{parahoric}]\dim S\le(1+\theta)\#\{\text{exponents}\}$. \end{proposition} \lean{New.FrobeniusCycle.exists_isEdgeCondition, New.FrobeniusCycle.IsEdgeCondition, New.FrobeniusCycle.mem_translatesIn_of_pow_smul_mem, New.FrobeniusCycle.sqrtPrime_mem_maximalIdeal, New.FrobeniusCycle.charP_residueField, New.FrobeniusCycle.congruencePrecision} \begin{proof} Let $\mathcal C$ be the defect conditions modulo $w^c$ with threshold $9kc$ along $(r-1,r)$, $S$ the defect conditions over the residue field with threshold $3t$, $t=3kc$, and $\mathrm{Av}$ the averaging map of \cref{prop:averaging-map}; its hypothesis $Nk(\ell+2)n+n+k