Complex varieties as real affine varieties: how to recover complex structure? If $A$ is a finitely generated $\mathbb C$-algebra without nilpotents, then $A = \mathbb C[V]$ is the $\mathbb C$-algebra of polynomial functions on $V := \mathrm{maxSpec}(A)$ (this is precisely the content of Hilbert's Nullstellensatz). We can define an associated $\mathbb R$-algebra, $\mathbb R[V]$, to be generated by the real parts of the the complex polynomial functions on $V$. This association induces a faithful forgetful functor 
$$\left\{\text{finitely generated nilpotent-free } \mathbb C\text{-algs}\right\} \to \left\{\mathbb R\text{-algs}\right\},$$
(where the functoriality comes from the fact that the $\mathbb R$-algebra is an algebra of functions on a set) or in schemes,
$$\left\{\text{finite type reduced affine } \mathbb C\text{-schemes}\right\} \to \{\mathbb R\text{-schemes}\},$$
where closed points on the LHS are in one-to-one correspondence with real points on the RHS.
The questions that arise here are endless, and I'm almost certainly reinventing the wheel here, so a few informal questions: to what extent can the domain of this functor be extended? Does this lead anywhere interesting? I'm pretty sure this functor respects gluing at least, so it should extend to non-affine varieties; does, for example, $\mathbb CP^n$ become an affine real variety in this picture? (Note that the closed points of $\mathbb CP^n$ are in 1-1 correspondence with the real points of the real variety consisting of unitary projection matrices of trace/rank 1.)
For the purpose of this posting, a slightly imprecise question which I suspect has a very concrete answer that I just don't know: what structure on an $\mathbb R$-algebra or $\mathbb R$-scheme allows us to go in the reverse direction? I suspect the answer has to do with a $\mathbb C$-action on the tangent bundle, and I know the $(\mathfrak m/\mathfrak m^2)^*$ chracterization of the tangent space at a point, but I don't know how to characterize when a $\mathbb C$-action on tangent spaces is "regular", in the sense of being induced by polynomial functions somehow.
 A: Congratulations, you've rediscovered Weil restriction! Here it is in the most general form I know:

Let $S'\to S$ be a morphism of schemes. Given any $S'$-scheme $X'$, we can consider the contravariant functor $R_{S'/S}(X'):(\text{Sch}/S)^{op}\to \text{Set}$ given by $$T\mapsto X'(T\times_S S').$$ If this functor is representable by an $S$-scheme $X$, then we say that $X$ is the Weil restriction of $X'$ along $S'\to S$, and we write $X=R_{S'/S}(X')$.

This is rather broad! Let us try and get a little better handle on it in the situation we care about.

Let $S'\to S$ be a finite locally free morphism. Let $X'$ be an $S'$-scheme so that for any $s\in S$ and any finite set $P\subset X'\times_S\operatorname{Spec}\kappa(s)$, there exists an affine open subscheme $U'\subset X'$ containing $P$. Then the functor $R_{S'/S}(X')$ is representable by an $S$-scheme. (For proof, see Neron Models by Bosch, Lutkebohmert, and Raynaud, section 7.6. This is actually a really good reference to have for everything I'm talking about in this post.)

In particular, this means that if $X'$ is quasiprojective over $S'$ (and $S'\to S$ is finite locally free) then the Weil restriction exists. Now let's get even more specific: if $K\subset L$ is a finite extension of fields of degree $d$ so that $L/K$ has basis $e_1,\cdots,e_d$ and $X'$ is affine over $L$, say $\operatorname{Spec} L[x_1,\cdots,x_n]/(f_1,\cdots,f_r)$, then we can write the Weil restriction as $\operatorname{Spec} k[y_{ij}]/(g_{st})$ where we take $1\leq i\leq n$, $1\leq j\leq d$, $1\leq s\leq r$, $1\leq t\leq d$, and set $x_i=\sum e_jy_{ij}$ as well as $f_s=\sum e_tg_{st}$. This exactly recovers what you've written down in terms of real parts.
Now let's try to say something about your questions.


*

*Is it interesting? I'd say yes! Among other places, it gets used a fair bit when dealing with abelian varieties and algebraic groups. (Don't ask me for details, because I don't know!) Trying to verify certain properties can get pretty hairy, which means it's not trivial! For instance, if we have a Zariski cover of $X'$, then the Weil restrictions of this cover don't necessarily cover $X$ even in the case when $S'\to S$ is a finite separable extension of fields, and lots of other things like this can go wrong!

*Respecting gluing is tricky in general. As mentioned in the previous bullet point, it may transform covers to non-covers, which suggests that we really ought to be careful here. 

*Does $\Bbb CP^n$ become a real affine variety under this? No, though there are more tricks under the sun in real algebraic geometry than just Weil restriction.

*When can we go in the reverse direction? The bad news is that trying to give a reasonable nontrivial answer to this is hard, see for instance here (when dealing with what they call question #1 in that post).

