
> 
> **Zariski's Main Theorem** ([EGA IV](http://www.numdam.org/numdam-bin/fitem?id=PMIHES_1966__28__5_0), Thm 8.12.6): Suppose $Y$ is a quasi-compact and quasi-separated scheme, and $f:X\to Y$ is quasi-finite, separated, and finitely presented. Then $f$ factors as $X\xrightarrow{g} Z\xrightarrow{h} Y$, where $g$ is an open immersion and $h$ is finite.
> 
> 
> 


Is there a canonical choice for the factorization $f=h\circ g$, at least under some circumstances? 



For example, suppose $f$ factors as $X\to U\to Y$, where $X\to U$ is finite étale and $U\to Y$ is a Stein open immersion (i.e. the pushforward of $\mathcal O\_U$ is $\mathcal O\_Y$). Then I'm pretty sure the Stein factorization $X\to \mathit{Spec}\_Y(f\_\*\mathcal O\_X)\to Y$ witnesses Zariksi's Main Theorem (i.e. is an open immersion followed by a finite map).



In general, when does the Stein factorization witness ZMT? In the cases where it fails to witness ZMT (e.g. $X$ finite over an affine open in $Y$), is there some other canonical witness?



Does Zariski's Main Theorem come with a canonical factorization?
I think an initial object exists if you work with integral excellent schemes (maybe integral is not really necessarily, but then require that $X$ be schematically dense in $Z$). 


So suppose $X, Y$ are integral and excellent. Consider all possible factorizations $X\to Z\_{\alpha} \to Y$ with $Z\_{\alpha}$ integral. Then $K(Z\_{\alpha})=K(X)$. For any pair $Z\_{\alpha}, Z\_{\beta}$, the closure $Z\_{\gamma}$ of $X$ in $Z\_{\alpha}\times\_Y Z\_{\beta}$ gives a factorization $X\to Z\_{\gamma}\to Y$ with $Z\_{\gamma}$ dominating $Z\_{\alpha}$ and $Z\_{\beta}$, finite over $Y$, and $X\to Z\_{\gamma}$ is an open immersion (one checks that $X\to Z\_{\gamma}$ is an immersion, hence open in some closed subscheme $F$, but $X$ is birational to $Z\_{\gamma}$, so $F=Z\_{\gamma}$). Thus we can consider the projective limite $Z$ of the $Z\_{\alpha}$'s. 


By construction $Z$ is affine and integral over $Y$. As $Z\_{\alpha}$ is dominated by the normalization $\widetilde{Y}$ of $Y$ in $K(X)$ and $\widetilde{Y}$ is finite over $Y$ by excellent hypothesis, $Z$ is finite over $Y$. It remains to see that the canonical map $X\to Z$ is an open immersion. This property is local over $Y$. So we suppose $Y$ is affine. Cover $X$ by principal affine open subsets $D(h)$'s of some $Z\_{\alpha\_0}$. Then $D(h) \to D\_Z(h)$ is a closed immersion because $D(h)\to D\_{Z\_{\alpha\_0}}(h)$ is, and it is birational, so it is an isomorphism and we are done. 


It would interesting to compute explicitely the projective limite in some concrete situations. For exemple, consider a surface $S$, finite over $\mathbb A^2\_{\mathbb C}$, with non-normal locus $\Delta$. Let $X$ be an open subset of $S$ with $\Delta\cap X$ non-empty and not equal to $\Delta$. The inclusion $X\to S=Z\_{\alpha\_0}$ is a factorisation. But what is the $Z$ constructed as above ? 


