\section{Overview of the construction} \label{fl:sec:strategy} This section describes the proof of Theorem~\ref{rw:thm:II-main} without giving it. Its main difficulty is not visible from the statement, and the first subsection explains it. The last subsection lists the statements in which the steps are carried out and shows how they depend on one another. \subsection{The difficulty: a nonzero sheaf can have zero trace} Geometric Langlands produces sheaves, and we need a function. The function attached to a complex of sheaves \(\mathcal K\) with an action of Frobenius is the alternating sum of the traces of Frobenius on the cohomology of its stalks. This function can vanish identically for a nonzero \(\mathcal K\): on a point, the complex \(k\oplus k[-1]\) with the identity as Frobenius already has trace zero. So a theorem that produces a nonzero Hecke eigensheaf does not, by itself, produce a nonzero automorphic function. To exclude this cancellation, over the given finite field and without enlarging it, is the central problem of the geometric construction. The way out is to arrange that the alternating trace in question is a determinant. If \(\phi\) is an endomorphism of a finite-dimensional vector space \(V\), then the alternating trace of \(\phi\) on the exterior algebra of \(V\), with \(V\) placed in degree \(-1\), is \[ \sum_i(-1)^i\operatorname{tr}(\phi;\Lambda^iV)=\det(1-\phi;V). \] A determinant is nonzero as soon as no eigenvalue of \(\phi\) is equal to one, and this is a condition that purity can verify. \subsection{Where the exterior algebra comes from} The parameter \(\sigma\) lives on an open part of the curve \(X\) in characteristic \(p\), and may be ramified. The first step of the construction (Section~\ref{fl:sec:geometrization}) replaces this situation by an unramified one in characteristic zero: there is a smooth projective curve \(C\) over an algebraically closed field of characteristic zero, with an everywhere unramified local system \(\rho\). This curve degenerates, through a nodal curve in characteristic zero, to a curve with two components in characteristic \(p\), which is geometrically reduced and Gorenstein. One component is \(X\), with the parameter \(\sigma\); the other is auxiliary. On \(C\) the geometric Langlands equivalence of Gaitsgory and Raskin is available. It attaches to a coherent sheaf \(P\) on the space of local systems an automorphic sheaf \(\mathcal F_P\) on the stack of \(G\)-bundles on \(C\), and it identifies a certain functional of \(\mathcal F_P\), its Whittaker coefficient, with the space of global sections of \(P\). It remains to choose \(P\). The obvious choice is the structure sheaf of the residual gerbe of \(\rho\), whose space of global sections is \(k\). But its direct image on the stack of local systems need not be compact, and compactness is used twice below: for constructibility, and for the formula which expresses the Whittaker coefficient by ordinary global sections. Instead we remove a few points from the auxiliary component, fix the restriction of \(\rho\) to the punctured curve, and consider all ways of extending it across the punctures. As a set this space of extensions is small. As a derived space it also remembers the equations which say that the monodromy around each puncture is trivial, one equation for each direction in the Lie algebra, and these equations contribute exterior generators: the space is \[ \mathfrak F_\rho \simeq[\operatorname{Spec}\Lambda(\mathsf B_\rho[1])/Z_\rho], \] where \(\mathsf B_\rho\) is the sum of one copy \(\widehat{\mathfrak g}_x^*\) of the dual of the Lie algebra of \(\widehat G\) for each point \(x\) which is removed, and \(Z_\rho\) is the centralizer of the monodromy of \(\rho\) (Section~\ref{fl:sec:punctured-spectral-fibre}). For an orbit of length \(d\) of Frobenius on the points which are removed, and a point \(x\) of the orbit, the \(d\)-th power of Frobenius acts on the summand \(\widehat{\mathfrak g}_x^*\) by \(q^d\) times the coadjoint action of the image \(g_D\) of Frobenius under the parameter. The trace we need is therefore, up to the corrections discussed in the next paragraph, \[ \det\bigl(1-q^d\operatorname{Ad}(g_D)^\vee;\widehat{\mathfrak g}_x^*\bigr), \] and it is not zero: by the purity theorem of Section~\xref{I}{fl:sec:arithmetic-purity} the eigenvalues of \(\operatorname{Ad}(g_D)\) have absolute value one, so none of them is \(q^{-d}\). In the example of Section~\ref{fl:sec:low-rank-example}, where \(q=5\), \(d=1\), \(g_D=1\) and the Lie algebra has dimension three, this determinant is \((1-5)^3=-64\). Two corrections are needed because of the quotient by \(Z_\rho\). Global sections on the quotient are the invariants of \(Z_\rho\), and taking invariants could reintroduce cancellation. The group of components \(\Pi_\rho\) of \(Z_\rho\) is finite; we tensor the structure sheaf with its regular representation, \[ P_{\mathrm{reg}} =\mathcal O_{\mathfrak F_\rho}\otimes k[\Pi_\rho], \] because the invariants of a finite group in a representation tensored with the regular representation are the representation itself. The identity component of \(Z_\rho\) is a torus, since \(\sigma\) is elliptic, and Frobenius fixes no nontrivial character of it; so the parts of nonzero weight, which the invariants discard, would not have contributed to the trace in any case. The result is Proposition~\ref{fl:prop:puncture-exact-trace}. \subsection{Why the comparison is made for all coefficients} We have computed a trace on the side of local systems, and we need it on the side of automorphic sheaves, in characteristic \(p\). The equivalence of Gaitsgory and Raskin is an equivalence over an algebraically closed field. It identifies the two vector spaces, but it says nothing about the action of Frobenius on them, and an isomorphism of vector spaces that does not respect Frobenius is of no use for traces. If we transported only the object \(P_{\mathrm{reg}}\), the two actions of Frobenius could differ by an arbitrary automorphism. For this reason we transport the functor and not one object. On the side of local systems the functor is \[ \Gamma_\rho: \operatorname{Perf}(\mathfrak F_\rho)\longrightarrow \operatorname{Vect}_k,\qquad P\longmapsto\Gamma(\mathfrak F_\rho,P), \] and on the automorphic side it is \(P\mapsto\) the Whittaker coefficient of \(\mathcal F_P\). The two Frobenius actions then differ by an automorphism of the functor \(\Gamma_\rho\), and such automorphisms are very few: by the Yoneda lemma they are given by the invertible functions of degree zero on \(\mathfrak F_\rho\), which are the nonzero constants. So the two actions differ by one scalar \(c\in k^\times\), the same for all \(P\) and in all degrees (Lemma~\ref{fl:lem:scalar-coefficient-covariance}). A scalar multiplies the alternating trace of \(P_{\mathrm{reg}}\) by a nonzero number and cannot make it vanish. \subsection{From characteristic zero to characteristic \texorpdfstring{$p$}{p}} The price is that the whole family \(P\mapsto\mathcal F_P\), with all the maps between its members and all its Hecke identities, has to be carried from the smooth curve \(C\) in characteristic zero to the curve with two components in characteristic \(p\). There are two degenerations, the formation of the nodes and the reduction modulo \(p\), and we treat them together over a valuation ring of rank two (Section~\ref{fl:sec:hecke-extension}). The family is extended by relative nearby cycles. To compare its Whittaker coefficient before and after specialization, we replace this coefficient by a local invariant, the vanishing cycles of \(\mathcal F_P\) for a suitable function \(f\) on the stack of bundles at a suitable point, and we must show that this invariant is the same before and after specialization. It could change only at points where the differential of \(f\) lies in the singular support of the sheaves, in a suitable relative sense. For Hecke eigensheaves over a field the singular support is contained in the nilpotent cone; Theorem~\ref{fl:thm:noncharacteristic-hecke-comparison} is a form of this statement over a valuation ring: the restriction of the family to the hypersurface \(f=0\) still specializes well at every point where the differential of \(f\) is not nilpotent. The proof moves the point of a Hecke modification until the direction in question becomes visible there. The Hecke identity controls only the direct image of the sheaf along a proper map from the Hecke correspondence, and the theorem is a statement about one stalk before the direct image is taken. So one argument isolates the stalk inside a fibre of the correspondence (Lemma~\ref{rw:lem:isolated-hecke-contribution}), and another removes the auxiliary variables introduced on the way (Lemmas~\ref{rw:lem:exact-hyperbolic-coordinates} and~\ref{fl:lem:quadric-detection}). One nilpotent direction remains, the regular one. There \(f\) is chosen homogeneous of weight two for an action of the multiplicative group, and the part of the vanishing cycles on which \(-1\) acts by \(-1\) is shown to be the same at the three points of the base (Section~\ref{fl:sec:conservation}). \subsection{Returning to the original curve and field} At this stage we know that a vanishing cycle of the sheaf in characteristic \(p\) has nonzero Frobenius trace. This is still not a value of the function. Because \(f\) is homogeneous, the trace on its vanishing cycles can be written as a sum of traces on stalks of the sheaf, at points defined over \(\mathbb F_q\), some of them twisted by the action of \(-1\). The twisted terms are ordinary traces at other rational points: if \(x\) satisfies \(-\operatorname{Fr}_q(x)=x\) and \(a^{q-1}=-1\), then \(ax\) is fixed by \(\operatorname{Fr}_q\), and the equivariance of the sheaf identifies the twisted trace at \(x\) with the ordinary trace at \(ax\). So if the function vanished at every rational point, the trace on the vanishing cycles would vanish too. Hence the function is not zero at some bundle defined over \(\mathbb F_q\); no extension of the finite field is made. That bundle lives on the curve with two components. We restrict it to the auxiliary component, keep this restriction fixed, and let the bundle on \(X\) vary. The result is a nonzero function on bundles on \(X\) with a level structure along the points where the components meet (Section~\ref{fl:sec:exceptional-assembly}). The order of the two steps matters: the auxiliary bundle is the one found by the trace argument, and an arbitrary choice made beforehand would not be known to give a nonzero function. \subsection{The parameter} It remains to see that this function has parameter \(\sigma\), in the sense of \eqref{fl:eq:main-full-label}. Its Hecke eigenvalues at the unramified places are those of \(\sigma\), because it comes from a Hecke family attached to \(\sigma\). But for a general group the Hecke eigenvalues do not determine the parameter, and \eqref{fl:eq:main-full-label} asks for more: the eigenvalues of all excursion operators. An excursion operator is built from the cohomology of spaces of shtukas with several legs, and its three steps, creation, action of Galois elements, and annihilation, have counterparts for the family of sheaves: Hecke functors with several legs and their compatibilities when legs collide. Taking traces of Frobenius of these compatibilities gives the excursion equations (Theorem~\ref{fl:thm:arithmetic-family-trace}). They come out for the Chevalley dual of the parameter of the sheaf, so the construction is applied to the Chevalley dual of $\sigma$. This is why the Hecke identities of the family, with all legs and all collisions, were carried through every step above. Two further points complete the argument. The trace argument gives the excursion equations for tuples of elements of the Weil group. The function is cuspidal. Otherwise one of its constant terms along a proper parabolic subgroup would have a parameter with values in a proper Levi subgroup of the dual group, and an elliptic parameter is not of this form (Section~\xref{I}{fl:sec:arithmetic-cuspidality}). On the space of cusp forms the equations extend to tuples in the Galois group by continuity (Corollary~\xref{I}{fl:cor:weil-to-galois-nonzero}). \subsection{The statements and their dependencies} \label{rw:sec:dependencies} \begin{figure}[tbp] \centering \begin{tikzpicture}[ box/.style={draw,rounded corners=2pt,align=center,text width=5.9cm, inner sep=6pt,font=\small}, >=Stealth] \node[box] (coeff) {Coefficient and Frobenius trace\\ Proposition~\ref{fl:prop:puncture-exact-trace}}; \node[box,right=11mm of coeff] (curve) {Lift and smooth curve\\ Theorem~\ref{fl:thm:marked-lifting}; Proposition~\ref{fl:prop:geometrized-parameter}}; \node[box,below=12mm of curve] (family) {The entire Hecke family over \(S\)\\ Theorem~\ref{fl:thm:compact-automorphic-family}}; \node[box,below=12mm of coeff] (phase) {Transverse test function\\ and microstalk\\ Theorem~\ref{fl:thm:noncharacteristic-hecke-comparison}; Proposition~\ref{fl:lem:vacuum-microstalk-comparison}}; \node[box,below=12mm of phase] (trace) {Conserved trace and rational bundle\\ Theorems~\ref{fl:thm:scaling-character-conservation}, \ref{fl:thm:homogeneous-detector}}; \node[box,below=12mm of family] (excursion) {Excursion equations\\ Theorem~\ref{fl:thm:arithmetic-family-trace}}; \node[box,below=14mm of trace,xshift=3.55cm] (original) {Restriction to \(X\) and cuspidality\\ Theorem~\ref{fl:thm:weyl-prime-realization}}; \draw[->] (curve)--(family); \draw[->] (coeff)--(phase); \draw[->] (family)--(phase); \draw[->] (phase)--(trace); \draw[->] (family)--(excursion); \draw[->] (trace)--(original); \draw[->] (excursion)--(original); \end{tikzpicture} \caption{The two inputs to geometric realization: a nonzero rational trace and the excursion equations. The final restriction uses both.} \label{rw:fig:geometry-dependencies} \end{figure} The nonzero number of the first subsections is followed through three statements. \begin{enumerate} \item Proposition~\ref{fl:prop:puncture-exact-trace}: on the side of local systems, the Frobenius supertrace on the global sections of a certain perfect complex is a determinant, and it is nonzero by purity. \item Proposition~\ref{fl:prop:composite-trace-nonzero}: the corresponding automorphic sheaf, specialized to characteristic \(p\), has nonzero trace at some bundle defined over \(\mathbb F_q\) on the curve with two components. \item Proposition~\ref{fl:prop:passive-bundle-restriction}: the trace remains nonzero after the bundle on the auxiliary component is fixed, which gives a function on bundles on \(X\). \end{enumerate} Each passage must be compatible with Frobenius, and most of the work lies in the passage from (1) to (2). Figure~\ref{rw:fig:geometry-dependencies} shows how these and the other main results depend on one another; an arrow means that the result at its tail is used in the result at its head. The calculation of the trace on the side of local systems and the construction of the curve can be read separately, up to the comparison under specialization. The proof of Theorem~\ref{fl:thm:weyl-prime-realization}, in Section~\ref{fl:sec:exceptional-assembly}, assembles these results.