TITLE: Can isomorphisms of schemes be constructed on formal neighborhoods?
QUESTION [6 upvotes]: Let (A,m) be a complete local Noetherian ring and let X and Y be two schemes of finite type over A (and flat over A). Let Xn and Yn be the reductions of X and Y mod mn+1.

Question: Suppose there is a compatible system of isomorphisms between Xn and Yn (for all n). Does there necessarily exist an isomorphism between X and Y over A?

In other words, suppose the formal schemes \hat{X} and \hat{Y} are isomorphic; are X and Y isomorphic? 
Remark: The answer is `no' if we drop flatness (you can just stick an extra component over the generic fiber) or finite type (A[t] vs. A{t} = the completion of A[t]).

REPLY [4 votes]: In David S.'s example, I don't see a compatible sytem of isomorphisms $X_n\to Y_n$. Here is a similar example with the required properties. 
Let $A=k[[t]]$, let $Y={\rm Spec} A[x]]$ be the affine line over $A$ and $X=Y\setminus \{ y_0 \}$, where $y_0$ is the closed point of $Y$ corresponding to the ideal $(1-tx)A[x]$ (the quotient ring is $A[1/t]=k((t))$). 
Then the canonical inclusion $X\to Y$ induces clearly a compatible system of isomorphisms $X_n\to Y_n$ 
for all $n\ge 1$ (they are actually identities), and of course $X$ is not isomorphic to $Y$. 
The reason behind is that the point $y_0$ is invisible in all the formal neighborhood of the closed fibler of $Y\to {\rm Spec } A$. 
In general, a compatible system of isomorphisms $X_n\to Y_n$ induces an isomorphism between the formal schemes $\hat{X}\to \hat{Y}$. When $X, Y$ are projective, one can use GAGA to show that this isomorphism comes from an isomorphism $X\to Y$. This gives an alternative proof to the use of ${\rm Hom}(X, Y)$.