Questions about Formal Schemes Set  $X$ be a scheme and $Y \subset X$ a closed subscheme given locally by ideal sheaf $I \subset \mathcal{O}_X$.
Then there exist formalism constructing from pair $(Y,I)$ the induced formal scheme $\hat{X}$ along $Y$ as follows:
For affine $Spec(A) := U \subset X$ define $\widehat{U}_Y:= Spec \varprojlim_n A/I^n= \varinjlim_n Spec(A/I^n)$. 
This gives $(\widehat{X},\mathcal{O}_{\widehat{X}})$. Take into account that topologically $\widehat{X}=Y$.
Two questions:


*

*Locally, by construction the affine pieces of $\widehat{X}$ are completions with respect to the ideal $I$. Why is it then that the stalks $\mathcal{O}_{\widehat{X},x}$ in general not complete? (see comment at page 1 from:
https://www.uni-due.de/~mat903/sem/ws0809/material/Minicourse_FormalGeometry.pdf)

*Could anybody tell me what is the philosophic meaning of this formal scheme and it's main application in Grothendieck's (generalized) algebraic geometry considering not more only analytic spaces/varieties but passing to general base scheme $X \to S$?
My intuition is that one wants to study what happens "locally" in analytic sense (so with a topology which allows to stydy infinisesimal bahavior like in case of real of complex fields) since the Zariski topo is just to coarse.
Could anybody sumarize (if my intuition is correct) the most important resuls from study of real/complex analytic spaces which can be "transfered" with this concept of formal scheme to (algebraic) algebraic geometry :) in appropriate way?
I think that the goal mith be that if one have some strong theorems in classical analytic geometry (so study of analytic spaces in complex algebraic geometry) there might be possible to develop techniques as given in this "formal scheme" concept allows looking for a analog/similar statement for general schemes/ sheaves over arbitrary ring or field.
Looking throught the linked paper above one nice example for such correspondent result is 2.3.3 Corollary:
Theorem on formal functions. 
Are there more? 
 A: In the question it says $``\hat U_Y = $ $$\text{Spec} \varprojlim A/I^n = \varinjlim \text{Spec}\, A/I^n"$$ but this is not correct; these two ringed spaces are not equal, and even the underlying topological spaces are not equal. For example, take $A = k[x]$ and $I = (x)$. On the left hand side $$\text{Spec} \varprojlim\, k[x]/(x)^n = \text{Spec}\, k[[x]]$$ which is Spec of a DVR and has two points $(0), (x)$. On the right hand side, $\varinjlim\, \text{Spec}\, A/I^n$ is a colimit where each topological space has just a single point $(x) \in \text{Spec}\, k[x]/x^n$. In particular, the resulting ringed space is not a scheme. (Formal schemes usually aren't schemes, just ringed spaces.)
The same goes for the example in the comments, $\text{Spec}\, \mathbb Z_p$ is Spec of a DVR, has two points, while the formal spectrum of the point $\text{Spec}\, \mathbb F_p \hookrightarrow \text{Spec}\,\mathbb Z$ is a formal scheme with one point, and global sections equal to $\mathbb Z_p$ (thus not a scheme).
Besides not being equal to Spec of their global sections at the point-set level, formal schemes also behave differently algebraically than schemes when passing to an open set. For an affine scheme with global section $f \in A$, the open set $D(f)$ has global sections $A_f$. This will not be the case for formal schemes, as the localization happens before completion. When $A = k[x,y], I = (x), f = y$ for instance, on the open set $D(y)$ you can have elements like $\sum (x/y)^n$ where the power $y$ in the denominator is unbounded. There is no such element in $k[y][[x]]_y$.

As for your first question, the formal neighborhood of a point will have a complete stalks, but when the dimension of the subscheme is higher the formal neighborhood will not be complete. Intuitively this is because the formal neighborhood construction only takes the completion in directions orthogonal to the subscheme you complete.
Going back to the $k[x,y], I=(x)$ example, the stalk is complete "with respect to $x$" but not with respect to $y$. In other words, the stalk would be $k[x,y]_{(x,y)}[[t]]/(t-x)$ which is not a complete local ring, the completion being $k[x,y]_{(x,y)}[[t,s]]/(t-x,y-s)$ .
