# Is the complement of an affine variety always a divisor?

Let $X$ be a connected affine variety over an algebraically closed field $k$, and let $X \subset Y$ be a compactification, by which I mean $Y$ is a proper variety (or projective if you prefer), and $X$ is embedded as an open dense subset.

I am guessing that it is not always the case that $Y\setminus X$ is a divisor, one could imagine it being a single point with a horrible singularity. But if $Y$ is smooth or even normal, is it the case that $Y\setminus X$ is always a divisor? Does anybody know a proof of such a result?

Thanks, Dan

-
Affirmative even in the normal case, but this is a good exercise to work on more on your own. Hint: look at local ring at a generic point of the complement (assuming it is non-empty). As an aside, this plays a key role in producing the ample divisor in the proof that abelian varieties are projective! – BCnrd Apr 21 '10 at 12:24
A side remark: such a divisor must also be connected if dimension of $X$ is $\geq{2}$ ! – Maharana May 2 '10 at 7:02

It it true for any $Y$: see Corollaire 21.12.7 of EGAIV.
Have fun. By considering the normalization of $Y$, it is easy to reduce to the normal case. You don't need to speak French to read EGA. You don't even to really read it, only learn a few technical words and some funny-looking verbal forms. – Angelo Apr 21 '10 at 19:20
I think this paper discusses the question: If the complement of a divisor on a projective variety is affine, what positivity properties does the divisor have? In the OPs question, $X$ does not have to be projective. – J.C. Ottem Apr 21 '11 at 8:56