# Connectivity of complements of Stein opens

Let $Y$ be an affine open subset of a locally noetherian scheme $X$. Then, $X \setminus Y$ has pure codimension one [EGAIV$_4$, Cor. 21.12.7]. Moreover, if $X$ is proper and of finite type over a field $k$, and $\dim X \ge 2$, then $X \setminus Y$ is connected [Hartshorne, Cor. II.6.2].

My question is the following:

If $X$ is a complex projective variety of dimension $\ge 2$, and $Y$ is a Zariski open subset that is Stein, then is it still true that $X \setminus Y$ is connected?

The fact that $X \setminus Y$ is of pure codimension one is [Neeman, Prop. 3.4], and is a consequence of Hartog's theorem. Jing Zhang cites this proposition for the statement that $X \setminus Y$ is connected in Algebraic Stein Varieties, specifically in the proof of Thm. 2.8, but it is not clear to me how Neeman's proposition implies this result.

It could also be true that the algebraic proof when $Y$ is affine can be modified in the case when $Y$ is Stein instead. But a key step in the proof by Hartshorne (and Goodman in his original article) is that we can embed $Y$ into an affine space $\mathbf{A}^n$, then take its projective closure $\overline{Y}$ to get a compactification of $Y$, and compare this with $X$ using theorems about blow-ups from Nagata's paper on compactifications. I can't make this work in the Stein case.

• Let $X$ be a variety. (I presume this means that $X$ is irreducible.) Since $X$ is irreducible, it follows that any non-empty open $U$ of $X$ is irreducible (and thus connected). Thus, to make your question non-trivial, it might be useful to emphasize that $X$ is not assumed to be irreducible. – Ariyan Javanpeykar Feb 19 '16 at 12:46
• @AriyanJavanpeykar I'm a bit confused—I'm asking about the connectivity of $X \setminus U$, in your notation, and while $U$ is connected, it can be the case that the complement of a connected set is disconnected. – Takumi Murayama Feb 19 '16 at 14:29
• I guess you should allow arbitrary open subsets and not only Zariski open. – Jérôme Poineau Feb 19 '16 at 18:31
• @JérômePoineau I suppose in the application I have in mind, I can assume $Y$ is Zariski open, but nonetheless the answer below seems to say that the result holds even if $Y$ is only open in the analytic topology. – Takumi Murayama Feb 19 '16 at 18:47

• Thank you! I am a bit confused, though, how their notion of "connected at the boundary" relates to my question. In that respect, Cor. I.4.14 looks more like what I want: as long as the depth of the local rings in $X \setminus Y$ is $\ge 2$, we have connectedness of $X \setminus Y$. Luckily, we can reduce to this case by taking a normalization, and then applying Prop. I.1.8, which says that as long as $\dim X \ge 2$ and $X$ is normal, we have the condition on depth required. – Takumi Murayama Feb 19 '16 at 18:45