I have been reading Sam Raskin and Arun Debray's "Algebraic Geometry". In Definition 14.6, the author say that a scheme X is quasiseparated if the intersection of two affine opens in $X$ is quasicompact. Following this, he also mention that equivalently the diagonal map $\Delta: X → X \times X$ is a quasicompact morphism. I don't know why this is. By Remark 14.5, this is the same as for all affine schemes $S$ and maps $S \rightarrow X \times X$ , $X \times_{X \times X} S$ is quasicompact. From Definition 14.1, this means that $X \times_{X \times X} S$ has a finite affine open cover. It seems that this is equivalent to a scheme $X$ is quasiseparated i.e. the intersection of two affine opens in $X$ has a finite affine open cover but I can't prove this. How can we prove this? I'm sorry for my lack of ability, but I would be grateful if you could answer.
The equivalent of a quasicompact diagonal map and a quasiseparated scheme in Sam Raskin and Arun Debray’s “Algebraic Geometry”
algebraic-geometrycategory-theory
Related Solutions
I also wanted a topological proof, since it's nice to know what the proofs are in each language and knowing what the proof is when translated in another language (e.g. quasi-separatedness via diagonal morphisms) usually tells something a different way, which is not quite as enlightening. I cleaned up moji's proof (because I am not lazy ;)!)
A scheme $X$ is qcqs (short for quasi-compact and quasi-separated) if and only if there exists a finite open affine cover $\{U_1,\cdots,U_n\}$ such that each intersection $U_i \cap U_j$ admits a finite open affine cover $\{V_{ij1},\cdots,V_{ijk_{ij}}\}$ (where $k_{ij} \in \mathbb N$ depends on $i$ and $j$).
Proof : ($\Rightarrow$) Pick a finite open affine cover $\{U_1,\cdots,U_n\}$ of $X$ by quasi-compactness. Affine schemes are qcqs, so the intersections $U_i \cap U_j$ are quasi-compact and therefore admit a finite open affine cover $\{V_{ij1},\cdots,V_{ijk_{ij}}\}$.
($\Leftarrow$) Let $U \subseteq X$ be a quasi-compact open subset. We claim that for each $\alpha=1,\cdots,n$, $U \cap U_{\alpha}$ is quasi-compact. It suffices to deal with the case of $\alpha=1$. Because $U$ is a scheme, its topology admits a basis consisting of quasi-compact open neighborhoods (take a finite open affine cover and the basis of distinguished open subsets of each of those affines). Write $$ U = \bigcup_{j=1}^n U \cap U_j = \bigcup_{j=1}^n \bigcup_{\ell \in L_j} W_{j\ell} $$ where $W_{j\ell} \subseteq U \cap U_j$ is a quasi-compact open subset. Since $U$ is quasi-compact, choose finite subsets $M_1 \subseteq L_1, \cdots, M_n \subseteq L_n$ such that the above equality still holds. Intersecting this with $U_1$, we get $$ U \cap U_1 = \bigcup_{j=1}^n \bigcup_{\ell \in M_j} W_{j\ell} \cap U_1. $$ Pick $j > 1$ and $\ell \in M_j$, so that for any $1 \le k \le k_{1j}$, the open subsets $V_{1jk}, W_{j\ell} \subseteq U_j$ are quasi-compact. Because $U_j$ is quasi-separated, $V_{1jk} \cap W_{j\ell}$ is quasi-compact. This means that $$ U \cap U_1 = \bigcup_{j=1}^n \bigcup_{\ell \in M_j} W_{j\ell} \cap U_1 \overset{(!)}= \bigcup_{j=1}^n \bigcup_{\ell \in M_j} W_{j\ell} \cap U_1 \cap U_j = \bigcup_{j=1}^n \bigcup_{\ell \in M_j} \bigcup_{k=1}^{k_{1j}} W_{j\ell} \cap V_{1jk} $$ is quasi-compact. (The $(!)$ is because $W_{j\ell} \subseteq U_j$ for each $j$. This seemed to be the cause of many incorrect edits to my proof.)
With this lemma in hand, if $U, U' \subseteq X$ are quasi-compact, then for $i=1,\cdots,n$, we see that $U \cap U' \cap U_i = (U \cap U_i) \cap (U' \cap U_i)$ is quasi-compact by the quasi-separatedness of $U_i$ and the quasi-compactness of $U \cap U_i$ and $U' \cap U_i$, so $X$ is quasi-separated.
Hope that helps,
You can do a slight change to make your argument work and give you an affine cover of $X\times_Y Y'$ as follows. Call $h$ the base change morphism $Y'\to Y$. Consider a cover of $Y$ by open affines $V_i=Spec(A_i)$ and cover any $h^{-1}(V_i)$ by open affines $V_{ij}=Spec(A_{ij})$ of $Y'$. The preimage of $V_{ij}$ by $g$ is as you said $X\times_Y V_{ij}$ which by the properties of the fibered product coincides with $X_i\times_{V_i}V_{ij}$, where $X_i=f^{-1}(V_i)$ (this is crucial to end up with affine schemes as you will see in a moment). You can cover $X_i$ with open affines $X_{ik}=Spec(B_{ik})$ with all $B_{ik}$ finite type $A_i$-algebras. So $g^{-1}(V_{ij})$ is covered by the affines $X_{ik}\times_{V_i}V_{ij}=Spec(B_{ik}\otimes_{A_i}A_{ij})$, which are $A_{ij}$-algebras of finite type. This proves that the base change of $f$ is locally of finite type (actually we didn't use that $f$ is quasi compact, so we proved that locally of finite type morphisms are stable under base change).
If now $f$ is quasi compact, you just need a finite number of $X_{ik}$ to cover $X_{i}$ and so a finite number of $X_{ik}\times_{V_i}V_{ij}$ is enough to cover $g^{-1}(V_{ij})$, proving the quasi-compactness of $g$.
Best Answer
Note: the definition of a quasicompact morphism in the linked document is slightly non-standard. However, we can still work with that.
Let $X$ be a scheme and let $U$ and $V$ be open subschemes, then I claim that the following is a pullback square:
$$\require{AMScd} \begin{CD} U \cap V @>>> X\\ @VVV @VVV \\ U\times V @>>> X \times X; \end{CD}$$
To see this, let $T$ be a scheme and suppose that we have a commutative diagram:
$$\require{AMScd} \begin{CD} T @>>> X\\ @VVV @VVV \\ U\times V @>>> X \times X; \end{CD}$$
By the commuativity of this diagram, the image of $T \to X$ is contained in $U \cap V$, so it factors uniquely over the inclusion $U \cap V \to X$, which proves the claim.
Now we can apply this to the given definition of quasicompact morphisms: if $X \to X \times X$ is quasicompact, then for affine opens $U$ and $V$ in $X$, $U \times V$ is affine, so $(U\times V) \times_{X\times X}X=U\cap V$ is quasicompact.
For the other direction, it might be helpful to show that the definition of quasicompactness is equivalent to more standard definitions, the usual definition of a quasicompact morphism is that $f:X \to Y$ is quasicompact if the preimage of every quasicompact open is again quasicompact.