hcju/stacksqa huggingface dataset:
Assume (1). By transfinite induction we construct for each ordinal $\alpha$ an $A$-subalgebra $B_\alpha \subset B$ as follows. Set $B_0 = A$. If $\alpha$ is a limit ordinal, then we set $B_\alpha = \colim_{\beta < \alpha} B_\beta$. If $\alpha = \beta + 1$, then either $B_\beta = B$ in which case we set $B_\alpha = B_\beta$ or $B_\beta \not = B$, in which case we apply Lemma \ref{lemma-square-and-cube} to choose a $b_\alpha \in B$, $b_\alpha \not \in B_\beta$ with $b_\alpha^2, b_\alpha^3 \in B_\beta$ and we set $B_\alpha = B_\beta[b_\alpha] \subset B$. Clearly, $B = \colim B_\alpha$ (in fact $B = B_\alpha$ for some ordinal $\alpha$ as one sees by looking at cardinalities). We will prove, by transfinite induction, that (2) holds for $A \to B_\alpha$ for every ordinal $\alpha$. It is clear for $\alpha = 0$. Assume the statement holds for every $\beta < \alpha$ and let $E \subset B_\alpha$ be a finite subset. If $\alpha$ is a limit ordinal, then $B_\alpha = \bigcup_{\beta < \alpha} B_\beta$ and we see that $E \subset B_\beta$ for some $\beta < \alpha$ which proves the result in this case. If $\alpha = \beta + 1$, then $B_\alpha = B_\beta[b_\alpha]$. Thus any $e \in E$ can be written as a polynomial $e = \sum d_{e, i}b_\alpha^i$ with $d_{e, i} \in B_\beta$. Let $D \subset B_\beta$ be the set $D = \{d_{e, i}\} \cup \{b_\alpha^2, b_\alpha^3\}$. By induction assumption there exists an $A$-subalgebra $A[b_1, \ldots, b_n] \subset B_\beta$ as in the statement of the lemma containing $D$. Then $A[b_1, \ldots, b_n, b_\alpha] \subset B_\alpha$ is an $A$-subalgebra of $B_\alpha$ as in the statement of the lemma containing $E$. \medskip\noindent Assume (2). Write $B = \colim B_\lambda$ as the colimit of its finite $A$-subalgebras. By Lemma \ref{lemma-colimit-inherits} it suffices to show that $\Spec(B_\lambda) \to \Spec(A)$ is a universal homeomorphism inducing isomorphisms on residue fields. Compositions of universally closed morphisms are universally closed and the same thing for morphisms which induce isomorphisms on residue fields. Thus it suffices to show that if $A \subset B$ and $B$ is generated by a single element $b$ with $b^2, b^3 \in A$, then (1) holds. Such an extension is integral and hence $\Spec(B) \to \Spec(A)$ is universally closed and surjective (Lemma \ref{lemma-integral-universally-closed} and Algebra, Lemma \ref{algebra-lemma-integral-overring-surjective}). Note that $(b^2)^3 = (b^3)^2$ in $A$. For any ring map $\varphi : A \to K$ to a field $K$ we see that there exists a $\lambda \in K$ with $\varphi(b^2) = \lambda^2$ and $\varphi(b^3) = \lambda^3$. Namely, $\lambda = 0$ if $\varphi(b^2) = 0$ and $\lambda = \varphi(b^3)/\varphi(b^2)$ if not. Thus $B \otimes_A K$ is a quotient of $K[x]/(x^2 - \lambda^2, x^3 - \lambda^3)$. This ring has exactly one prime with residue field $K$. This implies that $\Spec(B) \to \Spec(A)$ is bijective and induces isomorphisms on residue fields. Combined with universal closedness this shows (1) is true, see Lemmas \ref{lemma-universal-homeomorphism} and \ref{lemma-universally-injective}.
The proof is exactly the same as the proof of Proposition \ref{proposition-universal-homeomorphism-equal-residue-fields} except for the following changes: \begin{enumerate} \item Use Lemma \ref{lemma-pth-power-and-multiple} instead of Lemma \ref{lemma-square-and-cube} which means that for each successor ordinal $\alpha = \beta + 1$ we either have $b_\alpha^2, b_\alpha^3 \in B_\beta$ or we have a prime $p$ and $pb_\alpha, b_\alpha^p \in B_\beta$. \item If $\alpha$ is a successor ordinal, then take $D = \{d_{e, i}\} \cup \{b_\alpha^2, b_\alpha^3\}$ or take $D = \{d_{e, i}\} \cup \{pb_\alpha, b_\alpha^p\}$ depending on which case $\alpha$ falls into. \item In the proof of (2) $\Rightarrow$ (1) we also need to consider the case where $B$ is generated over $A$ by a single element $b$ with $pb, b^p \in B$ for some prime number $p$. Here $A \subset B$ defines a universal homeomorphism for example by Algebra, Lemma \ref{algebra-lemma-p-ring-map}. \end{enumerate} This finishes the proof.
By Lemma \ref{lemma-reduce-to-field} it suffices to prove this for $k \to \Lambda$ where $\Lambda$ is Noetherian and geometrically regular over $k$. Let $k \to A \to \Lambda$ be a factorization with $A$ a finite type $k$-algebra. It suffices to construct a factorization $A \to B \to \Lambda$ with $B$ of finite type such that $\mathfrak h_B = \Lambda$, see Lemma \ref{lemma-final-solve}. Hence we may perform Noetherian induction on the ideal $\mathfrak h_A$. Pick a prime $\mathfrak q \supset \mathfrak h_A$ such that $\mathfrak q$ is minimal over $\mathfrak h_A$. It now suffices to resolve $k \to A \to \Lambda \supset \mathfrak q$ (as defined in the text following Situation \ref{situation-local}). If the characteristic of $k$ is zero, this follows from Lemma \ref{lemma-resolve-special}. If the characteristic of $k$ is $p > 0$, this follows from Lemma \ref{lemma-resolve-general}.
Let $c_i \in R$ be an element such that $a_i - c_i \in \mathfrak m^N$. Choose generators $\mathfrak m^N = (d_1, \ldots, d_M)$. Write $a_i = c_i + \sum a_{i, l} d_l$. Consider the polynomial ring $R[x_{i, l}]$ and the elements $$ g_j = f_j(c_1 + \sum x_{1, l} d_l , \ldots, c_n + \sum x_{n, l} d_{n, l}) \in R[x_{i, l}] $$ The system of equations $g_j = 0$ has the solution $(a_{i, l})$. Suppose that we can show that $g_j$ as a solution $(b_{i, l})$ in $R$. Then it follows that $b_i = c_i + \sum b_{i, l}d_l$ is a solution of $f_j = 0$ which is congruent to $a_i$ modulo $\mathfrak m^N$. Thus it suffices to show that solvability over $R^\wedge$ implies solvability over $R$. \medskip\noindent Let $A \subset R^\wedge$ be the $R$-subalgebra generated by $a_1, \ldots, a_n$. Since we've assumed $R$ is a G-ring, i.e., that $R \to R^\wedge$ is regular, we see that there exists a factorization $$ A \to B \to R^\wedge $$ with $B$ smooth over $R$, see Theorem \ref{theorem-popescu}. Denote $\kappa = R/\mathfrak m$ the residue field. It is also the residue field of $R^\wedge$, so we get a commutative diagram $$ \xymatrix{ B \ar[rd] \ar@{..>}[r] & R' \ar@{..>}[d] \\ R \ar[r] \ar[u] & \kappa } $$ Since the vertical arrow is smooth, More on Algebra, Lemma \ref{more-algebra-lemma-lift-section-smooth-morphism} implies that there exists an \'etale ring map $R \to R'$ which induces an isomorphism $R/\mathfrak m \to R'/\mathfrak mR'$ and an $R$-algebra map $B \to R'$ making the diagram above commute. Since $R$ is henselian we see that $R \to R'$ has a section, see Algebra, Lemma \ref{algebra-lemma-characterize-henselian}. Let $b_i \in R$ be the image of $a_i$ under the ring maps $A \to B \to R' \to R$. Since all of these maps are $R$-algebra maps, we see that $(b_1, \ldots, b_n)$ is a solution in $R$.
We could deduce this theorem from Theorem \ref{theorem-approximation-property} using that the henselization $R^h$ is a G-ring by More on Algebra, Lemma \ref{more-algebra-lemma-henselization-G-ring} and writing $R^h$ as a directed colimit of \'etale extension $R'$. Instead we prove this by redoing the proof of the previous theorem in this case. \medskip\noindent Let $c_i \in R$ be an element such that $a_i - c_i \in \mathfrak m^N$. Choose generators $\mathfrak m^N = (d_1, \ldots, d_M)$. Write $a_i = c_i + \sum a_{i, l} d_l$. Consider the polynomial ring $R[x_{i, l}]$ and the elements $$ g_j = f_j(c_1 + \sum x_{1, l} d_l , \ldots, c_n + \sum x_{n, l} d_{n, l}) \in R[x_{i, l}] $$ The system of equations $g_j = 0$ has the solution $(a_{i, l})$. Suppose that we can show that $g_j$ as a solution $(b_{i, l})$ in $R'$ for some \'etale ring map $R \to R'$ endowed with a maximal ideal $\mathfrak m'$ such that $\kappa(\mathfrak m) = \kappa(\mathfrak m')$. Then it follows that $b_i = c_i + \sum b_{i, l}d_l$ is a solution of $f_j = 0$ which is congruent to $a_i$ modulo $(\mathfrak m')^N$. Thus it suffices to show that solvability over $R^\wedge$ implies solvability over some \'etale ring extension which induces a trivial residue field extension at some prime over $\mathfrak m$. \medskip\noindent Let $A \subset R^\wedge$ be the $R$-subalgebra generated by $a_1, \ldots, a_n$. Since we've assumed $R$ is a G-ring, i.e., that $R \to R^\wedge$ is regular, we see that there exists a factorization $$ A \to B \to R^\wedge $$ with $B$ smooth over $R$, see Theorem \ref{theorem-popescu}. Denote $\kappa = R/\mathfrak m$ the residue field. It is also the residue field of $R^\wedge$, so we get a commutative diagram $$ \xymatrix{ B \ar[rd] \ar@{..>}[r] & R' \ar@{..>}[d] \\ R \ar[r] \ar[u] & \kappa } $$ Since the vertical arrow is smooth, More on Algebra, Lemma \ref{more-algebra-lemma-lift-section-smooth-morphism} implies that there exists an \'etale ring map $R \to R'$ which induces an isomorphism $R/\mathfrak m \to R'/\mathfrak mR'$ and an $R$-algebra map $B \to R'$ making the diagram above commute. Let $b_i \in R'$ be the image of $a_i$ under the ring maps $A \to B \to R'$. Since all of these maps are $R$-algebra maps, we see that $(b_1, \ldots, b_n)$ is a solution in $R'$.
Set $I = (f_1, \ldots, f_m)$ so that the naive cotangent complex of $A$ over $R$ is homotopy equivalent to $I/I^2 \to \bigoplus A\text{d}x_i$, see Algebra, Lemma \ref{algebra-lemma-NL-homotopy}. We will use the formation of the naive cotangent complex commutes with localization, see Algebra, Section \ref{algebra-section-netherlander}, especially Algebra, Lemma \ref{algebra-lemma-localize-NL}. By Algebra, Definitions \ref{algebra-definition-smooth} and \ref{algebra-definition-smooth-at-prime} we see that $(I/I^2)_a \to \bigoplus A_a\text{d}x_i$ is a split injection for some $a \in A$, $a \not \in \mathfrak q$. After renumbering $x_1, \ldots, x_n$ and $f_1, \ldots, f_m$ we may assume that $f_1, \ldots, f_c$ form a basis for the vector space $I/I^2 \otimes_A \kappa(\mathfrak q)$ and that $\text{d}x_{c + 1}, \ldots, \text{d}x_n$ map to a basis of $\Omega_{A/R} \otimes_A \kappa(\mathfrak q)$. Hence after replacing $a$ by $aa'$ for some $a' \in A$, $a' \not \in \mathfrak q$ we may assume $f_1, \ldots, f_c$ form a basis for $(I/I^2)_a$ and that $\text{d}x_{c + 1}, \ldots, \text{d}x_n$ map to a basis of $(\Omega_{A/R})_a$. In this situation $a^N$ for some large integer $N$ satisfies the conditions of the lemma (with $U = V = \{1, \ldots, c\}$).
Assume $a$ is strictly standard in $A$ over $R$. We claim that $A_a$ is smooth over $R$, which proves that $a \in H_{A/R}$. Namely, let $A = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$, $c$, and $a' \in A$ be as in Definition \ref{definition-strictly-standard}. Write $I = (f_1, \ldots, f_m)$ so that the naive cotangent complex of $A$ over $R$ is given by $I/I^2 \to \bigoplus A\text{d}x_i$. Assumption (\ref{equation-strictly-standard-two}) implies that $(I/I^2)_a$ is generated by the classes of $f_1, \ldots, f_c$. Assumption (\ref{equation-strictly-standard-one}) implies that the differential $(I/I^2)_a \to \bigoplus A_a\text{d}x_i$ has a left inverse, see Lemma \ref{lemma-parse-equation-strictly-standard-one}. Hence $R \to A_a$ is smooth by definition and Algebra, Lemma \ref{algebra-lemma-localize-NL}. \medskip\noindent Let $H_e, H_s \subset A$ be the radical of the ideal generated by elementary, resp.\ strictly standard elements of $A$ over $R$. By definition and what we just proved we have $H_e \subset H_s \subset H_{A/R}$. The inclusion $H_{A/R} \subset H_e$ follows from Lemma \ref{lemma-find-strictly-standard}.
Apply Lemma \ref{lemma-improve-presentation} to get $A \to C$. By Algebra, Lemma \ref{algebra-lemma-huber} we can write $C = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ with $f_i$ mapping to a basis of $J/J^2$. The ring map $R \to C$ is syntomic (hence flat) as it is a composition of a syntomic and a smooth ring map. The dimension of the fibres is $n - c$ by Algebra, Lemma \ref{algebra-lemma-lci} (the fibres are local complete intersections, so the lemma applies).
Apply Lemma \ref{lemma-syntomic-complete-intersection} to get a smooth $R$-algebra map $A \to C$ with a retraction such that $C = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection over $R$. As $C$ is smooth over $R$ we have a short exact sequence $$ 0 \to \bigoplus\nolimits_{j = 1, \ldots, c} C f_j \to \bigoplus\nolimits_{i = 1, \ldots, n} C\text{d}x_i \to \Omega_{C/R} \to 0 $$ Since $\Omega_{C/R}$ is a projective $C$-module this sequence is split. Choose a left inverse $t$ to the first map. Say $t(\text{d}x_i) = \sum c_{ij} f_j$ so that $\sum_i \frac{\partial f_j}{\partial x_i} c_{i\ell} = \delta_{j\ell}$ (Kronecker delta). Let $$ B' = C[y_1, \ldots, y_c] = R[x_1, \ldots, x_n, y_1, \ldots, y_c]/(f_1, \ldots, f_c) $$ The $R$-algebra map $C \to B'$ has a retraction given by mapping $y_j$ to zero. We claim that the map $$ R[z_1, \ldots, z_n] \longrightarrow B',\quad z_i \longmapsto x_i - \sum\nolimits_j c_{ij} y_j $$ is \'etale at every point in the image of $\Spec(C) \to \Spec(B')$. In $\Omega_{B'/R[z_1, \ldots, z_n]}$ we have $$ 0 = \text{d}f_j - \sum\nolimits_i \frac{\partial f_j}{\partial x_i} \text{d}z_i \equiv \sum\nolimits_{i, \ell} \frac{\partial f_j}{\partial x_i} c_{i\ell} \text{d}y_\ell \equiv \text{d}y_j \bmod (y_1, \ldots, y_c)\Omega_{B'/R[z_1, \ldots, z_n]} $$ Since $0 = \text{d}z_i = \text{d}x_i$ modulo $\sum B'\text{d}y_j + (y_1, \ldots, y_c)\Omega_{B'/R[z_1, \ldots, z_n]}$ we conclude that $$ \Omega_{B'/R[z_1, \ldots, z_n]}/ (y_1, \ldots, y_c)\Omega_{B'/R[z_1, \ldots, z_n]} = 0. $$ As $\Omega_{B'/R[z_1, \ldots, z_n]}$ is a finite $B'$-module by Nakayama's lemma there exists a $g \in 1 + (y_1, \ldots, y_c)$ that $(\Omega_{B'/R[z_1, \ldots, z_n]})_g = 0$. This proves that $R[z_1, \ldots, z_n] \to B'_g$ is unramified, see Algebra, Definition \ref{algebra-definition-unramified}. For any ring map $R \to k$ where $k$ is a field we obtain an unramified ring map $k[z_1, \ldots, z_n] \to (B'_g) \otimes_R k$ between smooth $k$-algebras of dimension $n$. It follows that $k[z_1, \ldots, z_n] \to (B'_g) \otimes_R k$ is flat by Algebra, Lemmas \ref{algebra-lemma-CM-over-regular-flat} and \ref{algebra-lemma-characterize-smooth-kbar}. By the crit\`ere de platitude par fibre (Algebra, Lemma \ref{algebra-lemma-criterion-flatness-fibre}) we conclude that $R[z_1, \ldots, z_n] \to B'_g$ is flat. Finally, Algebra, Lemma \ref{algebra-lemma-characterize-etale} implies that $R[z_1, \ldots, z_n] \to B'_g$ is \'etale. Set $B = B'_g$. Note that $C \to B$ is smooth and has a retraction, so also $A \to B$ is smooth and has a retraction. Moreover, $R[z_1, \ldots, z_n] \to B$ is \'etale. By Algebra, Lemma \ref{algebra-lemma-etale-standard-smooth} we can write $$ B = R[z_1, \ldots, z_n, w_1, \ldots, w_c]/(g_1, \ldots, g_c) $$ with $\det(\partial g_j/\partial w_i)$ invertible in $B$. This proves the lemma.
Let $A \to \Lambda$ be an $R$-algebra map with $A$ of finite presentation over $R$. According to Algebra, Lemma \ref{algebra-lemma-when-colimit} we have to factor this map through a standard smooth algebra, and we know we can factor it as $A \to B \to \Lambda$ with $B$ smooth over $R$. Choose an $R$-algebra map $B \to C$ with a retraction $C \to B$ such that $C$ is standard smooth over $R$, see Lemma \ref{lemma-smooth-standard-smooth}. Then the desired factorization is $A \to B \to C \to B \to \Lambda$.
Both (1) and (2) are special cases of Algebra, Lemma \ref{algebra-lemma-blowup-base-change}. In fact, whenever we have $A_1 \to A_2 \to \Lambda$ such that $\mathfrak p_1 A_2 = \mathfrak p_2$, we have that $A_2'$ is the quotient of $A_1' \otimes_{A_1} A_2$ by its $\pi$-power torsion.
The cokernel of the map $I/I^2 \to \Omega_{B/R} \otimes_B A$ is $\Omega_{A/R}$, see Algebra, Lemma \ref{algebra-lemma-differential-seq}. Let $d = \dim_\mathfrak q(A/R)$ be the relative dimension of $R \to A$ at $\mathfrak q$, i.e., the dimension of $\Spec(A[1/\pi])$ at $\mathfrak q$. See Algebra, Definition \ref{algebra-definition-relative-dimension}. Then $\Omega_{A/R, \mathfrak q}$ is free over $A_\mathfrak q$ of rank $d$ (Algebra, Lemma \ref{algebra-lemma-characterize-smooth-over-field}). Thus if the hypothesis of the lemma holds, then $\Omega_{A/R} \otimes_A \Lambda$ is free of rank $d$. It follows that $\Omega_{A/R} \otimes_A \kappa(\mathfrak p)$ has dimension $d$ (as it is true upon tensoring with $\Lambda/\pi \Lambda$). Since $R \to A$ is flat and since $\mathfrak p$ is a specialization of $\mathfrak q$, we see that $\dim_\mathfrak p(A/R) \geq d$ by Algebra, Lemma \ref{algebra-lemma-dimension-fibres-bounded-open-upstairs}. Then it follows that $R \to A$ is smooth at $\mathfrak p$ by Algebra, Lemmas \ref{algebra-lemma-flat-fibre-smooth} and \ref{algebra-lemma-characterize-smooth-over-field}.
By Algebra, Lemma \ref{algebra-lemma-when-colimit} it suffices to show that any $R \to A \to \Lambda$ as in Situation \ref{situation-neron} can be factored as $A \to B \to \Lambda$ with $B$ a smooth $R$-algebra. After replacing $A$ by its image in $\Lambda$ we may assume that $A$ is a domain whose fraction field $K$ is a subfield of the fraction field of $\Lambda$. In particular, $A$ is separable over the fraction field of $R$ by our assumptions. Then $R \to A$ is smooth at $\mathfrak q = (0)$ by Algebra, Lemma \ref{algebra-lemma-smooth-at-generic-point}. After a finite number of N\'eron blowups, we may assume $R \to A$ is smooth at $\mathfrak p$, see Lemma \ref{lemma-neron-desingularization}. Then, after replacing $A$ by a localization at an element $a \in A$, $a \not \in \mathfrak p$ it becomes smooth over $R$ and the lemma is proved.
Choose a factorization $$ A/IA \to \bar B \to \Lambda/I\Lambda $$ with $\bar B$ standard smooth over $R/I$; this is possible by assumption and Lemma \ref{lemma-colimit-standard-smooth}. Write $$ \bar B = A/IA[t_1, \ldots, t_r]/(\bar g_1, \ldots, \bar g_s) $$ and say $\bar B \to \Lambda/I\Lambda$ maps $t_i$ to the class of $\lambda_i$ modulo $I\Lambda$. Choose $g_1, \ldots, g_s \in A[t_1, \ldots, t_r]$ lifting $\bar g_1, \ldots, \bar g_s$. Write $\varphi(g_i)(\lambda_1, \ldots, \lambda_r) = \sum \epsilon_{ij} \mu_{ij}$ for some $\epsilon_{ij} \in I$ and $\mu_{ij} \in \Lambda$. Define $$ A' = A[t_1, \ldots, t_r, \delta_{i, j}]/ (g_i - \sum \epsilon_{ij} \delta_{ij}) $$ and consider the map $$ A' \longrightarrow \Lambda,\quad a \longmapsto \varphi(a),\quad t_i \longmapsto \lambda_i,\quad \delta_{ij} \longmapsto \mu_{ij} $$ We have $$ A'/IA' = A/IA[t_1, \ldots, t_r]/(\bar g_1, \ldots, \bar g_s)[\delta_{ij}] \cong \bar B[\delta_{ij}] $$ This is a standard smooth algebra over $R/I$ as $\bar B$ is standard smooth. Choose a presentation $A'/IA' = R/I[x_1, \ldots, x_n]/(\bar f_1, \ldots, \bar f_c)$ with $\det(\partial \bar f_j/\partial x_i)_{i, j = 1, \ldots, c}$ invertible in $A'/IA'$. Choose lifts $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ of $\bar f_1, \ldots, \bar f_c$. Then $$ B = R[x_1, \ldots, x_n, x_{n + 1}]/ (f_1, \ldots, f_c, x_{n + 1}\det(\partial f_j/\partial x_i)_{i, j = 1, \ldots, c} - 1) $$ is smooth over $R$. Since smooth ring maps are formally smooth (Algebra, Proposition \ref{algebra-proposition-smooth-formally-smooth}) there exists an $R$-algebra map $B \to A'$ which is an isomorphism modulo $I$. Then $B \to A'$ is surjective by Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}). Thus $A' = B/J$ with $J \subset IB$ finitely generated (see Algebra, Lemma \ref{algebra-lemma-finite-presentation-independent}).
If we can prove the lemma in case $J = (h)$, then we can prove the lemma by induction on the number of generators of $J$. Namely, suppose that $J$ can be generated by $n$ elements $h_1, \ldots, h_n$ and the lemma holds for all cases where $J$ is generated by $n - 1$ elements. Then we apply the case $n = 1$ to produce $B \to B' \to \Lambda$ where the first map kills of $h_n$. Then we let $J'$ be the ideal of $B'$ generated by the images of $h_1, \ldots, h_{n - 1}$ and we apply the case for $n - 1$ to produce $B' \to B'' \to \Lambda$. It is easy to verify that $B \to B'' \to \Lambda$ does the job. \medskip\noindent Assume $J = (h)$ and write $h = \sum \epsilon_i b_i$ for some $\epsilon_i \in I$ and $b_i \in B$. Note that $0 = \varphi(h) = \sum \epsilon_i \varphi(b_i)$. As $\Lambda$ is flat over $R$, the equational criterion for flatness (Algebra, Lemma \ref{algebra-lemma-flat-eq}) implies that we can find $\lambda_j \in \Lambda$, $j = 1, \ldots, m$ and $a_{ij} \in R$ such that $\varphi(b_i) = \sum_j a_{ij} \lambda_j$ and $\sum_i \epsilon_i a_{ij} = 0$. Set $$ C = B[x_1, \ldots, x_m]/(b_i - \sum a_{ij} x_j) $$ with $C \to \Lambda$ given by $\varphi$ and $x_j \mapsto \lambda_j$. Choose a factorization $$ C \to B'/J' \to \Lambda $$ as in Lemma \ref{lemma-lift-once}. Since $B$ is smooth over $R$ we can lift the map $B \to C \to B'/J'$ to a map $\psi : B \to B'$. We claim that $\psi(h) = 0$. Namely, the fact that $\psi$ agrees with $B \to C \to B'/J'$ mod $I$ implies that $$ \psi(b_i) = \sum a_{ij} \xi_j + \theta_i $$ for some $\xi_i \in B'$ and $\theta_i \in IB'$. Hence we see that $$ \psi(h) = \psi(\sum \epsilon_i b_i) = \sum \epsilon_i a_{ij} \xi_j + \sum \epsilon_i \theta_i = 0 $$ because of the relations above and the fact that $I^2 = 0$.
We apply Lemma \ref{lemma-desingularize} to $$ D \longrightarrow A \otimes_R D \longrightarrow \Lambda $$ and the image of $\pi$ in $D$. By Lemma \ref{lemma-strictly-standard-base-change} we see that $\pi$ is strictly standard in $A \otimes_R D$ over $D$. As our section $\rho : (A \otimes_R D)/\pi^4 (A \otimes_R D) \to D/\pi^4 D$ we take the map induced by the map in (2). Thus Lemma \ref{lemma-desingularize} applies and we obtain a factorization $A \otimes_R D \to B \to \Lambda$ with $B$ of finite presentation and $\mathfrak a B \subset H_{B/D}$ where $$ \mathfrak a = \text{Ann}_D(\text{Ann}_D(\pi^2)/\text{Ann}_D(\pi)). $$ For any prime $\mathfrak q$ of $D$ such that $D_\mathfrak q$ is flat over $R$ we have $\text{Ann}_{D_\mathfrak q}(\pi^2)/\text{Ann}_{D_\mathfrak q}(\pi) = 0$ because annihilators of elements commutes with flat base change and we assumed $\text{Ann}_R(\pi) = \text{Ann}_R(\pi^2)$. Because $D$ is Noetherian we see that $\text{Ann}_D(\pi^2)/\text{Ann}_D(\pi)$ is a finite $D$-module, hence formation of its annihilator commutes with localization. Thus we see that $\mathfrak a \not \subset \mathfrak q$. Hence we see that $D \to B$ is smooth at any prime of $B$ lying over $\mathfrak q$. Since any prime of $D$ where $R \to D$ is smooth is one where $D_\mathfrak q$ is flat over $R$ we conclude that $H_{D/R}B \subset H_{B/D}$. The final inclusion $H_{D/R}B \subset H_{B/R}$ follows because compositions of smooth ring maps are smooth (Algebra, Lemma \ref{algebra-lemma-compose-smooth}).
Apply Lemma \ref{lemma-lifting} to get $R \to D \to \Lambda$ with a factorization $\bar C/\pi^4\bar C \to D/\pi^4 D \to \Lambda/\pi^4\Lambda$ such that $R \to D$ is smooth at any prime not containing $\pi$ and at any prime lying over a prime of $\bar C/\pi^4\bar C$ where $R/\pi^8 R \to \bar C$ is smooth. By Lemma \ref{lemma-desingularize-strictly-standard} we can find a finitely presented $R$-algebra $B$ and factorizations $A \to B \to \Lambda$ and $D \to B \to \Lambda$ such that $H_{D/R}B \subset H_{B/R}$. We omit the verification that this is a solution to the problem posed by the lemma.