Let $k$ be a number field and denote by $\Omega \_k$ the set of places of $k$, by $\Omega \_\infty$ the set of archimedean places of $k$, and by $S$ a nonempty finite subset of $\Omega \_k$ such that $\Omega \_\infty \subset S$.


Let $X$ be a variety over $k$. We define an *integral model* $\mathcal{X}$ of $X$ to be a faithfully flat of finite type scheme that is separated over the ring of $S$-integers $\mathcal{O}\_S$ such that we have an isomorphism $\mathcal{X} \times \_{\mathcal{O}\_S} \mathrm{Spec}\,k \cong X$ over $k$. An *integral point* is defined to be an element of $\mathcal{X}(\mathcal{O}\_S)$.


**Question 1.** Let $(x\_v)$ be an adelic point of $X$, i.e., $(x\_v) \in X(\mathbb{A}\_k)$. By definition, we know that for all but finitely many places $v \in \Omega \_k$, we have $x\_v \in \mathcal{O}\_v$, i.e., $v(x\_v) \geq 0$. How do we prove that we can find a finite subset $S$ containing $\Omega \_\infty$ and an integral model $\mathcal{X}$ over $\mathcal{O}\_S$ such that $$(x\_v) \in (\prod\_{v \in S} X(k\_v) \times \prod \_{v \notin S} \mathcal{X}(\mathcal{O}\_v))?$$
Intuitively, I believe this set $S$ has to be the set of finite places $v$ such that $x\_v$ is not contained in $\mathcal{O}\_v$. It follows that a point $x\_v$ in $X(\mathcal{O}\_v)$ would also be in $\mathcal{X}(\mathcal{O}\_v)$ but I have no idea how to show this concretely.


Now we consider the map
$$\mathcal{X}(\mathcal{O}\_S) \rightarrow (\prod \_{v \in S} X(k\_v) \times \prod \_{v \notin S} \mathcal{X}(\mathcal{O}\_v)).$$


For $v \notin S$ and an integral point $x \in \mathcal{X}(\mathcal{O}\_S)$, we have $v(x) \geq 0$ and so $x$ is contained in the valuation ring $\mathcal{O}\_v$. Hence the map
$$\mathcal{X}(\mathcal{O}\_S) \rightarrow \prod \_{v \notin S} \mathcal{X}(\mathcal{O}\_v)$$
is simply the diagonal map.


**Question 2.** For $v \in S$, how do we define the map
$$\mathcal{X}(\mathcal{O}\_S) \rightarrow X(k\_v)?$$


Lastly, let $\Gamma\_k$ denote the absolute Galois group $\mathrm{Gal}(\bar{k}/k)$.


**Question 3.** Is it true that
$$\mathcal{X}(\bar{k})^{\Gamma\_k} = \mathcal{X}(\mathcal{O}\_S)?$$
In other words, under the action of $\Gamma\_k$, are the fixed $\bar{k}$-points of $\mathcal{X}$ simply its integral points?



Integral models and adelic points
for your first question, the idea is basically what MikhailBorovoi said but of course you have to be careful to get a model outside $S$: add all the prime divisors of dominators of the equations defining $X$ to $S$ to obtain a (faithfully flat)model for $X$ outside $S$. In general you want to glue several affine varieties so you have to also add all the dominators of equations and gluing data to $S$.(if I want to be more precise you have to be more careful for example you have to choose monic equations a more abstract way to say this is to use generic flatness which ensures that outside finitely many prime there is a flat model for $X$.)


for your second question you have obvious maps $O\_S\to k\to k\_v$ and by definition $\mathcal{X}(k\_v)=X(k\_v)$.


for the third why do you think $\mathcal{X}(\bar{k})^{\Gamma\_k} = \mathcal{X}(\mathcal{O}\_S)$ instead of $\mathcal{X}(\bar{k})^{\Gamma\_k} = \mathcal{X}(k)$? Galios invariance does not imply integrality!


