hcju/stacksqa huggingface dataset:
By Lemma \ref{lemma-regular-section-structure-sheaf} we see that $U \in X_\etale$ affine $\mathcal{S}_X(U) \subset \mathcal{O}_X(U)$ is the set of nonzerodivisors in $\mathcal{O}_X(U)$. Thus the presheaf $\mathcal{S}^{-1}\mathcal{O}_X$ is equal to $$ U \longmapsto Q(\mathcal{O}_X(U)) $$ on $X_{affine, \etale}$, with notation as in Algebra, Example \ref{algebra-example-localize-at-prime}. Observe that the codimension $0$ points of $X$ correspond to the generic points of $U$, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-codimension-0-points}. Hence if $U = \Spec(A)$, then $A$ is a ring with finitely many minimal primes such that any weakly associated prime of $A$ is minimal. The same is true for any \'etale extension of $A$ (because the spectrum of such is an affine scheme \'etale over $X$ hence can play the role of $A$ in the previous sentence). In order to show that our presheaf is a sheaf and quasi-coherent it suffices to show that $$ Q(A) \otimes_A B \longrightarrow Q(B) $$ is an isomorphism when $A \to B$ is an \'etale ring map, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-characterize-quasi-coherent-small-etale}. (To define the displayed arrow, observe that since $A \to B$ is flat it maps nonzerodivisors to nonzerodivisors.) By Algebra, Lemmas \ref{algebra-lemma-total-ring-fractions-no-embedded-points} and \ref{algebra-lemma-weakly-ass-zero-divisors}. we have $$ Q(A) = \prod\nolimits_{\mathfrak p \subset A\text{ minimal}} A_\mathfrak p \quad\text{and}\quad Q(B) = \prod\nolimits_{\mathfrak q \subset B\text{ minimal}} B_\mathfrak q $$ Since $A \to B$ is \'etale, the minimal primes of $B$ are exactly the primes of $B$ lying over the minimal primes of $A$ (for example by More on Algebra, Lemma \ref{more-algebra-lemma-dimension-etale-extension}). By Algebra, Lemmas \ref{algebra-lemma-local-dimension-zero-henselian}, \ref{algebra-lemma-characterize-henselian} (13), and \ref{algebra-lemma-mop-up} we see that $A_\mathfrak p \otimes_A B$ is a finite product of local rings finite \'etale over $A_\mathfrak p$. This cleary implies that $A_\mathfrak p \otimes_A B = \prod_{\mathfrak q\text{ lies over }\mathfrak p} B_\mathfrak q$ as desired. \medskip\noindent At this point we know that (1) and (2) hold. Proof of (3). Let $s \in \mathcal{O}_{X, \overline{x}}$ be a nonzerodivisor. Then we can find an \'etale neighbourhood $(U, \overline{u}) \to (X, \overline{x})$ and $f \in \mathcal{O}_X(U)$ mapping to $s$. Let $u \in U$ be the point determined by $\overline{u}$. Since $\mathcal{O}_{U, u} \to \mathcal{O}_{X, \overline{x}}$ is faithfully flat (as a strict henselization), we see that $f$ maps to a nonzerodivisor in $\mathcal{O}_{U, u}$. By Divisors, Lemma \ref{divisors-lemma-meromorphic-weakass-finite} after shrinking $U$ we find that $f$ is a nonzerodivisor and hence a section of $\mathcal{S}_X(U)$. Part (4) follows from (3) by computing stalks.
For the equivalence between $\QCoh(\mathcal{O}_X)$ and $\QCoh(\mathcal{O}_{X_0})$, please see Properties of Spaces, Section \ref{spaces-properties-section-quasi-coherent}. The lemma is true because $\mathcal{K}_X$ and $\mathcal{K}_{X_0}$ are quasi-coherent and have the same value on corresponding affine opens of $X$ and $X_0$ by Lemma \ref{lemma-meromorphic-quasi-coherent} and Divisors, Lemma \ref{divisors-lemma-meromorphic-weakass-finite}.
Working \'etale locally, this translates into the case of schemes, see Divisors, Lemma \ref{divisors-lemma-pullback-meromorphic-sections-defined}. To do the translation use Lemma \ref{lemma-regular-section-structure-sheaf} (description of regular sections), Definition \ref{definition-weakly-associated} (definition of weakly associated points), and Properties of Spaces, Lemma \ref{spaces-properties-lemma-codimension-0-points} (description of codimension $0$ points).
By Decent Spaces, Lemma \ref{decent-spaces-lemma-get-reasonable} and Section \ref{decent-spaces-section-reasonable-decent} we see that $X$ is decent\footnote{Conversely, if $X$ is decent, then condition (c) holds automatically.}. Thus $X^0 \subset |X|$ is the set of generic points of irreducible components (Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-generic-points}) and $X^0$ is locally finite in $|X|$ by (b). It follows that $X^0$ is contained in every dense open subset of $|X|$. In particular, $X^0$ is contained in the schematic locus (Decent Spaces, Theorem \ref{decent-spaces-theorem-decent-open-dense-scheme}). Thus the local rings $\mathcal{O}_{X, \eta}$ and the morphisms $j_\eta$ are defined. \medskip\noindent Observe that a locally finite direct sum of sheaves of modules is equal to the product. This and the fact that $X^0$ is locally finite in $|X|$ explains the equalities between direct sums and products in the statement. Then since $\mathcal{K}_X(\mathcal{F}) = \mathcal{F} \otimes_{\mathcal{O}_X} \mathcal{K}_X$ we see that the second equality follows from the first. \medskip\noindent Let $j : Y = \coprod\nolimits_{\eta \in X^0} \Spec(\mathcal{O}_{X, \eta}) \to X$ be the product of the morphisms $j_\eta$. We have to show that $\mathcal{K}_X = j_*\mathcal{O}_Y$. Observe that $\mathcal{K}_Y = \mathcal{O}_Y$ as $Y$ is a disjoint union of spectra of local rings of dimension $0$: in a local ring of dimension zero any nonzerodivisor is a unit. Next, note that pullbacks of meromorphic functions are defined for $j$ by Lemma \ref{lemma-pullback-meromorphic-sections-defined}. This gives a map $$ \mathcal{K}_X \longrightarrow j_*\mathcal{O}_Y. $$ Let $U \in X_\etale$ be affine. By Lemma \ref{lemma-meromorphic-quasi-coherent} the left hand side evaluates to total ring of fractions of $\mathcal{O}_X(U)$. On the other hand, the right hand side is equal to the product of the local rings of $U$ at the codimension $0$ points, i.e., the generic points of $U$. These two rings are equal (as we already saw in the proof of Lemma \ref{lemma-meromorphic-quasi-coherent}) by Algebra, Lemmas \ref{algebra-lemma-total-ring-fractions-no-embedded-points} and \ref{algebra-lemma-weakly-ass-zero-divisors}. Thus our map is an isomorphism. \medskip\noindent Finally, we have to show that $R(X) = \Gamma(X, \mathcal{K}_X)$. This follows from the case of schemes (Divisors, Lemma \ref{divisors-lemma-meromorphic-weakass-finite}) applied to the schematic locus $X' \subset X$. Namely, the ring of rational functions of $X$ is by definition the same as the ring of rational functions on $X'$ as it is a dense open subspace of $X$ (see above). Certainly, $R(X')$ agrees with the ring of rational functions when $X'$ is viewed as a scheme. On the other hand, by our description of $\mathcal{K}_X$ above, and the fact, seen above, that $X^0 \subset |X'|$ is contained in any dense open, we see that $\Gamma(X, \mathcal{K}_X) = \Gamma(X', \mathcal{K}_{X'})$. Finally, use the compatibility recorded in Lemma \ref{lemma-meromorphic-quasi-coherent-agree}.
With notation as in Lemma \ref{lemma-compute-meromorphic} the stalk $\mathcal{L}_\eta$ of $\mathcal{L}$ at is defined for all $\eta \in X^0$ and it is a rank $1$ free $\mathcal{O}_{X, \eta}$-module. Pick a generator $s_\eta \in \mathcal{L}_\eta$ for all $\eta \in X^0$. It follows immediately from the description of $\mathcal{K}_X$ and $\mathcal{K}_X(\mathcal{L})$ in Lemma \ref{lemma-compute-meromorphic} that $s = \prod s_\eta$ is a regular meromorphic section of $\mathcal{L}$.
It suffices to prove the second assertion, see Spaces, Lemma \ref{spaces-lemma-representable-over-space}. Let $g : Z \to X$ be a morphism where $Z$ is a scheme. Let $F'$ be the functor of quadruples associated to the graded quasi-coherent $\mathcal{O}_Z$-algebra $g^*\mathcal{A}$. Then there is a canonical isomorphism $F' = Z \times_X F$, sending a quadruple $(d, f : T \to Z, \mathcal{L}, \psi)$ for $F'$ to $(d, g \circ f, \mathcal{L}, \psi)$ (details omitted, see proof of Constructions, Lemma \ref{constructions-lemma-proj-base-change}). By Constructions, Lemmas \ref{constructions-lemma-equivalent-relative}, \ref{constructions-lemma-relative-proj}, and \ref{constructions-lemma-glueing-gives-functor-proj} and Definition \ref{constructions-definition-relative-proj} we see that $F'$ is representable by $\underline{\text{Proj}}_Z(g^*\mathcal{A})$.
As in the discussion following Definition \ref{definition-relative-proj} choose a scheme $U$ and a surjective \'etale morphism $U \to X$, set $R = U \times_X U$ with projections $s, t : R \to U$, $\mathcal{A}_U = \mathcal{A}|_U$, $\mathcal{A}_R = \mathcal{A}|_R$, and $\pi : P = \underline{\text{Proj}}_X(\mathcal{A}) \to X$, $\pi_U : P_U = \underline{\text{Proj}}_U(\mathcal{A}_U)$ and $\pi_R : P_R = \underline{\text{Proj}}_U(\mathcal{A}_R)$. By the Constructions, Lemma \ref{constructions-lemma-glue-relative-proj-twists} we have a quasi-coherent sheaf of $\mathbf{Z}$-graded $\mathcal{O}_{P_U}$-algebras $\bigoplus_{n \in \mathbf{Z}} \mathcal{O}_{P_U}(n)$ and a canonical map $\psi_U : \pi_U^*\mathcal{A}_U \to \bigoplus_{n \geq 0} \mathcal{O}_{P_U}(n)$ and similarly for $P_R$. By Constructions, Lemma \ref{constructions-lemma-relative-proj-base-change} the pullback of $\mathcal{O}_{P_U}(n)$ and $\psi_U$ by either projection $P_R \to P_U$ is equal to $\mathcal{O}_{P_R}(n)$ and $\psi_R$. By Properties of Spaces, Proposition \ref{spaces-properties-proposition-quasi-coherent} we obtain $\mathcal{O}_{P}(n)$ and $\psi$. We omit the verification of compatibility with pullback to arbitrary schemes over $X$.
Let $F$ be the functor (\ref{equation-proj}) and let $F'$ be the corresponding functor defined using $g^*\mathcal{A}$ on $X'$. We claim there is a canonical isomorphism $r : F' \to X' \times_X F$ of functors (and of course $r$ is the isomorphism of the lemma). It suffices to construct the bijection $r : F'(T) \to X'(T) \times_{X(T)} F(T)$ for quasi-compact schemes $T$ over $S$. First, if $\xi = (d', f', \mathcal{L}', \psi')$ is a quadruple over $T$ for $F'$, then we can set $r(\xi) = (f', (d', g \circ f', \mathcal{L}', \psi'))$. This makes sense as $(g \circ f')^*\mathcal{A}^{(d)} = (f')^*(g^*\mathcal{A})^{(d)}$. The inverse map sends the pair $(f', (d, f, \mathcal{L}, \psi))$ to the quadruple $(d, f', \mathcal{L}, \psi)$. We omit the proof of the final assertion (hint: reduce to the case of schemes by \'etale localization and apply Constructions, Lemma \ref{constructions-lemma-relative-proj-base-change}).
Omitted. Hints: First we observe that for a quasi-compact scheme $W$ over $X$ the following are equivalent \begin{enumerate} \item $W \to X$ factors through $U(\psi)$, and \item there exists a $d$ such that $\psi|_W : f^*\mathcal{A}_d|_W \to \mathcal{L}^{\otimes d}|_W$ is surjective. \end{enumerate} This gives a description of $U(\psi)$ as a subfunctor of $X$ on our base category $(\Sch/S)_{fppf}$. For such a $W$ and $d$ we consider the quadruple $(d, W \to Y, \mathcal{L}|_W, \psi^{(d)}|_W)$. By definition of $\underline{\text{Proj}}_Y(\mathcal{A})$ we obtain a morphism $W \to \underline{\text{Proj}}_Y(\mathcal{A})$. By our notion of equivalence of quadruples one sees that this morphism is independent of the choice of $d$. This clearly defines a transformation of functors $r_{\psi, \mathcal{L}} : U(\psi) \to \underline{\text{Proj}}_Y(\mathcal{A})$, i.e., a morphism of algebraic spaces. By construction this morphism satisfies (2). Since the morphism constructed in Constructions, Lemma \ref{constructions-lemma-invertible-map-into-relative-proj} satisfies the same property, we see that (3) is true. \medskip\noindent To construct $\theta$ and check the compatibility (1) of the lemma, work \'etale locally on $Y$ and $X$, arguing as in the discussion following Definition \ref{definition-relative-proj}.
The implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-ample-base-change}. Assume (2). This implies that $Y \to V$ is quasi-compact and separated (Lemma \ref{lemma-relatively-ample-properties}) and $Y$ is a scheme. Then we conclude that $X \to U$ is quasi-compact and separated (Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-quasi-compact-local} and \ref{spaces-morphisms-lemma-separated-local}). Set $\mathcal{A} = \bigoplus_{d \geq 0} f_*\mathcal{L}^{\otimes d}$. Thus is a quasi-coherent sheaf of graded $\mathcal{O}_U$-algebras (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}). By adjunction we have a map $\psi : f^*\mathcal{A} \to \bigoplus_{d \geq 0} \mathcal{L}^{\otimes d}$. Applying Lemma \ref{lemma-invertible-map-into-relative-proj} we obtain an open subspace $U(\psi) \subset X$ and a morphism $$ r_{\mathcal{L}, \psi} : U(\psi) \to \underline{\text{Proj}}_U(\mathcal{A}) $$ Since $h : V \to U$ is \'etale we have $\mathcal{A}|_V = (Y \to V)_*(\bigoplus_{d \geq 0} \mathcal{N}^{\otimes d})$, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-pushforward-etale-base-change-modules}. It follows that the pullback $\psi'$ of $\psi$ to $Y$ is the adjunction map for the situation $(Y \to V, \mathcal{N})$ as in Morphisms, Lemma \ref{morphisms-lemma-characterize-relatively-ample} part (5). Since $\mathcal{N}$ is ample on $Y/V$ we conclude from the lemma just cited that $U(\psi') = Y$ and that $r_{\mathcal{N}, \psi'}$ is an open immersion. Since Lemma \ref{lemma-invertible-map-into-relative-proj} tells us that the formation of $r_{\mathcal{L}, \psi}$ commutes with base change, we conclude that $U(\psi) = X$ and that we have a commutative diagram $$ \xymatrix{ Y \ar[r]_-{r'} \ar[d] & \underline{\text{Proj}}_V(\mathcal{A}|_V) \ar[d] \ar[r] & V \ar[d] \\ X \ar[r]^-r & \underline{\text{Proj}}_U(\mathcal{A}) \ar[r] & U } $$ whose squares are fibre products. We conclude that $r$ is an open immersion by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-local}. Thus $X$ is a scheme. Then we can apply Morphisms, Lemma \ref{morphisms-lemma-characterize-relatively-ample} part (5) to conclude that $\mathcal{L}$ is ample on $X/U$.
Parts (1) and (2) are equivalent by definition. The implication (2) $\Rightarrow$ (3) is immediate. If (3) holds and $Z \to Y$ is as in (2), then we see that $X_Z \to Z$ is affine locally on $Z$ representable. Hence $X_Z$ is a scheme for example by Properties of Spaces, Lemma \ref{spaces-properties-lemma-subscheme}. Then it follows that $\mathcal{L}_Z$ is ample on $X_Z/Z$ because it holds locally on $Z$ and we can use Morphisms, Lemma \ref{morphisms-lemma-characterize-relatively-ample}. Thus (1), (2), and (3) are equivalent. Clearly these conditions imply (4). \medskip\noindent Assume (4). Let $Z \to Y$ be a morphism with $Z$ affine. Then $U = V \times_Y Z \to Z$ is a surjective \'etale morphism such that the pullback of $\mathcal{L}_Z$ by $X_U \to X_Z$ is relatively ample on $X_U/U$. Of course we may replace $U$ by an affine open. It follows that $\mathcal{L}_Z$ is ample on $X_Z/Z$ by Lemma \ref{lemma-descend-relatively-ample}. Thus (4) $\Rightarrow$ (3) and the proof is complete.
The implication (1) $\Rightarrow$ (2) follows from Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-proper-ample} because assumption (1) implies that $X$ is a scheme. The implication (2) $\Rightarrow$ (1) is Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-Noetherian-h1-zero-invertible}.
Pick $d_0$ as in Lemma \ref{lemma-ample-on-fibre} for $\mathcal{F} = \mathcal{O}_X$. Pick $d \geq d_0$ so that we can find $r \geq 0$ and sections $s_{y, 0}, \ldots, s_{y, r} \in H^0(X_y, \mathcal{L}_y^{\otimes d})$ which define a closed immersion $$ \varphi_y = \varphi_{\mathcal{L}_y^{\otimes d}, (s_{y, 0}, \ldots, s_{y, r})} : X_y \to \mathbf{P}^r_{\kappa(y)}. $$ This is possible by Morphisms, Lemma \ref{morphisms-lemma-finite-type-over-affine-ample-very-ample} but we also use Morphisms, Lemma \ref{morphisms-lemma-image-proper-scheme-closed} to see that $\varphi_y$ is a closed immersion and Constructions, Section \ref{constructions-section-projective-space} for the description of morphisms into projective space in terms of invertible sheaves and sections. By our choice of $d_0$, after replacing $Y$ by an open neighbourhood of $y$, we can choose $s_0, \ldots, s_r \in H^0(X, \mathcal{L}^{\otimes d})$ mapping to $s_{y, 0}, \ldots, s_{y, r}$. Let $X_{s_i} \subset X$ be the open subspace where $s_i$ is a generator of $\mathcal{L}^{\otimes d}$. Since the $s_{y, i}$ generate $\mathcal{L}_y^{\otimes d}$ we see that $|X_y| \subset U = \bigcup |X_{s_i}|$. Since $X \to Y$ is closed, we see that there is an open neighbourhood $y \in V \subset Y$ such that $|f|^{-1}(V) \subset U$. After replacing $Y$ by $V$ we may assume that the $s_i$ generate $\mathcal{L}^{\otimes d}$. Thus we obtain a morphism $$ \varphi = \varphi_{\mathcal{L}^{\otimes d}, (s_0, \ldots, s_r)} : X \longrightarrow \mathbf{P}^r_Y $$ with $\mathcal{L}^{\otimes d} \cong \varphi^*\mathcal{O}_{\mathbf{P}^r_Y}(1)$ whose base change to $y$ gives $\varphi_y$ (strictly speaking we need to write out a proof that the construction of morphisms into projective space given in Constructions, Section \ref{constructions-section-projective-space} also works to describe morphisms of algebraic spaces into projective space; we omit the details). \medskip\noindent We will finish the proof by a sleight of hand; the ``correct'' proof proceeds by directly showing that $\varphi$ is a closed immersion after base changing to an open neighbourhood of $y$. Namely, by Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-proper-finite-fibre-finite-in-neighbourhood} we see that $\varphi$ is a finite over an open neighbourhood of the fibre $\mathbf{P}^r_{\kappa(y)}$ of $\mathbf{P}^r_Y \to Y$ above $y$. Using that $\mathbf{P}^r_Y \to Y$ is closed, after shrinking $Y$ we may assume that $\varphi$ is finite. In particular $X$ is a scheme. Then $\mathcal{L}^{\otimes d} \cong \varphi^*\mathcal{O}_{\mathbf{P}^r_Y}(1)$ is ample by the very general Morphisms, Lemma \ref{morphisms-lemma-pullback-ample-tensor-relatively-ample}.
The morphism $\pi$ is separated by Lemma \ref{lemma-relative-proj-separated}. As $\pi$ is quasi-compact, $\pi_*$ transforms quasi-coherent modules into quasi-coherent modules, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}. Hence $\mathcal{I}$ is a quasi-coherent $\mathcal{O}_X$-module. In particular, $\mathcal{B} = \mathcal{A}/\mathcal{I}$ is a quasi-coherent graded $\mathcal{O}_X$-algebra. The functoriality morphism $Z' = \underline{\text{Proj}}_X(\mathcal{B}) \to \underline{\text{Proj}}_X(\mathcal{A})$ is everywhere defined and a closed immersion, see Lemma \ref{lemma-surjective-graded-rings-map-relative-proj}. Hence it suffices to prove $Z = Z'$ as closed subspaces of $P$. \medskip\noindent Having said this, the question is \'etale local on the base and we reduce to the case of schemes (Divisors, Lemma \ref{divisors-lemma-closed-subscheme-proj}) by \'etale localization.
The reader can redo the arguments used in the case of schemes. However, we will show the lemma follows from the case of schemes by a trick. Let $\mathcal{I} \subset \mathcal{A}$ be the quasi-coherent graded ideal cutting out $Z$ of Lemma \ref{lemma-closed-subscheme-proj}. Choose an affine scheme $U$ and a surjective \'etale morphism $U \to X$, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}. By the case of schemes (Divisors, Lemma \ref{divisors-lemma-closed-subscheme-proj-finite}) there exists a $d > 0$ and a quasi-coherent finite type $\mathcal{O}_U$-submodule $\mathcal{F}' \subset \mathcal{I}_d|_U \subset \mathcal{A}_d|_U$ such that $Z \times_X U$ is equal to $\underline{\text{Proj}}_U(\mathcal{A}|_U/\mathcal{F}'\mathcal{A}|_U)$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-directed-colimit-finite-type} we can find a finite type quasi-coherent submodule $\mathcal{F} \subset \mathcal{I}_d$ such that $\mathcal{F}' \subset \mathcal{F}|_U$. Let $Z' = \underline{\text{Proj}}_X(\mathcal{A}/\mathcal{F}\mathcal{A})$. Then $Z' \to P$ is a closed immersion (Lemma \ref{lemma-surjective-generated-degree-1-map-relative-proj}) and $Z \subset Z'$ as $\mathcal{F}\mathcal{A} \subset \mathcal{I}$. On the other hand, $Z' \times_X U \subset Z \times_X U$ by our choice of $\mathcal{F}$. Thus $Z = Z'$ as desired.
We use the same trick as in the proof of Lemma \ref{lemma-closed-subscheme-proj-finite} to reduce to the case of schemes. Let $\mathcal{I} \subset \mathcal{A}$ be the quasi-coherent graded ideal cutting out $Z$ of Lemma \ref{lemma-closed-subscheme-proj}. Choose an affine scheme $W$ and a surjective \'etale morphism $W \to X$, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}. By the case of schemes (Divisors, Lemma \ref{divisors-lemma-closed-subscheme-proj-finite-type}) there exists a $d > 0$ and a quasi-coherent finite type $\mathcal{O}_W$-submodule $\mathcal{F}' \subset \mathcal{I}_d|_W \subset \mathcal{A}_d|_W$ such that (a) $Z \times_X W$ is equal to $\underline{\text{Proj}}_W(\mathcal{A}|_W/\mathcal{F}'\mathcal{A}|_W)$ and (b) the support of $\mathcal{A}_d|_W/\mathcal{F}'$ is disjoint from $U \times_X W$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-directed-colimit-finite-type} we can find a finite type quasi-coherent submodule $\mathcal{F} \subset \mathcal{I}_d$ such that $\mathcal{F}' \subset \mathcal{F}|_W$. Let $Z' = \underline{\text{Proj}}_X(\mathcal{A}/\mathcal{F}\mathcal{A})$. Then $Z' \to P$ is a closed immersion (Lemma \ref{lemma-surjective-generated-degree-1-map-relative-proj}) and $Z \subset Z'$ as $\mathcal{F}\mathcal{A} \subset \mathcal{I}$. On the other hand, $Z' \times_X W \subset Z \times_X W$ by our choice of $\mathcal{F}$. Thus $Z = Z'$. Finally, we see that $\mathcal{A}_d/\mathcal{F}$ is supported on $X \setminus U$ as $\mathcal{A}_d|_W/\mathcal{F}|_W$ is a quotient of $\mathcal{A}_d|_W/\mathcal{F}'$ which is supported on $W \setminus U \times_X W$. Thus the lemma follows.
Note that the restriction $\mathcal{I}|_U$ is equal to the pullback of $\mathcal{I}$ via the morphism $U \to X$, see Properties of Spaces, Section \ref{spaces-properties-section-modules}. Thus the lemma follows on combining Lemma \ref{lemma-relative-proj} with Divisors, Lemma \ref{divisors-lemma-blowing-up-affine}.
Let $\mathcal{I}_2$ be the ideal sheaf of $Z_2$ in $X_2$. Denote $g : X_1 \to X_2$ the given morphism. Then the ideal sheaf $\mathcal{I}_1$ of $Z_1$ is the image of $g^*\mathcal{I}_2 \to \mathcal{O}_{X_1}$ (see Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-inverse-image-closed-subspace} and discussion following the definition). By Lemma \ref{lemma-relative-proj-base-change} we see that $X_1 \times_{X_2} X_2'$ is the relative Proj of $\bigoplus_{n \geq 0} g^*\mathcal{I}_2^n$. Because $g$ is flat the map $g^*\mathcal{I}_2^n \to \mathcal{O}_{X_1}$ is injective with image $\mathcal{I}_1^n$. Thus we see that $X_1 \times_{X_2} X_2' = X_1'$.
Let $U$ be a scheme and let $U \to X$ be a surjective \'etale morphism. As blowing up commutes with flat base change (Lemma \ref{lemma-flat-base-change-blowing-up}) we can prove each of these statements after base change to $U$. This reduces us to the case of schemes. In this case the result is Divisors, Lemma \ref{divisors-lemma-blowing-up-gives-effective-Cartier-divisor}.
We see that $b : X' \to X$ is an object of $\mathcal{C}$ according to Lemma \ref{lemma-blowing-up-gives-effective-Cartier-divisor}. Let $f : Y \to X$ be an object of $\mathcal{C}$. We have to show there exists a unique morphism $Y \to X'$ over $X$. Let $D = f^{-1}(Z)$. Let $\mathcal{I} \subset \mathcal{O}_X$ be the ideal sheaf of $Z$ and let $\mathcal{I}_D$ be the ideal sheaf of $D$. Then $f^*\mathcal{I} \to \mathcal{I}_D$ is a surjection to an invertible $\mathcal{O}_Y$-module. This extends to a map $\psi : \bigoplus f^*\mathcal{I}^d \to \bigoplus \mathcal{I}_D^d$ of graded $\mathcal{O}_Y$-algebras. (We observe that $\mathcal{I}_D^d = \mathcal{I}_D^{\otimes d}$ as $D$ is an effective Cartier divisor.) By Lemma \ref{lemma-relative-proj-generated-in-degree-1}. the triple $(f : Y \to X, \mathcal{I}_D, \psi)$ defines a morphism $Y \to X'$ over $X$. The restriction $$ Y \setminus D \longrightarrow X' \setminus b^{-1}(Z) = X \setminus Z $$ is unique. The open $Y \setminus D$ is scheme theoretically dense in $Y$ according to Lemma \ref{lemma-complement-effective-Cartier-divisor}.  Thus the morphism $Y \to X'$ is unique by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-equality-of-morphisms} (also $b$ is separated by Lemma \ref{lemma-relative-proj-separated}).