$f:X\rightarrow Y$ is a closed immersion iff $f:f^{-1}(U_i)\rightarrow U_i$ is a closed immersion.

You are overthinking this. The approach should be the following:

  • Assume $f$ is a closed immersion and show that it holds for any open cover. (Actually we only have to take one single open subset of $X$ and show that the induce map is a closed immersion)

  • Assume it holds for one given cover. Show that $f$ is a closed immersion.

If you have done these two steps, the equivalance of "for some" and "for any" is automatically proven.

Note that the definition of a closed immersion consists of two ingredients:

  • The topological part: $f$ gives an homemorphism of $Z$ onto a closed subset of $X$.

  • The algebraic part: $\mathcal O_X \to f_* \mathcal O_Z$ is surjective.

I think proving the two statements above for the topological part should be quite clear, it does not need any knowledge of algebraic geometry or sheaf theory.

The algebraic part comes down to two statements:

  1. You can check the surjectivity of a map of sheaves locally.

  2. We have $(f_* \mathcal O_Z)_{|U} = f_*(\mathcal O_{Z|f^{-1}(U)})$


After reading this, you will understand, why the equivalence of "for some" and "for any" is automatically proven:

Let $P$ be any property, which an open cover of $X$ has or has not. Consider the $3$ statements:

$(a)$: $P$ holds for the open cover $X$.

$(b)$: $P$ holds for any open cover of $X$.

$(c)$: $P$ holds for some open cover $X$.

$(a) \Rightarrow (b)$ is proven in the first step. $(b) \Rightarrow (c)$ is trivial. $(c) \Rightarrow (a)$ is proven in the second step. Hence the $3$ statements are all equivalent.


If you are a Vakilian, here is how to do it using the affine communication lemma. First note that by 7.3.4 in Vakil's notes we have that the affine property of a morphism is affine local on the target.

Let $X = \mathrm{Spec A}$ and $Y = \mathrm{Spec B}$, $\pi: X \to Y$. Now let $D(f) \subset Y$. Then $\pi^{-1}(D(f)) = D(\pi^{\#}(f))$.

Suppose that $\pi^{\#}: B \to A$ is surjective. Then $B_f \to A_{\pi^{\#}(f)}$ is surjective.

Now suppose that there exist $f_1,\dots,f_k$ in $B$ s.t $(f_1,\dots,f_k) = B$ such that for all $i$ we have that $B_{f_i} \to A_{\pi^{\#}(f_i)}$ is surjective. Then by algebra for all $a \in A$ we have there exist $n_i$ s.t ${\pi^{\#}(f_i)}^{n_i}a \in Im(\pi^{\#})$. Since $({\pi^{\#}(f_1)}^{n_1},\dots,{\pi^{\#}(f_k)}^{n_k})_{Im(\pi^{\#})} \supset \{1\}$ we have that $a \in Im(\pi^{\#})$. We have shown surjectivity of $\pi^{\#}: B \to A$.