hcju/stacksqa huggingface dataset:
Consider the graded ring $S = R/I \oplus I/I^2 \oplus I^2/I^3 \oplus \ldots = \bigoplus_{d \geq 0} I^d/I^{d + 1}$. Consider the graded $S$-module $N = M/IM \oplus IM/I^2M \oplus \ldots = \bigoplus_{d \geq 0} I^dM/I^{d + 1}M$. This pair $(S, N)$ satisfies the hypotheses of Proposition \ref{proposition-graded-hilbert-polynomial}. Hence the result for $\varphi_{I, M}$ follows from that proposition and Lemma \ref{lemma-length-K0}. The result for $\chi_{I, M}$ follows from this and Lemma \ref{lemma-numerical-polynomial}.
This proof is really just the same as the proof of Lemma \ref{lemma-height-1}. We will prove the proposition by induction on $d$. By Lemmas \ref{lemma-dimension-0-d-0} and \ref{lemma-height-1} we may assume that $d > 1$. Denote the minimal number of generators for an ideal of definition of $R$ by $d'(R)$. We will prove the inequalities $\dim(R) \geq d'(R) \geq d(R) \geq \dim(R)$, and hence they are all equal. \medskip\noindent First, assume that $\dim(R) = d$. Let $\mathfrak p_i$ be the minimal primes of $R$. According to Lemma \ref{lemma-Noetherian-irreducible-components} there are finitely many. Hence we can find $x \in \mathfrak m$, $x \not \in \mathfrak p_i$, see Lemma \ref{lemma-silly}. Note that every maximal chain of primes starts with some $\mathfrak p_i$, hence the dimension of $R/xR$ is at most $d-1$. By induction there are $x_2, \ldots, x_d$ which generate an ideal of definition in $R/xR$. Hence $R$ has an ideal of definition generated by (at most) $d$ elements. \medskip\noindent Assume $d'(R) = d$. Let $I = (x_1, \ldots, x_d)$ be an ideal of definition. Note that $I^n/I^{n + 1}$ is a quotient of a direct sum of $\binom{d + n - 1}{d - 1}$ copies $R/I$ via multiplication by all degree $n$ monomials in $x_1, \ldots, x_n$. Hence $\text{length}_R(I^n/I^{n + 1})$ is bounded by a polynomial of degree $d-1$. Thus $d(R) \leq d$. \medskip\noindent Assume $d(R) = d$. Consider a chain of primes $\mathfrak p \subset \mathfrak q \subset \mathfrak q_2 \subset \ldots \subset \mathfrak q_e = \mathfrak m$, with all inclusions strict, and $e \geq 2$. Pick some ideal of definition $I \subset R$. We will repeatedly use Lemma \ref{lemma-hilbert-ses-chi}. First of all it implies, via the exact sequence $0 \to \mathfrak p \to R \to R/\mathfrak p \to 0$, that $d(R/\mathfrak p) \leq d$. But it clearly cannot be zero. Pick $x\in \mathfrak q$, $x\not \in \mathfrak p$. Consider the short exact sequence $$ 0 \to R/\mathfrak p \to R/\mathfrak p \to R/(xR + \mathfrak p) \to 0. $$ This implies that $\chi_{I, R/\mathfrak p} - \chi_{I, R/\mathfrak p} - \chi_{I, R/(xR + \mathfrak p)} = - \chi_{I, R/(xR + \mathfrak p)}$ has degree $ < d$. In other words, $d(R/(xR + \mathfrak p)) \leq d - 1$, and hence $\dim(R/(xR + \mathfrak p)) \leq d - 1$, by induction. Now $R/(xR + \mathfrak p)$ has the chain of prime ideals $\mathfrak q/(xR + \mathfrak p) \subset \mathfrak q_2/(xR + \mathfrak p) \subset \ldots \subset \mathfrak q_e/(xR + \mathfrak p)$ which gives $e - 1 \leq d - 1$. Since we started with an arbitrary chain of primes this proves that $\dim(R) \leq d(R)$. \medskip\noindent Reading back the reader will see we proved the circular inequalities as desired.
Choose a filtration as in (3). In Lemma \ref{lemma-filter-minimal-primes-in-support} we have seen that the sets in (1) and (3) are equal. \medskip\noindent Let $\mathfrak p$ be a minimal element of the set $\{\mathfrak p_i\}$. Let $i$ be minimal such that $\mathfrak p = \mathfrak p_i$. Pick $m \in M_i$, $m \not \in M_{i-1}$. The annihilator of $m$ is contained in $\mathfrak p_i = \mathfrak p$ and contains $\mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_i$. By our choice of $i$ and $\mathfrak p$ we have $\mathfrak p_j \not \subset \mathfrak p$ for $j < i$ and hence we have $\mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_{i - 1} \not \subset \mathfrak p_i$. Pick $f \in \mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_{i - 1}$, $f \not \in \mathfrak p$. Then $fm$ has annihilator $\mathfrak p$. In this way we see that $\mathfrak p$ is an associated prime of $M$. By Lemma \ref{lemma-ass-support} we have $\text{Ass}(M) \subset \text{Supp}(M)$ and hence $\mathfrak p$ is minimal in $\text{Ass}(M)$. Thus the set of primes in (1) is contained in the set of primes of (2). \medskip\noindent Let $\mathfrak p$ be a minimal element of $\text{Ass}(M)$. Since $\text{Ass}(M) \subset \text{Supp}(M)$ there is a minimal element $\mathfrak q$ of $\text{Supp}(M)$ with $\mathfrak q \subset \mathfrak p$. We have just shown that $\mathfrak q \in \text{Ass}(M)$. Hence $\mathfrak q = \mathfrak p$ by minimality of $\mathfrak p$. Thus the set of primes in (2) is contained in the set of primes of (1).
First we prove (1) implies (2).  Choose a presentation $R^m \to R^n \to M$ and consider the commutative diagram $$ \xymatrix{ R^m \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d]^{\cong} & R^m \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d]^{\cong} & M \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & 0 \\ \prod_{\alpha} (R^m \otimes_R Q_{\alpha}) \ar[r] & \prod_{\alpha} (R^n \otimes_R Q_{\alpha}) \ar[r] & \prod_{\alpha} (M \otimes_R Q_{\alpha}) \ar[r] & 0. } $$ The first two vertical arrows are isomorphisms and the rows are exact.  This implies that the map $M \otimes_R (\prod_{\alpha} Q_{\alpha}) \to \prod_{\alpha} ( M \otimes_R Q_{\alpha})$ is surjective and, by a diagram chase, also injective.  Hence (2) holds. \medskip\noindent Obviously (2) implies (3) implies (4), so it remains to prove (4) implies (1). From Proposition \ref{proposition-fg-tensor}, if (4) holds we already know that $M$ is finitely generated.  So we can choose a surjection $F \to M$ where $F$ is free and finite.  Let $K$ be the kernel.  We must show $K$ is finitely generated.  For any set $A$, we have a commutative diagram $$ \xymatrix{ & K \otimes_R R^A \ar[r] \ar[d]_{f_3} & F \otimes_R R^A \ar[r] \ar[d]_{f_2}^{\cong} & M \otimes_R R^A \ar[r] \ar[d]_{f_1}^{\cong} & 0 \\ 0 \ar[r] & K^A \ar[r] & F^A \ar[r] & M^A \ar[r] & 0 . } $$ The map $f_1$ is an isomorphism by assumption, the map $f_2$ is a isomorphism since $F$ is free and finite, and the rows are exact.  A diagram chase shows that $f_3$ is surjective, hence by Proposition \ref{proposition-fg-tensor} we get that $K$ is finitely generated.
Assume $R$ coherent, and let $Q_\alpha$, $\alpha \in A$ be a set of flat $R$-modules. We have to show that $I \otimes_R \prod_\alpha Q_\alpha \to \prod Q_\alpha$ is injective for every finitely generated ideal $I$ of $R$, see Lemma \ref{lemma-flat}. Since $R$ is coherent $I$ is an $R$-module of finite presentation. Hence $I \otimes_R \prod_\alpha Q_\alpha = \prod I \otimes_R Q_\alpha$ by Proposition \ref{proposition-fp-tensor}. The desired injectivity follows as $I \otimes_R Q_\alpha \to Q_\alpha$ is injective by flatness of $Q_\alpha$. \medskip\noindent The implication (2) $\Rightarrow$ (3) is trivial. \medskip\noindent Assume that the $R$-module $R^A$ is flat for every set $A$. Let $I$ be a finitely generated ideal in $R$. Then $I \otimes_R R^A \to R^A$ is injective by assumption. By Proposition \ref{proposition-fg-tensor} and the finiteness of $I$ the image is equal to $I^A$. Hence $I \otimes_R R^A = I^A$ for every set $A$ and we conclude that $I$ is finitely presented by Proposition \ref{proposition-fp-tensor}.
Let $Z = \text{Supp}(M) \subset \Spec(R)$. By Lemma \ref{lemma-one-equation} in the chain $Z \supset Z \cap V(g_1) \supset \ldots \supset Z \cap V(g_1, \ldots, g_c)$ each step decreases the dimension at most by $1$. Hence by assumption each step decreases the dimension by exactly $1$ each time. Thus we may successively apply Lemma \ref{lemma-CM-one-g} to the modules $M/(g_1, \ldots, g_i)$ and the element $g_{i + 1}$. \medskip\noindent To extend $g_1, \ldots, g_c$ by one element if $c < d$ we simply choose an element $g_{c + 1} \in \mathfrak m$ which is not in any of the finitely many minimal primes of $Z \cap V(g_1, \ldots, g_c)$, using Lemma \ref{lemma-silly}.
We prove this by induction on $\text{depth}(M)$. The most interesting case is the case $\text{depth}(M) = 0$. In this case, let $$ 0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0} \to M \to 0 $$ be a minimal finite free resolution, so $e = \text{pd}_R(M)$. By Lemma \ref{lemma-add-trivial-complex} we may assume all matrix coefficients of the maps in the complex are contained in the maximal ideal of $R$. Then on the one hand, by Proposition \ref{proposition-what-exact} we see that $\text{depth}(R) \geq e$. On the other hand, breaking the long exact sequence into short exact sequences \begin{align*} 0 \to R^{n_e} \to R^{n_{e - 1}} \to K_{e - 2} \to 0,\\ 0 \to K_{e - 2} \to R^{n_{e - 2}} \to K_{e - 3} \to 0,\\ \ldots,\\ 0 \to K_0 \to R^{n_0} \to M \to 0 \end{align*} we see, using Lemma \ref{lemma-depth-in-ses}, that \begin{align*} \text{depth}(K_{e - 2}) \geq \text{depth}(R) - 1,\\ \text{depth}(K_{e - 3}) \geq \text{depth}(R) - 2,\\ \ldots,\\ \text{depth}(K_0) \geq \text{depth}(R) - (e - 1),\\ \text{depth}(M) \geq \text{depth}(R) - e \end{align*} and since $\text{depth}(M) = 0$ we conclude $\text{depth}(R) \leq e$. This finishes the proof of the case $\text{depth}(M) = 0$. \medskip\noindent Induction step. If $\text{depth}(M) > 0$, then we pick $x \in \mathfrak m$ which is a nonzerodivisor on both $M$ and $R$. This is possible, because either $\text{pd}_R(M) > 0$ and $\text{depth}(R) > 0$ by the aforementioned Proposition \ref{proposition-what-exact} or $\text{pd}_R(M) = 0$ in which case $M$ is finite free hence also $\text{depth}(R) = \text{depth}(M) > 0$. Thus $\text{depth}(R \oplus M) > 0$ by Lemma \ref{lemma-depth-in-ses} (for example) and we can find an $x \in \mathfrak m$ which is a nonzerodivisor on both $R$ and $M$. Let $$ 0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0} \to M \to 0 $$ be a minimal resolution as above. An application of the snake lemma shows that $$ 0 \to (R/xR)^{n_e} \to (R/xR)^{n_{e-1}} \to \ldots \to (R/xR)^{n_0} \to M/xM \to 0 $$ is a minimal resolution too. Thus $\text{pd}_R(M) = \text{pd}_{R/xR}(M/xM)$. By Lemma \ref{lemma-depth-drops-by-one} we have $\text{depth}(R/xR) = \text{depth}(R) - 1$ and $\text{depth}(M/xM) = \text{depth}(M) - 1$. Till now depths have all been depths as $R$ modules, but we observe that $\text{depth}_R(M/xM) = \text{depth}_{R/xR}(M/xM)$ and similarly for $R/xR$. By induction hypothesis we see that the Auslander-Buchsbaum formula holds for $M/xM$ over $R/xR$. Since the depths of both $R/xR$ and $M/xM$ have decreased by one and the projective dimension has not changed we conclude.
It is clear that (1) implies (3) implies (2), see first part of the proof of Lemma \ref{lemma-characterize-formally-smooth}. It is also true that (3) implies (5) implies (4) and that (2) implies (4), see first part of the proof of Lemma \ref{lemma-characterize-formally-smooth-again}. Finally, Lemma \ref{lemma-characterize-formally-smooth-again} applied to the canonical surjection $R[S] \to S$ (\ref{equation-canonical-presentation}) shows that (1) implies (6). \medskip\noindent Assume (4) and let's prove (6). Consider the sequence of Lemma \ref{lemma-exact-sequence-NL} associated to the ring maps $R \to P \to S$. By the implication (1) $\Rightarrow$ (6) proved above we see that $\NL_{P/R} \otimes_R S$ is quasi-isomorphic to $\Omega_{P/R} \otimes_P S$ placed in degree $0$. Hence $H_1(\NL_{P/R} \otimes_P S) = 0$. Since $P \to S$ is surjective we see that $\NL_{S/P}$ is homotopy equivalent to $J/J^2$ placed in degree $1$ (Lemma \ref{lemma-NL-surjection}). Thus we obtain the exact sequence $0 \to H_1(L_{S/R}) \to J/J^2 \to \Omega_{P/R} \otimes_P S \to \Omega_{S/R} \to 0$. By assumption we see that $H_1(L_{S/R}) = 0$ and that $\Omega_{S/R}$ is a projective $S$-module. Thus (6) follows. \medskip\noindent Finally, let's prove that (6) implies (1). The assumption means that the complex $J/J^2 \to \Omega_{P/R} \otimes S$ where $P = R[S]$ and $P \to S$ is the canonical surjection (\ref{equation-canonical-presentation}). Hence Lemma \ref{lemma-characterize-formally-smooth-again} shows that $S$ is formally smooth over $R$.
The Noetherian complete local ring case is Lemma \ref{lemma-Noetherian-complete-local-Nagata}. In the other cases you just check if $R/\mathfrak p$ is N-2 for every prime ideal $\mathfrak p$ of the ring. This is clear whenever $R/\mathfrak p$ is a field, i.e., $\mathfrak p$ is maximal. Hence for the Dedekind ring case we only need to check it when $\mathfrak p = (0)$. But since we assume the fraction field has characteristic zero Lemma \ref{lemma-domain-char-zero-N-1-2} kicks in.
Part (1) is an immediate consequence of Lemma \ref{lemma-stable-reduction} and Semistable Reduction, Theorem \ref{models-theorem-semistable-reduction}. \medskip\noindent Proof of (2). Let $L/K$ be the finite separable extension found in part (3) of Semistable Reduction, Theorem \ref{models-theorem-semistable-reduction}. Let $A \subset L$ be the integral closure of $R$. Recall that $A$ is a Dedekind domain finite over $R$ with finitely many maximal ideals $\mathfrak m_1, \ldots, \mathfrak m_n$, see More on Algebra, Remark \ref{more-algebra-remark-finite-separable-extension}. Set $S = \Spec(A)$, $S_i = \Spec(A_{\mathfrak m_i})$, $U = \Spec(L)$, and $U_i = S_i \setminus \{\mathfrak m_i\}$. Observe that $U \cong U_i$ for $i = 1, \ldots, n$. Set $X = C_L$ viewed as a scheme over the open subscheme $U$ of $S$. By our choice of $L$ and $A$ and Lemma \ref{lemma-stable-reduction} we have a stable families of curves $X_i \to S_i$ and isomorphisms $X \times_U U_i \cong X_i \times_{S_i} U_i$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-glueing-near-multiple-closed-points} we can find a finitely presented morphism $Y \to S$ whose base change to $S_i$ is isomorphic to $X_i$ for $i = 1, \ldots, n$. Alternatively, you can use that $S = \bigcup_{i = 1, \ldots, n} S_i$ is an open covering of $S$ and $S_i \cap S_j = U$ for $i \not = j$ and use $n - 1$ applications of Limits of Spaces, Lemma \ref{spaces-limits-lemma-relative-glueing} to get $Y \to S$ whose base change to $S_i$ is isomorphic to $X_i$ for $i = 1, \ldots, n$. Clearly $Y \to S$ is the stable family of curves we were looking for.
Most of the properties mentioned in the statement have already been shown. Smoothness is Lemma \ref{lemma-stable-curves-smooth}. Deligne-Mumford is Lemma \ref{lemma-stable-curves-deligne-mumford}. Openness of $\mathcal{M}_g$ is Lemma \ref{lemma-smooth-dense-in-stable}. We know that $\overline{\mathcal{M}}_g \to \Spec(\mathbf{Z})$ is separated by Lemma \ref{lemma-stable-separated} and we know that $\overline{\mathcal{M}}_g$ is quasi-compact by Lemma \ref{lemma-stable-quasi-compact}. Thus, to show that $\overline{\mathcal{M}}_g \to \Spec(\mathbf{Z})$ is proper and finish the proof, we may apply More on Morphisms of Stacks, Lemma \ref{stacks-more-morphisms-lemma-refined-valuative-criterion-proper} to the morphisms $\mathcal{M}_g \to \overline{\mathcal{M}}_g$ and $\overline{\mathcal{M}}_g \to \Spec(\mathbf{Z})$. Thus it suffices to check the following: given any $2$-commutative diagram $$ \xymatrix{ \Spec(K) \ar[r] \ar[d]_j & \mathcal{M}_g \ar[r] & \overline{\mathcal{M}}_g \ar[d] \\ \Spec(A) \ar[rr] & & \Spec(\mathbf{Z}) } $$ where $A$ is a discrete valuation ring with field of fractions $K$, there exist an extension $K'/K$ of fields, a valuation ring $A' \subset K'$ dominating $A$ such that the category of dotted arrows for the induced diagram $$ \xymatrix{ \Spec(K') \ar[r] \ar[d]_{j'} & \overline{\mathcal{M}}_g \ar[d] \\ \Spec(A') \ar[r] \ar@{..>}[ru] & \Spec(\mathbf{Z}) } $$ is nonempty (Morphisms of Stacks, Definition \ref{stacks-morphisms-definition-fill-in-diagram}). (Observe that we don't need to worry about $2$-arrows too much, see Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-cat-dotted-arrows-independent}). Unwinding what this means using that $\mathcal{M}_g$, resp.\ $\overline{\mathcal{M}}_g$ are the algebraic stacks parametrizing smooth, resp.\ stable families of genus $g$ curves, we find that what we have to prove is exactly the result contained in the stable reduction theorem, i.e., Theorem \ref{theorem-stable-reduction}.
A family of curves over $T$ is a morphism $f : X \to T$ of algebraic spaces, which is flat, proper, of finite presentation, and has relative dimension $\leq 1$ (Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-relative-dimension}). This is exactly the same as the definition in Quot, Situation \ref{quot-situation-curves} except that $T$ the base is allowed to be an algebraic space. Our default base category for algebraic stacks/spaces is the category of schemes, hence the lemma does not follow immediately from the definitions. Having said this, we encourage the reader to skip the proof. \medskip\noindent By the product description of $B\text{-}\Curvesstack$ given above, it suffices to prove the lemma in the absolute case. Choose a scheme $U$ and a surjective \'etale morphism $p : U \to T$. Let $R = U \times_T U$ with projections $s, t : R \to U$. \medskip\noindent Let $v : T \to \Curvesstack$ be a morphism. Then $v \circ p$ corresponds to a family of curves $X_U \to U$. The canonical $2$-morphism $v \circ p \circ t \to v \circ p \circ s$ is an isomorphism $\varphi : X_U \times_{U, s} R \to X_U \times_{U, t} R$. This isomorphism satisfies the cocycle condition on $R \times_{s, t} R$. By Bootstrap, Lemma \ref{bootstrap-lemma-descend-algebraic-space} we obtain a morphism of algebraic spaces $X \to T$ whose pullback to $U$ is equal to $X_U$ compatible with $\varphi$. Since $\{U \to T\}$ is an \'etale covering, we see that $X \to T$ is flat, proper, of finite presentation by Descent on Spaces, Lemmas \ref{spaces-descent-lemma-descending-property-flat}, \ref{spaces-descent-lemma-descending-property-proper}, and \ref{spaces-descent-lemma-descending-property-finite-presentation}. Also $X \to T$ has relative dimension $\leq 1$ because this is an \'etale local property. Hence $X \to T$ is a family of curves over $T$. \medskip\noindent Conversely, let $X \to T$ be a family of curves. Then the base change $X_U$ determines a morphism $w : U \to \Curvesstack$ and the canonical isomorphism $X_U \times_{U, s} R \to X_U \times_{U, t} R$ determines a $2$-arrow $w \circ s \to w \circ t$ satisfying the cocycle condition. Thus a morphism $v : T = [U/R] \to \Curvesstack$ by the universal property of the quotient $[U/R]$, see Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-2-coequalizer}. (Actually, it is much easier in this case to go back to before we introduced our abuse of language and direct construct the functor $\Sch/T \to \Curvesstack$ which ``is'' the morphsim $T \to \Curvesstack$.) \medskip\noindent We omit the verification that the constructions given above extend to morphisms between objects and are mutually quasi-inverse.
Surjective. Given a field $k$ and a proper algebraic space $X$ over $k$ of dimension $\leq 1$, i.e., an object of $\Curvesstack$ over $k$. By Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-codim-1-point-in-schematic-locus} the algebraic space $X$ is a scheme. Hence $X$ is a proper scheme of dimension $\leq 1$ over $k$. By Varieties, Lemma \ref{varieties-lemma-dim-1-proper-projective} we see that $X$ is H-projective over $\kappa$. In particular, there exists an ample invertible $\mathcal{O}_X$-module $\mathcal{L}$ on $X$. Then $(X, \mathcal{L})$ is an object of $\textit{PolarizedCurves}$ over $k$ which maps to $X$. \medskip\noindent Smooth. Let $X \to S$ be an object of $\Curvesstack$, i.e., a morphism $S \to \Curvesstack$. It is clear that $$ \textit{PolarizedCurves} \times_{\Curvesstack} S \subset \Picardstack_{X/S} $$ is the substack of objects $(T/S, \mathcal{L}/X_T)$ such that $\mathcal{L}$ is ample on $X_T/T$. This is an open substack by Descent on Spaces, Lemma \ref{spaces-descent-lemma-ample-in-neighbourhood}. Since $\Picardstack_{X/S} \to S$ is smooth by Moduli Stacks, Lemma \ref{moduli-lemma-pic-curves-smooth} we win.
This is an immediate corollary of Lemma \ref{lemma-polarized-curves-over-curves}. Namely, unwinding the definitions, this lemma gives there is a surjective smooth morphism $S' \to S$ such that $X' = X \times_S S'$ comes endowed with an invertible $\mathcal{O}_{X'}$-module $\mathcal{L}'$ which is ample on $X'/S'$. Then we can refine the smooth covering $\{S' \to S\}$ by an \'etale covering $\{S_i \to S\}$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-dominates-smooth}. After replacing $S_i$ by a suitable open covering we may assume $X_i \to S_i$ is H-projective, see Morphisms, Lemmas \ref{morphisms-lemma-proper-ample-locally-projective} and \ref{morphisms-lemma-characterize-locally-projective} (this is also discussed in detail in More on Morphisms, Section \ref{more-morphisms-section-projective}).
To check $\Curvesstack \to \Spec(\mathbf{Z})$ is quasi-separated we have to show that its diagonal is quasi-compact and quasi-separated. This is immediate from Lemma \ref{lemma-curves-diagonal-separated-fp}. To prove that $\Curvesstack \to \Spec(\mathbf{Z})$ is locally of finite presentation, it suffices to show that $\Curvesstack$ is limit preserving, see Limits of Stacks, Proposition \ref{stacks-limits-proposition-characterize-locally-finite-presentation}. This is Quot, Lemma \ref{quot-lemma-curves-limits}.
The existence of an open substack with property (1) is Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-open-DM-locus}. The points of this open substack are characterized by (3)(c) by Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-points-DM-locus}. The equivalence of (3)(b) and (3)(c) is the statement that an algebraic space $G$ which is locally of finite type, geometrically reduced, and of dimension $0$ over a field $k$, is unramified over $k$. First, $G$ is a scheme by Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-locally-finite-type-dim-zero}. Then we can take an affine open in $G$ and observe that it will be proper over $k$ and apply Varieties, Lemma \ref{varieties-lemma-proper-geometrically-reduced-global-sections}. Minor details omitted. \medskip\noindent Part (2) is true because (3) holds. Namely, the morphism $\mathit{Aut}_S(X) \to S$ is locally of finite type. Thus we can check whether $\mathit{Aut}_S(X) \to S$ is unramified at all points of $\mathit{Aut}_S(X)$ by checking on fibres at points of the scheme $S$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-where-unramified}. But after base change to a point of $S$ we fall back into the equivalence of (3)(a) and (3)(c).
In the discussion above we have seen that $G = \mathit{Aut}(X)$ is a group scheme over $\Spec(k)$ which is finite type and separated; this uses Lemma \ref{lemma-curves-diagonal-separated-fp} and More on Groupoids in Spaces, Lemma \ref{spaces-more-groupoids-lemma-group-space-scheme-locally-finite-type-over-k}. Then $G$ is unramified over $k$ if and only if $\Omega_{G/k} = 0$ (Morphisms, Lemma \ref{morphisms-lemma-unramified-omega-zero}). By Groupoids, Lemma \ref{groupoids-lemma-group-scheme-module-differentials} the vanishing holds if $T_{G/k, e} = 0$, where $T_{G/k, e}$ is the tangent space to $G$ at the identity element $e \in G(k)$, see Varieties, Definition \ref{varieties-definition-tangent-space} and the formula in Varieties, Lemma \ref{varieties-lemma-tangent-space-cotangent-space}. Since $\kappa(e) = k$ the tangent space is defined in terms of morphisms $\alpha : \Spec(k[\epsilon]) \to G = \mathit{Aut}(X)$ whose restriction to $\Spec(k)$ is $e$. It follows that it suffices to show any automorphism $$ \alpha : X \times_{\Spec(k)} \Spec(k[\epsilon]) \longrightarrow X \times_{\Spec(k)} \Spec(k[\epsilon]) $$ over $\Spec(k[\epsilon])$ whose restriction to $\Spec(k)$ is $\text{id}_X$. Such automorphisms are called infinitesimal automorphisms. \medskip\noindent The infinitesimal automorphisms of $X$ correspond $1$-to-$1$ with derivations of $\mathcal{O}_X$ over $k$. This follows from More on Morphisms, Lemmas \ref{more-morphisms-lemma-difference-derivation} and \ref{more-morphisms-lemma-action-by-derivations} (we only need the first one as we don't care about the reverse direction; also, please look at More on Morphisms, Remark \ref{more-morphisms-remark-another-special-case} for an elucidation). For a different argument proving this equality we refer the reader to Deformation Problems, Lemma \ref{examples-defos-lemma-schemes-TI}.