\documentclass[10pt]{article} \usepackage[a4paper,left=19mm,right=19mm,top=20mm,bottom=24mm,footskip=11mm]{geometry} \usepackage[T1]{fontenc} \usepackage{amsmath,amsthm} \usepackage{stix2} \usepackage[protrusion=true,expansion=true,letterspace=60]{microtype} \usepackage{booktabs,array,tabularx} \usepackage{xcolor} \usepackage{titlesec} \usepackage[framemethod=default]{mdframed} \usepackage[hidelinks]{hyperref} % ---- type sizes of «The Dancing Sand Theorem» (body 10.6 pt, leading 1.46) ---- \makeatletter \renewcommand\normalsize{\@setfontsize\normalsize{10.6pt}{15.4pt}% \abovedisplayskip 7pt plus 2pt minus 3pt\belowdisplayskip\abovedisplayskip \abovedisplayshortskip 3pt plus 1pt\belowdisplayshortskip 4pt plus 2pt minus 1pt} \renewcommand\small{\@setfontsize\small{9.4pt}{12.4pt}} \renewcommand\footnotesize{\@setfontsize\footnotesize{8.6pt}{11pt}} \makeatother \normalsize \setlength{\parindent}{0pt} \setlength{\parskip}{1.6mm plus 0.6mm minus 0.2mm} \definecolor{rulegrey}{HTML}{888888} \definecolor{boxgrey}{HTML}{777777} \color[HTML]{111111} % ---- headings: 14 pt bold with a thin grey rule; 11.6 pt; 10.8 pt ---- \titleformat{\section}{\fontsize{14}{17}\selectfont\bfseries}{\thesection.}{0.35em}{}[\vspace{0.6mm}{\color{rulegrey}\titlerule[0.4pt]}] \titlespacing*{\section}{0pt}{6.5mm plus 1mm}{2.2mm} \titleformat{\subsection}{\fontsize{11.6}{14}\selectfont\bfseries}{\thesubsection}{0.5em}{} \titlespacing*{\subsection}{0pt}{4mm plus 1mm}{1.2mm} % ---- statements: bold head, upright body, as in the Dancing Sand ---- \newtheoremstyle{ds}{2.2mm}{2.2mm}{\upshape}{}{\bfseries}{.}{0.5em}{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} \newtheoremstyle{dsrem}{2.2mm}{2.2mm}{\upshape}{}{\bfseries}{.}{0.5em}{} \renewcommand\qedsymbol{$\blacksquare$} \mdfdefinestyle{headline}{topline=false,bottomline=false,rightline=false,linewidth=0.6pt,linecolor=boxgrey, innerleftmargin=4mm,innerrightmargin=0mm,innertopmargin=1.2mm,innerbottommargin=1.2mm, leftmargin=4mm,rightmargin=4mm,skipabove=3mm,skipbelow=3mm} % ---- page numbers: centred, 9.5 pt, none on the first page ---- \makeatletter \renewcommand\@oddfoot{\hfil{\fontsize{9.5}{11}\selectfont\color[HTML]{222222}\thepage}\hfil} \renewcommand\@evenfoot{\@oddfoot} \renewcommand\@oddhead{}\renewcommand\@evenhead{} \makeatother \theoremstyle{ds} \newtheorem{theorem}{Theorem} \renewcommand{\thetheorem}{\Alph{theorem}} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{lemma}{Lemma} \newtheorem{proposition}[lemma]{Proposition} \newtheorem{corollary}[lemma]{Corollary} \newtheorem{definition}[lemma]{Definition} \newtheorem*{thmDp}{Theorem D$_p$ (the odd dance)} \newtheorem*{thmSmith}{Theorem (the Smith form of $M_p$)} \theoremstyle{dsrem} \newtheorem{remark}[lemma]{Remark} \newtheorem{example}[lemma]{Example} \emergencystretch=3em \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\F}{\mathbb{F}} \newcommand{\Syl}{\operatorname{Syl}} \newcommand{\coker}{\operatorname{coker}} \newcommand{\rank}{\operatorname{rank}} \newcommand{\Dist}{\operatorname{Dist}} \hypersetup{pdftitle={The Coloured Sand Theorem},pdfsubject={The p-part of the sandpile group of the Hamming graph, for every prime p dividing q and every dimension d},pdfauthor={Rafael Amichis Luengo}} \begin{document} \thispagestyle{empty} \begin{center} \vspace*{2mm} {\fontsize{25}{30}\selectfont\bfseries\textls[60]{THE COLOURED SAND THEOREM}\par} \vspace{4.5mm} {\fontsize{13.5}{17.5}\selectfont\itshape The $p$-part of the sandpile group of the Hamming graph,\\ for every prime $p$ dividing $q$ and every dimension $d$\par} \vspace{7mm} {\bfseries Rafael Amichis Luengo\par} \vspace{1.4mm} Madrid, Spain \,\textperiodcentered\, tretoef@gmail.com \,\textperiodcentered\, ORCID \href{https://orcid.org/0009-0008-6252-675X}{0009-0008-6252-675X}\par \vspace{0.6mm} 15 October 2026 \,\textperiodcentered\, version 6 \,\textperiodcentered\, doi:\href{https://doi.org/10.5281/zenodo.23327608}{10.5281/zenodo.23327608} (all versions)\par \end{center} \vspace{2mm} {\color{rulegrey}\hrule height 0.4pt} \section*{Abstract} Let $H(d,q)=K_q^{\,d}$ be the Hamming graph and $K(H(d,q))$ its sandpile group (critical group, Jacobian). For primes $p\nmid q$ its $p$-part was determined by Jacobson, Niedermaier and Reiner in 2003, who wrote that the other primes appear ``to be difficult, due to bad behavior of its $p$-primary structure''. {\boldmath\textbf{We determine the Sylow $p$-subgroup of $K(H(d,q))$ for every prime $p$ dividing $q$ and every $d$, by an explicit rule.}} After the splitting of Jacobson, Niedermaier and Reiner, the group is a sum of cokernels of operators $q(c+H)+U$ on the Boolean lattice (Theorem~A). These split over the indecomposable tilting modules $T(\lambda)$ of $SL_2$ in characteristic $p$ that occur in a tensor power of the natural module. The contribution of $T(\lambda)$ consists of explicit small cyclic factors and of $2^{|I|}$ large ones, where $I$ is the set of positions of the nonzero base-$p$ digits of $\lambda+1$ below the leading one. The large ones are obtained by pooling explicit integers, built from binomial valuations and base-$p$ carries, into a non-increasing sequence (Theorems~I and~J). The proof writes down explicit $\Z_p$-lattices for all tilting modules of $SL_2$, one move per base-$p$ digit; it reduces each contribution to the Smith form of an explicit $2^{|I|}\times2^{|I|}$ matrix, and computes that form as in our proof for the hypercube \cite{DST}, the case $p=2$. We also give closed formulas that need no pooling: for $p>d$ with ballot numbers (B), for the exponent with every prime (C), and for the number of cyclic factors (D). This proves Conjecture~I of version~3. {\boldmath\textbf{Every result of the paper, Theorems A--J, is checked in Lean~4 with Mathlib, for every prime, and the Lean project was rebuilt from its sources on GitHub's machines, on Mathlib's published build (\S\ref{sec:lean}).}} This work has not been refereed by a human expert. \vspace{3mm}{\color{rulegrey}\hrule height 0.4pt} \clearpage \subsection*{Summary of results} Throughout, $p$ is a prime, $q\ge2$, $e=v_p(q)$, and $\Syl_pA$ is the $p$-primary part of a finite abelian group $A$. \smallskip \begin{center}\small \begin{tabularx}{\textwidth}{@{}l X l l@{}} \toprule Result & What it says & Where & Lean\\ \midrule Theorem A & $\coker L(H(d,q))$ is a sum of pieces $X_q(m,c)=\coker(q(c+H)+U)$ (Jacobson--Niedermaier--Reiner) & \S1, \S2 & checked\\ Theorem B & $\Syl_pK(H(d,q))$ for $p>d$, $p\mid q$, with ballot numbers & \S3 & checked\\ Theorem C & the exponent of $\Syl_pK(H(d,q))$, every $p$, $q\ge3$ & \S4 & checked\\ Theorem D & the number of cyclic factors, $p\mid q$ & \S5 & checked\\ Theorem E & every piece of size $m
p^k$; the others form an explicit group independent of $q$ and of the shift (Conjecture~I of version~3) & \S8, \S9 & checked\\ \textbf{Theorem J} & the whole $\Syl_pK(H(d,q))$, every $p\mid q$, every $d$, in closed form & \S8, \S9 & checked\\ \bottomrule \end{tabularx} \end{center} \smallskip \noindent\textbf{Status.} This is a preprint. For $d=2$ the whole group $K(H(2,q))$ was known before (Ducey, Gerhard and Watson \cite{DGW}); our results are new, to the best of our knowledge, for $d\ge3$ (see the section on provenance at the end). The proofs of Theorems A--H were re-derived by an independent reader with no access to our audits; that reading found one priority omission, three citation and presentation gaps and one wrong example in a remark, all corrected here (\S\ref{sec:changes}). The proofs of Theorems I and J were written by one reader, re-derived by a second and read cold by a third, who wrote the riskiest step, the floor of the Smith form for odd $p$, out in full; it found no error and no gap. The Lean certificate and version~5 were read cold by a fourth reader, who found three claims of version~5 wider than the Lean proof of that day: the cases Theorem~\ref{thBprime} for $p\nmid q$ and Theorems~F, G and~I for $p=2$ are now checked, and \S\ref{sec:lean} now says on which lattices Theorem~I and the blocks of Theorem~J are proved. The changes of version~6 were read cold by a fifth reader, who found no error in the mathematics or in the Lean statements; its corrections of wording are applied (\S\ref{sec:changes}). All these readers are instances of the AI system Claude; no human expert has read the proofs. Every result of the paper, Theorems A--J, is checked in Lean~4 with Mathlib for every prime (\S\ref{sec:lean}). \vspace{3mm}{\color{rulegrey}\hrule height 0.4pt} \section{Introduction} For a connected graph $\Gamma$ with Laplacian $L(\Gamma)$, the sandpile group $K(\Gamma)$ is the torsion subgroup of $\coker L(\Gamma)$, and $\coker L(\Gamma)\cong\Z\oplus K(\Gamma)$; its order is the number of spanning trees \cite{Big}. The Hamming graph $H(d,q)$ has vertex set $(\Z/q)^d$, two vertices being adjacent when they differ in exactly one coordinate; it is the Cartesian power $K_q^{\,d}$ of the complete graph. Its Laplacian eigenvalues are $qs$, $0\le s\le d$, with multiplicity $\binom ds(q-1)^s$. Jacobson, Niedermaier and Reiner \cite{JNR} determined the Sylow $p$-subgroup of $K(K_{n_1}\times\cdots\times K_{n_k})$ for every prime $p$ that divides none of the $n_i$ \cite[Theorem~2]{JNR}, and bounded the number of invariant factors \cite[Theorem~3]{JNR}. About the other primes they wrote: ``Describing the exact structure of the critical group $K(K_{n_1}\times\cdots\times K_{n_k})$ appears to be difficult, due to bad behavior of its $p$-primary structure for primes $p$ that divide some of $n_1,\dots,n_k$.'' Ducey and Jalil \cite{DJ} recovered the results of \cite{JNR} by another method. For $d=2$ the whole group $K(H(2,q))=K(K_q\times K_q)$ was determined by Ducey, Gerhard and Watson \cite[Theorem~1.1]{DGW}; it also follows from \cite[Theorem~13 and Example~11]{JNR}. Our results agree with it at $d=2$, and are new, to the best of our knowledge, for $d\ge3$. For $q=2$ the graph is the hypercube; its odd part is due to Bai \cite{Bai} and its $2$-part was determined in \cite{DST}. In this paper $q\ge2$ is arbitrary, $p$ is a prime dividing $q$, and $e:=v_p(q)\ge1$, except where we say otherwise. \subsection{The pieces} Let $B_m$ be the free abelian group on the subsets of $[m]=\{1,\dots,m\}$, graded by size: $B_m=\bigoplus_{s=0}^m B_m(s)$. Let $H$ act on $B_m(s)$ as the scalar $s$, and let $U$ and $D$ be the up and down operators, \[ U(S)=\sum_{x\notin S}S\cup\{x\},\qquad D(S)=\sum_{x\in S}S\setminus\{x\}. \] For integers $c\ge0$ put \[ X_q(m,c):=\coker\big(q(c+H)+U\ \text{ on } B_m\big). \] It is finite when $c\ge1$; for $c=0$ it is $\Z$ plus a finite group. \begin{theorem}[Jacobson--Niedermaier--Reiner {\cite[Theorem~13]{JNR}}]\label{thA} For every $q\ge2$ and $d\ge1$, as abelian groups, \[ \coker L\big(H(d,q)\big)\;\cong\;\bigoplus_{j=0}^{d} X_q(d-j,\,j)^{\oplus\binom dj (q-2)^j}. \] \end{theorem} This is the case $n_1=\dots=n_d=q$ of \cite[Theorem~13]{JNR}: there the pieces are upper triangular matrices $M(N;n_S)$ of size $2^{|S|}$ with identity blocks above the diagonal, and after reversing the order of the subsets of $S$ they are the matrices $q(c+H)+U$. We include the short proof below, in the form we use. For $q=2$ only $j=0$ survives and the theorem says $\coker L(Q_d)\cong X_2(d,0)$, the starting point of \cite{DST}. \begin{theorem}[the primes $p>d$]\label{thB} Let $d\ge1$, let $p>d$ be a prime dividing $q$, and $e=v_p(q)$. Then \[ \Syl_p K\big(H(d,q)\big)\;\cong\;\bigoplus_{v=1}^{d}\big(\Z/p^{ev}\big)^{n_v},\qquad n_v=\sum_{\substack{j+2k=d+1-v\\ (j,k)\neq(0,0)}}\binom{d}{j}\,(q-2)^{j}\,b(k,v), \] the sum over integers $j,k\ge0$ (the condition $(j,k)\ne(0,0)$ is automatic, since $j+2k=d+1-v\ge1$), where $b(k,v)=\frac{v}{v+2k}\binom{v+2k}{k}=[x^k]\,C(x)^v$ are the ballot numbers and $C(x)=\sum_n\frac1{n+1}\binom{2n}nx^n$ is the Catalan series. \end{theorem} Equivalently, with $c(z)=C(z^2)$ and $u=q-2$, $\sum_v n_v y^v=[z^{d+1}]\,(1+uz)^d\,\frac{yz\,c(z)}{1-yz\,c(z)}-y^{d+1}$. For instance, with $u=q-2$: \begin{align*} d=2:&\quad (\Z/p^{e})^{u^2+1}\oplus(\Z/p^{2e})^{2u},\\ d=3:&\quad (\Z/p^{e})^{u^3+3u}\oplus(\Z/p^{2e})^{3u^2+2}\oplus(\Z/p^{3e})^{3u},\\ d=4:&\quad (\Z/p^{e})^{u^4+6u^2+2}\oplus(\Z/p^{2e})^{4u^3+8u}\oplus(\Z/p^{3e})^{6u^2+3}\oplus(\Z/p^{4e})^{4u}. \end{align*} Theorem~\ref{thB} is the case $m
d$ this gives $E=ed$, as in Theorem~\ref{thB}. For $p\le d$ the maximum need not be at $s=d$: for $q=3$ and $d=10$ it is at $s=9$ and $E=11$. The case $e=0$ ($p\nmid q$) can also be read off from \cite[Theorem~2]{JNR}; we include it because the proof below covers it at no cost. \begin{theorem}[the number of cyclic factors]\label{thD} Let $p\mid q$. The number of cyclic factors of $\Syl_p K(H(d,q))$ is \[ N=\sum_{j=0}^{d}\binom dj(q-2)^j\Big(2^{\,d-j}-\rho_p(d-j)\Big)\;-\;1,\qquad \rho_p(m)=\sum_{s=0}^{m-1}r_p(m,s), \] where $r_p(m,s)=\sum_{i}\big(\binom mi-\binom m{i-1}\big)$, the sum over $0\le i\le t$ with $p\nmid k-i$, and $(t,k)=(s,s+1)$ if $2s\le m-1$, $(t,k)=(m-1-s,m-s)$ otherwise. \end{theorem} Here $\rho_p(m)$ is the rank over $\F_p$ of $U$ on $B_m$. For $q=p=3$ the theorem gives $N=1,4,12,34,96,274,\dots$, and $N=3^{d-1}+2^{d-1}-1$ for every $d$ (Corollary~\ref{corN}). For $q=p$ the value of $N$ equals the bound $\frac12(q^d+(q-2)^d)-1$ of \cite[Theorem~3]{JNR} for $d\le2$, is one less for $d=3$, and is strictly smaller for $4\le d\le8$ and $p\le11$ (where we compared). \begin{corollary}\label{corq} $\Syl_p K(H(d,q))$ depends on $q$ only through $e=v_p(q)$ and the multiplicities $\binom dj(q-2)^j$. \end{corollary} \subsection{The rest of the paper} Theorems~\ref{thBprime}--\ref{thP} (Sections~3, 6 and~7) compute the pieces $X_q(m,c)$ for $m
m$}
On $B_m$ one has $[D,U]=m-2H$: on a set $S$ of size $s$, $DU(S)=(m-s)S+\Sigma$ and $UD(S)=s\,S+\Sigma$ with the same sum $\Sigma=\sum_{y\in S,\,x\notin S}(S\setminus\{y\})\cup\{x\}$. For $0\le k\le m/2$ let $\Lambda_k=\ker D\cap B_m(k)$. By induction on $i$, for $v\in\Lambda_k$,
\begin{equation}\label{DU}
D\,U^iv=i\,(m-2k-i+1)\,U^{i-1}v .
\end{equation}
Over $\Q$ this is the classical $\mathfrak{sl}_2$-structure of the Boolean lattice \cite{Pro}:
\[B_m\otimes\Q=\bigoplus_{k\le m/2}\ \bigoplus_{i=0}^{m-2k}U^i\Lambda_k^{\Q},\]
$\dim\Lambda^{\Q}_k=\binom mk-\binom m{k-1}$, and $U^{m-2k+1}\Lambda_k=0$. We call $\Lambda_k,U\Lambda_k,\dots,U^{m-2k}\Lambda_k$ a \emph{string}; its ranks are $k,\dots,m-k$ and its length is $m-2k+1$.
\begin{lemma}[strings over $\Z_{(p)}$]\label{strings}
If $p>m$, then $B_m\otimes\Z_{(p)}=\bigoplus_{k\le m/2}\bigoplus_{i=0}^{m-2k}U^i\Lambda_k$, each $\Lambda_k$ is free of rank $\binom mk-\binom m{k-1}$, and $U^i\colon\Lambda_k\to U^i\Lambda_k$ is an isomorphism for $i\le m-2k$.
\end{lemma}
\begin{proof}
All lattices below are over $R=\Z_{(p)}$. First, for $r\le m/2$ we show $B_m(r)=U B_m(r-1)\oplus\Lambda_r$, by induction on $r$ (for $r=0$, $\Lambda_0=B_m(0)$). By induction $B_m(r-1)=\bigoplus_{k s^*$, write $b=s^*+r$ and $L=s^*+r'$ with $1\le r'\le r p$ break: by \eqref{DU} the coefficient $i(m-2k-i+1)$ vanishes modulo $p$. The way they break is governed by the representation theory of $SL_2$ in characteristic $p$.
\subsection{The dictionary}
Let $V=\Z_p v_0\oplus\Z_p v_1$, where $\Z_p$ is the ring of $p$-adic integers, and let $f$ act on $V$ by $fv_0=v_1$, $fv_1=0$; give $v_0$ weight $1$ and $v_1$ weight $-1$. Identify $B_m\otimes\Z_p$ with $V^{\otimes m}$ by $S\mapsto v_{\mathbf 1_S}$. Then $U$ is the action of $f$ on the tensor power, a subset of size $s$ has weight $m-2s$, and so $H=(m-h)/2$ with $h$ the weight. The divided powers $U^{(r)}$ (add $r$ new elements, in all ways) are integral, and so is the analogous operator $e^{(r)}$ (remove $r$ elements). Hence $B_m\otimes\Z_p$ is a module over the distribution algebra $\mathrm{Dist}(SL_2)_{\Z_p}$, and
\[
q(c+H)+U \;=\; q\big(c+\tfrac{m-h}{2}\big)+f
\]
is built from that action alone.
We use three standard facts.
\begin{enumerate}
\item[(T1)] $V^{\otimes m}$ is a tilting module, and it decomposes over $\Z_p$ as $\bigoplus_\lambda T_{\Z_p}(\lambda)^{n_\lambda}$, where $T_{\Z_p}(\lambda)$ is the unique lift of the indecomposable tilting module $T(\lambda)$ over $\F_p$. The reason is that $\mathrm{Ext}^1(\Delta,\nabla)=0$, so decompositions over $\F_p$ lift; this is classical \cite[\S1.2]{And}, \cite[II.E.6, II.E.19--E.22]{Jan}. For $p=2$ the argument is written out, and checked in Lean, in \cite[Lemma~3.3, Corollary~3.4]{DST}.
\item[(T2)] Let $\lambda\le p^2+p-1$. If $\lambda\le p-1$, or if $\lambda+1\equiv0\pmod p$ and $\lambda\le p^2-1$, then $T(\lambda)=\Delta(\lambda)$ is simple. Otherwise write
\[
\lambda=p-1+r+pa,\qquad 1\le r\le p,\ 0\le a\le p-1,
\]
where $r=p$ (and then $a=p-1$) occurs only for $\lambda=p^2+p-1$. Then $T(\lambda)$ has exactly two Weyl factors, $\Delta(\lambda)$ and $\Delta(\lambda^-)$ with $\lambda^-:=\lambda-2r$, and it is a non-split extension $0\to\Delta(\lambda)\to T(\lambda)\to\Delta(\lambda^-)\to0$; so is its lift over $\Z_p$. Indeed, by Donkin's tensor product theorem \cite[Prop.~2.1]{Don} (for $SL_2$ in every characteristic see \cite[Prop.~3.4(a)]{STWZ} and \cite[Remark~1.1(ii)]{And}), $T(p-1+r'+pb)\cong T(p-1+r')\otimes T(b)^{[1]}$ for $0\le r'\le p-1$. For $r\le p-1$ take $r'=r$, $b=a\le p-1$, so that $T(a)=\Delta(a)$. For $\lambda=p^2+p-1$ take $r'=0$, $b=p$: then $T(p-1)$ is the Steinberg module and $T(p)$ has the Weyl factors $\Delta(p),\Delta(p-2)$. In both cases the product of characters, expanded by Brauer's formula with $\chi(-n-2)=-\chi(n)$, leaves exactly $\chi(\lambda)+\chi(\lambda-2r)$; the other terms cancel in pairs.
\item[(T3)] Comparing characters, the multiplicities in $V^{\otimes m}$ are given, from the top down, by $n_\lambda=\beta(m,\lambda)-n_{\lambda^+}$. Here $\lambda^+$ is the weight whose bottom factor is $\lambda$, and $n_{\lambda^+}=0$ if there is none or if $\lambda^+>m$. (For $\lambda\le p^2+p-1$ the map $\lambda\mapsto\lambda^-$ is injective: $\lambda^-\equiv p-1-r\pmod p$ determines $r$, and then $a$.)
\end{enumerate}
For $\lambda\equiv m\pmod 2$, $0\le\lambda\le m$, write $\beta(m,\lambda)=\binom{m}{(m-\lambda)/2}-\binom m{(m-\lambda)/2-1}$ (the number of strings of length $\lambda+1$).
\subsection{The blocks}
Fix $m$, $c$ and $\lambda\equiv m\pmod2$, put $k=(m-\lambda)/2$ and
\[
v_t=e+v_p(c+k+t)\qquad(0\le t\le\lambda),
\]
with $v_0=\infty$ when $c=k=0$. Put $A=\sum_{t=0}^{\lambda}v_t$. When $T(\lambda)$ has two Weyl factors, with $(r,a)$ as in (T2), put also
\[
A'=\sum_{t=r}^{r+\lambda^-}v_t,\qquad \alpha=\sum_{t=(a+1)p}^{\lambda}v_t,\qquad \tau=1+[a=p-1],
\]
and
\[
E_{11}=A-\alpha-a,\qquad E_{12}=A'-a+\tau,\qquad E_{22}=A'-a+\alpha.
\]
Here $A'$ is the sum over the levels of the bottom factor (it is $A_c(m,\lambda^-)$ in the notation of Theorem~\ref{glue}), and $\alpha$ is the sum over the last $r$ levels of the top factor. Define the abelian $p$-group $G_c(m,\lambda)$ by
\[
G_c(m,\lambda)=\begin{cases}
\Z/p^{A}, & \lambda\le p-1,\\[2pt]
(\Z/p)^{a}\oplus\Z/p^{A-a}, & \lambda+1=(a+1)p\le p^2,\\[2pt]
(\Z/p)^{2a}\oplus\Z/p^{x}\oplus\Z/p^{y}, & \text{two Weyl factors},
\end{cases}
\]
where $x=\min(E_{11},E_{12},E_{22})$ and $y=E_{11}+E_{22}-x$. When $c=k=0$ (the block containing the empty set) we put instead: $\Z_p$ for $\lambda\le p-1$; $\Z_p\oplus(\Z/p)^a$ in the second case; and $\Z_p\oplus(\Z/p)^{2a}\oplus\Z/p^{\min(E_{12},E_{22})}$ in the third.
When $a+1 r$, where it vanishes), so the image of $\tilde s_0$ in $T\otimes\F_p$ is a highest weight vector of weight $\mu$. It generates the image of a map $\Delta(\mu)\to T\otimes\F_p$, and the composite with $T\otimes\F_p\to\Delta(\mu)$ is the identity on the generator, so it is an isomorphism and the extension splits. This is impossible, because $T\otimes\F_p=T(\lambda)$ is indecomposable. So $x_0=u\,p^{-\nu}$ with $u$ a unit, and rescaling $y$ makes $u=1$. The lattice so described is $T$ itself, so it is stable under all $f^{(t)}$ and $e^{(t)}$; nothing more has to be checked. (For $f^{(t)}$ this is also visible directly: $f^{(t)}\tilde s_j-\binom{j+t}{t}\tilde s_{j+t}$ vanishes by the identity $\binom{j+r}{j}\binom{j+r+t}{t}=\binom{j+t}{t}\binom{j+t+r}{j+t}$.) Stability under every $e^{(t)}$ and $f^{(t)}$ is also checked by machine in Section~\ref{sec:ver}.
\end{proof}
\begin{lemma}[the blocks]\label{blocks}
Embed $T_{\Z_p}(\lambda)$ in $B_m\otimes\Z_p$ at levels $k,\dots,k+\lambda$ ($m=\lambda+2k$). Then the cokernel of $q(c+H)+U$ on it is $G_c(m,\lambda)$. The same holds for the simple blocks.
\end{lemma}
\begin{proof}
Put $N_t=q(c+k+t)$, so $v_p(N_t)=v_t$, and $M=q(c+H)+U$. In the basis of Lemma~\ref{forced}:
\begin{itemize}
\item $M\ell_i=N_i\ell_i+(i+1)\ell_{i+1}$;
\item $M\tilde s_j=N_{j+r}\tilde s_j+(j+1)\tilde s_{j+1}$ for $j<\mu$; the $\ell$-component is $p^{-\nu}[(j+r+1)\binom{j+r}{j}-(j+1)\binom{j+r+1}{j+1}]\ell_{j+r+1}=0$;
\item $M\tilde s_\mu=N_{\mu+r}\tilde s_\mu+u\,\ell_{\mu+r+1}$, where $\mu+r+1=(a+1)p$ and $u=p^{-\nu}\binom{\mu+r}{\mu}(a+1)p$.
\end{itemize}
By Lucas, $\binom{\mu+r}{\mu}$ is a unit: $\mu+r=(a+1)p-1$ has digits $(a,p-1)$, or $(p-1,p-1)$ when $r=p$. So $v_p(u)=v_p((a+1)p)-\nu$. This is $0$ when $r\le p-1$, and $1$ when $r=p$.
The non-unit subdiagonal entries are:
\begin{itemize}
\item on the $\ell$-chain, the $i+1=tp$ with $1\le t\le a+1$, of valuation $1$ except the last, of valuation $\tau$;
\item on the $\tilde s$-chain, the $j+1=tp\le\mu$, of valuation $1$. There are $a$ of them if $r\le p-1$, and $a-1$ if $r=p$.
\end{itemize}
Solving the unit subdiagonals, the cokernel is generated by the first vector of each segment between them, with one relation at the end of each segment. Write $g_t=\ell_{tp}$ and $h_t=\tilde s_{tp}$, and let $\alpha_t$, $\sigma_t$ be the sums of the $v$'s over the segments, so that $\sum_t\alpha_t=A$, $\sum_t\sigma_t=A'$ and the last $\alpha_t$ is $\alpha$. After rescaling the generators by units, the relations are:
\begin{itemize}
\item $p^{\alpha_t}g_t+p\,g_{t+1}$ on the $\ell$-chain, the last link having $p^{\tau}$ instead of $p$;
\item $p^{\alpha}g_{a+1}$ at the end of the $\ell$-chain;
\item $p^{\sigma_t}h_t+p\,h_{t+1}$ on the $\tilde s$-chain;
\item at the end of the $\tilde s$-chain, $p^{\sigma}h_{\rm last}+p^{v_p(u)}g_{a+1}$.
\end{itemize}
If $r=p$, every entry has valuation $\ge1$; if $r\le p-1$ this holds after the elimination of $g_{a+1}$ described next. In both cases the relation matrix is then $pM'$ with $M'$ integral.
If $r\le p-1$ the last relation has a unit coefficient on $g_{a+1}$. Eliminating $g_{a+1}$ turns the last link of the $\ell$-chain into $p^{\tau+\sigma_a}h_a$ and the end relation into $p^{\alpha+\sigma_a}h_a$. In $M'$ the links with coefficient $1$ form $a$ units on the $\ell$-chain and $a$ on the $\tilde s$-chain, in distinct rows and columns. Clearing them (column operations along each chain, then row operations) splits off $I_{2a}$. The $2\times2$ matrix that remains, on the rows of the last link of the $\ell$-chain and of the end relation $p^{\alpha+\sigma_a}h_a$, and on the columns $g_0,h_0$, is upper triangular with diagonal valuations $E_{11}-1$, $E_{22}-1$ and corner $E_{12}-1$.
If $r=p$ the $\tilde s$-chain has $a-1$ unit links and its end relation has a unit coefficient on $g_{a+1}=g_p$ in $M'$. These give $2a$ units again, and clearing them leaves the same $2\times2$ matrix.
So the relation matrix is equivalent to $pI_{2a}\oplus\begin{pmatrix}p^{E_{11}}&\ast\,p^{E_{12}}\\0&p^{E_{22}}\end{pmatrix}$, with a unit $\ast$. The Smith form of such a matrix is $(p^{x},p^{E_{11}+E_{22}-x})$ with $x$ the least of the three valuations, and this is $G_c(m,\lambda)$.
When $c=k=0$, $N_0=0$: the column $g_0$ is zero and gives the free summand, and what remains on $h_0$ are the relations $p^{E_{12}}$ and $p^{E_{22}}$. The simple blocks are single chains. When $\lambda+1=(a+1)p\le p^2$ the chain has $a$ non-unit subdiagonal entries, $i+1=tp$ with $1\le t\le a\le p-1$, each of valuation $1$. The same elimination gives $(\Z/p)^a\oplus\Z/p^{A-a}$.
When $a+1 t\}$ and $h_t=\mathrm{next}(t)-t$. The subsets $D\subseteq I$ are the \emph{dancers}; put $o_D=\sum_{t\in D}d_tp^t$. Since $d_tp^t>\sum_{u \max\Delta$, as in \cite[Lemma~4.5]{DST}. With $m=\max\Delta$, $[q_{m+1}]_\Delta=-[q_m^{p-d_m}]_{\Delta\setminus\{m\}}$. For a power $N$ of $q$, $[q^N]_\Gamma$ is the sum over the set partitions of $\Gamma$ into $j\le N$ blocks of $N(N-1)\cdots(N-j+1)\prod_B[q]_B$. For $N=p-d_m\in[1,p-1]$ the single-block term has a unit factor; for $N=p$ (every later move) every falling factorial $(p)_j$, $1\le j\le p$, has valuation $1$. In both cases a partition into $j\ge2$ blocks has valuation larger than the single-block one, by induction. So the valuation is $m-(|\Delta|-1)-\min\Delta$ at $t=m+1$ and grows by exactly $1$ at each later move; the final power $d_k$ is a unit.
\end{proof}
\begin{proposition}[cost form]\label{costform}
Let $M=M_p(\lambda,i,e)$ and $b\subseteq a\subseteq I$, and let $\gamma(\Delta)=\sum_{u\in I\setminus\Delta,\ u>\min\Delta}h_u$ ($\gamma(\emptyset)=0$). If $i\ge1$, then $v_p(M_{ab})=eK+\kappa_p(m,K)+R_m(a)-R_{m+K}(b)+\gamma(a\setminus b)$ with $m=i-1$. If $i=0$, the row $\emptyset$ is zero and, for $a\ne\emptyset$, $v_p(M_{ab})=eK+R^\sharp(a)-R^\sharp(b)+\gamma(a\setminus b)$. All entries with $b\subseteq a$ ($a\ne\emptyset$ when $i=0$) are nonzero.
\end{proposition}
\begin{proof}
By Lemmas~\ref{windows} and~\ref{deficit}, $v_p(M_{ab})=-d_k\frac{p^k-1}{p-1}+\sum_{t\in\Delta}\big(1+d_t\frac{p^t-1}{p-1}\big)+\delta(\Delta)+e(K-o_\Delta)+\sum_{d=o_a}^{o_b+K-1}v_p(i+d)$, $\Delta=a\setminus b$, $\delta(\Delta)=k-|\Delta|-\min\Delta$. Legendre's formula $v_p(n!)=(n-s_p(n))/(p-1)$, the identity $s_p(x+o_E)=s_p(x)+\sum_{t\in E}d_t-(p-1)\kappa_p(x,o_E)$, $s_p(K)=d_k$, and $|\Delta|+\delta(\Delta)=\sum_{t\in a}h_t-\sum_{t\in b}h_t+\gamma(\Delta)$ \cite[Lemma~5.1]{DST} collapse this to the stated form. For $i=0$ use also $\kappa_p(K-1,o_E)=k-\min E$.
\end{proof}
\subsection{The Smith form of $M_p$}
\begin{lemma}\label{integral}
The real antitonic fits of the clocks $x$ and $x^\sharp$ of \S\ref{sec:conjI} take integer values.
\end{lemma}
\begin{thmSmith}
For $i\ge1$ the Smith exponents of $M_p(\lambda,i,e)$ are $eK+\kappa_p(i-1,K)+\hat y_D$, $D\subseteq I$; for $i=0$ they are $\infty$ (once) and $eK+\hat y^\sharp_D$, $\emptyset\ne D\subseteq I$.
\end{thmSmith}
\begin{proof}[Proof of the Smith form and of Lemma~\ref{integral}]
The proof of the case $p=2$, \cite[\S6--\S7]{DST}, goes through for odd $p$ with the changes listed below; every step not listed is used verbatim. A complete line-by-line version for odd $p$, written by the independent reader, is part of the record of this paper (file \texttt{THEOREM\_F\_ODD\_P.md}).
\emph{(O1) The order.} Since $d_tp^t>\sum_{u