# Hartshorne Prop I.4.3 Proof

$\textit{The proposition}$: On any variety $Y$, there is a base for the topology consisting of open affine sets.

$\textit{The proof}$: Assume $Y$ is quasi-affine in $\mathbb{A}^n$ and let $Z=\overline{Y}-Y$ with $\mathfrak{a}$ the ideal of $Z$ in $k[x_1,\dots, x_n]$. Let $P\in Y$. If $P\notin Z$ there is a polynomial $f\in \mathfrak{a}$ for which $f(P)\neq 0$. Let $H = Z(f)\subseteq \mathbb{A}^n$. Then $P\in Y-Y\cap H$ is open in $Y$ and closed in $\mathbb{A}^n - H$, the latter an affine variety. Thus $Y-Y\cap H$ is the desired open neighborhood.

$\textit{The problem}$: $Y-Y\cap H = (\mathbb{A}^n - H)\cap Y$. We know $Y$ is open in $\overline{Y}$, and if $Y-Y\cap H$ were closed in that subspace then we should be able to express it as the intersection with a closed set. I'm just not sure why it is closed. If $\overline{Y}=\mathbb{A}^n$, then $Y=\mathbb{A}^n - Z(T)$ is a standard open set, hence quasi-affine variety, and $Y-Y\cap H$ would therefore be open in $\mathbb{A}^n$ by defintion of the subspace topology.

Since $f\in\mathfrak{a}$, $Z\subseteq H$. So $(\mathbb{A}^n-H)\cap Y=(\mathbb{A}^n-H)\cap \overline{Y}$, which is closed in $\mathbb{A}^n-H$.