This question is partly motivated by a few comments [here](https://mathoverflow.net/questions/362633/any-real-algebraic-variety-is-diffeomorphic-to-a-real-algebraic-variety-defined). Let me denote by $R$ the (real-closed) field of real numbers $\mathbb{R}$; everything is probably the same over an arbitrary real-closed field.


When one has a polynomial subset $V$ of $R^n$, the following two are equally sensible ways of putting a structure sheaf on $V$:


1. One is by considering regular functions in the sense of usual scheme theory: in this case the global regular functions are $R$-polynomials in $n$ variables modulo the ideal of those polynomials vanishing on $V$. If, more precisely, we call $X$ the corresponding $R$-scheme (with all of its non-$R$-points too, which by the way are reconstructible from the set $V\subseteq R^n$) and $O\_X$ its structure sheaf, then $X(R)=V\subseteq R^n$ and $O\_X(X)\simeq R[x\_1,\ldots, x\_n]/I\_X$.
2. The other way is by declaring that a regular function is a ratio of polynomials with nonvanishing denominator. We will call such functions $R$-regular, and $R\_V$ the resulting structure sheaf. We call $(V,R\_V)$ an $R$-algebraic variety. This definition seems to be standard in real algebraic geometry, see e.g. [Bochnak-Coste-Roy - Real algebraic geometry (Section 3.2)](https://books.google.it/books?id=GJv6CAAAQBAJ&printsec=copyright&redir_esc=y#v=onepage&q&f=false). I think it doesn't change much if we consider the topological space $X$ of the scheme in point 1) instead, endowed with the sheaf $R\_X$ that sends an open set $U$ to the rational functions on $U\subseteq X$ that are regular at each point of $U\cap X(R)$.


The resulting structure sheaves are not the same. For example, consider the real line: the function $\frac{1}{1+x^2}$ is an $R$-regular function which is not (scheme-theoretically) regular.


Likewise, one can define abstract $R$-algebraic varieties, and $R$-regular maps thereof.


The curious thing is that every projective $R$-algebraic variety is $R$-biregularly isomorphic to an affine one. Indeed, the set theoretic map ([example 1.5 in Ottaviani - Real algebraic geometry. A few basics](http://web.math.unifi.it/gruppi/algebraic-geometry/RealAG_basic.pdf) or [theorem 3.4.4 in BCR](https://books.google.it/books?id=GJv6CAAAQBAJ&printsec=copyright&redir_esc=y#v=onepage&q&f=false))
$$\mathbb{P}^n(R)\to \operatorname{Sym}^2(R^{n+1})\;\;,\quad (x\_0:\ldots : x\_n)\mapsto \frac{x\_ix\_j}{\sum\_{h=1}^n x\_h^2}$$
is an $R$-regular embedding. This does not correspond to an everywhere-defined morphism of schemes, as is immediately seen by looking at any component of the map in a standard affine chart of $\mathbb{P}^n$.



> 
> Are there non-(quasi-)affine abstract $R$-algebraic varieties at all?
> 
> 
> 


Edit: I think the "quasi" in "quasi-affine" may be pleonastic: I haven't checked the details but a quasi-affine $R$-algebraic variety should very often be affine. Indeed, if $X=W\smallsetminus Y$, $Y\subset W \subseteq R^n$ with $W$ affine and $Y$ closed (maybe with some assumptions on $Y$), the real blowup $\operatorname{Bl}\_Y W$ is closed in some $\mathbb{P}^{m}\times W$ and the latter is *affine*; but now the "missing" set $E$ has become a divisor: $X\simeq (\operatorname{Bl}\_Y W)\smallsetminus E$, and affine minus a divisor is still affine.




---


The above example (the one of projective space embedding in an affine space) shows that the category $\text{$R$-Var}$ of $R$-algebraic varieties is *not* a full subcategory of schemes over $\operatorname{Spec}(R)$. On the other hand, I think the category $\operatorname{Sch}'\_R$ of finite type separated reduced schemes over $\operatorname{Spec}(R)$ is a full subcategory of $\text{$R$-Var}$. [Edit: following the comment of Julian Rosen, we probably also want to require the schemes in $\operatorname{Sch}'\_R$ to have dense $R$-points]



> 
> Are there two non-isomorphic schemes in $\operatorname{Sch}'\_R$ that become isomorphic in $\text{$R$-Var}$?
> 
> 
> 


Edit: even before posting, I found [example 3.2.8](https://books.google.it/books?id=GJv6CAAAQBAJ&printsec=copyright&redir_esc=y#v=onepage&q&f=false) in BCR. There is also [proposition 3.5.2](https://books.google.it/books?id=GJv6CAAAQBAJ&printsec=copyright&redir_esc=y#v=onepage&q&f=false) in BCR, the $R$-biregular isomorphism between the circle $x^2+y^2=1$ and $\mathbb{P}^1\_R$. And between the "quadric" sphere and the "Riemann" sphere (i.e. *complex* projective line thought of as a *real* algebraic variety).




---



> 
> In which other ways does $\text{$R$-Var}$ deviate from $\operatorname{Sch}'\_R$?
> 
> 
> 


Note: I'm *not* asking how real algebraic geometry deviates from complex algebraic geometry (which is surely addressed in a preexisting MO question).




---


Edit: (added following question)



> 
> For non real-closed fields, or fields of positive characteristic, do people consider varieties in the sense of 1) or in the sense of 2)?
> 
> 
> 


For example, should $1/(1+x^2)$ be a regular function on the line over $\mathbb{F}\_7$? (It's a well defined function on a finite field, so there will be a polynomial realizing its values set theoretically, but should it be enough?) -- Or, should 1/(x^2-3) be a regular function on the line over $\mathbb{Q}(\sqrt{2})$?



"Real algebraic varieties" vs finite type separated reduced $\mathbb{R}$-schemes with dense $\mathbb{R}$-points
As for your first question, concerning nonaffine R-varieties as you call them, yes, there are nonaffine R-varieties. However, they are considered pathological. Example 12.1.5 on page 301
of Bochnak-Coste-Roy, Real algebraic geometry, constructs an R-line bundle over $\mathbf R^2$ whose total space is not affine. In fact, it is not
affine since it does not have any separated complexification. Note that the R-variety itself, however, is separated!


The essential point here is that the set of real points of an irreducible affine scheme over $\mathbf R$ can be reducible. In the aforementioned
example, the irreducible scheme in question is the one defined by the irreducible polynomial $$p=x^2(x-1)^2+y^2\in\mathbf R[x,y,z].$$ The set of
real points in $\mathbf R^3$ defined by $p$ is the disjoint union of the affine lines $$L\_0=\{(0,0)\}\times\mathbf R\ \mathrm{and}\
L\_1=\{(1,0)\}\times\mathbf R. $$ This is clearly a reducible subset of $\mathbf R^3$. The separated R-variety that does not have a separated
complexification is the one obtained by gluing the open subsets $$ U\_0=\mathbf R^3\setminus L\_0\ \mathrm{and}\ U\_1=\mathbf R^3\setminus L\_1 $$
along the open subsets $$ U\_{01}=U\_0\cap U\_1\subseteq U\_0\ \mathrm{and}\ U\_{10}=U\_0\cap U\_1\subseteq U\_1 $$ via the regular isomorphism $$
\phi\_{10}\colon U\_{01}\rightarrow U\_{10} $$ defined by $$ \phi\_{10}(x,y,z)=(x,y,pz). $$ Note that this is indeed a regular isomorphism
since the map $\phi\_{01}=\phi\_{10}^{-1}$ is the regular map $$ \phi\_{01}\colon U\_{10}\rightarrow U\_{01} $$ defined by $$
\phi\_{01}(x,y,z)=(x,y,\tfrac{z}{p}). $$


Now, it is easy to see that the R-variety $U$ one obtains is separated, as defined in the
founding paper of the whole theory: Faisceaux algébriques cohérents by Jean-Pierre Serre. Indeed, one easily checks that the diagonal in $U\times
U$ is closed. However, if one wants to construct a real scheme $X$ whose set of real points coincides with $U$, then, inevitably, $X$ will not be
separated. Indeed, the polynomial $p$ defines a nonclosed point $x\_0$ in any scheme-wise thickening $X\_0$ of $U\_0$ since $p$ has zeros in $U\_0$,
and similarly it defines a non closed point $x\_1$ of any scheme-wise thickening $X\_1$ of $U\_1$. The gluing morphisms $\phi\_{01}$ and $\phi\_{10}$ will
extend to open subsets $X\_{01}$ of $X\_0$ and $X\_{10}$ of $X\_1$, but they won't contain $x\_0$ and $x\_1$, respectively. This is because the
polynomial $p$ vanishes at $x\_0$. As a result, any scheme-wise thickening of $U$ will be nonseparated!


As for your second question, if I understand correctly, you are asking whether the functor
$$
F\colon Sch\_R'\rightarrow R-Var
$$
defined by $F(X)=X(\mathbf R)$ is an equivalence onto a full subcategory, where $Sch\_R'$ is the category of finite type separated reduced schemes
over $Spec(\mathbf R)$ having dense sets of real points. This is an equivalence onto a full subcategory, its image category, if you localize $Sch\_R'$ with respect to inlcusions of open subsets containing all real points: any
morphism of $R$-varieties wil extend to a morphims defined on some open subset containing the real points. Uniqueness is implied by density of
real points and separation.


As for your third question, I can't think of other differences between $R$-varieties and schemes over $\mathbf R$ that differ essentially from
phenomena already present in the example above.


As for your final question about varieties in the sense of $R$-varieties over other fields, Serre certainly did define them in the paper
I mentioned above. I'm not sure whether that has had a follow-up for other fields than real or algebraically closed fields.


