# Is this subvariety affine?

Consider the following algebraic variety $X$:

Let $C\subset\mathbb{A}^3$ be the affine variety cut out by $xy-z^2=0$ (i.e. the affine cone over a projective conic). Let $B=\mathbb{A}^2$, with coordinate functions $x',z'$. Identify $C\setminus \{x=0\}$ with $B\setminus \{x'=0\}$ by the map $(x,y,z)\mapsto (x'^{-1},z')$. Then let $X$ be $B\cup C$.

Now I believe that $y$ and $z$ (coordinate functions on $C$) extend to global sections on $X$. Therefore $y-z$ is a global section. My question is this:

Is the open subvariety $D(y-z)=\{p\in X\mid y(p)-z(p)\neq 0\}$ affine?

Some background (you can ignore this):

Why do I care about this question? My original motivation was that I was wondering if in general, for an arbitrary variety $X$, the set of $f\in \mathcal{O}_X(X)$ such that $D(f)$ is affine is an ideal of $\mathcal{O}_X(X)$, since it seems to me it is closed under multiplication by $\mathcal{O}_X(X)$. But I couldn't think of a reason for it to be closed under addition. I made up the variety $X$ in this question as a random test case. Then I realized I didn't have a way to check affineness. I now assume that the set of such $f$ is not an ideal in general, or somebody would already have answered this question. But I still hope to learn the answer, because I want to understand how I would determine affineness in this case.

Why do I think $C\setminus\{x=0\}$ and $B\setminus\{x'=0\}$ are isomorphic? Because the coordinate rings are, respectively, $\left(k[x,y,z]/(xy-z^2)\right)_x$ and $k[x',z']_{x'}=k[x',x'^{-1},z']$. But $\left(k[x,y,z]/(xy-z^2)\right)_x$ is generated over $k$ by $x,x^{-1},y,z$ and $y$ satisfies $y=x^{-1}z^2$, so this is the ring $k[x,x^{-1},z]$. Then $x'\mapsto x^{-1},z'\mapsto z$ is an isomorphism of the rings.

Why do I think $y,z$ extend to global sections? The complement of $C$ in $X$ is the line $x'=0$ in $B$; this is where the functions need to be defined in order to become global sections. But on $B\cap C$, $y=x^{-1}z^2 = x'z'^2$ which is a regular function on all of $B$, so $y$ extends. (Thus $y$ is actually identically zero on the line $x'=0$ in $B$.) Extending $z$ is even clearer because $z$ becomes $z'$ on $B$.

Aside: I described the variety $X$ in this previous question.

-
A minor remark: for the your set of $f$ to be closed under multiplication, you should need $X$ is separated (this is enough anyway). –  user18119 Nov 20 '12 at 21:12