hcju/stacksqa huggingface dataset:
There is a trace map $Rf_*\omega_X \to \omega_A$, see Duality for Schemes, Section \ref{duality-section-trace}. By Grauert-Riemenschneider (Resolution of Surfaces, Proposition \ref{resolve-proposition-Grauert-Riemenschneider}) we have $R^1f_*\omega_X = 0$. Thus the trace map is a map $f_*\omega_X \to \omega_A$. Then we can consider $$ \mathcal{O}_{\Spec(A)} = f_*\mathcal{O}_X \to f_*\omega_X \to \omega_A $$ where the first map comes from the map $\mathcal{O}_X \to \mathcal{O}_X(E) = \omega_X$ which is assumed to exist in the statement of the lemma. The composition is an isomorphism by Divisors, Lemma \ref{divisors-lemma-check-isomorphism-via-depth-and-ass} as it is an isomorphism over the punctured spectrum of $A$ (by the assumption in the lemma and the fact that $f$ is an isomorphism over the punctured spectrum) and $A$ and $\omega_A$ are $A$-modules of depth $2$ (by Algebra, Lemma \ref{algebra-lemma-criterion-normal} and Dualizing Complexes, Lemma \ref{dualizing-lemma-depth-dualizing-module}). Hence $f_*\omega_X \to \omega_A$ is surjective whence an isomorphism. Thus $Rf_*\omega_X = \omega_A$ which by duality implies $Rf_*\mathcal{O}_X = \mathcal{O}_{\Spec(A)}$. Whence $H^1(X, \mathcal{O}_X) = 0$ which implies that $A$ defines a rational singularity (see discussion in Resolution of Surfaces, Section \ref{resolve-section-bounded} in particular Lemmas \ref{resolve-lemma-regular-rational} and \ref{resolve-lemma-exact-sequence}). If $f$ is minimal, then $E = 0$ because the map $f^*\omega_A \to \omega_X$ is surjective by a repeated application of Resolution of Surfaces, Lemma \ref{resolve-lemma-dualizing-blow-up-rational} and $\omega_A \cong A$ as we've seen above.
We will prove the lemma by induction on $d = \dim(\mathcal{O}_{X, x})$. \medskip\noindent An uninteresting case is $d = 1$ since in that case the morphism $f$ is \'etale at $x$ by assumption. Assume $d \geq 2$. \medskip\noindent We can base change by $\Spec(\mathcal{O}_{Y, y}) \to Y$ without affecting the conclusion of the lemma, see Morphisms, Lemma \ref{morphisms-lemma-set-points-where-fibres-etale}. Thus we may assume $Y = \Spec(A)$ where $A$ is a regular local ring and $y$ corresponds to the maximal ideal $\mathfrak m$ of $A$. \medskip\noindent Let $x' \leadsto x$ be a specialization with $x' \not = x$. Then $\mathcal{O}_{X, x'}$ is normal as a localization of $\mathcal{O}_{X, x}$. If $x'$ is not a generic point of $X$, then $1 \leq \dim(\mathcal{O}_{X, x'}) < d$ and we conclude that $f$ is \'etale at $x'$ by induction hypothesis. Thus we may assume that $f$ is \'etale at all points specializing to $x$. Since the set of points where $f$ is \'etale is open in $X$ (by definition) we may after replacing $X$ by an open neighbourhood of $x$ assume that $f$ is \'etale away from $\overline{\{x\}}$. In particular, we see that $f$ is \'etale except at points lying over the closed point $y \in Y = \Spec(A)$. \medskip\noindent Let $X' = X \times_{\Spec(A)} \Spec(A^\wedge)$. Let $x' \in X'$ be the unique point lying over $x$. By the above we see that $X'$ is \'etale over $\Spec(A^\wedge)$ away from the closed fibre and hence $X'$ is normal away from the closed fibre. Since $X$ is normal we conclude that $X'$ is normal by Resolution of Surfaces, Lemma \ref{resolve-lemma-normalization-completion}. Then if we can show $X' \to \Spec(A^\wedge)$ is \'etale at $x'$, then $f$ is \'etale at $x$ (by the aforementioned Morphisms, Lemma \ref{morphisms-lemma-set-points-where-fibres-etale}). Thus we may and do assume $A$ is a regular complete local ring. \medskip\noindent The case $d = 2$ now follows from Lemma \ref{lemma-key-purity-ramification}. \medskip\noindent Assume $d > 2$. Let $t \in \mathfrak m$, $t \not \in \mathfrak m^2$. Set $Y_0 = \Spec(A/tA)$ and $X_0 = X \times_Y Y_0$. Then $X_0 \to Y_0$ is \'etale away from the fibre over the closed point. Since $d > 2$ we have $\dim(\mathcal{O}_{X_0, x}) = d - 1$ is $\geq 2$. The normalization $X_0' \to X_0$ is surjective and finite (as we're working over a complete local ring and such rings are Nagata). Let $x' \in X_0'$ be a point mapping to $x$. By induction hypothesis the morphism $X'_0 \to Y$ is \'etale at $x'$. From the inclusions $\kappa(y) \subset \kappa(x) \subset \kappa(x')$ we conclude that $\kappa(x)$ is finite over $\kappa(y)$. Hence $x$ is a closed point of the fibre of $X \to Y$ over $y$. But since $x$ is also a generic point of this fibre, we conclude that $f$ is quasi-finite at $x$ and we reduce to the case of purity of branch locus, see Lemma \ref{lemma-purity}.
Denote $U = \Spec(A) \setminus \{\mathfrak m\}$ the punctured spectrum. Thus $g : V \to U$ is affine. We have $H^i(V, \mathcal{O}_V) = H^i(U, g_*\mathcal{O}_V)$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}. The $\mathcal{O}_U$-module $g_*\mathcal{O}_V$ is quasi-coherent by Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}. For any quasi-coherent $\mathcal{O}_U$-module $\mathcal{F}$ the cohomology $H^i(U, \mathcal{F})$, $i > 0$ is $\mathfrak m$-power torsion, see for example Local Cohomology, Lemma \ref{local-cohomology-lemma-local-cohomology}. In particular, the $A$-modules $H^i(V, \mathcal{O}_V)$, $i > 0$ are $\mathfrak m$-power torsion. For any flat ring map $A \to A'$ we have $H^i(V, \mathcal{O}_V) \otimes_A A' = H^i(V', \mathcal{O}_{V'})$ where $V' = V \times_{\Spec(A)} \Spec(A')$ by flat base change Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}. If we take $A'$ to be the completion of $A$ (flat by More on Algebra, Section \ref{more-algebra-section-permanence-completion}), then we see that $$ H^i(V, \mathcal{O}_V) = H^i(V, \mathcal{O}_V) \otimes_A A' = H^i(V', \mathcal{O}_{V'}),\quad\text{for } i > 0 $$ The first equality by the torsion property we just proved and More on Algebra, Lemma \ref{more-algebra-lemma-neighbourhood-equivalence}. Moreover, the injective hull of the residue field $k$ is the same for $A$ and $A'$, see Dualizing Complexes, Lemma \ref{dualizing-lemma-compare}. In this way we reduce to the case $A = k[[x_1, \ldots, x_d]]$, see Algebra, Section \ref{algebra-section-cohen-structure-theorem}. \medskip\noindent Assume the characteristic of $k$ is $p > 0$. Since $F : A \to A$, $a \mapsto a^p$ is flat (Local Cohomology, Lemma \ref{local-cohomology-lemma-frobenius-flat-regular}) and since $V \times_{\Spec(A), \Spec(F)} \Spec(A) \cong V$ as schemes over $\Spec(A)$ by \'Etale Morphisms, Lemma \ref{etale-lemma-relative-frobenius-etale} the above gives $H^i(V, \mathcal{O}_V) \otimes_{A, F} A \cong H^i(V, \mathcal{O}_V)$. Thus we get the result by Local Cohomology, Lemma \ref{local-cohomology-lemma-structure-torsion-Frobenius-regular}. \medskip\noindent Assume the characteristic of $k$ is $0$. By Local Cohomology, Lemma \ref{local-cohomology-lemma-etale-derivation} there are additive operators $D_j$, $j = 1, \ldots, d$ on $H^i(V, \mathcal{O}_V)$ satisfying the Leibniz rule with respect to $\partial_j = \partial/\partial x_j$. Thus we get the result by Local Cohomology, Lemma \ref{local-cohomology-lemma-structure-torsion-D-module-regular}.
Let $k = A/\mathfrak m$. Since $V \times_{\Spec(A)} \Spec(k) = \emptyset$, by cohomology and base change we have $$ R\Gamma(V, \mathcal{O}_V) \otimes_A^\mathbf{L} k = 0 $$ See Derived Categories of Schemes, Lemma \ref{perfect-lemma-compare-base-change}. Thus there is a spectral sequence (More on Algebra, Example \ref{more-algebra-example-tor}) $$ E_2^{p, q} = \text{Tor}_{-p}(k, H^q(V, \mathcal{O}_V)),\quad d_2^{p, q} : E_2^{p, q} \to E_2^{p + 2, q - 1} $$ and $d_r^{p, q} : E_r^{p, q} \to E_r^{p + r, q - r + 1}$ converging to zero. By Lemma \ref{lemma-structure-cohomology}, Dualizing Complexes, Lemma \ref{dualizing-lemma-tor-injective-hull}, and our assumption $H^i(V, \mathcal{O}_V) = 0$ for $i \geq \dim(A) - 1$ we conclude that there is no nonzero differential entering or leaving the $(p, q) = (0, 0)$ spot. Thus $H^0(V, \mathcal{O}_V) \otimes_A k = 0$. This means that if $\mathfrak m = (x_1, \ldots, x_d)$ then we have an open covering $V = \bigcup V \times_{\Spec(A)} \Spec(A_{x_i})$ by affine open subschemes $V \times_{\Spec(A)} \Spec(A_{x_i})$ (because $V$ is affine over the punctured spectrum of $A$) such that $x_1, \ldots, x_d$ generate the unit ideal in $\Gamma(V, \mathcal{O}_V)$. This implies $V$ is affine by Properties, Lemma \ref{properties-lemma-characterize-affine}.
Since $X_s$ is geometrically reduced, we may assume all fibres are geometrically reduced after possibly shrinking $S$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-geometrically-reduced-open}. Let $\mathcal{O}_{S, s} \to A \to \kappa(\overline{s}')$ be as in the construction of the specialization map, see Section \ref{section-specialization-map}. Thus it suffices to show that $$ \pi_1(X_{\overline{s}'}) \to \pi_1(X_A) $$ is surjective. This follows from Proposition \ref{proposition-first-homotopy-sequence} and $\pi_1(\Spec(A)) = \{1\}$.
Before we start we note that $\mathcal{O}_{X, x}$ is a regular local ring for all $x \in D$. This follows from Algebra, Lemma \ref{algebra-lemma-regular-mod-x} and our assumption that $\mathcal{O}_{D, x}$ is regular. Let $\xi \in D$ be a generic point of an irreducible component of $D$. By the above $\mathcal{O}_{X, \xi}$ is a discrete valuation ring. Hence the statement of the lemma makes sense. As in the discussion above, write $Y \times_U \Spec(K_\xi) = \Spec(L_\xi)$. Denote $B_\xi$ the integral closure of $\mathcal{O}_{X, \xi}$ in $L_\xi$. Our assumption that $Y$ is unramified over $X$ in codimension $1$ signifies that $\mathcal{O}_{X, \xi} \to B_\xi$ is finite \'etale. Thus we get $Y_\xi \to \Spec(\mathcal{O}_{X, \xi})$ finite \'etale and an isomorphism $$ Y \times_U \Spec(K_\xi) \cong Y_\xi \times_{\Spec(\mathcal{O}_{X, \xi})} \Spec(K_\xi) $$ over $\Spec(K_\xi)$. By Limits, Lemma \ref{limits-lemma-glueing-near-point} we find an open subscheme $X \setminus D \subset U' \subset X$ containing $\xi$ and a morphism $Y' \to U'$ of finite presentation whose restriction to $X \setminus D$ recovers $Y$ and whose restriction to $\Spec(\mathcal{O}_{X, \xi})$ recovers $Y_\xi$. Finally, the morphism $Y' \to U'$ is finite \'etale after possible shrinking $U'$ to a smaller open by Limits, Lemma \ref{limits-lemma-glueing-near-point-properties}. Repeating the argument with the other generic points of $D$ we may assume that we have a finite \'etale morphism $Y' \to U'$ extending $Y \to X\setminus D$ to an open subscheme containing $U' \subset X$ containing $X \setminus D$ and all generic points of $D$. We finish by applying Lemma \ref{lemma-extend-pure} to $Y' \to U'$. Namely, all local rings $\mathcal{O}_{X, x}$ for $x \in D$ are regular (see above) and if $x \not \in U'$ we have $\dim(\mathcal{O}_{X, x}) \geq 2$. Hence we have purity for $\mathcal{O}_{X, x}$ by Lemma \ref{lemma-local-purity}.
This is just an addendum to Lemma \ref{lemma-abhyankar-one-divisor} and in fact the truth of this lemma follows almost immediately if you've read the proof of that lemma. But we can also deduce the lemma from the result of Lemma \ref{lemma-abhyankar-one-divisor}. Namely, taking the normalization of $X$ in $Y$ commutes with \'etale base change, see More on Morphisms, Lemma \ref{more-morphisms-lemma-normalization-smooth-localization}. Hence we see that we may prove the statements on the local structure of $Y' \to X$ \'etale locally on $X$. Thus, by Lemma \ref{lemma-abhyankar-one-divisor} we may assume that $X = \Spec(A)$ where $A$ is a Noetherian ring, that we have a nonzerodivisor $f\in A$ such that $A/fA$ is regular, and that $Y$ is a finite disjoint union of spectra of rings $A_f[x]/(x^e - f)$ where $e$ is invertible in $A$. We omit the verification that the integral closure of $A$ in $A_f[x]/(x^e - f)$ is equal to $A' = A[x]/(x^e - f)$. (To see this argue that the localizations of $A'$ at primes lying over $(f)$ are regular.) We omit the details.
By the valuative criterion of properness applied to the finite morphism $Y' \to X$ we see that $\Spec(K)$-valued points of $Y$ matching $t|_{\Spec(K)}$ as maps into $X$ lift uniquely to morphisms $t' : \Spec(R) \to Y'$. Thus statement (1) make sense. \medskip\noindent Choose an \'etale neighbourhood $(U, u) \to (X, t(\mathfrak m_R))$ such that $U = \Spec(A)$ and such that $Y' \times_X U \to U$ has a description as in Lemma \ref{lemma-extend-tame-covering-normal} for some $f \in A$. Then $\Spec(R) \times_X U \to \Spec(R)$ is \'etale and surjective. If $R'$ denotes the local ring of $\Spec(R) \times_X U$ lying over the closed point of $\Spec(R)$, then $R'$ is a discrete valuation ring and $R \subset R'$ is an unramified extension of discrete valuation rings (More on Algebra, Lemma \ref{more-algebra-lemma-Dedekind-etale-extension}). The assumption on $t$ signifies that the map $A \to R'$ corresponding to $$ \Spec(R') \to \Spec(R) \times_X U \to U $$ maps $f$ to a uniformizer $\pi \in R'$. Now suppose that $$ Y' \times_X U = \coprod\nolimits_{i \in I} \Spec(A[x]/(x^{e_i} - f)) $$ for some $e_i \geq 1$. Then we see that $$ \Spec(R') \times_U (Y' \times_X U) = \coprod\nolimits_{i \in I} \Spec(R'[x]/(x^{e_i} - \pi)) $$ The rings $R'[x]/(x^{e_i} - f)$ are discrete valuation rings (More on Algebra, Lemma \ref{more-algebra-lemma-pull-root-uniformizer}) and hence have no map into the fraction field of $R'$ unless $e_i = 1$. \medskip\noindent Proof of (1). In this case the map $t' : \Spec(R) \to Y'$ base changes to determine a corresponding map $t'' : \Spec(R') \to Y' \times_X U$ which must map into a summand corresponding to $i \in I$ with $e_i = 1$ by the discussion above. Thus clearly we see that $Y' \times_X U \to U$ is \'etale along the image of $t''$. Since being \'etale is a property one can check after \'etale base chamge, this proves (1). \medskip\noindent Proof of (2). In this case the assumption implies that $e_i = 1$ for all $i \in I$. Thus $Y' \times_X U \to U$ is finite \'etale and we conclude as before.
If $S$ is Noetherian, then this is the result of Lemma \ref{lemma-extend-covering}. The general case follows from this by a standard limit argument. We strongly urge the reader to skip the proof. \medskip\noindent We can write $S = \lim S_i$ as a directed limit of a system of schemes with affine transition morphisms and with $S_i$ of finite type over $\mathbf{Z}$, see Limits, Proposition \ref{limits-proposition-approximate}. For each $i$ let $S \to S'_i \to S_i$ be the normalization of $S_i$ in $S$, see Morphisms, Section \ref{morphisms-section-normalization-X-in-Y}. Combining Algebra, Proposition \ref{algebra-proposition-ubiquity-nagata} Morphisms, Lemmas \ref{morphisms-lemma-nagata-normalization-finite} and \ref{morphisms-lemma-normal-normalization} we conclude that $S'_i$ is of finite type over $\mathbf{Z}$, finite over $S_i$, and that $S'_i$ is an integral normal scheme such that $S \to S'_i$ is dominant. By Morphisms, Lemma \ref{morphisms-lemma-functoriality-normalization} we obtain transition morphisms $S'_{i'} \to S'_i$ compatible with the transition morphisms $S_{i'} \to S_i$ and with the morphisms with source $S$. We claim that $S = \lim S'_i$. Proof of claim omitted (hint: look on affine opens over a chosen affine open in $S_i$ for some $i$ to translate this into a straightforward algebra problem). We conclude that we may write $S = \lim S_i$ as a directed limit of a system of normal integral schemes $S_i$ with affine transition morphisms and with $S_i$ of finite type over $\mathbf{Z}$. \medskip\noindent For some $i$ we can find a smooth morphism $X_i \to S_i$ of finite presentation whose base change to $S$ is $X \to S$. See Limits, Lemmas \ref{limits-lemma-descend-finite-presentation} and \ref{limits-lemma-descend-smooth}. After increasing $i$ we may assume the section $\sigma$ lifts to a section $\sigma_i : S_i \to X_i$ (by the equivalence of categories in Limits, Lemma \ref{limits-lemma-descend-finite-presentation}). We may replace $X_i$ by the open subscheme $X_i^0$ of it studied in More on Morphisms, Section \ref{more-morphisms-section-connected-components} since the image of $X \to X_i$ clearly maps into it (openness by More on Morphisms, Lemma \ref{more-morphisms-lemma-connected-along-section-open}). Thus we may assume the fibres of $X_i \to S_i$ are geometrically connected. After increasing $i$ we may assume $|G|$ is invertible on $S_i$. Let $\eta_i \in S_i$ be the generic point. Since $X_\eta$ is the limit of the schemes $X_{i, \eta_i}$ we can use the exact same arguments to descent $Z \to X_\eta$ to some finite \'etale Galois cover $Z_i \to X_{i, \eta_i}$ after possibly increasing $i$. See Lemma \ref{lemma-limit}. After possibly increasing $i$ once more we may assume $Z_i$ has a $\kappa(\eta_i)$-rational point mapping to $\sigma_i(\eta_i)$. Then we apply the lemma in the Noetherian case and we pullback to $X$ to conclude.
Choose $r \geq 0$ and $y_1, \ldots, y_r \in C$ which generate $C$ over $\Im(\varphi)$ and let $0 \leq s \leq r$ be such that $y_1, \ldots, y_s$ are integral over $\Im(\varphi)$ such that $r - s = NF(C, \varphi, \tau) > 0$. Since $B$ is finite over $A$, the image of $y_{s + 1}$ in $B$ satisfies a monic polynomial over $A$. Hence we can find $d \geq 1$ and $f_1, \ldots, f_d \in k[x_1, \ldots, x_n]$ such that $$ z = y_{s + 1}^d + \varphi(f_1) y_{s + 1}^{d - 1} + \ldots + \varphi(f_d) \in J = \Ker(C \to C/\varphi(I)C \xrightarrow{\tau} B) $$ Since $\varphi : k[x_1, \ldots, x_n] \to C$ is \'etale, we can find a nonzero and nonconstant polynomial $g \in k[T_1, \ldots, T_{n + 1}]$ such that $$ g(\varphi(x_1), \ldots, \varphi(x_n), z) = 0 \quad\text{in}\quad C $$ To see this you can use for example that $C \otimes_{\varphi, k[x_1, \ldots, x_n]} k(x_1, \ldots, x_n)$ is a finite product of finite separable field extensions of $k(x_1, \ldots, x_n)$ (see Algebra, Lemmas \ref{algebra-lemma-etale-over-field}) and hence $z$ satisfies a monic polynomial over $k(x_1, \ldots, x_n)$. Clearing denominators we obtain $g$. \medskip\noindent The existence of $g$ and Algebra, Lemma \ref{algebra-lemma-helper-polynomial} produce integers $e_1, e_2, \ldots, e_n \geq 1$ such that $z$ is integral over the subring $C'$ of $C$ generated by $t_1 = \varphi(x_1) + z^{pe_1}, \ldots, t_n = \varphi(x_n) + z^{pe_n}$. Of course, the elements $\varphi(x_1), \ldots, \varphi(x_n)$ are also integral over $C'$ as are the elements $y_1, \ldots, y_s$. Finally, by our choice of $z$ the element $y_{s + 1}$ is integral over $C'$ too. \medskip\noindent Consider the ring map $$ \varphi' : k[x_1, \ldots, x_n] \longrightarrow C, \quad x_i \longmapsto t_i $$ with image $C'$. Since $\text{d}(\varphi(x_i)) = \text{d}(t_i) = \text{d}(\varphi'(x_i))$ in $\Omega_{C/k}$ (and this is where we use the characteristic of $k$ is $p > 0$) we conclude that $\varphi'$ is \'etale because $\varphi$ is \'etale, see Algebra, Lemma \ref{algebra-lemma-characterize-etale-over-polynomial-ring}. Observe that $\varphi'(x_i) - \varphi(x_i) = t_i - \varphi(x_i) = z^{pe_i}$ is in the kernel $J$ of the map $C \to C/\varphi(I)C \to B$ by our choice of $z$ as an element of $J$. Hence for $f \in I$ the element $$ \varphi'(f) = f(t_1, \ldots, t_n) = f(\varphi(x_1) + z^{pe_1}, \ldots, \varphi(x_n) + z^{pe_n}) = \varphi(f) + \text{element of }(z) $$ is in $J$ as well. In other words, $\varphi'(I)C \subset J$ and we obtain a surjection $$ \tau' : C/\varphi'(I)C \longrightarrow C/J \cong B $$ of algebras \'etale over $A$. Finally, the algebra $C$ is generated by the elements $\varphi(x_1), \ldots, \varphi(x_n), y_1, \ldots, y_r$ over $C' = \Im(\varphi')$ with $\varphi(x_1), \ldots, \varphi(x_n), y_1, \ldots, y_{s + 1}$ integral over $C' = \Im(\varphi')$. Hence $NF(C, \varphi', \tau') < r - s = NF(C, \varphi, \tau)$. This finishes the proof.
Write $X = \Spec(C)$. Set $A = 0$ and denote $I = k[x_1, \ldots, x_n]$. By assumption there exists some \'etale $k$-algebra map $\varphi : k[x_1, \ldots, x_n] \to C$. Denote $\tau : C/\varphi(I)C \to 0$ the unique surjection. We may choose $\varphi$ and $\tau$ such that $N(C, \varphi, \tau)$ is minimal. By Lemma \ref{lemma-lower-invariant} we get $N(C, \varphi, \tau) = 0$. Hence $\varphi$ is finite \'etale.
Let us turn the problem into algebra. Write $\mathbf{A}^n_k = \Spec(k[x_1, \ldots, x_n])$. Then $Z = \Spec(A)$ where $A = k[x_1, \ldots, x_n]/I$ for some ideal $I \subset k[x_1, \ldots, x_n]$. Write $Y = \Spec(B)$ so that $Y \to Z$ corresponds to the finite \'etale $k$-algebra map $A \to B$. \medskip\noindent By Algebra, Lemma \ref{algebra-lemma-lift-etale} there exists an \'etale ring map $$ \varphi : k[x_1, \ldots, x_n] \to C $$ and a surjective $A$-algebra map $\tau : C/\varphi(I)C \to B$. (We can even choose $C, \varphi, \tau$ such that $\tau$ is an isomorphism, but we won't use this). We may choose $\varphi$ and $\tau$ such that $N(C, \varphi, \tau)$ is minimal. By Lemma \ref{lemma-lower-invariant} we get $N(C, \varphi, \tau) = 0$. Hence $\varphi$ is finite \'etale. \medskip\noindent Let $f : U = \Spec(C) \to \mathbf{A}^n_k$ be the finite \'etale morphism corresponding to $\varphi$. The morphism $Y \to f^{-1}(Z) = \Spec(C/\varphi(I)C)$ induced by $\tau$ is a closed immersion as $\tau$ is surjective and open as it is an \'etale morphism by Morphisms, Lemma \ref{morphisms-lemma-etale-permanence}. This finishes the proof.
We will use the results of Lemma \ref{lemma-epi-mono} without further mention. In particular we know the functor is faithful. By Lemma \ref{lemma-tame} we know that for any connected $X$ the action of $G$ on $F(X)$ is transitive. Hence $F$ preserves the decomposition into connected components (existence of which is an axiom of a Galois category). Let $X$ and $Y$ be objects and let $s : F(X) \to F(Y)$ be a map. Then the graph $\Gamma_s \subset F(X) \times F(Y)$ of $s$ is a union of connected components. Hence there exists a union of connected components $Z$ of $X \times Y$, which comes equipped with a monomorphism $Z \to X \times Y$, with $F(Z) = \Gamma_s$. Since $F(Z) \to F(X)$ is bijective we see that $Z \to X$ is an isomorphism and we conclude that $s = F(f)$ where $f : X \cong Z \to Y$ is the composition. Hence $F$ is fully faithful. \medskip\noindent To finish the proof we show that $F$ is essentially surjective. It suffices to show that $G/H$ is in the essential image for any open subgroup $H \subset G$ of finite index. By definition of the topology on $G$ there exists a finite collection of objects $X_i$ such that $$ \Ker(G \longrightarrow \prod\nolimits_i \text{Aut}(F(X_i))) $$ is contained in $H$. We may assume $X_i$ is connected for all $i$. We can choose a Galois object $Y$ mapping to a connected component of $\prod X_i$ using Lemma \ref{lemma-galois}. Choose an isomorphism $F(Y) = G/U$ in $G\textit{-sets}$ for some open subgroup $U \subset G$. As $Y$ is Galois, the group $\text{Aut}(Y) = \text{Aut}_{G\textit{-Sets}}(G/U)$ acts transitively on $F(Y) = G/U$. This implies that $U$ is normal. Since $F(Y)$ surjects onto $F(X_i)$ for each $i$ we see that $U \subset H$. Let $M \subset \text{Aut}(Y)$ be the finite subgroup corresponding to $$ (H/U)^{opp} \subset (G/U)^{opp} = \text{Aut}_{G\textit{-Sets}}(G/U) = \text{Aut}(Y). $$ Set $X = Y/M$, i.e., $X$ is the coequalizer of the arrows $m : Y \to Y$, $m \in M$. Since $F$ is exact we see that $F(X) = G/H$ and the proof is complete.