hcju/stacksqa huggingface dataset:
Write $B' = B^I$. It follows from the definitions that $B' = B^I$ is the integral closure of $A$ in $L^I$. Write $\mathfrak m' = B^I \cap \mathfrak m = B' \cap \mathfrak m \subset B'$. By Lemma \ref{lemma-one-orbit} the maximal ideal $\mathfrak m$ is the unique prime ideal of $B$ lying over $\mathfrak m'$. As $I$ acts trivially on $\kappa(\mathfrak m)$ we see from Lemma \ref{lemma-invariants-modulo} that the extension $\kappa(\mathfrak m)/\kappa(\mathfrak m')$ is purely inseparable (perhaps an easier alternative is to apply the result of Lemma \ref{lemma-one-orbit-geometric}). Since $D/I$ acts faithfully on $\kappa(\mathfrak m')$, we conclude that $D/I$ acts faithfully on $\kappa(\mathfrak m)$. Of course the elements of the residue field $\kappa$ of $A$ are fixed by this action. By Galois theory we see that $[\kappa(\mathfrak m') : \kappa] \geq |D/I|$, see Fields, Lemma \ref{fields-lemma-galois-over-fixed-field}. \medskip\noindent Let $\pi$ be the uniformizer of $A$. Since $\text{Norm}_{L/K}(\pi) = \pi^{[L : K]}$ we see from Algebra, Lemma \ref{algebra-lemma-finite-extension-dim-1} that $$ |G| = [L : K] = [L : K]\ \text{ord}_A(\pi) = |G/D|\ [\kappa(\mathfrak m) : \kappa]\ \text{ord}_{B_\mathfrak m}(\pi) $$ as there are $n = |G/D|$ maximal ideals of $B$ which are all conjugate under $G$, see Remark \ref{remark-finite-separable-extension} and Lemma \ref{lemma-galois}. Applying the same reasoning to the finite extension the finite extension $L/L^I$ of degree $|I|$ we find $$ |I|\ \text{ord}_{B'_{\mathfrak m'}}(\pi) = [\kappa(\mathfrak m) : \kappa(\mathfrak m')]\ \text{ord}_{B_\mathfrak m}(\pi) $$ We conclude that $$ \text{ord}_{B'_{\mathfrak m'}}(\pi) = \frac{|D/I|}{[\kappa(\mathfrak m') : \kappa]} $$ Since the left hand side is a positive integer and since the right hand side is $\leq 1$ by the above, we conclude that we have equality, $\text{ord}_{B'_{\mathfrak m'}}(\pi) = 1$ and $\kappa(\mathfrak m')/\kappa$ has degree $|D/I|$. Thus $\pi B'_{\mathfrak m'} = \mathfrak m' B_\mathfrak m'$ and $\kappa(\mathfrak m')$ is Galois over $\kappa$ with Galois group $D/I$, in particular separable, see Fields, Lemma \ref{fields-lemma-finite-Galois}. By Algebra, Lemma \ref{algebra-lemma-characterize-etale} we find that $A \to B'_{\mathfrak m'}$ is \'etale as desired.
The fact that under the map $\text{Gal}(M/K) \to \text{Gal}(L/K)$ the groups $P', I', D'$ map into $P, I, D$ is immediate from the definitions of these groups. The commutativity of the first diagram is clear (observe that since $\kappa(\mathfrak m)/\kappa_A$ is normal every automorphism of $\kappa(\mathfrak m')$ over $\kappa_A$ indeed induces an automorphism of $\kappa(\mathfrak m)$ over $\kappa_A$ and hence we obtain the right vertical arrow in the first diagram, see Lemma \ref{lemma-galois-galois} and Fields, Lemma \ref{fields-lemma-lift-maps}). \medskip\noindent The maps $I' \to I$ and $D' \to D$ are surjective by Lemma \ref{lemma-one-orbit-geometric-galois-compare}. The surjectivity of $P' \to P$ follows as $P'$ and $P$ are p-Sylow subgroups of $I'$ and $I$. \medskip\noindent To see the commutativity of the second diagram we choose a uniformizer $\pi'$ of $C_{\mathfrak m'}$ and a uniformizer $\pi$ of $B_\mathfrak m$. Then $\pi = c' (\pi')^{e'/e}$ for some unit $c'$ of $C_{\mathfrak m'}$. For $\sigma' \in I'$ the image $\sigma \in I$ is simply the restriction of $\sigma'$ to $L$. Write $\sigma'(\pi') = c \pi'$ for a unit $c \in C_{\mathfrak m'}$ and write $\sigma(\pi) = b \pi$ for a unit $b$ of $B_\mathfrak m$. Then $\sigma'(\pi) = b \pi$ and we obtain $$ b \pi = \sigma'(\pi) = \sigma'(c' (\pi')^{e'/e}) = \sigma'(c') c^{e'/e} (\pi')^{e'/e} = \frac{\sigma'(c')}{c'} c^{e'/e} \pi $$ As $\sigma' \in I'$ we see that $b$ and $c^{e'/e}$ have the same image in the residue field which proves what we want.
Note that $A^\wedge$ is a discrete valuation ring too (by Lemmas \ref{lemma-completion-regular} and \ref{lemma-completion-dimension}). In particular $A^\wedge$ is a domain. The proof will work more generally for Noetherian local rings $A$ such that $A^\wedge$ is a local domain of dimension $1$. \medskip\noindent Let $\theta \in M$ be an element that generates $M$ over $K^\wedge$. (Theorem of the primitive element.) Let $P(t) \in K^\wedge[t]$ be the minimal polynomial of $\theta$ over $K^\wedge$. Let $\pi \in \mathfrak m_A$ be a nonzero element. After replacing $\theta$ by $\pi^n\theta$ we may assume that the coefficients of $P(t)$ are in $A^\wedge$. Let $B = A^\wedge[\theta] = A^\wedge[t]/(P(t))$. Note that $B$ is a complete local domain of dimension $1$ because it is finite over $A$ and contained in $M$. Since $M$ is separable over $K$ the element $\theta$ is not a root of the derivative of $P$. For any integer $n$ we can find a monic polynomial $P_1 \in A[t]$ such that $P - P_1$ has coefficients in $\pi^nA^\wedge[t]$. By Krasner's lemma (Lemma \ref{lemma-krasner}) we see that $P_1$ has a root $\beta$ in $B$ for $n$ sufficiently large. Moreover, we may assume (if $n$ is chosen large enough) that $\theta - \beta \in \pi B$. Consider the map $\Phi : A^\wedge[t]/(P_1) \to B$ of $A^\wedge$-algebras which maps $t$ to $\beta$. Since $B = \pi B + \sum_{i < \deg(P)} A^\wedge \theta^i$, the map $\Phi$ is surjective by Nakayama's lemma. As $\deg(P_1) = \deg(P)$ it follows that $\Phi$ is an isomorphism. We conclude that the ring extension $L = K[t]/(P_1(t))$ satisfies $K^\wedge \otimes_K L \cong M$. This implies that $L$ is a field and the proof is complete.
We will use the equivalence of Lemma \ref{lemma-extension-dvrs-formally-smooth} without further mention. Let $\pi \in A$ and $\pi_i \in (A_1)_{\mathfrak m_i}$ be uniformizers. As $\kappa_A \subset \kappa_B$ is separable, the ring $$ (B \otimes_A (A_1)_{\mathfrak m_i})/\pi_i (B \otimes_A (A_1)_{\mathfrak m_i}) = B/\pi B \otimes_{A/\pi A} (A_1)_{\mathfrak m_i}/\pi_i (A_1)_{\mathfrak m_i} $$ is a product of fields each separable over $\kappa_{\mathfrak m_i}$. Hence the element $\pi_i$ in $B \otimes_A (A_1)_{\mathfrak m_i}$ is a nonzerodivisor and the quotient by this element is a product of fields. It follows that $B \otimes_A A_1$ is a Dedekind domain in particular reduced. Thus $B \otimes_A A_1 \subset B_1$ is an equality.
We will use the results of the discussion in Remark \ref{remark-finite-separable-extension} without further mention. Let $C/B/A$ be the integral closures of $A$ in $M/L/K$. Since $C$ is a finite ring extension of $B$, we see that $\Spec(C) \to \Spec(B)$ is surjective. Hence for ever maximal ideal $\mathfrak m \subset B$ there is a maximal ideal $\mathfrak m' \subset C$ lying over $\mathfrak m$. By the multiplicativity of ramification indices (Lemma \ref{lemma-multiplicative-e-f}) and the assumption, we conclude that the ramification index of $B_\mathfrak m$ over $A$ is prime to the residue characteristic. Since $\kappa(\mathfrak m')/\kappa_A$ is finite separable, the same is true for $\kappa(\mathfrak m)/\kappa_A$.
Observe that $A'$ is a discrete valuation ring with fraction field $K'$, see Lemma \ref{lemma-pull-root-uniformizer}. Of course the ramification index of $A'$ over $A$ is $e$. Thus if (2) holds, then $L'$ is tamely ramified with respect to $A$ by Lemma \ref{lemma-composition-tame}. Hence $L$ is tamely ramified with respect to $A$ by Lemma \ref{lemma-subextension-tame}. \medskip\noindent The implication (3) $\Rightarrow$ (2) is immediate. \medskip\noindent Assume that (1) holds. Let $B$ be the integral closure of $A$ in $L$ and let $\mathfrak m_1, \ldots, \mathfrak m_n$ be its maximal ideals. Denote $e_i$ the ramification index of $A \to B_{\mathfrak m_i}$. Let $e_0$ be the least common multiple of $e_1, \ldots, e_r$. This is invertible in $\kappa_A$ by our assumption (1). Let $e = de_0$ as in (3). Set $A' = A[\pi^{1/e}]$. Then $A \to A'$ is an extension of discrete valuation rings with fraction field $K' = K[\pi^{1/e}]$, see Lemma \ref{lemma-pull-root-uniformizer}. Choose a product decomposition $$ L \otimes_K K' = \prod L'_j $$ where $L'_j$ are fields. Let $B'_j$ be the integral closure of $A$ in $L'_j$. Let $\mathfrak m_{ijk}$ be the maximal ideals of $B'_j$ lying over $\mathfrak m_i$. Observe that $(B'_j)_{\mathfrak m_i}$ is the integral closure of $B_{\mathfrak m_i}$ in $L'_j$. By Abhyankar's lemma (Lemma \ref{lemma-abhyankar}) applied to $A \subset B_{\mathfrak m_i}$ and the extension $K \subset K'$ we see that $A' \to (B'_j)_{\mathfrak m_{ijk}}$ is formally smooth in the $\mathfrak m_{ijk}$-adic topology. This implies that the ramification index is $1$ and that the residue field extension is separable (Lemma \ref{lemma-extension-dvrs-formally-smooth}). In this way we see that $L'_j$ is unramified with respect to $A'$. This finishes the proof: we take $L' = L'_j$ for some $j$.
Proof of (2). Choose a uniformizer $\pi \in A$. We can choose an integer $e$ invertible in $\kappa_A$ and extensions $L_i'/K' = K[\pi^{1/e}]$ unramified with respect to $A' = A[\pi^{1/e}]$ with $L_i \subset L'_i$ as extensions of $K$, see Lemma \ref{lemma-characterize-tame}. By Lemma \ref{lemma-permanence-unramified} we can find an extension $L'/K'$ which is unramified with respect to $A'$ such that $L'_i/K$ is isomorphic to a subextension of $L'/K'$ for $i = 1, 2$. This finishes the proof of (3) as $L'/K$ is tamely ramified (use same lemma as above). \medskip\noindent Proof of (1). We may first replace $L$ by a larger extension and assume that $L$ is an extension of $K' = K[\pi^{1/e}]$ unramified with respect to $A' = A[\pi^{1/e}]$ where $e$ is invertible in $\kappa_A$, see Lemma \ref{lemma-characterize-tame}. Let $M$ be the normal closure of $L$ over $K$, see Fields, Definition \ref{fields-definition-normal-closure}. Then $M/K$ is Galois by Fields, Lemma \ref{fields-lemma-normal-closure-galois}. On the other hand, there is a surjection $$ L \otimes_K \ldots \otimes_K L \longrightarrow M $$ of $K$-algebras, see Fields, Lemma \ref{fields-lemma-normal-closure-tensor-product}. Let $B$ be the integral closure of $A$ in $L$ as in Remark \ref{remark-finite-separable-extension}. The condition that $L$ is unramified with respect to $A' = A[\pi^{1/e}]$ exactly means that $A' \to B$ is an \'etale ring map, see Algebra, Lemma \ref{algebra-lemma-characterize-etale}. Claim:  $$ K' \otimes_K \ldots \otimes_K K' = \prod K'_i $$ is a product of field extensions $K'_i/K$ tamely ramified with respect to $A$. Then if $A'_i$ is the integral closure of $A$ in $K'_i$ we see that $$ \prod A'_i \otimes_{(A' \otimes_A \ldots \otimes_A A')} (B \otimes_A \ldots \otimes_A B) $$ is finite \'etale over $\prod A'_i$ and hence a product of Dedekind domains (Lemma \ref{lemma-Dedekind-etale-extension}). We conclude that $M$ is the fraction field of one of these Dedekind domains which is finite \'etale over $A'_i$ for some $i$. It follows that $M/K'_i$ is unramified with respect to every maximal ideal of $A'_i$ and hence $M/K$ is tamely ramified by Lemma \ref{lemma-composition-tame}. \medskip\noindent It remains the prove the claim. For this we write $A' = A[x]/(x^e - \pi)$ and we see that $$ A' \otimes_A \ldots \otimes_A A' = A'[x_1, \ldots, x_r]/(x_1^e - \pi, \ldots, x_r^e - \pi) $$ The normalization of this ring certainly contains the elements $y_i = x_i/x_1$ for $i = 2, \ldots, r$ subject to the relations $y_i^e - 1 = 0$ and we obtain $$ A[x_1, y_2, \ldots, y_r]/(x_1^e - \pi, y_2^e - 1, \ldots, y_r - 1) = A'[y_2, \ldots, y_r]/(y_2^e - 1, \ldots, y_r^e - 1) $$ This ring is finite \'etale over $A'$ because $e$ is invertible in $A'$. Hence it is a product of Dedekind domains each unramified over $A'$ as desired (see references given above in case of confusion).
The algebra $K' \otimes_K L$ is a finite product of fields as it is a finite \'etale algebra over $L$. Let $A'$ be the integral closure of $A$ in $K'$. \medskip\noindent In case (1) the ring map $A \to A'$ is finite \'etale. Hence $B' = B \otimes_A A'$ is finite \'etale over $B$ and is a finite product of Dedekind domains (Lemma \ref{lemma-Dedekind-etale-extension}). Hence $B'$ is the integral closure of $B$ in $K' \otimes_K L$. It follows immediately that each $L'_i$ is unramified with respect to $B$. \medskip\noindent Choose a uniformizer $\pi \in A$. To prove (2) we may replace $K'$ by a larger extension tame ramified with respect to $A$ (details omitted; hint: use Lemma \ref{lemma-subextension-tame}). Thus by Lemma \ref{lemma-characterize-tame} we may assume there exists some $e \geq 1$ invertible in $\kappa_A$ such that $K'$ contains $K[\pi^{1/e}]$ and such that $K'$ is unramified with respect to $A[\pi^{1/e}]$. Choose a product decomposition $$ K[\pi^{1/e}] \otimes_K L = \prod L_{e, j} $$ For every $i$ there exists a $j_i$ such that $L'_i/L_{e, j_i}$ is a finite separable extension. Let $B_{e, j}$ be the integral closure of $B$ in $L_{e, j}$. By (1) applied to $K'/K[\pi^{1/e}]$ and $A[\pi^{1/e}] \subset (B_{e, j_i})_\mathfrak m$ we see that $L'_i$ is unramified with respect to $(B_{e, j_i})_\mathfrak m$ for every maximal ideal $\mathfrak m \subset B_{e, j_i}$. Hence the proof will be complete if we can show that $L_{e, j}$ is tamely ramified with respect to $A[\pi^{1/e}]$, see Lemma \ref{lemma-composition-tame}. \medskip\noindent Choose a uniformizer $\theta$ in $B$. Write $\pi = u \theta^t$ where $u$ is a unit of $B$ and $t \geq 1$. Then we have $$ A[\pi^{1/e}] \otimes_A B = B[x]/(x^e - u \theta^t) \subset B[y, z]/(y^{e'} - \theta, z^e - u) $$ where $e' = e/\gcd(e, t)$. The map sends $x$ to $z y^{t/\gcd(e, t)}$. Since the right hand side is a product of Dedekind domains each tamely ramified over $B$ the proof is complete (details omitted).
Let $L_1 = (L \otimes_K K_1)_{red}$ and $M_1 = (M \otimes_K K_1)_{red}$ and let $B_1 \subset L_1$ and $C_1 \subset M_1$ be the integral closure of $B$ and $C$. Note that $M_1 = (M \otimes_L L_1)_{red}$ and that $L_1$ is a (nonempty) finite product of finite extensions of $L$. Hence the ring map $B_1 \to C_1$ is a finite product of ring maps of the form discussed in Remark \ref{remark-construction}. In particular, the map $\Spec(C_1) \to \Spec(B_1)$ is surjective. Choose a maximal ideal $\mathfrak m \subset C_1$ and consider the extensions of discrete valuation rings $$ (A_1)_{A_1 \cap \mathfrak m} \to (B_1)_{B_1 \cap \mathfrak m} \to (C_1)_\mathfrak m $$ If the composition is weakly unramified, so is the map $(A_1)_{A_1 \cap \mathfrak m} \to (B_1)_{B_1 \cap \mathfrak m}$. If the residue field extension $\kappa_{A_1 \cap \mathfrak m} \to \kappa_\mathfrak m$ is separable, so is the subextension $\kappa_{A_1 \cap \mathfrak m} \to \kappa_{B_1 \cap \mathfrak m}$. Taking into account Lemma \ref{lemma-extension-dvrs-formally-smooth} this proves (1). A similar argument works for (2).
The lemma is trivial if the characteristic of $K$ is zero; thus we may and do assume that the characteristic of $K$ is $p > 0$. \medskip\noindent Let $K \subset K_1$ be a finite extension. Since $L/K$ is separable, the algebra $L \otimes_K K_1$ is reduced (Algebra, Lemma \ref{algebra-lemma-separable-extension-preserves-reducedness}). Since $B$ is Nagata, the ring extension $B \subset B_1$ is finite (Remark \ref{remark-construction}) and $B_1$ is a Nagata ring. Moreover, if $K \subset K_1 \subset K_2$ is a tower of finite extensions, then the same thing is true, i.e., the ring extension $B_1 \subset B_2$ is finite too where $B_2$ is the integral closure of $B$ (or $B_1$) in $L \otimes_K K_2$. \medskip\noindent Let $K \subset K_2$ be a solution for $A \to B$. There exists a subfield $K \subset K_1 \subset K_2$ such that $K_1/K$ is separable and $K_2/K_1$ is purely inseparable (Fields, Lemma \ref{fields-lemma-separable-first}). Thus it suffices to show that if we have $K \subset K_1 \subset K_2$ with $K_2/K_1$ purely inseparable of degree $p$, then $K \subset K_1$ is a solution for $A \subset B$. Using the remarks above, we may replace $A$ by a localization $(A_1)_{\mathfrak m_i}$ and $B$ by $(B_1)_{\mathfrak m_{ij}}$ (notation as in Remark \ref{remark-construction}) and reduce to the problem discussed in the following paragraph. \medskip\noindent Assume that $K \subset K_1$ is a purely inseparable extension of degree $p$ which is a solution for $A \subset B$. Problem: show that $A \to B$ is formally smooth in the $\mathfrak m_B$-adic topology. By the discussion in Remark \ref{remark-construction} we see that $A_1$ and $B_1$ are discrete valuation rings and as discussed above $B \subset B_1$ is finite. Consider the diagrams $$ \vcenter{ \xymatrix{ B \ar[r]_{e_u} & B_1 \\ A \ar[u]_e \ar[r]^{e_d} & A_1 \ar[u]^1 } } \quad\text{and}\quad \vcenter{ \xymatrix{ \kappa_B \ar[r]_{d_u} & \kappa_{B_1} \\ \kappa_A \ar[u]_d \ar[r]^{d_d} & \kappa_{A_1} \ar[u]^1 } } $$ of extensions of discrete valuation rings and residue fields. Here $e, e_u, e_d, 1$ denote ramification indices, so $e e_u = e_d$. Also $d, d_u, d_d, 1$ denote the inseparable degrees (Fields, Definition \ref{fields-definition-insep-degree}), so $dd_u = d_d$ (Fields, Lemma \ref{fields-lemma-multiplicativity-all-degrees}). By Algebra, Lemma \ref{algebra-lemma-finite-extension-dim-1} and the fact that $L \subset L \otimes_K K_1$ is a degree $p$ field extension, we see that $e_ud_u = p$ (this is where we really use that $B$ is Nagata; this need not be true if the extension $B \subset B_1$ is not finite). We have $e_d d_d \leq p$ by Lemma \ref{lemma-inequality}. Thus it follows that $e = d = 1$ as desired.
By Algebra, Lemma \ref{algebra-lemma-colimit-finite-etale-given-residue-field} there exists an extension $A \subset A'$ which is a filtered colimit of finite \'etale extensions such that the residue field of $A'$ is a separable algebraic closure of the residue field of $A$. Then $A \subset A'$ is an extension of discrete valuation rings such that the induced extension $K \subset K'$ of fraction fields is separable algebraic. \medskip\noindent Let $B \subset B'$ be a strict henselization of $B$. Then $B \subset B'$ is an extension of discrete valuation rings whose fraction field extension is separable algebraic. By Algebra, Lemma \ref{algebra-lemma-strictly-henselian-functorial-prepare} there exists a commutative diagram as in the statement of the lemma. Parts (1) and (2) of the lemma are clear. \medskip\noindent Let $K' \subset K'_1$ be a (weak) solution for $A' \to B'$. Since $A'$ is a colimit, we can find a finite \'etale extension $A \subset A_1'$ and a finite extension $K_1$ of the fraction field $F$ of $A_1'$ such that $K'_1 = K' \otimes_F K_1$. As $A \subset A_1'$ is finite \'etale and $B'$ strictly henselian, it follows that $B' \otimes_A A_1'$ is a finite product of rings isomorphic to $B'$. Hence $$ L' \otimes_K K_1 = L' \otimes_K F \otimes_F K_1 $$ is a finite product of rings isomorphic to $L' \otimes_{K'} K'_1$. Thus we see that $K \subset K_1$ is a (weak) solution for $A \to B'$. Hence it is also a (weak) solution for $A \to B$ by Lemma \ref{lemma-solutions-go-down}.
If the characteristic of $K$ is zero, then we can take the extension given by $\pi_B^q = \pi$, see Lemma \ref{lemma-pull-root-uniformizer}. If the characteristic of $K$ is $p > 0$, then we can take the extension of $K$ given by $z^q - \pi^n z = \pi^{1 - q}$. Namely, then we see that $y^q - \pi^{n + q - 1} y = \pi$ where $y = \pi z$. Taking $\pi_B = y$ we obtain the desired result.
Let $e$ be the ramification index of $C$ over $B$. If $e = 1$, then we are done. If not, then $e = p$ by Lemmas \ref{lemma-inequality} and \ref{lemma-ramification-index-a-power-of-p}. This in turn implies that the residue fields of $B$ and $C$ agree. Choose a uniformizer $\pi_C$ of $C$. Write $\pi_C^p = u \pi$ for some unit $u$ of $C$. Since $\pi_C^p \in L$, we see that $u \in B^*$. Also $M = L[\pi_C]$. \medskip\noindent Suppose there exists an integer $m \geq 0$ such that $$ u = \sum\nolimits_{0 \leq i < m} b_i^p \pi^i + b \pi^m $$ with $b_i \in B$ and with $b \in B$ an element whose image in $\kappa_B$ is not a $p$th power. Choose an extension $K \subset K_1$ as in Lemma \ref{lemma-make-degree-q-extension} with $n = m + 2$ and denote $\pi'$ the uniformizer of the integral closure $A_1$ of $A$ in $K_1$ such that $\pi = (\pi')^p + (\pi')^{np} a$ for some $a \in A_1$. Let $B_1$ be the integral closure of $B$ in $L \otimes_K K_1$. Observe that $A_1 \to B_1$ is weakly unramified by Lemma \ref{lemma-weakly-unramified-goes-up-along-totally-ramified}. In $B_1$ we have $$ u \pi = \left(\sum\nolimits_{0 \leq i < m} b_i (\pi')^{i + 1}\right)^p + b (\pi')^{(m + 1)p} + (\pi')^{np} b_1 $$ for some $b_1 \in B_1$ (computation omitted). We conclude that $M_1$ is obtained from $L_1$ by adjoining a $p$th root of $$ b + (\pi')^{n - m - 1} b_1 $$ Since the residue field of $B_1$ equals the residue field of $B$ we see from Lemma \ref{lemma-pre-purely-inseparable-case} that $M_1/L_1$ has degree $p$ and the integral closure $C_1$ of $B_1$ is weakly unramified over $B_1$. Thus we conclude in this case. \medskip\noindent If there does not exist an integer $m$ as in the preceding paragraph, then $u$ is a $p$th power in the $\pi$-adic completion of $B_1$. Since $B$ is Nagata, this means that $u$ is a $p$th power in $B_1$ by Algebra, Lemma \ref{algebra-lemma-nagata-pth-roots}. Whence the second case of the statement of the lemma holds.
Let $\pi \in A$ be a uniformizer. By Kummer theory (Fields, Lemma \ref{fields-lemma-Kummer}) $M$ is obtained from $L$ by adjoining the root of $y^p = b$ for some $b \in L$. \medskip\noindent If $\text{ord}_B(b)$ is prime to $p$, then we choose a degree $p$ separable extension $K \subset K_1$ totally ramified with respect to $A$ (for example using Lemma \ref{lemma-make-degree-q-extension}). Let $A_1$ be the integral closure of $A$ in $K_1$. By Lemma \ref{lemma-weakly-unramified-goes-up-along-totally-ramified} the integral closure $B_1$ of $B$ in $L_1 = L \otimes_K K_1$ is a discrete valuation ring weakly unramified over $A_1$. If $K \subset K_1$ is not a weak solution for $A \to C$, then the integral closure $C_1$ of $C$ in $M_1 = M \otimes_K K_1$ is a discrete valuation ring and $B_1 \to C_1$ has ramification index $p$. In this case, the field $M_1$ is obtained from $L_1$ by adjoining the $p$th root of $b$ with $\text{ord}_{B_1}(b)$ divisible by $p$. Replacing $A$ by $A_1$, etc we may assume that $b = \pi^n u$ where $u \in B$ is a unit and $n$ is divisible by $p$. Of course, in this case the extension $M$ is obtained from $L$ by adjoining the $p$th root of a unit. \medskip\noindent Suppose $M$ is obtained from $L$ by adjoining the root of $y^p = u$ for some unit $u$ of $B$. If the residue class of $u$ in $\kappa_B$ is not a $p$th power, then $B \subset C$ is weakly unramified (Lemma \ref{lemma-pre-purely-inseparable-case}) and we are done. Otherwise, we can replace our choice of $y$ by $y/v$ where $v^p$ and $u$ have the same image in $\kappa_B$. After such a replacement we have $$ y^p = 1 + \pi b $$ for some $b \in B$. Then we see that $P(z) = \pi b/ w^p$ where $z = (y - 1)/w$. Thus we see that the extension is a degree $p$ extension of finite level with $\xi = \pi b / w^p$.
Let $A \to C$ be a finite type ring map such that $B$ is a localization of $C$ at a prime $\mathfrak p$. Then $C' = C \otimes_A A'$ is a finite type $A'$-algebra, in particular Noetherian. Since $A \to A'$ is integral, so is $C \to C'$. Thus $B = C_\mathfrak p \subset C'_\mathfrak p$ is integral too. It follows that the dimension of $C'_\mathfrak p$ is $1$ (Algebra, Lemma \ref{algebra-lemma-integral-sub-dim-equal}). Of course $C'_\mathfrak p$ is Noetherian. Let $\mathfrak q_1, \ldots, \mathfrak q_n$ be the minimal primes of $C'_\mathfrak p$. Let $B'_i$ be the integral closure of $B = C_\mathfrak p$, or equivalently by the above of $C'_\mathfrak p$ in the field of fractions of $C'_{\mathfrak p'}/\mathfrak q_i$. It follows from Krull-Akizuki (Algebra, Lemma \ref{algebra-lemma-krull-akizuki} applied to the finitely many localizations of $C'_\mathfrak p$ at its maximal ideals) that each $B'_i$ is Noetherian. Moreover the residue field extensions in $C'_\mathfrak p \to B'_i$ are finite by Algebra, Lemma \ref{algebra-lemma-finite-extension-residue-fields-dimension-1}. Finally, we observe that $B' = \prod B'_i$ is the integral closure of $B$ in $L' = (L \otimes_K K')_{red}$.