# Varieties cannot be isomorphic to proper open subsets

Let $X$ be an irreducible variety and let $U \subset X$ be a proper open set. Question : can there be a morphism $f : X \rightarrow U$ such that the composition $U \hookrightarrow X \stackrel{f}{\rightarrow} U$ is the identity?

My guess is that the answer is "no", but I can't seem to prove it.

One observation is that if $f$ exists, then it would give a procedure for taking a regular function $\phi : U \rightarrow k$ and extending it to all of $X$. But this can definitely be done in some cases; for instance, if $X = \mathbb{A}^2$ and $U = \mathbb{A}^2 \setminus \{(0,0)\}$.

-
The title seems to ask a different question than the body. The question in the body asks whether a proper open subset can be a retract. –  Benjamin Steinberg Feb 10 '12 at 23:00
The question in the title is much more interesting than the question in the question. For the question in the question, regard $f$ as a function from $X$ to $X$, and observe that $f$ restricts to the identity on $U$. Thus $f$ must be the identity on the closure of $U$, which is all of $X$ since $X$ is irreducible. –  Andy Putman Feb 11 '12 at 4:35
The retraction question is slightly more subtle than it appears since the Zariski topology is not Hausdorff. One needs to use that varieties are separated. –  Benjamin Steinberg Feb 11 '12 at 13:11

To answer the question in the title on Andy Putnam's suggestion: Let $f$ be an open map from $X$ into $X$, that is, an isomorphism into an open subset. Then the $n$th composition of $f$ with itself is still open. Look at the complement of the image - this is an increasing chain of closed sets. Assuming Noetherian, this must terminate with some function $g$ such that the image of $f \circ g$ is the same as the image of $g$, so the image of $g\circ g$ is the same as the image of $g$, so you can compose it with an inverse on that open set to get a retract onto an open set. Then Andy's comment answers the question. EDIT: As Oliver points out, this argument makes no sense.
Non-noetherian counterexample: $k$ a field, $(x_i)$ and $(y_j)$ two infinite families of indeterminates, $X=\mathrm{Spec\,}k[(x_i),(y_j),(y_j^{-1})]$. It is isomorphic to the open subscheme obtained by inverting one of the $x_i$'s. –  Laurent Moret-Bailly Feb 11 '12 at 8:37