Let me for simplicity start with affine case. If $X=\operatorname{Spec}(A)$ is an affine variety $Z \subset X$ is a closed affine subvariety $Z=\operatorname{Spec}(A/I)$. What conditions are sufficient to say that completion of the (total space of) normal bundle $N_{Z/X}$ along zero section is isomorphic to the completion of $X$ along $Z$?

$\begingroup$ Nonexample: $Z$ a cusp in a curve $X$. Then the normal bundle and its completion are nonreduced, but the completion in $X$ is reduced. (So whatever condition you use must rule that out.) $\endgroup$ – Allen Knutson Mar 8 '14 at 13:23

$\begingroup$ Yes, in fact I'm ready to assume that $X$ and $Z$ are smooth. $\endgroup$ – Sasha Pavlov Mar 8 '14 at 14:00

$\begingroup$ Suppose for a moment that the ideal $Z$ is generated by an element, which is not a zero divisor and that $Z$ is smooth over the base field. Then Lemma 3.6 in 'Differential algebra  a scheme theory approach' by H. Gillet will prove that the answer is yes. Note that the isomorphism depends on the choice of a derivation. The general case (if $Z$ is smooth) should be provable along the same lines. For a general schematic regular immersion, I think this still works, if you can produce the relevant derivations (my guess is: if the normal bundle is trivial). $\endgroup$ – Damian Rössler Mar 8 '14 at 18:18

1$\begingroup$ PS The above is only valid in char. 0 because it uses the exponential map. $\endgroup$ – Damian Rössler Mar 8 '14 at 18:32

$\begingroup$ It's true if $X$ is a bundle over $Z$. Then the completion is a bundle, and the automorphism group of the bundle is an extension of $GL_n$ by a unipotent group. The bundle is classified by cohomology of this group. $GL_n$ cohomology is just a vector bundle, the normal bundle. Unipotent cohomology on an affine variety is trivial, so it's just the completion of the normal bundle. $\endgroup$ – Will Sawin Mar 8 '14 at 20:12
The formal completion of $X$ along $Z$ is always isomorphic to that of the normal bundle $N_{Z \subset X}$ along its zero section if $X= \mathrm{Spec}(A)$ and $Z = \mathrm{Spec}(A/I)$ are smooth and affine over some base $k$. If the affineness or smoothness assumption is dropped, it is easy to give counterexamples.
It's easier to work in the world of algebra, so I will show that there exists an isomorphism of $k$algebras
$$\widehat{\mathrm{Sym}}_{A/I}(I/I^2) \to \widehat{A}$$
compatible with the projection down to $A/I$. Here $\widehat{A}$ is the $I$adic completion of $A$, and $\widehat{\mathrm{Sym}}_{A/I}(I/I^2)$ is the completion of the symmetric algebra $\mathrm{Sym}_{A/I}(I/I^2)$ along the augmentation ideal.
By the infinitesimal criterion for smoothness, one can find a compatible system of $k$algebra maps $\epsilon_n:A/I \to A/I^n$ lifting the projection $A/I^n \to A/I$. In the limit, we obtain a $k$algebra map $\epsilon:A/I \to \widehat{A}$ lifting the projection $\widehat{A} \to A/I$. Using $\epsilon$, we view $\widehat{A}$ and each quotient $A/I^n$ as $A/I$algebras.
Now the $A/I$module $I/I^2$ is a projective module as $X$ and $Z$ are smooth. There is an obvious $A/I$module map $I/I^2 \to A/I^2 \simeq \widehat{A}/I\widehat{A}^2$. By projectivity, one can find an $A/I$module map $I/I^2 \to \widehat{A}$ lifting the previous one. By the universal property of the symmetric algebra, this extends to an $A/I$algebra map $\mathrm{Sym}_{A/I}(I/I^2) \to \widehat{A}$. As both sides are augmented over $A/I$, this naturally extends to an $A/I$algebra map $\widehat{\mathrm{Sym}}_{A/I}(I/I^2) \to \widehat{A}$; by filtering both sides suitably, one can check that this is an isomorphism.

$\begingroup$ I think you need to complete the symmetric algebra along the augmentation ideal to get the iso. of $k$algebras you mention. $\endgroup$ – Damian Rössler Mar 9 '14 at 13:27
This is exactly the same answer as that of anonymous (which was 12 minutes earlier). So please read that one.
Suppose that $R$ is a ring and that $X$ is a scheme over $R$. I think the question is whether there exists an $R$algebra ismorphism $$ A^\wedge \cong A/I[[I/I^2]] $$ where the left hand side is the $I$adic completion of $A$ and the right hand side is completion of the symmetric algebra on $I/I^2$.
Let's assume for simplicity that $I$ is finitely generated, so that we know that $A^\wedge$ is complete.
To get such an isomorphism, the first thing we want is section $\sigma : A/I \to A^\wedge$ to the canonical map $A^\wedge \to A/I$. Besides $\sigma$ we want a map $\tau : I/I^2 \to A^\wedge$ which is $A/I$linear (here we are using $\sigma$), maps into the kernel $IA^\wedge$ of the canonical map $A^\wedge \to A/I$ and then induces an isomorphism $I/I^2 \to IA^\wedge/I^2A^\wedge$. Given $\sigma$ and $\tau$ we can at least define an $R$algebra map $$ A/I[[I/I^2]] \longrightarrow A^\wedge $$ In general the existence of $\sigma$ and $\tau$ is not good enough to imply that this map is an isomorphism. But if you assume for example that $I$ is a quasiregular ideal then it is an isomorphism (follows more or less immediately from the definition of quasiregular ideals).
If both $A$ and $A/I$ are smooth over $R$, then $\sigma$ and $\tau$ exist and the resulting map is an isomorphism. The existence of $\sigma$ for example follows because $A/I$ is formally smooth over $R$, hence we can successively lift the map $\text{id} : A/I \to A/I$ to $A/I \to A/I^n$ and taking the limit gives $\sigma$. Then existence of $\tau$ comes from the fact that in this case the module $I/I^2$ is a finite projective $A/I$module, hence there are no obstructions to lifting the linear map $I/I^2 \to A/I^2$ to $I/I^2 \to A/I^n$ and we can take the limit. Finally, the ideal defining a closed immersion of schemes smooth over $R$ is a regular ideal, see for example the more general Lemma Tag 067T.
If you are unfamiliar with some of the terms used above please try using the search function of the Stacks project to find their definitions. Moreover, some of the statements used above about completions of rings aren't entirely trivial and can be found there as well.

$\begingroup$ Or see EGA $0_{\rm{IV}}$ 19.5.4 with some extra topological pizzazz (that can be ignored, using discrete topologies). They use the older technique of extensive crossreferencing to substitute for the lack of search functions in physical books. :) $\endgroup$ – user76758 Mar 9 '14 at 3:46

$\begingroup$ Of course it would be trivial to set up such a search function for an online version of EGA, but that would probably run into legal issues having to do with copyright. $\endgroup$ – answer_bot Mar 9 '14 at 11:21