\section{Geometric setup} \label{rw:sec:geometric-route} This section fixes the geometric objects which are used from Section~\ref{fl:sec:punctured-spectral-fibre} on: the curves, the base over which they vary, the Hecke correspondences, and the notion of a Hecke family. It contains no proofs. \subsection{Curves and specializations} The curve of the closed fibre is the union \(C_0=X\cup_D C_2\) of the original curve and of an \emph{auxiliary component} \(C_2\). It is Gorenstein and geometrically reduced, but it is not nodal when \(D\) is not reduced. Its construction is expressed by the pushout square \begin{equation}\label{rw:eq:curve-pushout-guide} \begin{tikzcd}[column sep=large,row sep=large] D \arrow[r,hook] \arrow[d,hook] & C_2 \arrow[d,hook] \\ X \arrow[r,hook] & C_0 . \end{tikzcd} \end{equation} The original parameter and the Hecke legs remain on \(X\). The component \(C_2\) carries the extra puncture that produces the exterior algebra of Section~\ref{fl:sec:punctured-spectral-fibre}. On the intermediate fibre, in characteristic zero, the two local systems have opposite inertia along \(D\); this is the condition under which the glued local system extends to the smoothing. The divisor \(D\) may have multiplicities; its scheme structure records the level retained at the end of the construction. Two specializations are involved: the smooth curve degenerates to a nodal one, and the nodal curve in characteristic zero reduces to characteristic \(p\). Section~\ref{fl:sec:valued-nodal-family} constructs a rank-two valuation base \(S\) with geometric points \(\eta,\xi,s\) in this order. The fibres have the following roles: \begin{equation}\label{rw:eq:valuation-flag-guide} \begin{tikzcd}[column sep=8.5em,row sep=large] \mathcal C_\eta \arrow[r,rightsquigarrow,"\text{the nodes form}"] \arrow[d] & \mathcal C_\xi \arrow[r,rightsquigarrow,"\text{reduction mod }p"] \arrow[d] & C_0\otimes\overline{\mathbb F}_q \arrow[d] \\ \eta \arrow[r,rightsquigarrow] & \xi \arrow[r,rightsquigarrow] & s . \end{tikzcd} \end{equation} The first fibre is smooth and proper in characteristic zero; the middle fibre has the two components of \eqref{rw:eq:curve-pushout-guide} in characteristic zero; the last is the curve \(C_0\) in characteristic \(p\), which is geometrically reduced and Gorenstein. In general only the middle fibre is nodal. The wavy arrows indicate specialization. All comparisons are made along this ordered flag. For a finite set of legs \(I\) in the smooth open \(U\), the Hecke functor is defined by the correspondence \begin{equation}\label{rw:eq:hecke-correspondence-guide} \begin{tikzcd}[column sep=small,row sep=large] \Bun_G(\mathcal C)\times U^I \arrow[dr] & \operatorname{Hk}_{G,I}\arrow[l,"h_0"'] \arrow[r,"h_1"]\arrow[d] & \Bun_G(\mathcal C)\times U^I\arrow[dl] \\ & U^I . & \end{tikzcd} \end{equation} After bounding the modifications by a Satake representation, the appropriate projection is proper. \subsection{The object which is transported: Hecke families} One kind of object is constructed in characteristic zero (Section~\ref{fl:sec:punctured-spectral-fibre}), extended over the base $S$ (Section~\ref{fl:sec:hecke-extension}), restricted to the curve $X$ (Section~\ref{fl:sec:exceptional-assembly}), and finally used to produce a function (Section~\ref{fl:sec:arithmetic-trace}). We define it here once, in the generality needed for all four steps. Let $\mathcal Y$ be a stack of $G$-bundles on a curve, with or without level structure, over a field or over $S$, and let $U'$ be an open subset of the smooth locus of the curve, disjoint from the level. For a finite set $I$ and a representation $V$ of $\widehat G^I$, modifications of bundles at $I$ points of $U'$, with the Satake kernel of $V$, define the Hecke functor $\mathsf H_{I,V}$ from complexes on $\mathcal Y$ to complexes on $\mathcal Y\times U'^I$; when $I$ has one element we write $\mathsf H_V$. Let $\rho$ be a $\widehat G$-local system on $U'$, and $Z$ a reductive group over $k$ which acts on $\rho$ by automorphisms. For $V$ as above let $V_\rho$ be the local system on $U'^I$ attached to $\rho$ and $V$; the group $Z$ acts on it. For a local system $\mathcal W$ with an action of $Z$ on a scheme $B$, and a functor $W\mapsto\mathcal F_W$ on representations of $Z$, put \[ \mathcal F(\mathcal W)=\bigoplus_W\mathcal F_W\boxtimes \underline{\operatorname{Hom}}_Z(W,\mathcal W) \qquad\text{on }\mathcal Y\times B, \] the sum being over the irreducible representations of $Z$. \begin{definition}[Hecke families] \label{rw:def:hecke-family} \begin{enumerate} \item A \emph{Hecke family} on $\mathcal Y$, with legs in $U'$ and eigenvalue $\rho$, is a $k$-linear functor $W\mapsto\mathcal F_W$ from the finite-dimensional representations of $Z$ to complexes on $\mathcal Y$, together with isomorphisms \[ \mathsf H_{I,V}(\mathcal F_W)\simeq\mathcal F(W\otimes V_\rho) \qquad\text{on }\mathcal Y\times U'^I \] for all $I$, $V$ and $W$. They are required to be natural in $W$ and in $V$, to be the identity for the trivial representation $V$, and to be compatible with the restriction to the diagonals of $U'^I$ and with convolution, that is, with the composition of Hecke functors. \item Let $\phi$ be an automorphism of the curve which preserves $U'$ and the level structure, so that it acts on $\mathcal Y$, let $\alpha$ be an automorphism of $Z$, and let $\theta:\alpha^*\phi^*V_\rho\simeq V_\rho$ be isomorphisms commuting with $Z$ and compatible with the operations on $V$. A \emph{structure of compatibility with $\phi$} on a Hecke family is a system of isomorphisms \[ c_W:\phi^*\mathcal F_W\simeq\mathcal F_{\alpha^*W}, \] natural in $W$, such that for all $I$, $V$ and $W$ the two isomorphisms from $\phi^*\mathsf H_{I,V}(\mathcal F_W)$ to $\mathcal F(\alpha^*W\otimes V_\rho)$ are equal: the Hecke isomorphism for $W$ followed by $c$ and $\theta$, and $\mathsf H_{I,V}(c_W)$ followed by the Hecke isomorphism for $\alpha^*W$. \item When $\mathcal Y$ is defined over $\mathbb F_q$, the pullbacks by the Frobenius endomorphisms of $\mathcal Y$ and of $U'^I$ are equivalences of the \'etale categories. A \emph{Hecke family with Frobenius} is a Hecke family together with a comparison of the Hecke functors under these pullbacks, given by the Frobenius structure of the Satake kernels as in (F3) of Setup~\ref{rw:setup:trace}. \end{enumerate} \end{definition} In this paper the word \emph{coefficient}, used alone, refers to the argument of such a family: a representation $W$ of $Z$, a local system $\mathcal W$ with an action of $Z$, or more generally a perfect complex $P$ on the stack $\mathfrak F_\rho$ of Section~\ref{fl:sec:punctured-spectral-fibre}. Whittaker coefficients, Fourier coefficients and fields of coefficients are always named in full. The conditions (1) and (2), for $\mathcal Y=\Bun_{G,D}(X)$ and the Frobenius endomorphism, are written out with all normalizations as (F1)--(F3) in Setup~\ref{rw:setup:trace}. In these terms the steps of the construction are the following. \begin{itemize} \item Lemma~\ref{fl:lem:coarse-covariance}: the functor $W\mapsto\mathcal F_{P_W}$ is a Hecke family on the stack of bundles of the smooth curve in characteristic zero, with legs outside $D_{\rm aux}$, and it has a structure of compatibility with the semilinear Frobenius automorphism. (The lemma is stated for the larger family $P\mapsto\mathcal F_P$ indexed by perfect complexes; this is needed in Section~\ref{fl:sec:conservation}.) \item Theorem~\ref{fl:thm:compact-automorphic-family}: the family, with this structure, extends over $S$. \item Proposition~\ref{fl:prop:passive-bundle-restriction}: the restriction of the fibre over $s$ to $\Bun_{G,D}(X)$ is a Hecke family with Frobenius. \item Theorem~\ref{fl:thm:arithmetic-family-trace}: the trace function of a Hecke family with Frobenius satisfies the excursion equations of its eigenvalue. \end{itemize}