Conditions under which a bijective morphism of quasi-projective varieties is an isomorphism? I'm reading a paper by Nakajima (Quiver Varieties and Tensor Products), and I'm having a hard time understanding his proof of Lemma 3.2. Essentially, we have two (quasi-projective) varieties, say $X$ and $Y$, that we would like to show are isomorphic. The proof uses the following argument:
(1) Construct a bijective morphism $f:X \to Y$.
(2) Show that $\mathrm{d}f: T_x(X) \to T_{f(x)}(Y)$ is an isomorphism for all $x \in X$ (where $T_x(X)$ is the tangent space of $X$ at $x$).
From (1) and (2), he concludes that $f$ is an isomorphism. My question is, how can one conclude that $f$ is an isomorphism from (1) and (2)? According to Joe Harris's Algebraic Geometry (specifically Theorem 14.9 and Corollary 14.10), a bijection $f:X \to Y$ that induces an isomorphism on the tangent spaces is an isomorphism if $f$ is finite or if $X$ and $Y$ are projective (this is in general false otherwise). In our setting, $X$ and $Y$ are not projective and it is not obvious (to me, at least) that the map constructed by the author is finite. Does anyone know what conditions the author is using to conclude that (1) and (2) $\implies$ $f$ is an isomorphism?
 A: This question is a cross-site duplicate at MO. This is a community wiki recording the highest-voted answer there, so that this question can be marked as "answered" once this post is upvoted.

Jason Starr's answer:
As CamSar notes, if you assume that $Y$ is smooth, the result is true.  In fact, if you even just assume that $Y$ is normal and that $df$ is an isomorphism at the generic points, then Zariski's Main Theorem implies that $f$ is an isomorphism if $X$ is reduced and $f$ is bijective.  As Nakajima explains on the top of p. 12, his space $\mathfrak{M}(\mathbf{v},\mathbf{w})$ is smooth.  Moreover, the group action is by the linearly reductive group $\mathbb{G}_m$.  Thus the fixed point set $Y$ is smooth by "Iversen's theorem".  So that explains the result in Nakajima's paper.
Of course there are counterexamples when $Y$ is singular.  If you allow $X$ and $Y$ to be nonreduced, it is trivial to construct examples, as explained in the answers here.  However, your wording suggests that you are interested in the case when $X$ and $Y$ are integral varieties.  None of the previous answers seems to address that case.  So, just for the record, following is an example where $X$ and $Y$ are integral varieties, $f$ is bijective and isomorphic on Zariski tangent spaces, yet $f$ is not an isomorphism.  Note, the following morphism $f$ is not finite -- if it were, then the theorems mentioned in your comment would imply that $f$ is an isomorphism.
Beginning with $\mathbb{A}^2$ with coordinates $(x,y)$, let $Y$ be the plane curve $$ Y = \{(x,y)\in \mathbb{A}^2 : y^4+y^2x-x^3 = 0 \}.$$  This is an irreducible curve with a unique singular point at $(x,y)=(0,0)$.
Next, beginning with $\mathbb{A}^3$ with coordinates $(u,v,w)$, let $X$ be the curve $$X = \{(u,v,w)\in \mathbb{A}^3 :(v+1)w-1 = v^3+v^2-u^2=0\}. $$
Projection from $X$ to the $(u,v)$-plane is a locally closed immersion with image the complement of $(0,-1)$ in the plane curve with equation $v^3+v^2-u^2$.  In particular, $X$ is an irreducible curve with a unique singular point at $(0,0,1)$. Now consider the morphism,
$$ F :\mathbb{A}^3 \to \mathbb{A}^2, \ \ f(u,v,w) = (u,v^2+v).$$
I claim that $F(X)$ equals $Y$, and the restriction morphism,
$$ f :X \to Y,$$
is a bijection that induces isomorphisms on all Zariski tangent spaces.  The simplest way to prove this is to first normalize $X$ and $Y$.  In the function field of $X$, observe that the following monic equation holds,
$$ t^2 - (v+1) = 0, \ \ t = u/v.$$
Thus, $k[t]$ is a subring of the integral closure of the fraction field.  But, of course, $v = t^2 - 1$ and $u = t(t^2-1)$ are already in $k[t]$.  Finally, $w = 1/t^2$ is in the integral closure.  Thus, the integral closure of $k[X]$ equals the integral closure of $k[t][1/t^2]$, which is already the integrally closed ring $k[t][1/t]$.  So the normalization of $X$ is just $$\nu:  \mathbb{G}_m \to X, \ \ \nu(t) = (t(t^2-1),t^2-1,1/t^2).$$
In particular, the composition with $F$ is,
$$ F\circ \nu: \mathbb{G}_m \to \mathbb{A}^2, \ \ F(\mu(t)) = (t(t^2-1),t^2(t^2-1)).$$  By the same argument as above, the normalization of $Y$ is,
$$ \mu: \mathbb{A}^1 \to Y, \ \mu(t) = (t(t^2-1),t^2(t^2-1)).$$
Thus, $F\circ \nu$ is just the restriction of the normalization $\mu$ to the open $\mathbb{G}_m\subset \mathbb{A}^1$.
Since $F\circ\nu$ factors through the normalization of $Y$, in particular $F(X)$ is contained in $Y$.  Denote by $f$ the restriction.  Moreover, since $\nu$ is a bijection except over $(0,0,1)$, also $f$ is injective at that point.  Similarly, since the domain of $F\circ \nu$ contains every point except $t=0$, the image of $f$ contains every point, except possibly $\mu(0)=(0,0)$.  But by direct computation, the inverse image under $f$ of $(0,0)$ is precisely $(0,0,1)$.  Therefore $f$ is bijective.
Since $f$ matches up normalizations, $f$ is an isomorphism at every point where the normalization morphisms $\nu$ and $\mu$ are isomorphisms, i.e., everywhere except $(0,0)$ in $Y$ and $(0,0,1)$ in $X$.  In particular, except possibly at those points, $df$ is an isomorphism.  Finally, by direct computation, $df$ is an isomorphism at the point $(0,0,1)$: both Zariski tangent spaces are two dimensional, and $df$ is an isomorphism between them (just linear projection, really).
Finally, $f$ is not an isomorphism.  If $f$ were an isomorphism, it would induce an isomorphism of normalizations.  But the induced morphism of normalizations is the non-surjective inclusion, $\mathbb{G}_m\subset \mathbb{A}^1$.
A: Example: $X=\{xy=0\}\sqcup \{x+y, x\ne 0\}$, consider the tautological map to $X\to Y\subset C^2$,
$$
Y=\{xy(x+y)=0\}.
$$
This is a bijection (to $Y$), isomorphic on Zariski tangent spaces (at every point), but not an isomorphism. I can also give an irreducible example, but I hope you see what is going on.   
Edit: the right local condition I think is an induced isomorphism of completed local rings. 
