I have problems to understand a proof of the following theorem (Algebraic Geometry and Arithmetic Curves, Qing Liu, Theo 3.3.25, page 107).
Theorem: let $\mathcal{O}_K$ be a valuation ring over $K$, $X$ a proper $\mathcal{O}_K$-scheme. Then the canonical map $X(\mathcal{O}_K)\to X_K(K)$ is bijective.
If I have well understand the canonical map associate to $\varphi:\mathrm{Spec}\mathcal({O}_K)\to K$ the map $\varphi_K:\mathrm{Spec}(K)\to X_K$ base change of $\varphi$ under $\mathrm{Spec}(K)\to\mathrm{Spec}(\mathcal{O}_K)$.
The proof is going so:
Proof: injectivity: ok
surjectivity: let $\pi:\mathrm{Spec}(K)\to X_K\in X_K(K)$. Let $x=\pi((0))\in X_K$.
Let $Z=\overline{\{x\}}\subseteq X$: problem 1, why can we suppose that $x\in X$? Should we reasonning on $y$ image of $x$ by $X_K\to X$?
We endowed $Z$ with the structure of reduced closed subscheme, so $Z$ is integral: ok
The $\mathcal{O}_K$-scheme $Z$ is proper: ok
The point $x$ is closed in $X_K$: ok
The point $x$ is dense in $Z_K$: problem 2, why? I don't have the beaginning of a explanation.
Then $Z_K=\{x\}$: ok
Image of $Z\to\mathrm{Spec}(\mathcal{O}_K)$ is $\mathrm{Spec}(\mathcal{O}_K)$: ok
Let $t\in Z_\mathfrak{m}$ ($\mathfrak{m}\subseteq\mathcal{O}_K$ is the maximal ideal). $\mathcal{O}_{Z,t}$ is dominating $\mathcal{O}_K$: ok
The field of fraction of $\mathcal{O}_{Z,t}$ is $\mathcal{O}_{Z,x}$ and $\mathcal{O}_{Z,x}=K$: problem 3, why $\mathcal{O}_{Z,x}=K$? It should be linked with $\{x\}=Z_K$ but how?
Then $\mathcal{O}_{Z,t}=\mathcal{O}_K$ and so we have $\mathrm{Spec}(\mathcal{O}_K)\to X$: ok
Thank you for your help
Problem 2: $x$ is dense in $Z$, so is a fortiori dense in $Z_K$.
Problem 3: As $x$ is the generic point of $Z$, $O_{Z,x}$ is equal to the residue field of $Z$ at $x$. As $x$ is a rational point of $X_K/K$, this residue field is $K$. Another way to see this is $Z\to \mathrm{Spec}(O_K)$ is birational.