hcju/stacksqa huggingface dataset:
Let $R_0 \subset R$ be the $\mathbf{Z}$-algebra of $R$ generated by all the coefficients of the polynomials $f_1, \ldots, f_c$. Let $S_0 = R_0[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Clearly, $S = R \otimes_{R_0} S_0$. Pick a prime $\mathfrak q \subset S$ and denote $\mathfrak p \subset R$, $\mathfrak q_0 \subset S_0$, and $\mathfrak p_0 \subset R_0$ the primes it lies over. Because $\dim (S \otimes_R \kappa(\mathfrak p) ) = n - c$ we also have $\dim (S_0 \otimes_{R_0} \kappa(\mathfrak p_0)) = n - c$, see Lemma \ref{lemma-dimension-preserved-field-extension}. By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} there exists a $g \in S_0$, $g \not \in \mathfrak q_0$ such that all nonempty fibres of $R_0 \to (S_0)_g$ have dimension $\leq n - c$. As $\mathfrak q$ was arbitrary and $\Spec(S)$ quasi-compact, we can find finitely many $g_1, \ldots, g_m \in S_0$ such that (a) for $j = 1, \ldots, m$ the nonempty fibres of $R_0 \to (S_0)_{g_j}$ have dimension $\leq n - c$ and (b) the image of $\Spec(S) \to \Spec(S_0)$ is contained in $D(g_1) \cup \ldots \cup D(g_m)$. In other words, the images of $g_1, \ldots, g_m$ in $S = R \otimes_{R_0} S_0$ generate the unit ideal. After increasing $R_0$ we may assume that $g_1, \ldots, g_m$ generate the unit ideal in $S_0$. By (a) the nonempty fibres of $R_0 \to S_0$ all have dimension $\leq n - c$ and we conclude.
First, by Lemma \ref{lemma-regular-quasi-regular}, part (3) follows from part (1). Parts (1) and (2) immediately reduce to the Noetherian case by Lemma \ref{lemma-relative-global-complete-intersection-Noetherian} (some minor details omitted). Assume $R$ is Noetherian. Let $\mathfrak p = R \cap \mathfrak q'$. By Lemma \ref{lemma-lci} for example we see that $f_1, \ldots, f_c$ form a regular sequence in the local ring $R[x_1, \ldots, x_n]_{\mathfrak q'} \otimes_R \kappa(\mathfrak p)$. Moreover, the local ring $R[x_1, \ldots, x_n]_{\mathfrak q'}$ is flat over $R_{\mathfrak p}$. Since $R$, and hence $R[x_1, \ldots, x_n]_{\mathfrak q'}$ is Noetherian we may apply Lemma \ref{lemma-grothendieck-regular-sequence} to conclude.
The implication (1) $\Rightarrow$ (3) is Lemma \ref{lemma-lci-at-prime}. The implication (2) $\Rightarrow$ (1) is Lemma \ref{lemma-relative-global-complete-intersection}. It remains to show that (3) implies (2). \medskip\noindent 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 \ref{lemma-lci-at-prime} the equivalent conditions of Lemma \ref{lemma-lci} 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 \ref{lemma-lci}). 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 \ref{lemma-compose-finite-type}). 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 \ref{lemma-flat-tor-zero}). 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 \ref{lemma-NAK}) 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 \ref{lemma-localize-relative-complete-intersection} as desired.
By Lemma \ref{lemma-syntomic} there exist finitely many elements $g_1, \ldots, g_m \in S$ which generate the unit ideal in $S_g$ such that each $S_{gg_j}$ is a relative global complete intersection over $R$. Since it suffices to prove that $(I/I^2)_{gg_j}$ is finite projective, see Lemma \ref{lemma-finite-projective}, we may assume that $S_g$ is a relative global complete intersection. In this case the result follows from Lemmas \ref{lemma-conormal-module-localize} and \ref{lemma-relative-global-complete-intersection-conormal}.
Assume $R \to S$ and $S \to S'$ are syntomic. This implies that $R \to S'$ is flat by Lemma \ref{lemma-composition-flat}. It also implies that $R \to S'$ is of finite presentation by Lemma \ref{lemma-compose-finite-type}. Thus it suffices to show that the fibres of $R \to S'$ are local complete intersections. Choose a prime $\mathfrak p \subset R$. We have a factorization $$ \kappa(\mathfrak p) \to S \otimes_R \kappa(\mathfrak p) \to S' \otimes_R \kappa(\mathfrak p). $$ By assumption $S \otimes_R \kappa(\mathfrak p)$ is a local complete intersection, and by Lemma \ref{lemma-base-change-syntomic} we see that $S \otimes_R \kappa(\mathfrak p)$ is syntomic over $S \otimes_R \kappa(\mathfrak p)$. After replacing $S$ by $S \otimes_R \kappa(\mathfrak p)$ and $S'$ by $S' \otimes_R \kappa(\mathfrak p)$ we may assume that $R$ is a field. Say $R = k$. \medskip\noindent Choose a prime $\mathfrak q' \subset S'$ lying over the prime $\mathfrak q$ of $S$. Our goal is to find a $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S'_{g'}$ is a global complete intersection over $k$. Choose a $g \in S$, $g \not \in \mathfrak q$ such that $S_g = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a global complete intersection over $k$. Since $S_g \to S'_g$ is still syntomic also, and $g \not \in \mathfrak q'$ we may replace $S$ by $S_g$ and $S'$ by $S'_g$ and assume that $S =  k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a global complete intersection over $k$. Next we choose a $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S' = S[y_1, \ldots, y_m]/(h_1, \ldots, h_d)$ is a relative global complete intersection over $S$. Hence we have reduced to part (2) of the lemma. \medskip\noindent Suppose that $R \to S$ and $S \to S'$ are relative global complete intersections. Say $S =  R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ and $S' = S[y_1, \ldots, y_m]/(h_1, \ldots, h_d)$. Then $$ S' \cong R[x_1, \ldots, x_n, y_1, \ldots, y_m]/(f_1, \ldots, f_c, h'_1, \ldots, h'_d) $$ for some lifts $h_j' \in R[x_1, \ldots, x_n, y_1, \ldots, y_m]$ of the $h_j$. Hence it suffices to bound the dimensions of the fibres. Thus we may yet again assume $R = k$ is a field. In this case we see that we have a ring, namely $S$, which is of finite type over $k$ and equidimensional of dimension $n - c$, and a finite type ring map $S \to S'$ all of whose nonempty fibre rings are equidimensional of dimension $m - d$. Then, by Lemma \ref{lemma-dimension-base-fibre-total} for example applied to localizations at maximal ideals of $S'$, we see that $\dim(S') \leq n - c + m - d$ as desired.
By Lemma \ref{lemma-syntomic} we find a collection of elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{g_i}$ is a relative global complete intersection over $R/I$. Hence we may assume that $\overline{S}$ is a relative global complete intersection. Write $\overline{S} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_c)$ as in Definition \ref{definition-relative-global-complete-intersection}. Choose $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ lifting $\overline{f}_1, \ldots, \overline{f}_c$. Set $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Note that $S/IS \cong \overline{S}$. By Lemma \ref{lemma-localize-relative-complete-intersection} we can find $g \in S$ mapping to $1$ in $\overline{S}$ such that $S_g$ is a relative global complete intersection over $R$. Since $\overline{S} \cong S_g/IS_g$ this finishes the proof.
By Lemma \ref{lemma-localize-NL} the naive cotangent complex for $S_g$ over $R$ is the base change of the naive cotangent complex of $S$ over $R$. The assumption is that the naive cotangent complex of $S/R$ is $\Omega_{S/R}$ and that this is a finite projective $S$-module. Hence so is its base change. Thus $S_g$ is smooth over $R$. \medskip\noindent The second assertion follows in the same way from Lemma \ref{lemma-NL-localize-bottom}.
Let $\alpha : R[x_1, \ldots, x_n] \to S$ be a presentation with kernel $I$. Let $\alpha' : R'[x_1, \ldots, x_n] \to R' \otimes_R S$ be the induced presentation. Let $I' = \Ker(\alpha')$. Since $0 \to I \to R[x_1, \ldots, x_n] \to S \to 0$ is exact, the sequence $R' \otimes_R I \to R'[x_1, \ldots, x_n] \to R' \otimes_R S \to 0$ is exact. Thus $R' \otimes_R I \to I'$ is surjective. By Definition \ref{definition-smooth} there is a short exact sequence $$ 0 \to I/I^2 \to \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \to \Omega_{S/R} \to 0 $$ and the $S$-module $\Omega_{S/R}$ is finite projective. In particular $I/I^2$ is a direct summand of $\Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S$. Consider the commutative diagram $$ \xymatrix{ R' \otimes_R (I/I^2) \ar[r] \ar[d] & R' \otimes_R (\Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S) \ar[d] \\ I'/(I')^2 \ar[r] & \Omega_{R'[x_1, \ldots, x_n]/R'} \otimes_{R'[x_1, \ldots, x_n]} (R' \otimes_R S) } $$ Since the right vertical map is an isomorphism we see that the left vertical map is injective and surjective by what was said above. Thus we conclude that $\NL(\alpha')$ is quasi-isomorphic to $\Omega_{S'/R'} \cong S' \otimes_S \Omega_{S/R}$. And this is finite projective since it is the base change of a finite projective module.
By Lemmas \ref{lemma-base-change-smooth} and \ref{lemma-lci-field-change} it suffices to prove this when $k$ is algebraically closed. Choose a presentation $\alpha : k[x_1, \ldots, x_n] \to S$ with kernel $I$. Let $\mathfrak m$ be a maximal ideal of $S$, and let $\mathfrak m' \supset I$ be the corresponding maximal ideal of $k[x_1, \ldots, x_n]$. We will show that condition (5) of Lemma \ref{lemma-lci} holds (with $\mathfrak m$ instead of $\mathfrak q$). We may write $\mathfrak m' = (x_1 - a_1, \ldots, x_n - a_n)$ for some $a_i \in k$, because $k$ is algebraically closed, see Theorem \ref{theorem-nullstellensatz}. By our assumption that $k \to S$ is smooth the $S$-module map $\text{d} : I/I^2 \to \bigoplus_{i = 1}^n S \text{d}x_i$ is a split injection. Hence the corresponding map $I/\mathfrak m' I \to \bigoplus \kappa(\mathfrak m') \text{d}x_i$ is injective. Say $\dim_{\kappa(\mathfrak m')}(I/\mathfrak m' I) = c$ and pick $f_1, \ldots, f_c \in I$ which map to a $\kappa(\mathfrak m')$-basis of $I/\mathfrak m' I$. By Nakayama's Lemma \ref{lemma-NAK} we see that $f_1, \ldots, f_c$ generate $I_{\mathfrak m'}$ over $k[x_1, \ldots, x_n]_{\mathfrak m'}$. Consider the commutative diagram $$ \xymatrix{ I \ar[r] \ar[d] & I/I^2 \ar[rr] \ar[d] & & I/\mathfrak m'I \ar[d] \\ \Omega_{k[x_1, \ldots, x_n]/k} \ar[r] & \bigoplus S\text{d}x_i \ar[rr]^{\text{d}x_i \mapsto x_i - a_i} & & \mathfrak m'/(\mathfrak m')^2 } $$ (proof commutativity omitted). The middle vertical map is the one defining the naive cotangent complex of $\alpha$. Note that the right lower horizontal arrow induces an isomorphism $\bigoplus \kappa(\mathfrak m') \text{d}x_i \to \mathfrak m'/(\mathfrak m')^2$. Hence our generators $f_1, \ldots, f_c$ of $I_{\mathfrak m'}$ map to a collection of elements in $k[x_1, \ldots, x_n]_{\mathfrak m'}$ whose classes in $\mathfrak m'/(\mathfrak m')^2$ are linearly independent over $\kappa(\mathfrak m')$. Therefore they form a regular sequence in the ring $k[x_1, \ldots, x_n]_{\mathfrak m'}$ by Lemma \ref{lemma-regular-ring-CM}. This verifies condition (5) of Lemma \ref{lemma-lci} hence $S_g$ is a global complete intersection over $k$ for some $g \in S$, $g \not \in \mathfrak m$. As this works for any maximal ideal of $S$ we conclude that $S$ is a local complete intersection over $k$.
Consider the naive cotangent complex of the given presentation $$ (f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2 \longrightarrow \bigoplus\nolimits_{i = 1}^n S \text{d}x_i $$ Let us compose this map with the projection onto the first $c$ direct summands of the direct sum. According to the definition of a standard smooth algebra the classes $f_i \bmod (f_1, \ldots, f_c)^2$ map to a basis of $\bigoplus_{i = 1}^c S\text{d}x_i$. We conclude that $(f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2$ is free of rank $c$ with a basis given by the elements $f_i \bmod (f_1, \ldots, f_c)^2$, and that the homology in degree $0$, i.e., $\Omega_{S/R}$, of the naive cotangent complex is a free $S$-module with basis the images of $\text{d}x_{c + j}$, $j = 1, \ldots, n - c$. In particular, this proves $R \to S$ is smooth. \medskip\noindent The proofs of (4) and (6) are omitted. But see the example below and the proof of Lemma \ref{lemma-base-change-relative-global-complete-intersection}. \medskip\noindent Let $\varphi : R \to R'$ be any ring map. Denote $S' = R'[x_1, \ldots, x_n]/(f_1^\varphi, \ldots, f_c^\varphi)$ where $f^\varphi$ is the polynomial obtained from $f \in R[x_1, \ldots, x_n]$ by applying $\varphi$ to all the coefficients. Then $S' \cong R' \otimes_R S$. Moreover, the determinant of Definition \ref{definition-standard-smooth} for $S'/R'$ is equal to $g^\varphi$. Its image in $S'$ is therefore the image of $g$ via $R[x_1, \ldots, x_n] \to S \to S'$ and hence invertible. This proves (5). \medskip\noindent To prove (7) it suffices to show that $S \otimes_R \kappa(\mathfrak p)$ has dimension $n - c$ for every prime $\mathfrak p \subset R$. By (5) it suffices to prove that any standard smooth algebra $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ over a field $k$ has dimension $n - c$. We already know that $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a local complete intersection by Lemma \ref{lemma-smooth-over-field}. Hence, since $I/I^2$ is free of rank $c$ we see that $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ has dimension $n - c$, by Lemma \ref{lemma-lci} for example.
Choose a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I = (f_1, \ldots, f_m)$. For every subset $E \subset \{1, \ldots, m\}$ consider the open subset $U_E$ where the classes $f_e, e\in E$ freely generate the finite projective $S$-module $I/I^2$, see Lemma \ref{lemma-cokernel-flat}. We may cover $\Spec(S)$ by standard opens $D(g)$ each completely contained in one of the opens $U_E$. For such a $g$ we look at the presentation $$ \beta : R[x_1, \ldots, x_n, x_{n + 1}] \longrightarrow S_g $$ mapping $x_{n + 1}$ to $1/g$. Setting $J = \Ker(\beta)$ we use Lemma \ref{lemma-principal-localization-NL} to see that $J/J^2 \cong (I/I^2)_g \oplus S_g$ is free. We may and do replace $S$ by $S_g$. Then using Lemma \ref{lemma-huber} we may assume we have a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I = (f_1, \ldots, f_c)$ such that $I/I^2$ is free on the classes of $f_1, \ldots, f_c$. \medskip\noindent Using the presentation $\alpha$ obtained at the end of the previous paragraph, we more or less repeat this argument with the basis elements $\text{d}x_1, \ldots, \text{d}x_n$ of $\Omega_{R[x_1, \ldots, x_n]/R}$. Namely, for any subset $E \subset \{1, \ldots, n\}$ of cardinality $c$ we may consider the open subset $U_E$ of $\Spec(S)$ where the differential of $\NL(\alpha)$ composed with the projection $$ S^{\oplus c} \cong I/I^2 \longrightarrow \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \longrightarrow \bigoplus\nolimits_{i \in E} S\text{d}x_i $$ is an isomorphism. Again we may find a covering of $\Spec(S)$ by (finitely many) standard opens $D(g)$ such that each $D(g)$ is completely contained in one of the opens $U_E$. By renumbering, we may assume $E = \{1, \ldots, c\}$. For a $g$ with $D(g) \subset U_E$ we look at the presentation $$ \beta : R[x_1, \ldots, x_n, x_{n + 1}] \to S_g $$ mapping $x_{n + 1}$ to $1/g$. Setting $J = \Ker(\beta)$ we conclude from Lemma \ref{lemma-principal-localization-NL} that $J = (f_1, \ldots, f_c, fx_{n + 1} - 1)$ where $\alpha(f) = g$ and that the composition $$ J/J^2 \longrightarrow \Omega_{R[x_1, \ldots, x_{n + 1}]/R} \otimes_{R[x_1, \ldots, x_{n + 1}]} S_g \longrightarrow \bigoplus\nolimits_{i = 1}^c S_g\text{d}x_i \oplus S_g \text{d}x_{n + 1} $$ is an isomorphism. Reordering the coordinates as $x_1, \ldots, x_c, x_{n + 1}, x_{c + 1}, \ldots, x_n$ we conclude that $S_g$ is standard smooth over $R$ as desired. \medskip\noindent This finishes the proof as standard smooth algebras are syntomic (Lemmas \ref{lemma-standard-smooth} and \ref{lemma-relative-global-complete-intersection}) and being syntomic over $R$ is local on $S$ (Lemma \ref{lemma-local-syntomic}).
We will use without further mention that formation of the naive cotangent complex commutes with localization, see Section \ref{section-netherlander}, especially Lemma \ref{lemma-localize-NL}. Note that $\Omega_{S/R}$ is a finitely presented $S$-module, see Lemma \ref{lemma-differentials-finitely-presented}. Hence (2), (3), and (4) are equivalent by Lemma \ref{lemma-finite-projective}. It is clear that (1) implies the equivalent conditions (2), (3), and (4). Assume (2) holds. Writing $S_\mathfrak q$ as the colimit of principal localizations we see from Lemma \ref{lemma-colimit-category-fp-modules} that we can find a $g \in S$, $g \not \in \mathfrak q$ such that $(\Omega_{S/R})_g$ is finite free. Choose a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I$. We may work with $\NL(\alpha)$ instead of $\NL_{S/R}$, see Lemma \ref{lemma-NL-homotopy}. The surjection $$ \Omega_{R[x_1, \ldots, x_n]/R} \otimes_R S \to \Omega_{S/R} \to 0 $$ has a right inverse after inverting $g$ because $(\Omega_{S/R})_g$ is projective. Hence the image of $\text{d} : (I/I^2)_g \to \Omega_{R[x_1, \ldots, x_n]/R} \otimes_R S_g$ is a direct summand and this map has a right inverse too. We conclude that $H_1(L_{S/R})_g$ is a quotient of $(I/I^2)_g$. In particular $H_1(L_{S/R})_g$ is a finite $S_g$-module. Thus the vanishing of $H_1(L_{S/R})_{\mathfrak q}$ implies the vanishing of $H_1(L_{S/R})_{gg'}$ for some $g' \in S$, $g' \not \in \mathfrak q$. Then $R \to S_{gg'}$ is smooth by definition.
The direct implication is trivial. Suppose that $R \to S$ is smooth at every prime $\mathfrak q$ of $S$. Since $\Spec(S)$ is quasi-compact, see Lemma \ref{lemma-quasi-compact}, there exists a finite covering $\Spec(S) = \bigcup D(g_i)$ such that each $S_{g_i}$ is smooth. By Lemma \ref{lemma-cover-upstairs} this implies that $S$ is of finite presentation over $R$. According to Lemma \ref{lemma-localize-NL} we see that $\NL_{S/R} \otimes_S S_{g_i}$ is quasi-isomorphic to a finite projective $S_{g_i}$-module. By Lemma \ref{lemma-finite-projective} this implies that $\NL_{S/R}$ is quasi-isomorphic to a finite projective $S$-module.
You can prove this in many different ways. One way is to use the snake lemma (Lemma \ref{lemma-snake}), the Jacobi-Zariski sequence (Lemma \ref{lemma-exact-sequence-NL}), combined with the characterization of projective modules as being direct summands of free modules (Lemma \ref{lemma-characterize-projective}). Another proof can be obtained by combining Lemmas \ref{lemma-smooth-syntomic}, \ref{lemma-compose-standard-smooth} and \ref{lemma-locally-smooth}.
By Lemma \ref{lemma-relative-global-complete-intersection-conormal} we see that the naive cotangent complex associated to the given presentation of $S$ is the complex $$ \bigoplus\nolimits_{j = 1}^c S \cdot f_j \longrightarrow \bigoplus\nolimits_{i = 1}^n S \cdot \text{d}x_i, \quad f_j \longmapsto \sum \frac{\partial f_j}{\partial x_i} \text{d}x_i. $$ The maximal minors of the matrix giving the map are exactly the polynomials $g_I$. \medskip\noindent Assume $g_I$ maps to $g \in S$, with $g \not \in \mathfrak q$. Then the algebra $S_g$ is smooth over $R$. Namely, its naive cotangent complex is quasi-isomorphic to the complex above localized at $g$, see Lemma \ref{lemma-localize-NL}. And by construction it is quasi-isomorphic to a free rank $n - c$ module in degree $0$. \medskip\noindent Conversely, suppose that all $g_I$ end up in $\mathfrak q$. In this case the complex above tensored with $\kappa(\mathfrak q)$ does not have maximal rank, and hence there is no localization by an element $g \in S$, $g \not \in \mathfrak q$ where this map becomes a split injection. By Lemma \ref{lemma-localize-NL} again there is no such localization which is smooth over $R$.
By Lemmas \ref{lemma-syntomic} and \ref{lemma-smooth-over-field} we see that there exists a $g \in S$ such that $S_g$ is a relative global complete intersection. Replacing $S$ by $S_g$ we may assume $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection. For any subset $I \subset \{1, \ldots, n\}$ of cardinality $c$ consider the polynomial $g_I = \det (\partial f_j/\partial x_i)_{j = 1, \ldots, c, i \in I}$ of Lemma \ref{lemma-relative-global-complete-intersection-smooth}. Note that the image $\overline{g}_I$ of $g_I$ in the polynomial ring $\kappa(\mathfrak p)[x_1, \ldots, x_n]$ is the determinant of the partial derivatives of the images $\overline{f}_j$ of the $f_j$ in the ring $\kappa(\mathfrak p)[x_1, \ldots, x_n]$. Thus the lemma follows by applying Lemma \ref{lemma-relative-global-complete-intersection-smooth} both to $R \to S$ and to $\kappa(\mathfrak p) \to S \otimes_R \kappa(\mathfrak p)$.
By Lemma \ref{lemma-change-base-NL} we see that $\NL_{S/R} \otimes_S S'$ is homotopy equivalent to $\NL_{S'/R'}$. This already implies that $f^{-1}(U) \subset V$. \medskip\noindent Let $\mathfrak q' \subset S'$ be a prime lying over $\mathfrak q \subset S$. Assume $\mathfrak q' \in V$. We have to show that $\mathfrak q \in U$. Since $S \to S'$ is flat, we see that $S_{\mathfrak q} \to S'_{\mathfrak q'}$ is faithfully flat (Lemma \ref{lemma-local-flat-ff}). Thus the vanishing of $H_1(L_{S'/R'})_{\mathfrak q'}$ implies the vanishing of $H_1(L_{S/R})_{\mathfrak q}$. By Lemma \ref{lemma-finite-projective-descends} applied to the $S_{\mathfrak q}$-module $(\Omega_{S/R})_{\mathfrak q}$ and the map $S_{\mathfrak q} \to S'_{\mathfrak q'}$ we see that $(\Omega_{S/R})_{\mathfrak q}$ is projective. Hence $R \to S$ is smooth at $\mathfrak q$ by Lemma \ref{lemma-smooth-at-point}.
By Lemma \ref{lemma-smooth-syntomic} we find a collection of elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{g_i}$ is standard smooth over $R/I$. Hence we may assume that $\overline{S}$ is standard smooth over $R/I$. Write $\overline{S} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_c)$ as in Definition \ref{definition-standard-smooth}. Choose $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ lifting $\overline{f}_1, \ldots, \overline{f}_c$. Set $S = R[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, x_{n + 1}\Delta - 1)$ where $\Delta = \det(\frac{\partial f_j}{\partial x_i})_{i, j = 1, \ldots, c}$ as in Example \ref{example-make-standard-smooth}. This proves the lemma.
Let a solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rrd] & R' \otimes_R S \ar[r] \ar@{-->}[rd] & A/I \\ R  \ar[u] \ar[r] & R' \ar[r] \ar[u] & A \ar[u] } $$ as in Definition \ref{definition-formally-smooth} be given. By assumption the longer dotted arrow exists. By the universal property of tensor product we obtain the shorter dotted arrow.