hcju/stacksqa huggingface dataset:
Assume $X_{\overline{k}}$ is irreducible, i.e., assume (3). Let $k \subset k'$ be a field extension. There exists a field extension $\overline{k} \subset \overline{k}'$ such that $k'$ embeds into $\overline{k}'$ as an extension of $k$. By Lemma \ref{lemma-separably-closed-field-irreducible-components} we see that $X_{\overline{k}'}$ is irreducible. Since $X_{\overline{k}'} \to X_{k'}$ is surjective we conclude that $X_{k'}$ is irreducible. Hence (1) holds. \medskip\noindent Let $k \subset \overline{k}$ be a separable algebraic closure of $k$. Assume not (3), i.e., assume $X_{\overline{k}}$ is reducible. Our goal is to show that also $X_{k'}$ is reducible for some finite subextension $k \subset k' \subset \overline{k}$. Let $X = \bigcup_{i \in I} U_i$ be an affine open covering with $U_i$ not empty. If for some $i$ the scheme $U_i$ is reducible, or if for some pair $i \not = j$ the intersection $U_i \cap U_j$ is empty, then $X$ is reducible (Properties, Lemma \ref{properties-lemma-characterize-irreducible}) and we are done. In particular we may assume that $U_{i, \overline{k}} \cap U_{j, \overline{k}}$ for all $i, j \in I$ is nonempty and we conclude that $U_{i, \overline{k}}$ has to be reducible for some $i$. According to Algebra, Lemma \ref{algebra-lemma-geometrically-irreducible} this means that $U_{i, k'}$ is reducible for some finite separable field extension $k \subset k'$. Hence also $X_{k'}$ is reducible. Thus we see that (2) implies (3). \medskip\noindent The implication (1) $\Rightarrow$ (2) is immediate. This proves the lemma.
Consider the diagram $$ \xymatrix{ X_K \ar[d] & X_{\overline{K}} \ar[d] \ar[l] \\ X & X_{\overline{k}} \ar[l] } $$ where $\overline{K}$ is the separable algebraic closure of $K$, and where $\overline{k}$ is the separable algebraic closure of $k$. By Lemma \ref{lemma-separably-closed-field-irreducible-components} the morphism $X_{\overline{K}} \to X_{\overline{k}}$ induces a bijection between irreducible components. Hence it suffices to show the lemma for the morphisms $X_{\overline{k}} \to X$ and $X_{\overline{K}} \to X_K$. In other words we may assume that $K = \overline{k}$. \medskip\noindent The morphism $p : X_{\overline{k}} \to X$ is integral, flat and surjective. Flatness implies that generalizations lift along $p$, see Morphisms, Lemma \ref{morphisms-lemma-generalizations-lift-flat}. Hence generic points of irreducible components of $X_{\overline{k}}$ map to generic points of irreducible components of $X$. Integrality implies that $p$ is universally closed, see Morphisms, Lemma \ref{morphisms-lemma-integral-universally-closed}. Hence we conclude that the image $p(\overline{T})$ of an irreducible component is a closed irreducible subset which contains a generic point of an irreducible component of $X$, hence $p(\overline{T})$ is an irreducible component of $X$. This proves the first assertion. If $T \subset X$ is an irreducible component, then $p^{-1}(T) =T_K$ is a nonempty union of irreducible components, see Lemma \ref{lemma-inverse-image-irreducible}. Each of these necessarily maps onto $T$ by the first part. Hence the map is surjective.
Let $k'/k$ be a finite extension of fields and let $Z, Z' \subset X_{k'}$ be irreducible components. It suffices to show $Z = Z'$, see Lemma \ref{lemma-characterize-geometrically-irreducible}. By Lemma \ref{lemma-image-irreducible} we have $p(Z) = p(Z') = X$ where $p : X_{k'} \to X$ is the projection. If $Z \not = Z'$ then $Z \cap Z'$ is nowhere dense in $X_{k'}$ and hence $p(Z \cap Z')$ is not dense by Morphisms, Lemma \ref{morphisms-lemma-image-nowhere-dense-finite}; here we also use that $p$ is a finite morphism as the base change of the finite morphism $\Spec(k') \to \Spec(k)$, see Morphisms, Lemma \ref{morphisms-lemma-base-change-finite}. Thus we can pick a $k$-rational point $x \in X$ with $x \not \in p(Z \cap Z')$. Since the residue field of $x$ is $k$ we see that $p^{-1}(\{x\}) = \{x'\}$ where $x' \in X_{k'}$ is a point whose residue field is $k'$. Since $x \in p(Z) = p(Z')$ we conclude that $x' \in Z \cap Z'$ which is the contradiction we were looking for.
The action (\ref{equation-galois-action-base-change-kbar}) of $\text{Gal}(\overline{k}/k)$ on $X_{\overline{k}}$ induces an action on its irreducible components. Irreducible components are always closed (Topology, Lemma \ref{topology-lemma-connected-components}). Hence if $\overline{T}$ is as in (1), then by Lemma \ref{lemma-closed-fixed-by-Galois} there exists a closed subset $T \subset X$ such that $\overline{T} = T_{\overline{k}}$. Note that $T$ is geometrically irreducible over $k$, see Lemma \ref{lemma-characterize-geometrically-irreducible}. To see that $T$ is an irreducible component of $X$, suppose that $T \subset T'$, $T \not = T'$ where $T'$ is an irreducible component of $X$. Let $\overline{\eta}$ be the generic point of $\overline{T}$. It maps to the generic point $\eta$ of $T$. Then the generic point $\xi \in T'$ specializes to $\eta$. As $X_{\overline{k}} \to X$ is flat there exists a point $\overline{\xi} \in X_{\overline{k}}$ which maps to $\xi$ and specializes to $\overline{\eta}$. It follows that the closure of the singleton $\{\overline{\xi}\}$ is an irreducible closed subset of $X_{\overline{\xi}}$ which strictly contains $\overline{T}$. This is the desired contradiction. \medskip\noindent We omit the proof of the functoriality in (2).
Let $T \subset X$ be an irreducible component of $X$. Let $\eta \in T$ be its generic point. By Lemmas \ref{lemma-inverse-image-irreducible} and \ref{lemma-image-irreducible} the generic points of irreducible components of $\overline{T}$ which map into $T$ map to $\eta$. By Algebra, Lemma \ref{algebra-lemma-Galois-orbit} the Galois group acts transitively on all of the points of $X_{\overline{k}}$ mapping to $\eta$. Hence the lemma follows.
Let $\overline{T}$ be an irreducible component of $X_{\overline{k}}$. We may choose an affine open $U \subset X$ such that $\overline{T} \cap U_{\overline{k}}$ is not empty. Write $U = \Spec(A)$, so $A$ is a finite type $k$-algebra, see Morphisms, Lemma \ref{morphisms-lemma-locally-finite-type-characterize}. Hence $A_{\overline{k}}$ is a finite type $\overline{k}$-algebra, and in particular Noetherian. Let $\mathfrak p = (f_1, \ldots, f_n)$ be the prime ideal corresponding to $\overline{T} \cap U_{\overline{k}}$. Since $A_{\overline{k}} = A \otimes_k \overline{k}$ we see that there exists a finite subextension $k \subset k' \subset \overline{k}$ such that each $f_i \in A_{k'}$. It is clear that $\text{Gal}(\overline{k}/k')$ fixes $\overline{T}$, which proves (1). \medskip\noindent Part (2) follows by applying Lemma \ref{lemma-galois-action-irreducible-components} (1) to the situation over $k'$ which implies the irreducible component $\overline{T}$ is of the form $T'_{\overline{k}}$ for some irreducible $T' \subset X_{k'}$. \medskip\noindent To prove (3), let $T \subset X$ be an irreducible component. Choose an irreducible component $\overline{T} \subset X_{\overline{k}}$ which maps to $T$, see Lemma \ref{lemma-image-irreducible}. By the above the orbit of $\overline{T}$ is finite, say it is $\overline{T}_1, \ldots, \overline{T}_n$. Then $\overline{T}_1 \cup \ldots \cup \overline{T}_n$ is a $\text{Gal}(\overline{k}/k)$-invariant closed subset of $X_{\overline{k}}$ hence of the form $W_{\overline{k}}$ for some $W \subset X$ closed by Lemma \ref{lemma-closed-fixed-by-Galois}. Clearly $W = T$ and we win.
Let $\overline{k}$ be a separable algebraic closure of $k$. The assumption that $X$ has finitely many irreducible components combined with Lemma \ref{lemma-galois-action-irreducible-components-locally-finite-type} (3) shows that $X_{\overline{k}}$ has finitely many irreducible components $\overline{T}_1, \ldots, \overline{T}_n$. By Lemma \ref{lemma-galois-action-irreducible-components-locally-finite-type} (2) there exists a finite extension $k \subset k' \subset \overline{k}$ and irreducible components $T_i \subset X_{k'}$ such that $\overline{T}_i = T_{i, \overline{k}}$ and we win.
By Cohomology of Schemes, Lemma \ref{coherent-lemma-proper-over-affine-cohomology-finite} we see that $A = H^0(X, \mathcal{O}_X)$ is a finite dimensional $k$-algebra. This proves (1). \medskip\noindent Then $A$ is a product of local Artinian $k$-algebras by Algebra, Lemma \ref{algebra-lemma-finite-dimensional-algebra} and Proposition \ref{algebra-proposition-dimension-zero-ring}. If $X = Y \amalg Z$ with $Y$ and $Z$ open in $X$, then we obtain an idempotent $e \in A$ by taking the section of $\mathcal{O}_X$ which is $1$ on $Y$ and $0$ on $Z$. Conversely, if $e \in A$ is an idempotent, then we get a corresponding decomposition of $X$. Finally, as $X$ has a Noetherian underlying topological space its connected components are open. Hence the connected components of $X$ correspond $1$-to-$1$ with primitive idempotents of $A$. This proves (2). \medskip\noindent If $X$ is reduced, then $A$ is reduced. Hence the local rings $A_i = k_i$ are reduced and therefore fields (for example by Algebra, Lemma \ref{algebra-lemma-minimal-prime-reduced-ring}). This proves (3). \medskip\noindent If $X$ is geometrically reduced, then $A \otimes_k \overline{k} = H^0(X_{\overline{k}}, \mathcal{O}_{X_{\overline{k}}})$ (equality by Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}) is reduced. This implies that $k_i \otimes_k \overline{k}$ is a product of fields and hence $k_i/k$ is separable for example by Algebra, Lemmas \ref{algebra-lemma-characterize-separable-field-extensions} and \ref{algebra-lemma-geometrically-reduced-finite-purely-inseparable-extension}. This proves (4). \medskip\noindent If $X$ is geometrically connected, then $A \otimes_k \overline{k} = H^0(X_{\overline{k}}, \mathcal{O}_{X_{\overline{k}}})$ is a zero dimensional local ring by part (2) and hence its spectrum has one point, in particular it is irreducible. Thus $A$ is geometrically irreducible. This proves (5). Of course (5) implies (6). \medskip\noindent If $X$ is geometrically reduced and connected, then $A = k_1$ is a field and the extension $k_1/k$ is finite separable and geometrically irreducible. However, then $k_1 \otimes_k \overline{k}$ is a product of $[k_1 : k]$ copies of $\overline{k}$ and we conclude that $k_1 = k$. This proves (7). Of course (7) implies (8).
Set $S = \Spec(A)$. The canonical morphism $X \to S$ is the morphism corresponding to $\Gamma(S, \mathcal{O}_S) = A = \Gamma(X, \mathcal{O}_X)$ via Schemes, Lemma \ref{schemes-lemma-morphism-into-affine}. The $k$-algebra $A$ is a finite product $A = \prod A_i$ of local Artinian $k$-algebras finite over $k$, see Lemma \ref{lemma-proper-geometrically-reduced-global-sections}. Denote $s_i \in S$ the point corresponding to the maximal ideal of $A_i$. Choose an algebraic closure $\overline{k}$ of $k$ and set $\overline{A} = A \otimes_k \overline{k}$. Choose an embedding $\kappa(s_i) \to \overline{k}$ over $k$; this determines a $\overline{k}$-algebra map $$ \sigma_i : \overline{A} = A \otimes_k \overline{k} \to \kappa(s_i) \otimes_k \overline{k} \to \overline{k} $$ Consider the base change $$ \xymatrix{ \overline{X} \ar[r] \ar[d] & X \ar[d] \\ \overline{S} \ar[r] & S } $$ of $X$ to $\overline{S} = \Spec(\overline{A})$. By Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology} we have $\Gamma(\overline{X}, \mathcal{O}_{\overline{X}}) = \overline{A}$. If $\overline{s}_i \in \Spec(\overline{A})$ denotes the $\overline{k}$-rational point corresponding to $\sigma_i$, then we see that $\overline{s}_i$ maps to $s_i \in S$ and $\overline{X}_{\overline{s}_i}$ is the base change of $X_{s_i}$ by $\Spec(\sigma_i)$. Thus we see that it suffices to prove the lemma in case $k$ is algebraically closed. \medskip\noindent Assume $k$ is algebraically closed. In this case $\kappa(s_i)$ is algebraically closed and we have to show that $X_{s_i}$ is connected. The product decomposition $A = \prod A_i$ corresponds to a disjoint union decomposition $\Spec(A) = \coprod \Spec(A_i)$, see Algebra, Lemma \ref{algebra-lemma-spec-product}. Denote $X_i$ the inverse image of $\Spec(A_i)$. It follows from Lemma \ref{lemma-proper-geometrically-reduced-global-sections} part (2) that $A_i = \Gamma(X_i, \mathcal{O}_{X_i})$. Observe that $X_{s_i} \to X_i$ is a closed immersion inducing an isomorphism on underlying topological spaces (because $\Spec(A_i)$ is a singleton). Hence if $X_{s_i}$ isn't connected, then neither is $X_i$. So either $X_i$ is empty and $A_i = 0$ or $X_i$ can be written as $U \amalg V$ with $U$ and $V$ open and nonempty which would imply that $A_i$ has a nontrivial idempotent. Since $A_i$ is local this is a contradiction and the proof is complete.
It is clear that (1) implies (2). Assume (2). Let $k \subset k'$ be a finite purely inseparable field extension (for example $k = k'$). Consider the ring $\mathcal{O}_{X, x} \otimes_k k'$. By Algebra, Lemma \ref{algebra-lemma-p-ring-map} its spectrum is the same as the spectrum of $\mathcal{O}_{X, x}$. Hence it is a local ring also (Algebra, Lemma \ref{algebra-lemma-characterize-local-ring}). Therefore there is a unique point $x' \in X_{k'}$ lying over $x$ and $\mathcal{O}_{X_{k'}, x'} \cong \mathcal{O}_{X, x} \otimes_k k'$. By assumption this is a normal ring. Hence we deduce (3) by Algebra, Lemma \ref{algebra-lemma-geometrically-normal}. \medskip\noindent Assume (3). Let $k \subset k'$ be a field extension. Since $\Spec(k') \to \Spec(k)$ is surjective, also $X_{k'} \to X$ is surjective (Morphisms, Lemma \ref{morphisms-lemma-base-change-surjective}). Let $x' \in X_{k'}$ be any point lying over $x$. The local ring $\mathcal{O}_{X_{k'}, x'}$ is a localization of the ring $\mathcal{O}_{X, x} \otimes_k k'$. Hence it is normal by assumption and (1) is proved.
It is clear that (1) implies (2). Assume (2). Let $k \subset k''$ be a finite purely inseparable field extension and let $x'' \in X_{k''}$ be a point lying over $x$ (actually it is unique). We can find a common field extension $k \subset k'''$ (i.e.\ with both $k' \subset k'''$ and $k'' \subset k'''$) and a point $x''' \in X_{k'''}$ lying over both $x'$ and $x''$. Consider the map of local rings $$ \mathcal{O}_{X_{k''}, x''} \longrightarrow \mathcal{O}_{X_{k'''}, x''''}. $$ This is a flat local ring homomorphism and hence faithfully flat. By (2) we see that the local ring on the right is normal. Thus by Algebra, Lemma \ref{algebra-lemma-descent-normal} we conclude that $\mathcal{O}_{X_{k''}, x''}$ is normal. By Lemma \ref{lemma-geometrically-normal-at-point} we see that $X$ is geometrically normal at $x$.
By Lemma \ref{lemma-geometrically-reduced-stein} we have the equivalence of (1) and (2). A locally Noetherian normal scheme (such as $X_{\overline{k}}$) is a disjoint union of its irreducible components (Properties, Lemma \ref{properties-lemma-normal-Noetherian}). Thus we see that (2) and (3) are equivalent. Since $X_{\overline{k}}$ is assumed reduced, we see that (3) and (4) are equivalent too.
Using Properties, Lemma \ref{properties-lemma-locally-Noetherian} we reduce to the case where $X$ is affine, say $X = \Spec(A)$. In this case we have to prove that $A$ is Noetherian if and only if $A_{k'}$ is Noetherian. Since $A \to A_{k'} = k' \otimes_k A$ is faithfully flat, we see that if $A_{k'}$ is Noetherian, then so is $A$, by Algebra, Lemma \ref{algebra-lemma-descent-Noetherian}. Conversely, if $A$ is Noetherian then $A_{k'}$ is Noetherian by Algebra, Lemma \ref{algebra-lemma-Noetherian-field-extension}.
It is clear that (1) implies (2). Assume (2). This in particular implies that $\mathcal{O}_{X, x}$ is a regular local ring. Let $k \subset k'$ be a finite purely inseparable field extension. Consider the ring $\mathcal{O}_{X, x} \otimes_k k'$. By Algebra, Lemma \ref{algebra-lemma-p-ring-map} its spectrum is the same as the spectrum of $\mathcal{O}_{X, x}$. Hence it is a local ring also (Algebra, Lemma \ref{algebra-lemma-characterize-local-ring}). Therefore there is a unique point $x' \in X_{k'}$ lying over $x$ and $\mathcal{O}_{X_{k'}, x'} \cong \mathcal{O}_{X, x} \otimes_k k'$. By assumption this is a regular ring. Hence we deduce (3) from the definition of a geometrically regular ring. \medskip\noindent Assume (3). Let $k \subset k'$ be a field extension. Since $\Spec(k') \to \Spec(k)$ is surjective, also $X_{k'} \to X$ is surjective (Morphisms, Lemma \ref{morphisms-lemma-base-change-surjective}). Let $x' \in X_{k'}$ be any point lying over $x$. The local ring $\mathcal{O}_{X_{k'}, x'}$ is a localization of the ring $\mathcal{O}_{X, x} \otimes_k k'$. Hence it is regular by assumption and (1) is proved.
Assume (1). Then for every finitely generated field extension $k \subset k'$ and every point $x' \in X_{k'}$ the local ring of $X_{k'}$ at $x'$ is regular. By Properties, Lemma \ref{properties-lemma-characterize-regular} this means that $X_{k'}$ is regular. Hence (2). \medskip\noindent It is clear that (2) implies (3). \medskip\noindent Assume (3) and let $U \subset X$ be an affine open subscheme. Then $U_{k'}$ is a regular scheme for any finite purely inseparable extension $k \subset k'$ (including $k = k'$). This means that $k' \otimes_k \mathcal{O}(U)$ is a regular ring for all finite purely inseparable extensions $k \subset k'$. Hence $\mathcal{O}(U)$ is a geometrically regular $k$-algebra and we see that (4) holds. \medskip\noindent It is clear that (4) implies (5). Let $X = \bigcup U_i$ be an affine open covering as in (5). For any field extension $k \subset k'$ the base change $X_{k'}$ is gotten by gluing the spectra of the rings $\mathcal{O}_X(U_i) \otimes_k k'$ (see Schemes, Section \ref{schemes-section-fibre-products}). Hence $X_{k'}$ is regular. So (1) holds.
It is clear that (1) implies (2). Assume (2). Let $k \subset k''$ be a finite purely inseparable field extension and let $x'' \in X_{k''}$ be a point lying over $x$ (actually it is unique). We can find a common, finitely generated, field extension $k \subset k'''$ (i.e.\ with both $k' \subset k'''$ and $k'' \subset k'''$) and a point $x''' \in X_{k'''}$ lying over both $x'$ and $x''$. Consider the map of local rings $$ \mathcal{O}_{X_{k''}, x''} \longrightarrow \mathcal{O}_{X_{k'''}, x''''}. $$ This is a flat local ring homomorphism of Noetherian local rings and hence faithfully flat. By (2) we see that the local ring on the right is regular. Thus by Algebra, Lemma \ref{algebra-lemma-flat-under-regular} we conclude that $\mathcal{O}_{X_{k''}, x''}$ is regular. By Lemma \ref{lemma-geometrically-regular-at-point} we see that $X$ is geometrically regular at $x$.
Let $k'$ be finite purely inseparable extension of $k$. Let $f' : X_{k'} \to Y_{k'}$ be the base change of $f$. Let $x' \in X_{k'}$ be the unique point lying over $x$. If we show that $Y_{k'}$ is regular at $y' = f'(x')$, then $Y$ is geometrically regular over $k$ at $y'$, see Lemma \ref{lemma-geometrically-regular}. By Morphisms, Lemma \ref{morphisms-lemma-base-change-module-flat} the morphism $X_{k'} \to Y_{k'}$ is flat at $x'$. Hence the ring map $$ \mathcal{O}_{Y_{k'}, y'} \longrightarrow \mathcal{O}_{X_{k'}, x'} $$ is a flat local homomorphism of local Noetherian rings with right hand side regular by assumption. Hence the left hand side is a regular local ring by Algebra, Lemma \ref{algebra-lemma-flat-under-regular}.
The question is local around $x$, hence we may assume that $X = \Spec(A)$ for some finite type $k$-algebra. Let $x$ correspond to the prime $\mathfrak p$. \medskip\noindent If $A$ is smooth over $k$ at $\mathfrak p$, then we may localize $A$ and assume that $A$ is smooth over $k$. In this case $k' \otimes_k A$ is smooth over $k'$ for all extension fields $k'/k$, and each of these Noetherian rings is regular by Algebra, Lemma \ref{algebra-lemma-characterize-smooth-over-field}. \medskip\noindent Assume $X$ is geometrically regular at $x$. Consider the residue field $K := \kappa(x) = \kappa(\mathfrak p)$ of $x$. It is a finitely generated extension of $k$. By Algebra, Lemma \ref{algebra-lemma-make-separable} there exists a finite purely inseparable extension $k \subset k'$ such that the compositum $k'K$ is a separable field extension of $k'$. Let $\mathfrak p' \subset A' = k' \otimes_k A$ be a prime ideal lying over $\mathfrak p$. It is the unique prime lying over $\mathfrak p$, see Algebra, Lemma \ref{algebra-lemma-p-ring-map}. Hence the residue field $K' := \kappa(\mathfrak p')$ is the compositum $k'K$. By assumption the local ring $(A')_{\mathfrak p'}$ is regular. Hence by Algebra, Lemma \ref{algebra-lemma-separable-smooth} we see that $k' \to A'$ is smooth at $\mathfrak p'$. This in turn implies that $k \to A$ is smooth at $\mathfrak p$ by Algebra, Lemma \ref{algebra-lemma-smooth-field-change-local}. The lemma is proved.
A scheme is Jacobson if and only if it has an affine open covering by Jacobson schemes, see Properties, Lemma \ref{properties-lemma-locally-jacobson}. The property on residue fields at closed points is also local on $X$. Hence we may assume that $X$ is affine. In this case the result is a consequence of the Hilbert Nullstellensatz, see Algebra, Theorem \ref{algebra-theorem-nullstellensatz}. It also follows from a combination of Morphisms, Lemmas \ref{morphisms-lemma-jacobson-finite-type-points}, \ref{morphisms-lemma-Jacobson-universally-Jacobson}, and \ref{morphisms-lemma-ubiquity-Jacobson-schemes}.
Choose an affine open covering $X = \bigcup U_i$. By Algebra, Lemma \ref{algebra-lemma-base-change-Jacobson} and Properties, Lemma \ref{properties-lemma-affine-jacobson} there exist cardinals $\kappa_i$ such that $U_{i, K}$ has the desired properties over $K$ if $\#(K) \geq \kappa_i$. Set $\kappa = \max\{\kappa_i\}$. Then if the cardinality of $K$ is larger than $\kappa$ we see that each $U_{i, K}$ satisfies the conclusions of the lemma. Hence $X_K$ is Jacobson by Properties, Lemma \ref{properties-lemma-locally-jacobson}. The statement on residue fields at closed points of $X_K$ follows from the corresponding statements for residue fields of closed points of the $U_{i, K}$.
Let $k \subset K$ be a field extension such that $X_K$ has an ample invertible sheaf $\mathcal{L}$. The morphism $X_K \to X$ is surjective. Hence $X$ is quasi-compact as the image of a quasi-compact scheme (Properties, Definition \ref{properties-definition-ample}). Since $X_K$ is quasi-separated (by Properties, Lemma \ref{properties-lemma-affine-s-opens-cover-quasi-separated}) we see that $X$ is quasi-separated: If $U, V \subset X$ are affine open, then $(U \cap V)_K = U_K \cap V_K$ is quasi-compact and $(U \cap V)_K \to U \cap V$ is surjective. Thus Schemes, Lemma \ref{schemes-lemma-characterize-quasi-separated} applies. \medskip\noindent Write $K = \colim A_i$ as the colimit of the subalgebras of $K$ which are of finite type over $k$. Denote $X_i = X \times_{\Spec(k)} \Spec(A_i)$. Since $X_K = \lim X_i$ we find an $i$ and an invertible sheaf' $\mathcal{L}_i$ on $X_i$ whose pullback to $X_K$ is $\mathcal{L}$ (Limits, Lemma \ref{limits-lemma-descend-invertible-modules}; here and below we use that $X$ is quasi-compact and quasi-separated as just shown). By Limits, Lemma \ref{limits-lemma-limit-ample} we may assume $\mathcal{L}_i$ is ample after possibly increasing $i$. Fix such an $i$ and let $\mathfrak m \subset A_i$ be a maximal ideal. By the Hilbert Nullstellensatz (Algebra, Theorem \ref{algebra-theorem-nullstellensatz}) the residue field $k' = A_i/\mathfrak m$ is a finite extension of $k$. Hence $X_{k'} \subset X_i$ is a closed subscheme hence has an ample invertible sheaf (Properties, Lemma \ref{properties-lemma-ample-on-closed}). Since $X_{k'} \to X$ is finite locally free we conclude that $X$ has an ample invertible sheaf by Divisors, Proposition \ref{divisors-proposition-push-down-ample}.