hcju/stacksqa huggingface dataset:
Let $\mathcal{F}$ be an $\mathcal{O}_S$-module on $S_\etale$. We have to show that $\mathcal{F}$ is determined by the $R$-module $M = \Gamma(S, \mathcal{F})$. More precisely, if $\pi : X \to S$ is \'etale we have to show that $\Gamma(X, \mathcal{F}) = \Gamma(X, \pi^*\widetilde{M})$. \medskip\noindent Let $\mathfrak m \subset R$ be the maximal ideal and let $\kappa$ be the residue field. By Algebra, Lemma \ref{algebra-lemma-local-dimension-zero-henselian} the local ring $R$ is henselian. If $X \to S$ is \'etale, then the underlying topological space of $X$ is discrete by Morphisms, Lemma \ref{morphisms-lemma-etale-over-field} and hence $X$ is a disjoint union of affine schemes each having one point. Moreover, if $X = \Spec(A)$ is affine and has one point, then $R \to A$ is finite \'etale by Algebra, Lemma \ref{algebra-lemma-mop-up}. We have to show that $\Gamma(X, \mathcal{F}) = M \otimes_R A$ in this case. \medskip\noindent The functor $A \mapsto A/\mathfrak m A$ defines an equivalence of the category of finite \'etale $R$-algebras with the category of finite separable $\kappa$-algebras by Algebra, Lemma \ref{algebra-lemma-henselian-cat-finite-etale}. Let us first consider the case where $A/\mathfrak m A$ is a Galois extension of $\kappa$ with Galois group $G$. For each $\sigma \in G$ let $\sigma : A \to A$ denote the corresponding automorphism of $A$ over $R$. Let $N = \Gamma(X, \mathcal{F})$. Then $\Spec(\sigma) : X \to X$ is an automorphism over $S$ and hence pullback by this defines a map $\sigma : N \to N$ which is a $\sigma$-linear map: $\sigma(an) = \sigma(a) \sigma(n)$ for $a \in A$ and $n \in N$. We will apply Galois descent to the quasi-coherent module $\widetilde{N}$ on $X$ endowed with the isomorphisms coming from the action on $\sigma$ on $N$. See Descent, Lemma \ref{descent-lemma-galois-descent-more-general}. This lemma tells us there is an isomorphism $N = N^G \otimes_R A$. On the other hand, it is clear that $N^G = M$ by the sheaf property for $\mathcal{F}$. Thus the required isomorphism holds. \medskip\noindent The general case (with $A$ local and finite \'etale over $R$) is deduced from the Galois case as follows. Choose $A \to B$ finite \'etale such that $B$ is local with residue field Galois over $\kappa$. Let $G = \text{Aut}(B/R) = \text{Gal}(\kappa_B/\kappa)$. Let $H \subset G$ be the Galois group corresponding to the Galois extension $\kappa_B/\kappa_A$. Then as above one shows that $\Gamma(X, \mathcal{F}) = \Gamma(\Spec(B), \mathcal{F})^H$. By the result for Galois extensions (used twice) we get $$ \Gamma(X, \mathcal{F}) = (M \otimes_R B)^H = M \otimes_R A $$ as desired.
[Sketch of proof.] The Skolem-Noether theorem (see Brauer Groups, Theorem \ref{brauer-theorem-skolem-noether}) implies that for any field $L$ the group $\text{Aut}_{L\text{-Algebras}}(\text{Mat}_d(L))$ equals $\text{PGL}_d(L)$. By Theorem \ref{theorem-central-simple-algebra}, we see that central simple algebras of degree $d$ correspond to forms of the $K$-algebra $\text{Mat}_d(K)$. Combined we see that isomorphism classes of degree $d$ central simple algebras correspond to elements of $H^1(\text{Gal}(K^{sep}/K), \text{PGL}_d(K^{sep}))$. For more details on twisting, see for example \cite{SilvermanEllipticCurves}.
Choose an \'etale covering $\{U_i \to S\}$ and choose isomorphisms $\mathcal{A}|_{U_i} \to \SheafHom(\mathcal{F}_i, \mathcal{F}_i)$ for some locally free $\mathcal{O}_{U_i}$-modules $\mathcal{F}_i$ of rank $d$. (We may assume $\mathcal{F}_i$ is free.) Consider the composition $$ p_i : \mathcal{F}_i^{\otimes d} \to \wedge^d(\mathcal{F}_i) \to \mathcal{F}_i^{\otimes d} $$ The first arrow is the usual projection and the second arrow is the isomorphism of the top exterior power of $\mathcal{F}_i$ with the submodule of sections of $\mathcal{F}_i^{\otimes d}$ which transform according to the sign character under the action of the symmetric group on $d$ letters. Then $p_i^2 = d! p_i$ and the rank of $p_i$ is $1$. Using the given isomorphism $\mathcal{A}|_{U_i} \to \SheafHom(\mathcal{F}_i, \mathcal{F}_i)$ and the canonical isomorphism $$ \SheafHom(\mathcal{F}_i, \mathcal{F}_i)^{\otimes d} = \SheafHom(\mathcal{F}_i^{\otimes d}, \mathcal{F}_i^{\otimes d}) $$ we may think of $p_i$ as a section of $\mathcal{A}^{\otimes d}$ over $U_i$. We claim that $p_i|_{U_i \times_S U_j} = p_j|_{U_i \times_S U_j}$ as sections of $\mathcal{A}^{\otimes d}$. Namely, applying Lemma \ref{lemma-end-unique-up-to-invertible} we obtain an invertible sheaf $\mathcal{L}_{ij}$ and a canonical isomorphism $$ \mathcal{F}_i|_{U_i \times_S U_j} \otimes \mathcal{L}_{ij} \longrightarrow \mathcal{F}_j|_{U_i \times_S U_j}. $$ Using this isomorphism we see that $p_i$ maps to $p_j$. Since $\mathcal{A}^{\otimes d}$ is a sheaf on $S_\etale$ (Proposition \ref{proposition-quasi-coherent-sheaf-fpqc}) we find a canonical global section $p \in \Gamma(S, \mathcal{A}^{\otimes d})$. A local calculation shows that $$ \mathcal{H} = \Im(\mathcal{A}^{\otimes d} \to \mathcal{A}^{\otimes d}, f \mapsto fp) $$ is a locally free module of rank $d^d$ and that (left) multiplication by $\mathcal{A}^{\otimes d}$ induces an isomorphism $\mathcal{A}^{\otimes d} \to \SheafHom(\mathcal{H}, \mathcal{H})$. In other words, $\mathcal{A}^{\otimes d}$ is the trivial element of the Brauer group of $S$ as desired.
Recall that the \'etale cohomology of the structure sheaf is equal to its cohomology on the underlying topological space (Theorem \ref{theorem-zariski-fpqc-quasi-coherent}). The first statement follows from the Artin-Schreier exact sequence and the vanishing of cohomology of the structure sheaf on an affine scheme (Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}). The second statement follows by the same argument from the vanishing of Cohomology, Proposition \ref{cohomology-proposition-cohomological-dimension-spectral} and the fact that $S$ is a spectral space (Properties, Lemma \ref{properties-lemma-quasi-compact-quasi-separated-spectral}).
If $F = 0$, then the statement holds. If we have a filtration of $V$ by $F$-stable subvector spaces such that the statement holds for each graded piece, then it holds for $(V, F)$. Combining these two remarks we may assume the kernel of $F$ is zero. \medskip\noindent Choose a basis $v_1, \ldots, v_n$ of $V$ and write $F(v_i) = \sum a_{ij} v_j$. Observe that $v = \sum \lambda_i v_i$ is in the kernel if and only if $\sum \lambda_i^p a_{ij} v_j = 0$. Since $k$ is algebraically closed this implies the matrix $(a_{ij})$ is invertible. Let $(b_{ij})$ be its inverse. Then to see that $F - 1$ is surjective we pick $w = \sum \mu_i v_i \in V$ and we try to solve $$ (F - 1)(\sum \lambda_iv_i) = \sum \lambda_i^p a_{ij} v_j - \sum \lambda_j v_j = \sum \mu_j v_j $$ This is equivalent to $$ \sum \lambda_j^p v_j - \sum b_{ij} \lambda_i v_j = \sum b_{ij} \mu_i v_j $$ in other words $$ \lambda_j^p - \sum b_{ij} \lambda_i = \sum b_{ij} \mu_i, \quad j = 1, \ldots, \dim(V). $$ The algebra $$ A = k[x_1, \ldots, x_n]/ (x_j^p - \sum b_{ij} x_i - \sum b_{ij} \mu_i) $$ is standard smooth over $k$ (Algebra, Definition \ref{algebra-definition-standard-smooth}) because the matrix $(b_{ij})$ is invertible and the partial derivatives of $x_j^p$ are zero. A basis of $A$ over $k$ is the set of monomials $x_1^{e_1} \ldots x_n^{e_n}$ with $e_i < p$, hence $\dim_k(A) = p^n$. Since $k$ is algebraically closed we see that $\Spec(A)$ has exactly $p^n$ points. It follows that $F - 1$ is surjective and every fibre has $p^n$ points, i.e., the kernel of $F - 1$ is a group with $p^n$ elements.
Let $d = \dim(X)$. By the vanishing established in Lemma \ref{lemma-vanishing-affine-char-p-p} it suffices to show that $H_\etale^{d + 1}(X, \underline{\mathbf{Z}/p\mathbf{Z}}) = 0$. By Lemma \ref{lemma-top-cohomology-coherent} we see that $H^d(X, \mathcal{O}_X)$ is a finite dimensional $k$-vector space. Hence the long exact cohomology sequence associated to the Artin-Schreier sequence ends with $$ H^d(X, \mathcal{O}_X) \xrightarrow{F - 1} H^d(X, \mathcal{O}_X) \to H^{d + 1}_\etale(X, \mathbf{Z}/p\mathbf{Z}) \to 0 $$ By Lemma \ref{lemma-F-1} the map $F - 1$ in this sequence is surjective. This proves the lemma.
By Cohomology of Schemes, Lemma \ref{coherent-lemma-proper-over-affine-cohomology-finite}) and the comparison of cohomology of Theorem \ref{theorem-zariski-fpqc-quasi-coherent} the cohomology groups $H^q_\etale(X, \mathbf{G}_a) = H^q(X, \mathcal{O}_X)$ are finite dimensional $k$-vector spaces. Hence by Lemma \ref{lemma-F-1} the long exact cohomology sequence associated to the Artin-Schreier sequence, splits into short exact sequences $$ 0 \to H_\etale^q(X, \underline{\mathbf{Z}/p\mathbf{Z}}) \to H^q(X, \mathcal{O}_X) \xrightarrow{F - 1} H^q(X, \mathcal{O}_X) \to 0 $$ and moreover the $\mathbf{F}_p$-dimension of the cohomology groups $H_\etale^q(X, \underline{\mathbf{Z}/p\mathbf{Z}})$ is equal to the $k$-dimension of the vector space $H^q(X, \mathcal{O}_X)$. This proves the first statement. The second statement follows as $H^q(X, \mathcal{O}_X) \otimes_k k' \to H^q(X_{k'}, \mathcal{O}_{X_{k'}})$ is an isomorphism by flat base change (Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}).
The construction of $f_*$ commutes with \'etale localization. A finite \'etale morphism is locally isomorphic to a disjoint union of isomorphisms, see \'Etale Morphisms, Lemma \ref{etale-lemma-finite-etale-etale-local}. Thus the lemma says that if $\mathcal{F}_i$, $i = 1, \ldots, n$ are (finite) locally constant sheaves of sets, then $\prod_{i = 1, \ldots, n} \mathcal{F}_i$ is too. This is clear. Similarly for sheaves of abelian groups and modules.
A finite \'etale morphism is locally isomorphic to a disjoint union of isomorphisms, see \'Etale Morphisms, Lemma \ref{etale-lemma-finite-etale-etale-local}. Thus (2) implies (1). Conversely, if $\mathcal{F}$ is finite locally constant, then there exists an \'etale covering $\{X_i \to X\}$ such that $\mathcal{F}|_{X_i}$ is representable by $U_i \to X_i$ finite \'etale. Arguing exactly as in the proof of Descent, Lemma \ref{descent-lemma-descent-data-sheaves} we obtain a descent datum for schemes $(U_i, \varphi_{ij})$ relative to $\{X_i \to X\}$ (details omitted). This descent datum is effective for example by Descent, Lemma \ref{descent-lemma-affine} and the resulting morphism of schemes $U \to X$ is finite \'etale by Descent, Lemmas \ref{descent-lemma-descending-property-finite} and \ref{descent-lemma-descending-property-etale}.
We observe that $\pi_1(X, \overline{x})$ is a profinite topological group, see Fundamental Groups, Definition \ref{pione-definition-fundamental-group}. The left hand categories are defined in Section \ref{section-locally-constant}. The notation used in the right hand categories is taken from Fundamental Groups, Definition \ref{pione-definition-G-set-continuous} for sets and Definition \ref{definition-G-module-continuous} for abelian groups. This explains the notation. \medskip\noindent Assertion (1) follows from Lemma \ref{lemma-characterize-finite-locally-constant} and Fundamental Groups, Theorem \ref{pione-theorem-fundamental-group}. Parts (2) and (3) follow immediately from this by endowing the underlying (sheaves of) sets with additional structure. For example, a finite locally constant sheaf of abelian groups on $X_\etale$ is the same thing as a finite locally constant sheaf of sets $\mathcal{F}$ together with a map $+ : \mathcal{F} \times \mathcal{F} \to \mathcal{F}$ satisfying the usual axioms. The equivalence in (1) sends products to products and hence sends $+$ to an addition on the corresponding finite $\pi_1(X, \overline{x})$-set. Since $\pi_1(X, \overline{x})$-modules are the same thing as $\pi_1(X, \overline{x})$-sets with a compatible abelian group structure we obtain (2). Part (3) is proved in exactly the same way.
Choose a geometric point $\overline{s}$ of $S$. Via the equivalence of Lemma \ref{lemma-locally-constant-on-connected} the sheaf $\mathcal{F}$ corresponds to a finite dimensional $\mathbf{F}_\ell$-vector space $V$ with a continuous $\pi_1(S, \overline{s})$-action. Let $G \subset \text{Aut}(V)$ be the image of the homomorphism $\rho : \pi_1(S, \overline{s}) \to \text{Aut}(V)$ giving the action. Observe that $G$ is finite. The surjective continuous homomorphism $\overline{\rho} : \pi_1(S, \overline{s}) \to G$ corresponds to a Galois object $Y \to S$ of $\textit{F\'Et}_S$ with automorphism group $G = \text{Aut}(Y/S)$, see Fundamental Groups, Section \ref{pione-section-finite-etale-under-galois}. Let $H \subset G$ be an $\ell$-Sylow subgroup. We claim that $T = Y/H \to S$ works. Namely, let $\overline{t} \in T$ be a geometric point over $\overline{s}$. The image of $\pi_1(T, \overline{t}) \to \pi_1(S, \overline{s})$ is $(\overline{\rho})^{-1}(H)$ as follows from the functorial nature of fundamental groups. Hence the action of $\pi_1(T, \overline{t})$ on $V$ corresponding to $f^{-1}\mathcal{F}$ is through the map $\pi_1(T, \overline{t}) \to H$, see Remark \ref{remark-functorial-locally-constant-on-connected}. As $H$ is a finite $\ell$-group, the irreducible constituents of the representation $\rho|_{\pi_1(T, \overline{t})}$ are each trivial of rank $1$ (this is a simple lemma on representation theory of finite groups; insert future reference here). Via the equivalence of Lemma \ref{lemma-locally-constant-on-connected} this means $f^{-1}\mathcal{F}$ is a successive extension of constant sheaves with value $\underline{\mathbf{Z}/\ell\mathbf{Z}}_T$. Moreover the degree of $T = Y/H \to S$ is prime to $\ell$ as it is equal to the index of $H$ in $G$.
Let $g : X \to S$ and $g_i : X_i \to S$ denote the structure morphisms. Fix an $\ell$-power torsion sheaf $\mathcal{G}$ on $S$ with $H^n_\etale(S, \mathcal{G}) \not = 0$. The system given by $\mathcal{G}_i = g_i^{-1}\mathcal{G}$ satisify the conditions of Theorem \ref{theorem-colimit} with colimit sheaf given by $g^{-1}\mathcal{G}$. This tells  us that: $$ \colim_{i\in I} H^n_\etale(X_i, g_i^{-1}\mathcal{G}) = H^n_\etale(X, \mathcal{G}) $$ By virtue of the $g_i$ being finite \'etale morphism of degree prime to $\ell$ we can apply ``la m\'ethode de la trace'' and we find the maps $$ H^n_\etale(S, \mathcal{G}) \to H^n_\etale(X_i, g_i^{-1}\mathcal{G}) $$ are all injective (and compatible with the transition maps). See Section \ref{section-trace-method}. Thus, the colimit is non-zero, i.e., $H^n(X,g^{-1}\mathcal{G}) \neq 0$, giving us the desired result with  $\mathcal{F} = g^{-1}\mathcal{G}$. \medskip\noindent Conversely, suppose given an $\ell$-power torsion sheaf $\mathcal{F}$ on $X$ with $H^n_\etale(X, \mathcal{F}) \not = 0$. We note that since the $g_i$ are finite morphisms the higher direct images vanish (Proposition \ref{proposition-finite-higher-direct-image-zero}). Then, by applying Lemma \ref{lemma-relative-colimit} we may also conclude the  same for $g$. The vanishing of the higher direct images tells us that $H^n_\etale(X, \mathcal{F}) = H^n(S, g_*\mathcal{F}) \neq 0$ by Leray (Proposition \ref{proposition-leray}) giving us what we want with $\mathcal{G} = g_*\mathcal{F}$.
Write $L = \bigcup L_i$ as the union of its finite subextensions over $K$. Our choice of $H$ implies that $[L_i : K]$ is prime to $\ell$. Thus $\Spec(L) = \lim_{i \in I} \Spec(L_i)$ as in Lemma \ref{lemma-nonvanishing-inherited}. Thus we may replace $K$ by $L$ and assume that the absolute Galois group $G$ of $K$ is a profinite pro-$\ell$ group. \medskip\noindent Assume $H^n(\Spec(K), \underline{\mathbf{Z}/\ell\mathbf{Z}}) = 0$. Let $\mathcal{F}$ be an $\ell$-power torsion sheaf on $\Spec(K)_\etale$. We will show that $H^n_\etale(\Spec(K), \mathcal{F}) = 0$. By the correspondence specified in Lemma \ref{lemma-equivalence-abelian-sheaves-point} our sheaf $\mathcal{F}$ corresponds to an $\ell$-power torsion $G$-module $M$. Any finite set of elements $x_1, \ldots, x_m \in M$ must be fixed by an open subgroup $U$ by continuity. Let $M'$ be the module spanned by the orbits of $x_1, \ldots, x_m$. This is a finite abelian $\ell$-group as each $x_i$ is killed by a power of $\ell$ and the orbits are finite. Since $M$ is the filtered colimit of these submodules $M'$, we see that $\mathcal{F}$ is the filtered colimit of the corresponding subsheaves $\mathcal{F}' \subset \mathcal{F}$. Applying Theorem \ref{theorem-colimit} to this colimit, we reduce to the case where $\mathcal{F}$ is a finite locally constant sheaf. \medskip\noindent Let $M$ be a finite abelian $\ell$-group with a continuous action of the profinite pro-$\ell$ group $G$. Then there is a $G$-invariant filtration $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_r = M $$ such that $M_{i + 1}/M_i \cong \mathbf{Z}/\ell \mathbf{Z}$ with trivial $G$-action (this is a simple lemma on representation theory of finite groups; insert future reference here). Thus the corresponding sheaf $\mathcal{F}$ has a filtration $$ 0 = \mathcal{F}_0 \subset \mathcal{F}_1 \subset \ldots \subset \mathcal{F}_r = \mathcal{F} $$ with successive quotients isomorphic to $\underline{\mathbf{Z}/\ell \mathbf{Z}}$. Thus by induction and the long exact cohomology sequence we conclude.
The forward direction is trivial, so we need only prove the reverse direction.  We proceed by induction on $q$. The case of $q = n$ is Lemma \ref{lemma-reduce-to-l-group}. Now let  $\mathcal{F}$ be an $\ell$-power torsion sheaf on $\Spec(K)$. Let $f : \Spec(K^{sep}) \rightarrow \Spec(K)$ be the inclusion of a geometric point. Then consider the exact sequence: $$ 0 \rightarrow \mathcal{F} \xrightarrow{res} f_* f^{-1} \mathcal{F} \rightarrow f_* f^{-1} \mathcal{F}/\mathcal{F}  \rightarrow 0 $$ Note that $K^{sep}$ may be written as the filtered colimit of finite  separable extensions. Thus $f$ is the limit of a directed system of finite \'etale  morphisms. We may, as was seen in the proof of Lemma \ref{lemma-nonvanishing-inherited}, conclude that $f$ has  vanishing higher direct images. Thus, we may express the higher cohomology of  $f_* f^{-1} \mathcal{F}$ as the higher cohomology on the geometric point which  clearly vanishes. Hence, as everything here is still $\ell$-torsion, we may use  the inductive hypothesis in conjunction with the long-exact cohomology sequence  to conclude the result for $q + 1$.
Recall that $H_\etale^q(\Spec(K), \mathbf{G}_m) = H^q(\text{Gal}(K^{sep}/K), (K^{sep})^*)$ by Lemma \ref{lemma-compare-cohomology-point}. Thus by Proposition \ref{proposition-serre-galois} it suffices to show that if $K \subset K'$ is a finite field extension, then $\text{Br}(K') = 0$. Now observe that $K' = \colim K''$, where $K''$ runs over the finitely generated subextensions of $k$ contained in $K'$ of transcendence degree $1$. Note that $\text{Br}(K') = \colim \text{Br}(K'')$ which reduces us to a finitely generated field extension $K''/k$ of transcendence degree $1$. Such a field is the function field of a curve over $k$, hence has trivial Brauer group by Lemma \ref{lemma-curve-brauer-zero}.
We need to show that $(R^q j_*\mathbf{G}_{m, \eta})_{\bar x} = 0$ for every geometric point $\bar x$ of $X$. \medskip\noindent Assume that $\bar x$ lies over a closed point $x$ of $X$. Let $\Spec(A)$ be an affine open neighbourhood of $x$ in $X$, and $K$ the fraction field of $A$. Then $$ \Spec(\mathcal{O}^{sh}_{X, \bar x}) \times_X \eta = \Spec(\mathcal{O}^{sh}_{X, \bar x} \otimes_A K). $$ The ring $\mathcal{O}^{sh}_{X, \bar x} \otimes_A K$ is a localization of the discrete valuation ring $\mathcal{O}^{sh}_{X, \bar x}$, so it is either $\mathcal{O}^{sh}_{X, \bar x}$ again, or its fraction field $K^{sh}_{\bar x}$. But since some local uniformizer gets inverted, it must be the latter. Hence $$ (R^q j_*\mathbf{G}_{m, \eta})_{(X, \bar x)} = H_\etale^q(\Spec K^{sh}_{\bar x}, \mathbf{G}_m). $$ Now recall that $\mathcal{O}^{sh}_{X, \bar x} = \colim_{(U, \bar u) \to \bar x} \mathcal{O}(U) = \colim_{A \subset B} B$ where $A \to B$ is \'etale, hence $K^{sh}_{\bar x}$ is an algebraic extension of $K = k(X)$, and we may apply Lemma \ref{lemma-cohomology-Gm-function-field-curve} to get the vanishing. \medskip\noindent Assume that $\bar x = \bar \eta$ lies over the generic point $\eta$ of $X$ (in fact, this case is superfluous). Then $\mathcal{O}_{X, \bar \eta} = \kappa(\eta)^{sep}$ and thus \begin{eqnarray*} (R^q j_*\mathbf{G}_{m, \eta})_{\bar \eta} & = & H_\etale^q(\Spec(\kappa(\eta)^{sep}) \times_X \eta, \mathbf{G}_m) \\ & = & H_\etale^q (\Spec(\kappa(\eta)^{sep}), \mathbf{G}_m) \\ & = & 0 \ \ \text{ for } q \geq 1 \end{eqnarray*} since the corresponding Galois group is trivial.
The Leray spectral sequence reads $$ E_2^{p, q} = H_\etale^p(X, R^qj_*\mathbf{G}_{m, \eta}) \Rightarrow H_\etale^{p+q}(\eta, \mathbf{G}_{m, \eta}), $$ which vanishes for $p+q \geq 1$ by Lemma \ref{lemma-cohomology-Gm-function-field-curve}. Taking $q = 0$, we get the desired vanishing.
For $X$ quasi-compact and quasi-separated, cohomology commutes with colimits, so it suffices to show the vanishing of $H_\etale^q(X, {i_x}_* \underline{\mathbf{Z}})$. But then the inclusion $i_x$ of a closed point is finite so $R^p {i_x}_* \underline{\mathbf{Z}} = 0$ for all $p \geq 1$ by Proposition \ref{proposition-finite-higher-direct-image-zero}. Applying the Leray spectral sequence, we see that $H_\etale^q(X, {i_x}_* \underline{\mathbf{Z}}) = H_\etale^q(x, \underline{\mathbf{Z}})$. Finally, since $x$ is the spectrum of an algebraically closed field, all higher cohomology on $x$ vanishes.
Theorems \ref{theorem-picard-group} and \ref{theorem-vanishing-cohomology-Gm-curve} determine the \'etale cohomology of $\mathbf{G}_m$ on $X$ in terms of the Picard group of $X$. The Kummer sequence $0\to \mu_{n, X} \to \mathbf{G}_{m, X} \to \mathbf{G}_{m, X}\to 0$ (Lemma \ref{lemma-kummer-sequence}) then gives us the long exact cohomology sequence $$ \xymatrix{ 0 \ar[r] & \mu_n(k) \ar[r] & k^* \ar[r]^{(\cdot)^n} & k^* \ar@(rd, ul)[rdllllr] \\ & H_\etale^1(X, \mu_n) \ar[r] & \Pic(X) \ar[r]^{(\cdot)^n} & \Pic(X) \ar@(rd, ul)[rdllllr] \\ & H_\etale^2(X, \mu_n) \ar[r] & 0 \ar[r] & 0 \ldots } $$ The $n$th power map $k^* \to k^*$ is surjective since $k$ is algebraically closed. So we need to compute the kernel and cokernel of the map $n : \Pic(X) \to \Pic(X)$. Consider the commutative diagram with exact rows $$ \xymatrix{ 0 \ar[r] & \Pic^0(X) \ar[r] \ar@{>>}[d]^{(\cdot)^n} & \Pic(X) \ar[r]_-\deg \ar[d]^{(\cdot)^n} & \mathbf{Z} \ar[r] \ar@{^{(}->}[d]^n & 0 \\ 0 \ar[r] & \Pic^0(X) \ar[r] & \Pic(X) \ar[r]^-\deg & \mathbf{Z} \ar[r] & 0 } $$ The group $\Pic^0(X)$ is the $k$-points of the group scheme $\underline{\Picardfunctor}^0_{X/k}$, see Picard Schemes of Curves, Lemma \ref{pic-lemma-picard-pieces}. The same lemma tells us that $\underline{\Picardfunctor}^0_{X/k}$ is a $g$-dimensional abelian variety over $k$ as defined in Groupoids, Definition \ref{groupoids-definition-abelian-variety}. Hence the left vertical map is surjective by Groupoids, Proposition \ref{groupoids-proposition-review-abelian-varieties}. Applying the snake lemma gives canonical identifications as stated in the lemma. \medskip\noindent To get the noncanonical identifications of the lemma we need to show the kernel of $n : \Pic^0(X) \to \Pic^0(X)$ is isomorphic to $(\mathbf{Z}/n\mathbf{Z})^{\oplus 2g}$. This is also part of Groupoids, Proposition \ref{groupoids-proposition-review-abelian-varieties}.
Observe that the statement makes sense as we have identified both cohomology groups $ H^2_\etale(Y, \mu_n)$ and $H^2_\etale(X, \mu_n)$ with $\mathbf{Z}/n\mathbf{Z}$ in Lemma \ref{lemma-cohomology-smooth-projective-curve}. In fact, if $\mathcal{L}$ is a line bundle of degree $1$ on $Y$ with class $[\mathcal{L}] \in H^1_\etale(Y, \mathbf{G}_m)$, then the coboundary of $[\mathcal{L}]$ is the generator of $H^2_\etale(Y, \mu_n)$. Here the coboundary is the coboundary of the long exact sequence of cohomology associated to the Kummer sequence. Thus the result of the lemma follows from the fact that the degree of the line bundle $\pi^*\mathcal{L}$ on $X$ is $\deg(\pi)$. Some details omitted.