How to show a morphism is etale? I was read this paper.
Proposition 2.6: there is a morphism between schemes (actually between closed sets in projective spaces over $\mathbb{C}$) $f:X\to Y$. We want to show it is etale at some point $x$. We also know the fiber at $y:=f(x)$ contains only $x$. Then the author construct the following Cartesian diagram which I do not think make sense:
$$
\require{AMScd}
\begin{CD}
Z @>>> X\\
@V{f'}VV @VV{f}V \\
\mathrm{Spec}(\mathscr{O}_{Y,y}) @>>> Y
\end{CD}$$
And he claims: $a'$ is finite morphism, assume $Z=\mathrm{Spec}(B)$ (locally?), $B$ is $\mathscr{O}_{Y,y}$-algebra that is finite and local. By Nakayama, we will get $B\cong\mathscr{O}_{Y,y}$?
First $\mathrm{Spec}(\mathscr{O}_{Y,y})$ looks weird to me. I have never used this construction.
Second, what is $Z:=\mathrm{Spec}(\mathscr{O}_{Y,y})\times_Y X$, does it have anything to do with $\mathscr{O}_{X,x}$? If we want to show the etaleness of $f$, we need to show some properties of the stalk at $x$ but it never appears. I don't see why this is enough to say $f$ is etale.
 A: The fact that the morphism is between projective varieties is actually important to this proof. As projective varieties, $X$ is proper and $Y$ is separated, so the map $f:X\to Y$ is proper. By upper semicontinuity of fiber dimension, there exists a neighborhood $U$ of $y$ so that $f^{-1}(U)\to U$ is quasifinite, and as quasifinite + proper = finite, we have that $f^{-1}(U)\to U$ is actually a finite morphism. We rewrite our diagram to update our situation:
$$
\require{AMScd}
\begin{CD}
Z @>>> f^{-1}(U) @>>> X\\
@V{a'}VV @V{a|_U}VV @VV{a}V \\
Spec(\mathcal{O}_{Y,y}) @>>> U @>>> Y
\end{CD}$$
where $a|_U$ is finite. Then $a'$ is the base change of a finite morphism and thus is also finite - in particular, it's affine, so $Z$ is affine as well, so writing $Z=\operatorname{Spec} B$ makes sense. If one can show that $B$ is flat over $\mathcal{O}_{Y,y}$ then it must be free and then via Nakayma isomorphic to $\mathcal{O}_{Y,y}$ as there's an isomorphism after modding out by $\mathfrak{m}$ (as the fiber consists of one point). ($B$ is not a priori the local ring $\mathcal{O}_{X,x}$, but it is after a finite localization, which is etale.)
Unfortunately, there is a gap here according to what you've presented. Consider $X=\operatorname{Spec} k[x]/(x^2)$ and $Y=\operatorname{Spec} k$ with the natural map between them, which fulfills the assumptions you've mentioned in your post. Then $k[x]/(x^2)$ is a finite local $k$-algebra but it's not flat. You should search the paper for missing assumptions you have not included in your post (for instance, if $X$ is Cohen-Macaulay at $x$ and $Y$ is smooth at $y$, then this would suffice by miracle flatness).
