I hope this question is not completely trivial:


Suppose $V$ is an irreducible projective variety and $U\subset V$ is a Zariski open subset isomorphic to an affine variety. Is it true that $V\setminus U$ is a Cartier divisor in $V$? If not, what conditions should we impose on $V$? (I guess if $V$ is smooth, then everything is fine?)



Complement to an open affine subvariety in an irreducible projective one
aglearner, In his article on abelian varieties Bryden Cais proves the result you mention. You can find the statement/proof on the top of page 4. (math.arizona.edu/~cais/Papers/Expos/AbVar.pdf)


Specifically, he proves that if $X$ is separated, normal, noetherian and $U \subset X$ is a nonempty affine open subset the complement has pure codimension 1. Thus, with it's reduced-induced structure it is a Weil divisor.


