Solution (source code)

= Solution

Use the usual <algebraically closed field> convention for classical <algebraic sets>, or equivalently interpret their points geometrically. The proof also gives the scheme-theoretic statement over any field; the difference from an arbitrary-field rational-point image is explained below.

Choose an affine open cover $X=\bigcup_i U_i$. On each $U_i$, the subset $Y_i=Y\cap(U_i\times\mathbb P^n)$ is closed relative to $U_i\times\mathbb P^n$. If the affine-base assertion holds, its projected image is closed in $U_i$. But
$$
\pi(Y_i)=\pi(Y)\cap U_i.
$$
Thus the complement of $\pi(Y)$ is open on each member of the open cover and hence open in $X$. Therefore \b[it suffices to prove closedness for affine $X$]. No finite-cover assumption is needed for this localization argument.