Let $U\subset\mathbf{P}^n\_{\mathbf{Z}}$ be an open subscheme such that the smooth morphism $U\to\text{Spec}(\mathbf{Z})$ is surjective. Suppose $U(\mathbf{Q})\neq\varnothing$ and $U(\mathbf{Z}\_p)\neq\varnothing$ for all primes $p$.



> 
> Do we have $U(\mathbf{Z})\neq\varnothing$?
> 
> 
> 


The answer is probably "no", but I could benefit from related references.



> 
> Does there exist a finite extension $K/\mathbf{Q}$ such that, if $R$ is the integral closure in $K$ of $\mathbf{Z}$, then $U(R)\neq\varnothing$, and what can one say about $R$? (for example, how ramified is it?)
> 
> 
> 


This question came up while reading through this [paper](http://www.numdam.org/item/10.5802/aif.1863.pdf) of Autissier.



> 
> Do we at least have $U(\overline{\mathbf{Z}})^{\text{Gal}(\overline{\mathbf{Q}}/\mathbf{Q})}\neq\varnothing$, and under what conditions on $U$ can we deduce $U(\mathbf{Z})\neq\varnothing$? (presumably some condition on the codimension/singularities of the complement).
> 
> 
> 


A variant of the same question, with $U(\mathbf{Q})\neq \varnothing$ replaced by $U(\overline{\mathbf{Z}})\neq\varnothing$.



> 
> Does there exist a finite extension $K/\mathbf{Q}$ such that, if $R$ is the integral closure in $K$ of $\mathbf{Z}$, then $U(R)\neq\varnothing$ if $U(\mathbf{Z}\_p)$ and $U(\overline{\mathbf{Z}})$ are nonempty for all $p$, and what can one say about $R$?
> 
> 
> 



$\mathbf{Z}$-points of quasi-projective schemes
As Jason Starr points out, $U = \mathbf P^1{\setminus}\{[1{:}0],[1{:}4],[0{:}1]\}$ is a counterexample to the first question:


* It has a $\mathbf Z[1/3]$-point $[1{:}1]$ and a $\mathbf Z[1/2]$-point $[1{:}2]$, so $U(\mathbf Q) \neq \varnothing$ and $U(\mathbf Z\_p)\neq\varnothing$ for all primes $p$;
* But it does not have a $\mathbf Z$-point: such a point is of the form $[a{:}b]$ with $a,b \in \mathbf Z$ and $\gcd(a,b) = 1$. Then $a \neq 0$ since $[a{:}b] \neq [0{:}1]$, so it is not possible that both $b$ and $4a-b$ are a unit in $\mathbf Z$. Then there exists a prime $p$ dividing either $b$ or $4a-b$. If $p \mid b$, then $[a{:}b]$ intersects $[1{:}0]$ above $p$, and if $p \mid 4a-b$, then $[a{:}b]$ intersects $[1{:}4] = [a{:}4a]$ above $p$. So $[a{:}b]$ never lands entirely in $U$.


The answer to the second question is positive: following the references in Autissier's paper quickly leads to the following result of Skolem [Sko34] (see also [MB89, 1.1] — I was unable to access the original source [Sko34] at the moment).


**Theorem.** *Let $p \in \bar{\mathbf Z}[x\_1,\ldots,x\_n]$ be a polynomial. Then the following are equivalent:*


* *there exist $a\_1,\ldots,a\_n \in \bar{\mathbf Z}$ such that $p(a\_1,\ldots,a\_n)$ is a unit;*
* *$p$ is primitive.*


This means that a standard open $U = D(f) \subseteq \mathbf A^n\_{\mathbf Z}$ has an $\mathcal O\_K$-point for some number field $K$ if and only if $f$ is primitive, i.e. if and only if $U \to \operatorname{Spec} \mathbf Z$ is surjective. If $f$ is moreover homogeneous, then the standard open $D\_+(f) \subseteq \mathbf P^{n-1}\_{\mathbf Z}$ therefore also has an $\mathcal O\_K$-point.


Now if $U \subseteq \mathbf P^n\_{\mathbf Z}$ is any open such that $U \to \operatorname{Spec} \mathbf Z$ is surjective, then it contains a standard open with the same property: for each component $Z\_i$ of the complement $Z$ of $U$, pick a primitive polynomial $f\_i$ in the homogeneous ideal of $Z\_i$. Setting $f = \prod\_i f\_i$ and $V = D\_+(f) \subseteq U$ does the trick. Since $V$ contains an $\mathcal O\_K$-point for some number field $K$, so does $U$.


(This is all subsumed by Rumely's theorem, but in this case we really only need Skolem's version!)


If you want to make this more effective, you have to look into the proofs of Skolem and Rumely.




---


**References.**


[MB89] L. Moret-Bailly, [*Groupes de Picard et problèmes de Skolem, I*](https://doi.org/10.24033/asens.1581). Ann. Sci. Éc. Norm. Supér. (4) **22**.2 (1989), p. 161-179. [ZBL0704.14014](https://zbmath.org/?q=an:0704.14014).


[Sko34] Th. Skolem, *Lösung gewisser Gleichungen in ganzen algebraischen Zahlen, insbesondere in Einheiten*. Skr. Norske Vid.-Akad. **10** (1935), p. 1-19. [ZBL0011.19701](https://zbmath.org/?q=an:0011.19701).


