TITLE: Functorial point of view for formal schemes
QUESTION [22 upvotes]: Giving a scheme is the same as giving the corresponding functor from the category of rings to the category of set, and there are characterization of what functors arise in this way. This is explained in the book by Demazure and Gabriel.
This "functorial point of view" is sometimes very useful, so I was wondering whether there is something similar for formal schemes rather that algebraic schemes. I searched for this but I wasn't able to find anything, it seems that Demazure and Gabriel don't speak about formal schemes at all.
Ricky

REPLY [3 votes]: Although this doesn't cover every example, formal completions $\hat{X}_Y$  of a scheme $X$ along a closed subscheme $Y$ have a particularly nice functorial presentation. We have
$$\hat{X}_Y \simeq Y_{dR} \times_{X_{dR}} X.$$
Here the subscript $dR$ means we are considering the de Rham stack of a space $X$; i.e. the stack whose $S$-points are $\operatorname{Hom}(S^{red},X)$.
In general, a formal scheme is a ind-scheme $X$ that has a presentation
$$ X = \operatorname{colim}_{i \in I} X_i, $$
where each $X_i$ is a finite scheme and the transition maps $X_i \to X_j$ are closed embeddings. By definition, this colimit takes place in some category of sheaves (e.g. fppf) on the category of affine schemes, and therefore automatically has a functor of points interpretation.