hcju/stacksqa huggingface dataset:
Let $R$ be a ring and let $M$ be an $R$-module. Let $f_1, \ldots, f_r$ be an $M$-$H_1$-regular sequence. Denote $J = (f_1, \ldots, f_r)$. The assumption means that we have an exact sequence $$ \wedge^2(R^r) \otimes M \to R^{\oplus r} \otimes M \to JM \to 0 $$ where the first arrow is given by $e_i \wedge e_j \otimes m \mapsto (f_ie_j - f_je_i) \otimes m$. In particular this implies that $$ JM/J^2M = JM \otimes_R R/J = (M/JM)^{\oplus r} $$ is a finite free module. To finish the proof we have to prove for every $n \geq 2$ the following: if $$ \xi = \sum\nolimits_{|I| = n, I = (i_1, \ldots, i_r)} m_I f_1^{i_1} \ldots f_r^{i_r} \in J^{n + 1}M $$ then $m_I \in JM$ for all $I$. Note that $f_1, \ldots, f_{r - 1}, f_r^n$ is an $M$-$H_1$-regular sequence by Lemma \ref{lemma-mult-koszul-regular}. Hence we see that the required result holds for the multi-index $I = (0, \ldots, 0, n)$. It turns out that we can reduce the general case to this case as follows. \medskip\noindent Let $S = R[x_1, x_2, \ldots, x_r, 1/x_r]$. The ring map $R \to S$ is faithfully flat, hence $f_1, \ldots, f_r$ is an $M$-$H_1$-regular sequence in $S$, see Lemma \ref{lemma-koszul-regular-flat-base-change}. By Lemma \ref{lemma-change-basis} we see that $$ g_1 = f_1 - x_1/x_r f_r, \ldots g_{r - 1} = f_{r - 1} - x_{r - 1}/x_r f_r, g_r = (1/x_r)f_r $$ is an $M$-$H_1$-regular sequence in $S$. Finally, note that our element $\xi$ can be rewritten $$ \xi = \sum\nolimits_{|I| = n, I = (i_1, \ldots, i_r)} m_I (g_1 + x_r g_r)^{i_1} \ldots (g_{r - 1} + x_r g_r)^{i_{r - 1}} (x_rg_r)^{i_r} $$ and the coefficient of $g_r^n$ in this expression is $$ \sum m_I x_1^{i_1} \ldots x_r^{i_r} \in J(M \otimes_R S). $$ Since the monomials $x_1^{i_1} \ldots x_r^{i_r}$ form part of an $R$-basis of $S$ over $R$ we conclude that $m_I \in J$ for all $I$ as desired.
The implication (1) $\Rightarrow$ (2) is  Lemma \ref{lemma-regular-koszul-regular}. The implication (2) $\Rightarrow$ (3) is Lemma \ref{lemma-koszul-regular-H1-regular}. The implication (3) $\Rightarrow$ (4) is  Lemma \ref{lemma-H1-regular-quasi-regular}. The implication (4) $\Rightarrow$ (1) is Algebra, Lemma \ref{algebra-lemma-quasi-regular-regular}.
To prove this choose $g_1, \ldots, g_m \in J$ whose images in $A/I$ form a $H_1$-regular sequence which generates $J/I$. In particular $J = I + (g_1, \ldots, g_m)$. Suppose that $x \in I \cap J^2$. Because $x \in J^2$ can write $$ x = \sum a_{ij} g_ig_j + \sum a_j g_j + a $$ with $a_{ij} \in A$, $a_j \in I$ and $a \in I^2$. Then $\sum a_{ij}g_ig_j \in I \cap (g_1, \ldots, g_m)$ hence by Lemma \ref{lemma-H1-regular-in-quotient} we see that $\sum a_{ij}g_ig_j \in I(g_1, \ldots, g_m)$. Thus $x \in IJ$ as desired.
We claim that $g_1, \ldots, g_m$ forms an $H_1$-regular sequence in $A/I^d$ for every $d$. By induction assume that this holds in $A/I^{d - 1}$. We have a short exact sequence of complexes $$ 0 \to K_\bullet(A, g_\bullet) \otimes_A I^{d - 1}/I^d \to K_\bullet(A/I^d, g_\bullet) \to K_\bullet(A/I^{d - 1}, g_\bullet) \to 0 $$ Since $f_1, \ldots, f_n$ is quasi-regular we see that the first complex is a direct sum of copies of $K_\bullet(A/I, g_1, \ldots, g_m)$ hence acyclic in degree $1$. By induction hypothesis the last complex is acyclic in degree $1$. Hence also the middle complex is. In particular, the sequence $g_1, \ldots, g_m$ forms a quasi-regular sequence in $A/I^d$ for every $d \geq 1$, see Lemma \ref{lemma-H1-regular-quasi-regular}. Now we are ready to prove that $f_1, \ldots, f_n, g_1, \ldots, g_m$ is a quasi-regular sequence in $A$. Namely, set $J = (f_1, \ldots, f_n, g_1, \ldots, g_m)$ and suppose that (with multinomial notation) $$ \sum\nolimits_{|N| + |M| = d} a_{N, M} f^N g^M \in J^{d + 1} $$ for some $a_{N, M} \in A$. We have to show that $a_{N, M} \in J$ for all $N, M$. Let $e \in \{0, 1, \ldots, d\}$. Then $$ \sum\nolimits_{|N| = d - e, \ |M| = e} a_{N, M} f^N g^M \in (g_1, \ldots, g_m)^{e + 1} + I^{d - e + 1} $$ Because $g_1, \ldots, g_m$ is a quasi-regular sequence in $A/I^{d - e + 1}$ we deduce $$ \sum\nolimits_{|N| = d - e} a_{N, M} f^N \in (g_1, \ldots, g_m) + I^{d - e + 1} $$ for each $M$ with $|M| = e$. By Lemma \ref{lemma-H1-regular-in-quotient} applied to $I^{d - e}/I^{d - e + 1}$ in the ring $A/I^{d - e + 1}$ this implies $\sum_{|N| = d - e} a_{N, M} f^N \in I^{d - e}(g_1, \ldots, g_m)$. Since $f_1, \ldots, f_n$ is quasi-regular in $A$ this implies that $a_{N, M} \in J$ for each $N, M$ with $|N| = d - e$ and $|M| = e$. This proves the lemma.
Our assumptions say that $K_\bullet(A, f_1, \ldots, f_n)$ is a finite free resolution of $A/I$ and $K_\bullet(A/I, \overline{g}_1, \ldots, \overline{g}_m)$ is a finite free resolution of $A/(f_i, g_j)$ over $A/I$. Then \begin{align*} K_\bullet(A, f_1, \ldots, f_n, g_1, \ldots, g_m) & = \text{Tot}(K_\bullet(A, f_1, \ldots, f_n) \otimes_A K_\bullet(A, g_1, \ldots, g_m)) \\ & \cong A/I \otimes_A K_\bullet(A, g_1, \ldots, g_m) \\ & = K_\bullet(A/I, \overline{g}_1, \ldots, \overline{g}_m) \\ & \cong A/(f_i, g_j) \end{align*} The first equality by Lemma \ref{lemma-join-sequences-koszul-complex}. The first quasi-isomorphism $\cong$ by (the dual of) Homology, Lemma \ref{homology-lemma-double-complex-gives-resolution} as the $q$th row of the double complex $K_\bullet(A, f_1, \ldots, f_n) \otimes_A K_\bullet(A, g_1, \ldots, g_m)$ is a resolution of $A/I \otimes_A K_q(A, g_1, \ldots, g_m)$. The second equality is clear. The last quasi-isomorphism by assumption. Hence we win.
Set $I = (f_1, \ldots, f_n)$. Our assumptions say that $K_\bullet(A, f_1, \ldots, f_n)$ is a finite free resolution of $A/I$ and $K_\bullet(A, f_1, \ldots, f_n, g_1, \ldots, g_m)$ is a finite free resolution of $A/(f_i, g_j)$ over $A$. Then \begin{align*} A/(f_i, g_j) & \cong K_\bullet(A, f_1, \ldots, f_n, g_1, \ldots, g_m) \\ & = \text{Tot}(K_\bullet(A, f_1, \ldots, f_n) \otimes_A K_\bullet(A, g_1, \ldots, g_m)) \\ & \cong A/I \otimes_A K_\bullet(A, g_1, \ldots, g_m) \\ & = K_\bullet(A/I, \overline{g}_1, \ldots, \overline{g}_m) \end{align*} The first quasi-isomorphism $\cong$ by assumption. The first equality by Lemma \ref{lemma-join-sequences-koszul-complex}. The second quasi-isomorphism by (the dual of) Homology, Lemma \ref{homology-lemma-double-complex-gives-resolution} as the $q$th row of the double complex $K_\bullet(A, f_1, \ldots, f_n) \otimes_A K_\bullet(A, g_1, \ldots, g_m)$ is a resolution of $A/I \otimes_A K_q(A, g_1, \ldots, g_m)$. The second equality is clear. Hence we win.
If $I$ can be generated by a quasi-regular sequence of length $r$, then $I/I^2$ is free of rank $r$ over $R/I$. Since $f_1, \ldots, f_r$ generate by assumption we see that the images $\overline{f}_i$ form a basis of $I/I^2$ over $R/I$. It follows that $f_1, \ldots, f_r$ is a quasi-regular sequence as all this means, besides the freeness of $I/I^2$, is that the maps $\text{Sym}^n_{R/I}(I/I^2) \to I^n/I^{n + 1}$ are isomorphisms. \medskip\noindent We continue to assume that $I$ can be generated by a quasi-regular sequence, say $g_1, \ldots, g_r$. Write $g_j = \sum a_{ij}f_i$. As $f_1, \ldots, f_r$ is quasi-regular according to the previous paragraph, we see that $\det(a_{ij})$ is invertible mod $I$. The matrix $a_{ij}$ gives a map $R^{\oplus r} \to R^{\oplus r}$ which induces a map of Koszul complexes $\alpha : K_\bullet(R, f_1, \ldots, f_r) \to K_\bullet(R, g_1, \ldots, g_r)$, see Lemma \ref{lemma-functorial}. This map becomes an isomorphism on inverting $\det(a_{ij})$. Since the cohomology modules of both $K_\bullet(R, f_1, \ldots, f_r)$ and $K_\bullet(R, g_1, \ldots, g_r)$ are annihilated by $I$, see Lemma \ref{lemma-homotopy-koszul}, we see that $\alpha$ is a quasi-isomorphism. \medskip\noindent Now assume that $g_1, \ldots, g_r$ is a $H_1$-regular sequence generating $I$. Then $g_1, \ldots, g_r$ is a quasi-regular sequence by Lemma \ref{lemma-H1-regular-quasi-regular}. By the previous paragraph we conclude that $f_1, \ldots, f_r$ is a $H_1$-regular sequence. Similarly for Koszul-regular sequences.
If one of the $a_i$ is a unit this is just the statement that any element of the form $t_1 + a_2 t_2 + \ldots + a_n t_n$ is a nonzerodivisor in the polynomial ring over $R$. \medskip\noindent Case I: $R$ is Noetherian. Let $\mathfrak q_j$, $j = 1, \ldots, m$ be the associated primes of $R$. We have to show that each of the maps $$ \sum a_i t_i : \text{Sym}^d(R^{\oplus n}) \longrightarrow \text{Sym}^{d + 1}(R^{\oplus n}) $$ is injective. As $\text{Sym}^d(R^{\oplus n})$ is a free $R$-module its associated primes are $\mathfrak q_j$, $j = 1, \ldots, m$. For each $j$ there exists an $i = i(j)$ such that $a_i \not \in \mathfrak q_j$ because there exists an $x \in R$ with $\mathfrak q_jx = 0$ but $a_i x \not = 0$ for some $i$ by assumption. Hence $a_i$ is a unit in $R_{\mathfrak q_j}$ and the map is injective after localizing at $\mathfrak q_j$. Thus the map is injective, see Algebra, Lemma \ref{algebra-lemma-zero-at-ass-zero}. \medskip\noindent Case II: $R$ general. We can write $R$ as the union of Noetherian rings $R_\lambda$ with $a_1, \ldots, a_n \in R_\lambda$. For each $R_\lambda$ the result holds, hence the result holds for $R$.
The equality of ideals is obvious as the matrix $$ \left( \begin{matrix} t_{11} & t_{12} & t_{13} & \ldots \\ 0 & t_{22} & t_{23} & \ldots \\ 0 & 0 & t_{33} & \ldots \\ \ldots & \ldots & \ldots & \ldots \end{matrix} \right) $$ is invertible in $S$. Because $f_1, \ldots, f_n$ is a Koszul-regular sequence we see that the kernel of $R \to R^{\oplus n}$, $x \mapsto (xf_1, \ldots, xf_n)$ is zero (as it computes the $n$the Koszul homology of $R$ w.r.t.\ $f_1, \ldots, f_n$). Hence by Lemma \ref{lemma-make-nonzero-divisor} we see that $g_1 = f_1 t_{11} + \ldots + f_n t_{1n}$ is a nonzerodivisor in $S' = R[t_{11}, t_{12}, \ldots, t_{1n}, t_{11}^{-1}]$. We see that $g_1, f_2, \ldots, f_n$ is a Koszul-sequence in $S'$ by Lemma \ref{lemma-koszul-regular-flat-base-change} and \ref{lemma-independence-of-generators}. We conclude that $\overline{f}_2, \ldots, \overline{f}_n$ is a Koszul-regular sequence in $S'/(g_1)$ by Lemma \ref{lemma-truncate-koszul-regular}. Hence by induction on $n$ we see that the images $\overline{g}_2, \ldots, \overline{g}_n$ of $g_2, \ldots, g_n$ in $S'/(g_1)[\{t_{ij}\}_{2 \leq i \leq j}, t_{22}^{-1}, \ldots, t_{nn}^{-1}]$ form a regular sequence. This in turn means that $g_1, \ldots, g_n$ forms a regular sequence in $S$.
By Lemma \ref{lemma-mult-koszul-regular} and induction the sequence $f_1, \ldots, f_{r - 1}, f_r^n$ is Koszul regular for all $n \geq 1$. By Lemma \ref{lemma-change-basis} any permutation of a Koszul regular sequence is a Koszul regular sequence. Hence we see that we may replace any (or all) $f_i$ by its $n$th power and still have a Koszul regular sequence. Thus $K_\bullet(R, f_1^n, \ldots, f_r^n)$ has nonzero cohomology only in homological degree $0$. This implies what we want by Lemma \ref{lemma-extended-alternating-Cech-is-colimit-koszul}.
By Algebra, Lemma \ref{algebra-lemma-affine-blowup-quotient-description} it suffices to show that $R''$ is $a$-torsion free. \medskip\noindent We claim $a, ay_2 - a_2, \ldots, ay_n - a_r$ is a $H_1$-regular sequence in $R[y_2, \ldots, y_r]$. Namely, the map $$ (a, ay_2 - a_2, \ldots, ay_n - a_r) : R[y_2, \ldots, y_r]^{\oplus r} \longrightarrow R[y_2, \ldots, y_r] $$ used to define the Koszul complex on $a, ay_2 - a_2, \ldots, ay_n - a_r$ is isomorphic to the map $$ (a, a_2, \ldots, a_r) : R[y_2, \ldots, y_r]^{\oplus r} \longrightarrow R[y_2, \ldots, y_r] $$ used to the define the Koszul complex on $a, a_2, \ldots, a_r$ via the isomorphism $$ R[y_2, \ldots, y_r]^{\oplus r} \longrightarrow R[y_2, \ldots, y_r]^{\oplus r} $$ sending $(b_1, \ldots, b_r)$ to $(b_1 - b_2y_2 \ldots - b_ry_r, -b_2, \ldots, - b_r)$. By Lemma \ref{lemma-functorial} these Koszul complexes are isomorphic. By Lemma \ref{lemma-koszul-regular-flat-base-change} applied to the flat ring map $R \to R[y_2, \ldots, y_r]$ we conclude our claim is true. By Lemma \ref{lemma-cone-koszul} we see that the Koszul complex $K$ on $a, ay_2 - a_2, \ldots, ay_n - a_r$ is the cone on $a : L \to L$ where $L$ is the Koszul complex on $ay_2 - a_2, \ldots, ay_n - a_r$. Since $H_1(K) = 0$ by the claim, we conclude that $a : H_0(L) \to H_0(L)$ is injective, in other words that $R'' = R[y_2, \ldots, y_r]/(a y_i - a_i)$ has no nonzero $a$-torsion elements as desired.
The sequence $$ \wedge^2(B^{\oplus r}) \to B^{\oplus r} \to B \to B/J \to 0 $$ is a complex of $A$-modules with $B/J$ flat over $A$ and cohomology group $H_1 = H_1(K_\bullet(B, f_1, \ldots, f_r))$ in the spot $B^{\oplus r}$. If we tensor this with $A'$ we obtain a complex $$ \wedge^2((B')^{\oplus r}) \to (B')^{\oplus r} \to B' \to B'/J' \to 0 $$ which is exact at $B'$ and $B'/J'$. In order to compute its cohomology group $H'_1 = H_1(K_\bullet(B', f'_1, \ldots, f'_r))$ at $(B')^{\oplus r}$ we split the first sequence above into the exact sequences $0 \to J \to B \to B/J \to 0$, $0 \to K \to B^{\oplus r} \to J \to 0$ and $\wedge^2(B^{\oplus r}) \to K \to H_1 \to 0$. Tensoring over $A$ with $A'$ we obtain the exact sequences $$ \begin{matrix} 0 \to J \otimes_A A' \to B \otimes_A A' \to (B/J) \otimes_A A' \to 0 \\ K \otimes_A A' \to B^{\oplus r} \otimes_A A' \to J \otimes_A A' \to 0 \\ \wedge^2(B^{\oplus r}) \otimes_A A' \to K \otimes_A A' \to H_1 \otimes_A A' \to 0 \end{matrix} $$ where the first one is exact as $B/J$ is flat over $A$, see Algebra, Lemma \ref{algebra-lemma-flat-tor-zero}. We conclude that $J' = J \otimes_A A'$ and $\Ker((B')^{\oplus r} \to B') = K \otimes_A A'$. Thus \begin{align*} H'_1 & = \Coker\left( \wedge^2((B')^{\oplus r})  \to \Ker((B')^{\oplus r} \to B') \right) \\ & = \Coker\left(\wedge^2(B^{\oplus r}) \otimes_A A' \to K \otimes_A A'\right) \\ & = H_1 \otimes_A A' \end{align*} as $-\otimes_A A'$ is right exact. This proves the lemma.
Assume $f_1, \ldots, f_r$ is quasi-regular. Set $J = (f_1, \ldots, f_r)$. By assumption $J^n/J^{n + 1}$ is isomorphic to a direct sum of copies of $B/J$ hence flat over $A$. By induction and Algebra, Lemma \ref{algebra-lemma-flat-ses} we conclude that $B/J^n$ is flat over $A$. The ideal $(J')^n$ is equal to $J^n \otimes_A A'$, see Algebra, Lemma \ref{algebra-lemma-flat-tor-zero}. Hence $(J')^n/(J')^{n + 1} = J^n/J^{n + 1} \otimes_A A'$ which clearly implies that $f_1, \ldots, f_r$ is a quasi-regular sequence in $B'$. \medskip\noindent Assume $f_1, \ldots, f_r$ is $H_1$-regular. By Lemma \ref{lemma-base-change-H1-regular} the vanishing of the Koszul homology group $H_1(K_\bullet(B, f_1, \ldots, f_r))$ implies the vanishing of $H_1(K_\bullet(B', f'_1, \ldots, f'_r))$ and we win.
Set $C' = B'/(f'_1, \ldots, f'_r)$. We have to show $A' \to C'$ is flat. Let $\mathfrak r' \subset C'$ be a prime ideal lying over $\mathfrak p' \subset A'$. We let $\mathfrak q' \subset B'$ be the inverse image of $\mathfrak r'$. By Algebra, Lemma \ref{algebra-lemma-flat-localization} it suffices to show that $A'_{\mathfrak p'} \to C'_{\mathfrak q'}$ is flat. Algebra, Lemma \ref{algebra-lemma-grothendieck-regular-sequence-general} tells us it suffices to show that $f'_1, \ldots, f'_r$ map to a regular sequence in $$ B'_{\mathfrak q'}/\mathfrak p'B'_{\mathfrak q'} = B_\mathfrak q/\mathfrak p B_\mathfrak q = (B \otimes_A \kappa(\mathfrak p))_\mathfrak q $$ with obvious notation. What we know is that $f_1, \ldots, f_r$ is a quasi-regular sequence in $B$ and that $B/(f_1, \ldots, f_r)$ is flat over $A$. By Lemma \ref{lemma-relative-regular-immersion-algebra} the images $\overline{f}_1, \ldots, \overline{f}_r$ of $f'_1, \ldots, f'_r$ in $B \otimes_A \kappa(\mathfrak p)$ form a quasi-regular sequence. Since $(B \otimes_A \kappa(\mathfrak p))_\mathfrak q$ is a Noetherian local ring, we conclude by Lemma \ref{lemma-noetherian-finite-all-equivalent}.
Set $C' = B'/(f'_1, \ldots, f'_r)$ and $C = B/(f_1, \ldots, f_r)$. Then $A' \to C'$ is of finite presentation. By Lemma \ref{lemma-cut-by-koszul-flat} we see that $A' \to C'$ is flat. The fibre rings of $A' \to C'$ are equal to the fibre rings of $A \to C$ and hence smooth by assumption (4). It follows that $A' \to C'$ is smooth by Algebra, Lemma \ref{algebra-lemma-flat-fibre-smooth}.
Let $I \subset R$ be a quasi-regular ideal. Since $V(I)$ is quasi-compact, there exist $g_1, \ldots, g_m \in R$ such that $V(I) \subset D(g_1) \cup \ldots \cup D(g_m)$ and such that $I_{g_j}$ is generated by a quasi-regular sequence $g_{j1}, \ldots, g_{jr_j} \in R_{g_j}$. Write $g_{ji} = g'_{ji}/g_j^{e_{ij}}$ for some $g'_{ij} \in I$. Write $1 + x = \sum g_j h_j$ for some $x \in I$ which is possible as $V(I) \subset D(g_1) \cup \ldots \cup D(g_m)$. Note that $\Spec(R) = D(g_1) \cup \ldots \cup D(g_m) \bigcup D(x)$ Then $I$ is generated by the elements $g'_{ij}$ and $x$ as these generate on each of the pieces of the cover, see Algebra, Lemma \ref{algebra-lemma-cover}.
We fix the prime $\mathfrak p \supset I$ throughout the proof. Assume $IB$ is quasi-regular. By Lemma \ref{lemma-quasi-regular-ideal-finite} $IB$ is a finite module, hence $I$ is a finite $A$-module by Algebra, Lemma \ref{algebra-lemma-descend-properties-modules}. As $A \to B$ is flat we see that $$ I/I^2 \otimes_{A/I} B/IB = I/I^2 \otimes_A B = IB/(IB)^2. $$ As $IB$ is quasi-regular, the $B/IB$-module $IB/(IB)^2$ is finite locally free. Hence $I/I^2$ is finite projective, see Algebra, Proposition \ref{algebra-proposition-ffdescent-finite-projectivity}. In particular, after replacing $A$ by $A_f$ for some $f \in A$, $f \not \in \mathfrak p$ we may assume that $I/I^2$ is free of rank $r$. Pick $f_1, \ldots, f_r \in I$ which give a basis of $I/I^2$. By Nakayama's lemma (see Algebra, Lemma \ref{algebra-lemma-NAK}) we see that, after another replacement $A \leadsto A_f$ as above, $I$ is generated by $f_1, \ldots, f_r$. \medskip\noindent Proof of the ``quasi-regular'' case. Above we have seen that $I/I^2$ is free on the $r$-generators $f_1, \ldots, f_r$. To finish the proof in this case we have to show that the maps $\text{Sym}^d(I/I^2) \to I^d/I^{d + 1}$ are isomorphisms for each $d \geq 2$. This is clear as the faithfully flat base changes $\text{Sym}^d(IB/(IB)^2) \to (IB)^d/(IB)^{d + 1}$ are isomorphisms locally on $B$ by assumption. Details omitted. \medskip\noindent Proof of the ``$H_1$-regular'' and ``Koszul-regular'' case. Consider the sequence of elements $f_1, \ldots, f_r$ generating $I$ we constructed above. By Lemma \ref{lemma-independence-of-generators} we see that $f_1, \ldots, f_r$ map to a $H_1$-regular or Koszul-regular sequence in $B_g$ for any $g \in B$ such that $IB$ is generated by an $H_1$-regular or Koszul-regular sequence. Hence $K_\bullet(A, f_1, \ldots, f_r) \otimes_A B_g$ has vanishing $H_1$ or $H_i$, $i > 0$. Since the homology of $K_\bullet(B, f_1, \ldots, f_r) = K_\bullet(A, f_1, \ldots, f_r) \otimes_A B$ is annihilated by $IB$ (see Lemma \ref{lemma-homotopy-koszul}) and since $V(IB) \subset \bigcup_{g\text{ as above}} D(g)$ we conclude that $K_\bullet(A, f_1, \ldots, f_r) \otimes_A B$ has vanishing homology in degree $1$ or all positive degrees. Using that $A \to B$ is faithfully flat we conclude that the same is true for $K_\bullet(A, f_1, \ldots, f_r)$.
Choose $f_j \in A[x_1, \ldots, x_n]$ with $\alpha(f_j) = \beta(y_j)$ and $g_i \in A[y_1, \ldots, y_m]$ with $\beta(g_i) = \alpha(x_i)$. Then we get a commutative diagram $$ \xymatrix{ A[x_1, \ldots, x_n, y_1, \ldots, y_m] \ar[d]^{x_i \mapsto g_i} \ar[rr]_-{y_j \mapsto f_j} & & A[x_1, \ldots, x_n] \ar[d] \\ A[y_1, \ldots, y_m] \ar[rr] & & B } $$ Note that the kernel $K$ of $A[x_i, y_j] \to B$ is equal to $K = (I, y_j - f_j) = (J, x_i - f_i)$. In particular, as $I$ is finitely generated by Lemma \ref{lemma-quasi-regular-ideal-finite} we see that $J = K/(x_i - f_i)$ is finitely generated too. \medskip\noindent Pick a prime $\mathfrak q \subset B$. Since $I/I^2 \oplus B^{\oplus m} = J/J^2 \oplus B^{\oplus n}$ (Algebra, Lemma \ref{algebra-lemma-conormal-module}) we see that $$ \dim J/J^2 \otimes_B \kappa(\mathfrak q) + n = \dim I/I^2 \otimes_B \kappa(\mathfrak q) + m. $$ Pick $p_1, \ldots, p_t \in I$ which map to a basis of $I/I^2 \otimes \kappa(\mathfrak q) = I \otimes_{A[x_i]} \kappa(\mathfrak q)$. Pick $q_1, \ldots, q_s \in J$ which map to a basis of $J/J^2 \otimes \kappa(\mathfrak q) = J \otimes_{A[y_j]} \kappa(\mathfrak q)$. So $s + n = t + m$. By Nakayama's lemma there exist $h \in A[x_i]$ and $h' \in A[y_j]$ both mapping to a nonzero element of $\kappa(\mathfrak q)$ such that $I_h = (p_1, \ldots, p_t)$ in $A[x_i, 1/h]$ and $J_{h'} = (q_1, \ldots, q_s)$ in $A[y_j, 1/h']$. As $I$ is Koszul-regular we may also assume that $I_h$ is generated by a Koszul regular sequence. This sequence must necessarily have length $t = \dim I/I^2 \otimes_B \kappa(\mathfrak q)$, hence we see that $p_1, \ldots, p_t$ is a Koszul-regular sequence by Lemma \ref{lemma-independence-of-generators}. As also $y_1 - f_1, \ldots, y_m - f_m$ is a regular sequence we conclude $$ y_1 - f_1, \ldots, y_m - f_m, p_1, \ldots, p_t $$ is a Koszul-regular sequence in $A[x_i, y_j, 1/h]$ (see Lemma \ref{lemma-join-koszul-regular-sequences}). This sequence generates the ideal $K_h$. Hence the ideal $K_{hh'}$ is generated by a Koszul-regular sequence of length $m + t = n + s$. But it is also generated by the sequence $$ x_1 - g_1, \ldots, x_n - g_n, q_1, \ldots, q_s $$ of the same length which is thus a Koszul-regular sequence by Lemma \ref{lemma-independence-of-generators}. Finally, by Lemma \ref{lemma-truncate-koszul-regular} we conclude that the images of $q_1, \ldots, q_s$ in $$ A[x_i, y_j, 1/hh']/(x_1 - g_1, \ldots, x_n - g_n) \cong A[y_j, 1/h''] $$ form a Koszul-regular sequence generating $J_{h''}$. Since $h''$ is the image of $hh'$ it doesn't map to zero in $\kappa(\mathfrak q)$ and we win.
Let $S = R[x_1, \ldots, x_n]/I$ be a presentation. Pick $h_j \in R[x_1, \ldots, x_n]$ mapping to $g_j$ in $S$. Then $R[x_1, \ldots, x_n, x_{n + 1}]/(I, x_{n + 1}h_j - 1)$ is a presentation of $S_{g_j}$. Hence $I_j = (I, x_{n + 1}h_j - 1)$ is a Koszul-regular ideal in $R[x_1, \ldots, x_n, x_{n + 1}]$. Pick a prime $I \subset \mathfrak q \subset R[x_1, \ldots, x_n]$. Then $h_j \not \in \mathfrak q$ for some $j$ and $\mathfrak q_j = (\mathfrak q, x_{n + 1}h_j - 1)$ is a prime ideal of $V(I_j)$ lying over $\mathfrak q$. Pick $f_1, \ldots, f_r \in I$ which map to a basis of $I/I^2 \otimes \kappa(\mathfrak q)$. Then $x_{n + 1}h_j - 1, f_1, \ldots, f_r$ is a sequence of elements of $I_j$ which map to a basis of $I_j \otimes \kappa(\mathfrak q_j)$. By Nakayama's lemma there exists an $h \in R[x_1, \ldots, x_n, x_{n + 1}]$ such that $(I_j)_h$ is generated by $x_{n + 1}h_j - 1, f_1, \ldots, f_r$. We may also assume that $(I_j)_h$ is generated by a Koszul regular sequence of some length $e$. Looking at the dimension of $I_j \otimes \kappa(\mathfrak q_j)$ we see that $e = r + 1$. Hence by Lemma \ref{lemma-independence-of-generators} we see that $x_{n + 1}h_j - 1, f_1, \ldots, f_r$ is a Koszul-regular sequence generating $(I_j)_h$ for some $h \in R[x_1, \ldots, x_n, x_{n + 1}]$, $h \not \in \mathfrak q_j$. By Lemma \ref{lemma-truncate-koszul-regular} we see that $I_{h'}$ is generated by a Koszul-regular sequence for some $h' \in R[x_1, \ldots, x_n]$, $h' \not \in \mathfrak q$ as desired.
Recall that the homology groups $H_i(K_\bullet(f_\bullet))$ are annihilated by the ideal $(f_1, \ldots, f_c)$. Hence it suffices to show that $H_i(K_\bullet(f_\bullet))_\mathfrak q$ is zero for all primes $\mathfrak q \subset R[x_1, \ldots, x_n]$ containing $(f_1, \ldots, f_c)$. This follows from Algebra, Lemma \ref{algebra-lemma-relative-global-complete-intersection-conormal} and the fact that a regular sequence is Koszul regular (Lemma \ref{lemma-regular-koszul-regular}).