TITLE: Quasi-separatedness is affine-local?
QUESTION [11 upvotes]: [Vakil defines a scheme $X$ to be quasiseparated if the intersection of any two quasicompact opens is quasicompact]
This is part (b) of 7.3.C in Vakil's FOAG: Show that a morphism $\pi$ from a scheme $X$ into a scheme $Y$ is quasiseparated [ For any open affine $Spec(U)\subset Y$, $\pi^{-1}(Spec(U))$ is quasiseparated] if there is a cover of $Y$ by open affine subsets $U_i$ such that $\pi^{-1}(U_i)$ is quasiseparated.
Part (a) is to prove the same thing for quasicompactness and is straightforward. The hint suggests using the affine communication lemma and I can use that to show that for an arbitrary open subset $Spec(A)$ of $Y$, $\pi^{-1}(Spec(A))$ is finite union of quasiseparated open subsets, but that is clearly not sufficient.
Another approach seems to be to reduce the problem to showing that if $Spec(W)$ is an open subset of $\pi^{-1}(U_i)$ and $Spec(V)$ is an open subset of $\pi^{-1}(U_j)$, then $Spec(W)\cap Spec(V)$ is quasicompact. But i'm not even convinced that this is true in general.
Any hints or solutions would be greatly appreciated.

REPLY [8 votes]: Here is an argument using the ``Affine communication lemma,'' perhaps more along the lines of what Vakil intended. 
We want to show two steps:

If $\pi^{-1}(\text{Spec}(A))$ is quasi-separated and $f \in A$, then $\pi^{-1}(\text{Spec}(A_f))$ is quasi-separated. 
If $(f_1, \ldots, f_n) = A$ and each $\pi^{-1}(\text{Spec}(A_{f_i}))$ is quasi-separated, then $\pi^{-1}(\text{Spec}(A))$ is quasi-separated. 

Claim 1 is the easier one: an open subset of a quasi-separated scheme is quasi-separated. (Take two quasi-compacts in the open subset and regard them as quasicompacts in the whole space.) 
For 2, suppose $U$ and $V$ are two quasi-compact open subsets of $\pi^{-1}(\text{Spec}(A))$. We can reduce to the case where $U$ and $V$ lie entirely in $\pi^{-1}(\text{Spec}(A_{f_i}))$ and  $\pi^{-1}(\text{Spec}(A_{f_j}))$, since each is covered by finitely many open subsets lying entirely in one of the pre-images. Then 
$$U \cap V = U \cap \pi^{-1}(\text{Spec}(A_{f_i})) \cap V = U \cap V_{\pi^{\#}}(f_i)$$
and $V_{\pi^{\#}}(f_i)$ is affine, so this is quasicompact because $\pi^{-1}(\text{Spec}(A_{f_i}))$ is quasiseparated.