# A finite morphism $A\to B$ can be decomposed into a finite étale morphism followed by a finite morphism.

I have spent quite some time attempting to solve the following problem:

Let $A\to B$ be a finite homomorphism of Noetherian rings. We suppose that $A$ is a complete local ring, with residue field $k$. Let $k^\prime$ be the largest sub-$k$-algebra of $B\otimes_A k$ that is separable over $k$. Show that $A \to B$ decomposes into a finite étale homomorphism $A\to C$ followed by a finite homomorphism $C\to B$, with $C$ simple over $A$ (i.e., $C = A[c]$ for some $c\in C$) and $C\otimes_A k = k^\prime$.

So, as $B$ is an $A$-algebra, I want to start by writing $B = A[x_1,\cdots, x_n]/I$ for some ideal $I$, and then take $C = A[x_1, \cdots, x_n]$, hoping at the end that $n$ necessarily was $1$, but I have no idea why that might be the case. I really don't see another way to begin though, but if this is the wrong way to even start, I would appreciate any hints that you have to offer.

Thanks! :)

I think the statement has a counterexample. Suppose $$A = \mathbb{F}_2$$ and $$B=A^3$$. Then $$C = B$$, which cannot be expressed as a quotient of $$A[X]$$ as $$A[X]$$ only has two $$A$$-valued points.
If $$B$$ is local, then the statement is true. In this case, $$k'(\subseteq B\otimes_A k)$$ is a field because $$B\otimes_A k$$ is local.
$$k'$$ is finite separable over $$k$$ so that we have a monic polynomial $$f\in A[X]$$ such that $$k'\cong k[X]/(f(X))$$. Here, we denote the image of $$f$$ in $$k[X]$$ also by $$f$$. $$C:=A[X]/(f(X))$$ is finite etale over $$A$$ (with special fiber obviously $$k'$$). Indeed, the finiteness is obvious while for the etaleness, we are reduced to show it at the closed point of $$\operatorname{Spec} C$$ because the etale locus is open. But, $$A\to C$$ is flat and the special fiber of $$A\to C$$ is the etale $$k\to k'$$, implying what we want by the fiber criterion. Alternatively, we can directly calculate $$\Omega_{C/A}^1$$ and conclude it's $$0$$ by NAK.
$$C\to B$$ is finite as $$A\to B$$ is.