Under what condition can we deduce that $\mathcal O_X(X)\otimes_k\bar k = \mathcal O(X_{\bar k})$? I'm reading Qing Liu's book corollary 3.21.
The condition of this corollay is 'X is a reduced connected algebraic variety proper over a field $k$'. Then the author conclude that $K\otimes_k\bar k = \mathcal O(X_{\bar k})$ where $K = \mathcal O_X(X)$ from a proposoition 2.24.
But this book does not have proposition 2.24.... The only theorem might be relevent is propositon 2.14 which shows a similar result but just for geometrically integral variety.
I'm confused how to get this identity.
I'm also wondering, in general, under what condition can we deduce that $\mathcal O_X(X)\otimes_k\bar k = \mathcal O(X_{\bar k})$?
Thank you in advance.


 A: $\newcommand{\Spec}{\mathrm{Spec}}$This is true with essentially no conditions on $X$. Let us, for simplicity though, assume that $X$ is separated.
Suppose that $U_i$ is an affine open cover $X$. Then, $(U_i)_{\overline{k}}$ is an affine open cover $X_{\overline{k}}$. By the sheaf property, we have that
$$0\to H^0(X,\mathcal{O}_{X_{\overline{k}}})\to \prod_i \mathcal{O}((U_i)_{\overline{k}})\to \prod_{i,j}\mathcal{O}((U_i)_{\overline{k}}\cap (U_j)_{\overline{k}})$$
But, note that $(U_i)_{\overline{k}}\cap (U_j)_{\overline{k}}=(U_i\cap U_j)_{\overline{k}}$ and thus it suffices to check the equality
$$\mathcal{O}_X(X_{\overline{k}})=\mathcal{O}_X(X)_{\overline{k}}$$
holds functorially in affine schemes. But, this is clear since
$$\Spec(A)\times_{\Spec(k)}\Spec(\overline{k})=\Spec(A\otimes_k \overline{k})$$
A: As suggested by Alex Youcis in the comments below his answer, I'm going to expand a bit on when a statement like you're after is true (potentially at the risk of being too general). Suppose $X$ is a scheme over $\operatorname{Spec} R$ and $\operatorname{Spec} S\to \operatorname{Spec} R$ is a flat morphism. Further, assume that one of the following conditions is satisfied:

*

*$X\to \operatorname{Spec} R$ is quasi-compact and quasi-separated (qcqs);

*$S$ is a finitely-presented $R$-module.

Then $\mathcal{O}_{X\times_R S}(X\times_R S) \cong \mathcal{O}_X(X)\otimes_R S$. (I'll be writing $X\times_R S$ for $X\times_{\operatorname{Spec} R} \operatorname{Spec} S$ to save space/typing.)
Proof: Assuming 1, cover $X$ by finitely many affine opens $U_i$ by quasi-compactness. Cover each $U_i\cap U_j$ by finitely many affine opens $U_{ijk}$. Then by two applications of the sheaf condition, we have an exact sequence $$0\to \mathcal{O}_{X}(X) \to \prod \mathcal{O}_X(U_i) \to \prod \mathcal{O}_X(U_{ijk})$$ where all of the products actually finite (and thus the same as finite direct sums). Applying $-\otimes_R S$ and using the fact that tensor products commute with direct sums, we get the exact sequence $$0\to \mathcal{O}_{X}(X)\otimes_R S \to \prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S.$$
Assuming 2, do the same thing except to get the same exact sequence $$0\to \mathcal{O}_{X}(X) \to \prod \mathcal{O}_X(U_i) \to \prod \mathcal{O}_X(U_{ijk})$$ except that we no longer have a guarantee that the products are finite. Instead, as $S$ is a finitely presented $R$-module, we have that tensoring with $S$ commutes with arbitrary products and thus we get $$0\to \mathcal{O}_{X}(X)\otimes_R S \to \prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S$$ after applying $-\otimes_R S$.
By definition of the fiber product, the $U_i\times_R S$ cover $X\times_R S$ and the $U_{ijk}\times_R S$ cover $(U_i\times_R S)\cap (U_j\times_R S)$, so by two applications of the sheaf property we get an exact sequence $$0\to \mathcal{O}_{X\times_R S}(X\times_R S) \to \prod \mathcal{O}_{X\times_R S}(U_i\times_R S) \to \prod \mathcal{O}_X(U_{ijk}\times_R S)$$ and as $\mathcal{O}_{X\times_R S}(U_i\times_R S)\cong \mathcal{O}_X(U_i)\otimes_R S$, we have that $\mathcal{O}_{X\times_R S}(X\times_R S)$ and $\mathcal{O}_X(X)\otimes_R S$ are both the kernel of $\prod \mathcal{O}_X(U_i)\otimes_R S \to \prod \mathcal{O}_X(U_{ijk})\otimes_R S$ and thus must be canonically isomorphic.

How does this help in your situation? $X$ is finite type over a noetherian base $k$, and thus $X\to \operatorname{Spec} k$ is qcqs. As any $k$-module is flat, we're in exactly the hypotheses of the result above.
After a quick perusal of Liu's text, I don't see anything which will let you just cite away this issue, nor do I see this listed on the errata.
