**Proof.**
The implication (1) $\Rightarrow $ (3) is Lemma 10.135.8. The implication (2) $\Rightarrow $ (1) is Lemma 10.136.13. It remains to show that (3) implies (2).

Assume (3). After replacing $S$ by $S_ g$ for some $g \in S$, $g\not\in \mathfrak q$ we may assume $S$ is finitely presented over $R$. Choose a presentation $S = R[x_1, \ldots , x_ n]/I$. Let $\mathfrak q' \subset R[x_1, \ldots , x_ n]$ be the prime corresponding to $\mathfrak q$. Write $\kappa (\mathfrak p) = k$. Note that $S \otimes _ R k = k[x_1, \ldots , x_ n]/\overline{I}$ where $\overline{I} \subset k[x_1, \ldots , x_ n]$ is the ideal generated by the image of $I$. Let $\overline{\mathfrak q}' \subset k[x_1, \ldots , x_ n]$ be the prime ideal generated by the image of $\mathfrak q'$. By Lemma 10.135.8 the equivalent conditions of Lemma 10.135.4 hold for $\overline{I}$ and $\overline{\mathfrak q}'$. Say the dimension of $\overline{I}_{\overline{\mathfrak q}'}/ \overline{\mathfrak q}'\overline{I}_{\overline{\mathfrak q}'}$ over $\kappa (\overline{\mathfrak q}')$ is $c$. Pick $f_1, \ldots , f_ c \in I$ mapping to a basis of this vector space. The images $\overline{f}_ j \in \overline{I}$ generate $\overline{I}_{\overline{\mathfrak q}'}$ (by Lemma 10.135.4). Set $S' = R[x_1, \ldots , x_ n]/(f_1, \ldots , f_ c)$. Let $J$ be the kernel of the surjection $S' \to S$. Since $S$ is of finite presentation $J$ is a finitely generated ideal (Lemma 10.6.2). Consider the short exact sequence

\[ 0 \to J \to S' \to S \to 0 \]

As $S_\mathfrak q$ is flat over $R$ we see that $J_{\mathfrak q'} \otimes _ R k \to S'_{\mathfrak q'} \otimes _ R k$ is injective (Lemma 10.39.12). However, by construction $S'_{\mathfrak q'} \otimes _ R k$ maps isomorphically to $S_\mathfrak q \otimes _ R k$. Hence we conclude that $J_{\mathfrak q'} \otimes _ R k = J_{\mathfrak q'}/\mathfrak pJ_{\mathfrak q'} = 0$. By Nakayama's lemma (Lemma 10.20.1) we conclude that there exists a $g \in R[x_1, \ldots , x_ n]$, $g \not\in \mathfrak q'$ such that $J_ g = 0$. In other words $S'_ g \cong S_ g$. After further localizing we see that $S'$ (and hence $S$) becomes a relative global complete intersection by Lemma 10.136.10 as desired.
$\square$

## Comments (1)

Comment #6685 by WhatJiaranEatsTonight on

There are also: