hcju/stacksqa huggingface dataset:
Choose a scheme $W$ and a surjective smooth morphism $W \to \mathcal{X}$. Choose an extension of fields $k \subset k'$ and a morphism $w : \Spec(k') \to W$ such that $\Spec(k') \to W \to \mathcal{X}$ is $2$-isomorphic to $\Spec(k') \to \Spec(k) \to \mathcal{X}$. This is possible as $W \to \mathcal{X}$ is surjective. Consider the commutative diagram $$ \xymatrix{ U \ar[d] & U \times_\mathcal{X} W \ar[l]^-{\text{pr}_0} \ar[d] & F' \ar[l]^-{p'} \ar[d] \\ \mathcal{X} & W \ar[l] & \Spec(k') \ar[l] } $$ both of whose squares are cartesian. By our choice of $w$ we see that $F' = F \times_{\Spec(k)} \Spec(k')$. Thus $F' \to F$ is surjective and we can choose a point $z' \in |F'|$ mapping to $z$. Since $F' \to F$ is flat we see that $\mathcal{O}_{F, \overline{z}} \to \mathcal{O}_{F', \overline{z}'}$ is flat, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings}. Hence $f_1, \ldots, f_r$ map to a regular sequence in $\mathcal{O}_{F', \overline{z}'}$, see Algebra, Lemma \ref{algebra-lemma-flat-increases-depth}. Note that $U \times_\mathcal{X} W \to W$ is a morphism of algebraic spaces which is flat and locally of finite presentation. Hence by More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-slice} we see that there exists an open subspace $U'$ of $U \times_\mathcal{X} W$ containing $p(z')$ such that the intersection $U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W)$ is flat and locally of finite presentation over $W$. Note that $\text{pr}_0(U')$ is an open subspace of $U$ containing $p(z)$ as $\text{pr}_0$ is smooth hence open. Now we see that $U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W) \to \mathcal{X}$ is flat and locally of finite presentation as the composition $$ U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W) \to W \to \mathcal{X}. $$ Hence Properties of Stacks, Lemma \ref{stacks-properties-lemma-check-property-after-precomposing} implies $\text{pr}_0(U') \cap V(f_1, \ldots, f_r) \to \mathcal{X}$ is flat and locally of finite presentation as desired.
Since $f : U \to \mathcal{X}$ is locally of finite type there exists a maximal open $W(f) \subset U$ such that the restriction $f|_{W(f)} : W(f) \to \mathcal{X}$ is locally quasi-finite, see Properties of Stacks, Remark \ref{stacks-properties-remark-local-source-apply} (\ref{stacks-properties-item-loc-quasi-finite}). Hence all we need to do is prove that $p(z)$ is a point of $W(f)$. Moreover, the remark referenced above also shows the formation of $W(f)$ commutes with arbitrary base change by a morphism which is representable by algebraic spaces. Hence it suffices to show that the morphism $F \to \Spec(k)$ is locally quasi-finite at $z$. This follows immediately from Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0}.
Since $f : U \to \mathcal{X}$ is flat and locally of finite presentation there exists a maximal open $W(f) \subset U$ such that the restriction $f|_{W(f)} : W(f) \to \mathcal{X}$ is \'etale, see Properties of Stacks, Remark \ref{stacks-properties-remark-local-source-apply} (\ref{stacks-properties-item-etale}). Hence all we need to do is prove that $p(z)$ is a point of $W(f)$. Moreover, the remark referenced above also shows the formation of $W(f)$ commutes with arbitrary base change by a morphism which is representable by algebraic spaces. Hence it suffices to show that the morphism $F \to \Spec(k)$ is \'etale at $z$. Since it is flat and locally of finite presentation as a base change of $U \to \mathcal{X}$ and since $F \to \Spec(k)$ is unramified at $z$ by assumption, this follows from Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-unramified-flat-lfp-etale}.
Proof of (1). As $f$ is DM we see that the base change $\mathcal{X} \times_\mathcal{Y} \mathcal{Z} \to \mathcal{Z}$ is DM by Lemma \ref{lemma-base-change-separated}. Since $\mathcal{Z}$ is DM this implies that $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$ is DM by Lemma \ref{lemma-separated-over-separated}. Hence there exists a scheme $U$ and a surjective \'etale morphism $U \to \mathcal{X} \times_\mathcal{Y} \mathcal{Z}$, see Theorem \ref{theorem-DM}. Part (2) is a special case of (1) since an algebraic space (when viewed as an algebraic stack) is DM by Lemma \ref{lemma-trivial-implications}.
All we are really saying here is that if $\mathcal{U} \subset \mathcal{X}$ and $\mathcal{V} \subset \mathcal{X}$ are open substacks which are DM, then the open substack $\mathcal{W} \subset \mathcal{X}$ with $|\mathcal{W}| = |\mathcal{U}| \cup |\mathcal{V}|$ is DM as well. (Similarly for quasi-DM.) Although this is a cheat, let us use Theorem \ref{theorem-DM} to prove this. By that theorem we can choose schemes $U$ and $V$ and surjective \'etale morphisms $U \to \mathcal{U}$ and $V \to \mathcal{V}$. Then of course $U \amalg V \to \mathcal{W}$ is surjective and \'etale. The quasi-DM case is proven by exactly the same method using Theorem \ref{theorem-quasi-DM}.
Proof of (2). Choose a scheme $U$ and a surjective smooth morphism $U \to \mathcal{X}$. Consider the fibre product $$ \xymatrix{ G \ar[r] \ar[d] & \mathcal{I}_\mathcal{X} \ar[d] \\ U \ar[r] & \mathcal{X} } $$ Recall that $G$ is the automorphism group algebraic space of $U \to \mathcal{X}$. By Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-open-over-which-unramified-or-lqf} there is a maximal open subscheme $U' \subset U$ such that $G_{U'} \to U'$ is locally quasi-finite. Moreover, formation of $U'$ commutes with arbitrary base change. In particular the two inverse images of $U'$ in $R = U \times_\mathcal{X} U$ are the same open subspace of $R$ (since after all the two maps $R \to \mathcal{X}$ are isomorphic and hence have isomorphic automorphism group spaces). Hence $U'$ is the inverse image of an open substack $\mathcal{X}' \subset \mathcal{X}$ by Properties of Stacks, Lemma \ref{stacks-properties-lemma-substacks-presentation} and we have a cartesian diagram $$ \xymatrix{ G_{U'} \ar[r] \ar[d] & \mathcal{I}_{\mathcal{X}'} \ar[d] \\ U' \ar[r] & \mathcal{X}' } $$ Thus the morphism $\mathcal{I}_{\mathcal{X}'} \to \mathcal{X}'$ is locally quasi-finite and we conclude that $\mathcal{X}'$ is quasi-DM by Lemma \ref{lemma-diagonal-diagonal} part (5). On the other hand, if $\mathcal{W} \subset \mathcal{X}$ is an open substack which is quasi-DM, then the inverse image $W \subset U$ of $\mathcal{W}$ must be contained in $U'$ by our construction of $U'$ since $\mathcal{I}_\mathcal{W} = \mathcal{W} \times_\mathcal{X} \mathcal{I}_\mathcal{X}$ is locally quasi-finite over $\mathcal{W}$. Thus $\mathcal{X}'$ is the quasi-DM locus. Finally, choose a field extension $K/k$ and a $2$-commutative diagram $$ \xymatrix{ \Spec(K) \ar[r] \ar[d] & \Spec(k) \ar[d]^x \\ U \ar[r] & \mathcal{X} } $$ Then we find an isomorphism $G_x \times_{\Spec(k)} \Spec(K) \cong G \times_U \Spec(K)$ of group algebraic spaces over $K$. Hence $G_x$ is locally quasi-finite over $k$ if and only if $\Spec(K) \to U$ maps into $U'$ (use the commutation of formation of $U'$ and Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-open-over-which-unramified-or-lqf} applied to $\Spec(K) \to \Spec(k)$ and $G_x$ to see this). This finishes the proof of (2). The proof of (1) is exactly the same.
Assume (1). In this case the morphism of algebraic spaces $\mathcal{X}_k \to \Spec(k)$ is locally quasi-finite as a base change of $f$. Hence $|\mathcal{X}_k|$ is discrete by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}. Conversely, assume (2). Pick a surjective smooth morphism $V \to \mathcal{Y}$ where $V$ is a scheme. It suffices to show that the morphism of algebraic spaces $V \times_\mathcal{Y} \mathcal{X} \to V$ is locally quasi-finite, see Properties of Stacks, Lemma \ref{stacks-properties-lemma-check-property-covering}. The morphism $V \times_\mathcal{Y} \mathcal{X} \to V$ is locally of finite type by assumption. For any morphism $\Spec(k) \to V$ where $k$ is a field $$ \Spec(k) \times_V (V \times_\mathcal{Y} \mathcal{X}) = \Spec(k) \times_\mathcal{Y} \mathcal{X} $$ has a discrete space of points by assumption. Hence we conclude that $V \times_\mathcal{Y} \mathcal{X} \to V$ is locally quasi-finite by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}.
By Lemma \ref{lemma-composition-finite-type} we see that $V \to \Spec(k)$ is locally of finite type. Assume, to get a contradiction, that $V \to \Spec(k)$ is not locally quasi-finite. Then there exists a nontrivial specialization $v \leadsto v'$ of points of $V$, see Morphisms, Lemma \ref{morphisms-lemma-quasi-finite-at-point-characterize}. In particular $\text{trdeg}_k(\kappa(v)) > \text{trdeg}_k(\kappa(v'))$, see Morphisms, Lemma \ref{morphisms-lemma-dimension-fibre-specialization}. Because $|\mathcal{X}|$ is discrete we see that $|f|(v) = |f|(v')$. Consider $R = V \times_\mathcal{X} V$. Then $R$ is an algebraic space and the projections $s, t : R \to V$ are locally quasi-finite as base changes of $V \to \mathcal{X}$ (which is representable by algebraic spaces so this follows from the discussion in Properties of Stacks, Section \ref{stacks-properties-section-properties-morphisms}). By Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian} we see that there exists an $r \in |R|$ such that $s(r) = v$ and $t(r) = v'$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-compare-tr-deg} we see that the transcendence degree of $v/k$ is equal to the transcendence degree of $r/k$ is equal to the transcendence degree of $v'/k$. This contradiction proves the lemma.
We have seen this for quasi-DM morphisms in Lemma \ref{lemma-composition-separated} and for locally finite type morphisms in Lemma \ref{lemma-composition-finite-type}. Let $\mathcal{X} \to \mathcal{Y}$ and $\mathcal{Y} \to \mathcal{Z}$ be locally quasi-finite. Let $k$ be a field and let $\Spec(k) \to \mathcal{Z}$ be a morphism. It suffices to show that $|\mathcal{X}_k|$ is discrete. By Lemma \ref{lemma-base-change-locally-quasi-finite} the morphisms $\mathcal{X}_k \to \mathcal{Y}_k$ and $\mathcal{Y}_k \to \Spec(k)$ are locally quasi-finite. In particular we see that $\mathcal{Y}_k$ is a quasi-DM algebraic stack, see Lemma \ref{lemma-separated-implies-morphism-separated}. By Theorem \ref{theorem-quasi-DM} we can find a scheme $V$ and a surjective, flat, locally finitely presented, locally quasi-finite morphism $V \to \mathcal{Y}_k$. By Lemma \ref{lemma-locally-quasi-finite-over-field} we see that $V$ is locally quasi-finite over $k$, in particular $|V|$ is discrete. The morphism $V \times_{\mathcal{Y}_k} \mathcal{X}_k \to \mathcal{X}_k$ is surjective, flat, and locally of finite presentation hence $|V \times_{\mathcal{Y}_k} \mathcal{X}_k| \to |\mathcal{X}_k|$ is surjective and open. Thus it suffices to show that $|V \times_{\mathcal{Y}_k} \mathcal{X}_k|$ is discrete. Note that $V$ is a disjoint union of spectra of Artinian local $k$-algebras $A_i$ with residue fields $k_i$, see Varieties, Lemma \ref{varieties-lemma-algebraic-scheme-dim-0}. Thus it suffices to show that each $$ |\Spec(A_i) \times_{\mathcal{Y}_k} \mathcal{X}_k| = |\Spec(k_i) \times_{\mathcal{Y}_k} \mathcal{X}_k| = |\Spec(k_i) \times_\mathcal{Y} \mathcal{X}| $$ is discrete, which follows from the assumption that $\mathcal{X} \to \mathcal{Y}$ is locally quasi-finite.
The implication (2) $\Rightarrow$ (3) is immediate. \medskip\noindent Assume (1) and let $V \to \mathcal{Y}$ be as in (2). Then $\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM, see Lemma \ref{lemma-base-change-separated}. By Lemma \ref{lemma-trivial-implications} the algebraic space $V$ is DM, hence quasi-DM. Thus $\mathcal{X} \times_\mathcal{Y} V$ is quasi-DM by Lemma \ref{lemma-separated-over-separated}. Hence we may apply Theorem \ref{theorem-quasi-DM} to get the morphism $U \to \mathcal{X} \times_\mathcal{Y} V$ as in (2). \medskip\noindent Assume (3). Let $V \to \mathcal{Y}$ and $U \to \mathcal{X} \times_\mathcal{Y} V$ be as in (3). To prove that $f$ is quasi-DM it suffices to show that $\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM, see Lemma \ref{lemma-check-separated-covering}. By Lemma \ref{lemma-properties-covering-imply-diagonal} we see that $\mathcal{X} \times_\mathcal{Y} V$ is quasi-DM. Hence $\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM by Lemma \ref{lemma-separated-implies-morphism-separated} and (1) holds. This finishes the proof of the lemma.
Assume (1). Then $f$ is quasi-DM by assumption. Let $V \to \mathcal{Y}$ and $U \to \mathcal{X} \times_\mathcal{Y} V$ be as in (2). By Lemma \ref{lemma-composition-locally-quasi-finite} the composition $U \to \mathcal{X} \times_\mathcal{Y} V \to V$ is locally quasi-finite. Thus (1) implies (2). \medskip\noindent Assume (2). Let $V \to \mathcal{Y}$ be as in (3). By Lemma \ref{lemma-characterize-quasi-DM} we can find an algebraic space $U$ and a surjective, flat, locally finitely presented, locally quasi-finite morphism $U \to \mathcal{X} \times_\mathcal{Y} V$. By (2) the composition $U \to V$ is locally quasi-finite. Thus (2) implies (3). \medskip\noindent It is immediate that (3) implies (4). \medskip\noindent Assume (4). We will prove (1) holds, which finishes the proof. By Lemma \ref{lemma-characterize-quasi-DM} we see that $f$ is quasi-DM. To prove that $f$ is locally of finite type it suffices to prove that $g : \mathcal{X} \times_\mathcal{Y} V \to V$ is locally of finite type, see Lemma \ref{lemma-check-finite-type-covering}. Then it suffices to check that $g$ precomposed with $h : U \to \mathcal{X} \times_\mathcal{Y} V$ is locally of finite type, see Lemma \ref{lemma-check-finite-type-precompose}. Since $g \circ h : U \to V$ was assumed to be locally quasi-finite this holds, hence $f$ is locally of finite type. Finally, let $k$ be a field and let $\Spec(k) \to \mathcal{Y}$ be a morphism. Then $V \times_\mathcal{Y} \Spec(k)$ is a nonempty algebraic space which is locally of finite presentation over $k$. Hence we can find a finite extension $k \subset k'$ and a morphism $\Spec(k') \to V$ such that $$ \xymatrix{ \Spec(k') \ar[r] \ar[d] & V \ar[d] \\ \Spec(k) \ar[r] & \mathcal{Y} } $$ commutes (details omitted). Then $\mathcal{X}_{k'} \to \mathcal{X}_k$ is representable (by schemes), surjective, and finite locally free. In particular $|\mathcal{X}_{k'}| \to |\mathcal{X}_k|$ is surjective and open. Thus it suffices to prove that $|\mathcal{X}_{k'}|$ is discrete. Since $$ U \times_V \Spec(k') = U \times_{\mathcal{X} \times_\mathcal{Y} V} \mathcal{X}_{k'} $$ we see that $U \times_V \Spec(k') \to \mathcal{X}_{k'}$ is surjective, flat, and locally of finite presentation (as a base change of $U \to \mathcal{X} \times_\mathcal{Y} V$). Hence $|U \times_V \Spec(k')| \to |\mathcal{X}_{k'}|$ is surjective and open. Thus it suffices to show that $|U \times_V \Spec(k')|$ is discrete. This follows from the fact that $U \to V$ is locally quasi-finite (either by our definition above or from the original definition for morphisms of algebraic spaces, via Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}).
Write $\mathcal{X} \to \mathcal{Y}$ as the composition $$ \mathcal{X} \longrightarrow \mathcal{X} \times_\mathcal{Z} \mathcal{Y} \longrightarrow \mathcal{Y} $$ The second arrow is locally quasi-finite as a base change of $\mathcal{X} \to \mathcal{Z}$, see Lemma \ref{lemma-base-change-locally-quasi-finite}. The first arrow is locally quasi-finite by Lemma \ref{lemma-semi-diagonal} as $\mathcal{Y} \to \mathcal{Z}$ is quasi-DM. Hence $\mathcal{X} \to \mathcal{Y}$ is locally quasi-finite by Lemma \ref{lemma-composition-locally-quasi-finite}.
Choose an algebraic space $W$ and a surjective smooth morphism $W \to \mathcal{Z}$. Then $W \to \mathcal{Z}$ is surjective and flat (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-smooth-flat}) hence $W \to \mathcal{Y}$ is surjective and flat (by Properties of Stacks, Lemma \ref{stacks-properties-lemma-composition-surjective} and Lemma \ref{lemma-composition-flat}). Since the base change of $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$ by $W \to \mathcal{Z}$ is a flat morphism (Lemma \ref{lemma-base-change-flat}) we may replace $\mathcal{Z}$ by $W$. \medskip\noindent Choose an algebraic space $V$ and a surjective smooth morphism $V \to \mathcal{Y}$. Choose an algebraic space $U$ and a surjective smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$. We have to show that $U \to V$ is flat. Now we base change everything by $W \to \mathcal{Y}$: Set $U' = W \times_\mathcal{Y} U$, $V' = W \times_\mathcal{Y} V$, $\mathcal{X}' = W \times_\mathcal{Y} \mathcal{X}$, and $\mathcal{Y}' = W \times_\mathcal{Y} \mathcal{Y} = W$. Then it is still true that $U' \to V' \times_{\mathcal{Y}'} \mathcal{X}'$ is smooth by base change. Hence by our definition of flat morphisms of algebraic stacks and the assumption that $\mathcal{X}' \to \mathcal{Y}'$ is flat, we see that $U' \to V'$ is flat. Then, since $V' \to V$ is surjective as a base change of $W \to \mathcal{Y}$ we see that $U \to V$ is flat by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-module-flat} (2) and we win.
Choose an algebraic space $W$ and a surjective smooth morphism $W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth morphism $V \to W \times_\mathcal{Z} \mathcal{Y}$. Choose an algebraic space $U$ and a surjective smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$. We know that $U \to V$ is flat and that $U \to W$ is flat. Also, as $\mathcal{X} \to \mathcal{Y}$ is surjective we see that $U \to V$ is surjective (as a composition of surjective morphisms). Hence the lemma reduces to the case of morphisms of algebraic spaces. The case of morphisms of algebraic spaces is Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence}.
The base change $\mathcal{X}_A \to \Spec(A)$ is flat (Lemma \ref{lemma-base-change-flat}) and the closed point of $\Spec(A)$ is in the image of $|\mathcal{X}_A| \to |\Spec(A)|$ (Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}). Thus we may assume $\mathcal{Y} = \Spec(A)$. Let $U \to \mathcal{X}$ be a surjective smooth morphism where $U$ is a scheme. Then we can apply Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-lift-valuation-ring-through-flat-morphism} to the morphism $U \to \Spec(A)$ to conclude.
Suppose we are given a second diagram $U', V', u', a', b', h'$ as in the lemma. Then we can consider $$ \xymatrix{ U \ar[d] & U \times_\mathcal{X} U' \ar[l] \ar[d] \ar[r] & U' \ar[d] \\ V & V \times_\mathcal{Y} V' \ar[l] \ar[r] & V' } $$ By Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian} there is a point $u'' \in |U \times_\mathcal{X} U'|$ mapping to $u$ and $u'$. If $h$ is flat at $u$, then the base change $U \times_V (V \times_\mathcal{Y} V') \to V \times_\mathcal{Y} V'$ is flat at any point over $u$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-module-flat}. On the other hand, the morphism $$ U \times_\mathcal{X} U' \to U \times_\mathcal{X} (\mathcal{X} \times_\mathcal{Y} V') = U \times_\mathcal{Y} V' = U \times_V (V \times_\mathcal{Y} V') $$ is flat as a base change of $(a', h')$, see Lemma \ref{lemma-base-change-flat}. Composing and using Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-module-flat} we conclude that $U \times_\mathcal{X} U' \to V \times_\mathcal{Y} V'$ is flat at $u''$. Then we can use composition by the flat map $V \times_\mathcal{Y} V' \to V'$ to conclude that $U \times_\mathcal{X} U' \to V'$ is flat at $u''$. Finally, since $U \times_\mathcal{X} U' \to U'$ is flat at $u''$ and $u''$ maps to $u'$ we conclude that $U' \to V'$ is flat at $u'$ by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence}.
Assume $f : \mathcal{X} \to \mathcal{Y}$ locally of finite type and $\mathcal{Y}$ locally Noetherian. This means there exists a diagram as in Lemma \ref{lemma-local-source-target} with $h$ locally of finite type and surjective vertical arrow $a$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-noetherian-finite-type-finite-presentation} $h$ is locally of finite presentation. Hence $\mathcal{X} \to \mathcal{Y}$ is locally of finite presentation by definition. This proves (1). If $f$ is of finite type and quasi-separated then it is also quasi-compact and quasi-separated and (2) follows immediately.
Choose an algebraic space $W$ and a surjective smooth morphism $W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth morphism $V \to \mathcal{Y} \times_\mathcal{Z} W$. Choose an algebraic space $U$ and a surjective smooth morphism $U \to \mathcal{X} \times_\mathcal{Y} V$. The lemma follows upon applying Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-presentation-permanence} to the morphisms $U \to V \to W$.
Note that $\Delta$ is a morphism over $\mathcal{X}$ (via the second projection). If $f$ is locally of finite type, then $\mathcal{X}$ is of finite presentation over $\mathcal{X}$ and $\text{pr}_2 : \mathcal{X} \times_\mathcal{Y} \mathcal{X} \to \mathcal{X}$ is locally of finite type by Lemma \ref{lemma-base-change-finite-type}. Thus the first statement holds by Lemma \ref{lemma-finite-presentation-permanence}. The second statement follows from the first and the definitions (because $f$ being quasi-separated means by definition that $\Delta_f$ is quasi-compact and quasi-separated).
Choose an algebraic space $W$ and a morphism $W \to \mathcal{Z}$ which is surjective, flat, and locally of finite presentation. By Properties of Stacks, Lemma \ref{stacks-properties-lemma-composition-surjective} and Lemmas \ref{lemma-composition-flat} and \ref{lemma-composition-finite-presentation} the composition $W \to \mathcal{Y}$ is also surjective, flat, and locally of finite presentation. Denote $V = W \times_\mathcal{Z} \mathcal{W} = V \times_\mathcal{Y} \mathcal{X}$. By Properties of Stacks, Lemma \ref{stacks-properties-lemma-check-property-covering} we see that $f$ has $\mathcal{P}$ if and only if $V \to W$ does and that $\mathcal{W} \to \mathcal{Z}$ has $\mathcal{P}$ if and only if $V \to W$ does. The lemma follows.
Assume $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$ has $\mathcal{P}$. Choose an algebraic space $W$ and a surjective smooth morphism $W \to \mathcal{Z}$. Observe that $W \times_\mathcal{Z} \mathcal{Z} \times_\mathcal{Y} \mathcal{X} = W \times_\mathcal{Y} \mathcal{X}$. Thus by the very definition of what it means for $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$ to have $\mathcal{P}$ (see Definition \ref{definition-P} and Lemma \ref{lemma-local-source-target}) we see that $W \times_\mathcal{Y} \mathcal{X} \to W$ has $\mathcal{P}$. On the other hand, $W \to \mathcal{Z}$ is surjective, flat, and locally of finite presentation (Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-smooth-flat} and \ref{spaces-morphisms-lemma-smooth-locally-finite-presentation}) hence $W \to \mathcal{Y}$ is surjective, flat, and locally of finite presentation (by Properties of Stacks, Lemma \ref{stacks-properties-lemma-composition-surjective} and Lemmas \ref{lemma-composition-flat} and \ref{lemma-composition-finite-presentation}). Thus we may replace $\mathcal{Z}$ by $W$. \medskip\noindent Choose an algebraic space $V$ and a surjective smooth morphism $V \to \mathcal{Y}$. Choose an algebraic space $U$ and a surjective smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$. We have to show that $U \to V$ has $\mathcal{P}$. Now we base change everything by $W \to \mathcal{Y}$: Set $U' = W \times_\mathcal{Y} U$, $V' = W \times_\mathcal{Y} V$, $\mathcal{X}' = W \times_\mathcal{Y} \mathcal{X}$, and $\mathcal{Y}' = W \times_\mathcal{Y} \mathcal{Y} = W$. Then it is still true that $U' \to V' \times_{\mathcal{Y}'} \mathcal{X}'$ is smooth by base change. Hence by Lemma \ref{lemma-local-source-target} used in the definition of $\mathcal{X}' \to \mathcal{Y}' = W$ having $\mathcal{P}$ we see that $U' \to V'$ has $\mathcal{P}$. Then, since $V' \to V$ is surjective, flat, and locally of finite presentation as a base change of $W \to \mathcal{Y}$ we see that $U \to V$ has $\mathcal{P}$ as $\mathcal{P}$ is local in the fppf topology on the target.